I was recently writing a server status report program to check the statuses of
servers and produces a text file report (stunning good naming scheme I know)
and I ran into an error that was quite perplexing mostly because it shouldn't
have been happening for various apparent reasons. On launch of a unit test, I
received the error

----
Could not load file or assembly 'file:///<insert network drive path here><insert project path here>binDebugsome.dll' or one of its dependencies.
Operation is not supported. (Exception from HRESULT: 0x80131515)
----

This is quite the problem since unit testing is a wonderful thing sent down
from God Himself to bless us developers (who ever said God wasn't good?). **The
problem here is that Visual Studio won't load in untrusted assemblies**, and
assemblies on a networked drive are not considered trusted, *. That being said,
to fix this problem, all we need to do is allow remote sources to be loaded in.
Here's how...

Open up **C:\Program Files\Microsoft Visual Studio
10.0\Common7\IDE\devenv.exe.config**. Near the top of the configuration file
(mine was line 10) you should see an xml parent of **<runtime>**. Directly
beneath that add *<loadFromRemoteSources enabled="true" />*

image:files/devenvConfig.jpg[height=300]

Save and close out *devenv.exe.config* and restart visual studio. On restart,
you should now be able to debug using assemblies in remote locations.


Category:Microsoft

Category:Visual_Studio


// vim: set syntax=asciidoc:
