2

How do I create a Visual Studio Project for Development on my Local PC that links to Existing files and folders on a Server?

My employer has a large website. Most of that girth (close to 100 GB) is contributed to Portable and Image document (i.e. PDF and JPEG) files, but there are also numerous web files (.html, .aspx, .php, etc).

We have the following folders:

  • a WORKING folder that contains everything that is "Live" on our web server.

  • a BETA folder that contains newest technologies that are being tested and tried.

  • a DEVELOPMENT folder that contains numerous copies of projects that are being worked on by the different developers.

Developers are allowed to use whatever tools they prefer, so we have people who develop using Notepad++, Dreamweaver, Komodo, Zend Studio, and (now) Visual Studio.

It is NOT OK for me to create Visual Studio Projects for myself on the network servers. Other developers using other tools are not creating solution files or \bin and \obj folders on the servers, and I certainly should not be either.

So, to work on a file in Visual Studio, I use Windows Explorer to browse to the location, then I open it in the IDE.

However, this causes me to lose a lot of the power of Visual Studio - particularly if other classes used in this file, because I would have no access to the Intellisense for that class and I cannot simply Right-Click and go to definition.

Also, since each development environment is so large, I can not copy them to my laptop with its high tech 125 GB Solid State Drive (should be interesting to read that in a couple of years).

screenshot

What I would like to do is create the Visual Studio Projects on my local drive, and then have them reference the files and folders on our network.

screenshot

I've looked and found these similar questions, but my goal is slightly different:

These are all great topics, but none of them show a way to create a local project that uses remote files.

It would seem that developers in large company teams would have already developed a way to do this, and that I just do not know what it is called.

Community
  • 1
  • 1
  • The best way is to use a source control solution that keeps the source control data on the server, and have a local solution under source control. – Robert Harvey Nov 21 '13 at 20:33
  • Agreed, but I'd quickly run out of room on my hard drive. –  Nov 21 '13 at 20:40
  • Really? The project I'm currently working on has about 300 classes in it. It weighs about 40 megabytes. You can't afford 40 megabytes? – Robert Harvey Nov 21 '13 at 20:41
  • The source control projects are all about 100 GB. I could possibly load and work with 1 project at a time, but then I'd have to completely delete it to load one of the other projects ...unless I'm missing some feature of version control that says I don't have to sync up with everything (like the PDFs and Image files). –  Nov 21 '13 at 20:57
  • Do you really need all those PDFs and JPEGs there? You can't reasonably open 100 GB Visual Studio solutions. VS lags on 50-100 MB solutions, I can't even imagine what it would do on 100 GB. – Roman Nov 21 '13 at 21:15
  • I don't know. I'm the new guy on this project, and everyone else uses Notepad++. They know the code and the structure of this project, though. I don't. They also use Tortis for their Repository, and I don't really know how to get VS to hook up to it when VSS is already installed. –  Nov 21 '13 at 21:49
  • @RobertHarvey: I found a solution! :) –  Nov 26 '13 at 19:51

1 Answers1

2

I have found a way to do this!

For a long time, I was working with 2 sets of folders. One for our repository and one for Visual Studio.

I'd make changes in Visual Studio, then copy those working files over to the repository folder.

That was time consuming! Very.

Here is how I found to fix it: Open the Visual Studio Project file (*.csproj, *.vbproj, or *.phpproj) in NOTEPAD with Visual Studio closed.

Locate the <ItemGroup> tab, and change every path to be from the one shown to one that uses a relative path to get to the actual files.

screenshot Notepad

Notepad's Replace... CTRL+H will save you hours here!

screenshot Replace

It makes a funky looking project environment, but it works!

screenshot of VS2010

If this helps anyone else or if it were even something you didn't know you could do to manipulate Visual Studio, kindly vote it up.

  • Why would you want to do this, when you could just put the code into a source control solution, which you should already be doing anyway? – Robert Harvey Nov 26 '13 at 19:52
  • 1
    It is already in a source solution - just not Microsoft's. The files are already existing and used by many other developers. I am new, and I wanted a way to load, edit, and submit changes using Visual Studio. The other guys all use Notepad, Eclipse, or JetBrains. I prefer the Visual Studio IDE. –  Nov 27 '13 at 02:42