Monday, April 12, 2010
VS 2008 FullTrust Network Share in VS 2010
System.IO.FileLoadException: Could not load file or assembly
System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
That link didn't offer much help. Running CasPol from C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 was not supposed to do anything in VS 2010.
I came across the following post, http://social.msdn.microsoft.com/Forums/en-US/webdevelopmentprerelease/thread/ea9b9cab-cbfd-496d-8a81-7b3dd06e8c23
Closing VS 2010, then opening the %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config file and adding the loadFromRemoteSources element as follows:
<loadFromRemoteSources enabled="true" />
Worked wonders. My VS 2008 projects now run without a hitch in VS 2010.
Subscribe to Posts [Atom]