How to run Unit Tests From Network Drive

When loading a test project from a network drive, Visual Studio builds the projects fine, but when running the test project Visual Studio shows the error:
“Error loading \\\XYZ\Main\XYZ.Framework.Test\bin\Debug\XYZ.Framework.Test.dll: Could not load file or assembly ‘file:///Z:\Projects\XYZ\Main\XYZ.Framework.Test\bin\Debug\XYZ.Framework.Test.dll’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)” in the output window and does not continue.

The solution is to set COMPLUS_LoadFromRemoteSources = 1 in the environment variable.


2 thoughts on “How to run Unit Tests From Network Drive

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>