Search code examples
.netvisual-studio.net-4.0visual-studio-2012unc

Give FullTrust to UNC share for Visual Studio 2012 and .Net 4.0


Everytime I try to open a solution that is located on a UNC share I get this dialog:

enter image description here

I've tried using the caspol.exe utility that Hanselman talks about here, but it doesn't seem to work. At least not for a .Net 4 project runing in Visual Studio 2012. Running the .NET 4 version of caspol with the same arguments I get this message:

WARNING: The .NET Framework does not apply CAS policy by default. Any settings
shown or modified by CasPol will only affect applications that opt into using
CAS policy.

Please see http://go.microsoft.com/fwlink/?LinkId=131738 for more information.

I followed that link but nothing seemed to make sense to me.

To give a little context about what I'm doing, I have Windows 7 running as VM (via VirtualBox) on my mac. I setup an SMB network share on my mac which I'm able to connect to successfully from my VM. However trying to load the solution keeps giving me this error. I know I can "un-check the box" and load everything but I want to know how to fully trust the location.


Solution

  • Can you disable this in "Tools>Options>Projects and Solutions>Warn user when project location is not trusted"? This setting was actually broken in VS 2010, but it's indicated as fixed now for 2012.