Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keeping Visual Studio Projects on a Network Drive

We just did a move from storing all files locally to a network drive. Problem is that is where my VS projects are also stored now. (No versioning system yet, working on that.) I know I heard of problems with doing this in the past, but never heard of a work-around. Is there a work around?

So my VS is installed locally. The files are on a network drive. How can I get this to work?

EDIT: I know what SHOULD be done, but is there a band-aid I can put on right now to fix this and maintain the network drive?

EDIT 2: I am sure I am not understanding something, but Bob King has the right idea. I'll work with the lead web developer when he gets back into the office to figure out a temporary solution until we get some sort of version control setup. Thanks for the ideas.

like image 710
Mike Wills Avatar asked Oct 01 '08 20:10

Mike Wills


People also ask

Where should I save my Visual Studio projects?

If you save the project (File → Save All) then you can choose where to save it. The default is the Projects folder inside your Documents.

How do I change folder location in Visual Studio?

If you've already installed it and want to change the location, you must uninstall Visual Studio and then reinstall it. In the Shared components, tools, and SDKs section, select the folder where you want to store the files that are shared by side-by-side Visual Studio installations.

How do I host a network drive?

In Windows 10 and 8.1, select This PC > Computer > Map network drive. On Windows 7, it's Computer > Map network drive. From the Map Network Drive window, choose the drive letter you wish to use. Check Reconnect at sign-in if you want to map the drive each time you log into Windows.


2 Answers

While we do use Source Control, we do also run all our projects from Network Drives (not shared directories, private directories on network drives). The network drives are backed up nightly, and also use Volume Shadow Copy, so if you need to revert to something before it made it's way to SC, then you can.

To get projects to run correctly with the right permission, follow these steps.

Basically, you've just got to map the shared directory to a drive, and then grant permission, based on that Url, to all code. Say you map to "N:\", then use "N:\*" as your Url pattern. It isn't obvious you need to wildcard, but you do.

like image 197
Bob King Avatar answered Oct 01 '22 10:10

Bob King


The question is rather generic so I'll give an answer to one issue I was facing.

I run Visual Studio 2010 using a Parallels virtual machine on my Mac while keeping all my projects on the mac side via a network share. Visual Studio however wouldn't load the projects assembly files from there. Trying to set the rights using "caspol" alone didn't help in my case.

What finally worked for me to allow Visual Studio to load assemblies from a network share was to edit the file "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config" (assuming a default installation).

in the xml "<runtime>" section you have to add

<loadFromRemoteSources enabled="true"/> 

You may have to change the permissions on that file to allow write access. Save the file. Restart Visual Studio.

like image 35
fschaper Avatar answered Oct 01 '22 10:10

fschaper