Tuesday, May 22, 2012

Running Unit Tests From Network Drive

I used visual studio 2010 to create some unit tests for a custom application and I got the following error message "Error loading U:\Visual Studio 2010\Projects\LoyaltyViewer\LoyaltyViewerTest\bin\Debug\LoyaltyViewerTest.dll: Could not load file or assembly 'file:///U:\Visual Studio 2010\Projects\LoyaltyViewer\LoyaltyViewerTest\bin\Debug\LoyaltyViewerTest.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)". I googled the problem and what I found what the problem was. It appeared that visual studio could not load the assembly from a remote drive. To fix the problem, I followed the instructions from this post. The workaround is to create set COMPLUS_LoadFromRemoteSources=1.


Open a command prompt and type "setx COMPLUS_LoadFromRemoteSources 1"

or

Create an environment variable named COMPLUS_LoadFromRemoteSources
Set the value to 1

No comments:

Post a Comment