I had a simple C# program that had a set of Unit Tests. This was developed on Visual Studio 2010. Now on another computer I tried to reload this solution with Visual Studio 2012 and run the tests. I was able to rebuild the solution successfully however none of the unit tests show up in Test Explorer. The Visual Studio project (solution) was located on a LaCie Ethernet network drive. I copied the entire solution to my local C: drive, closed the solution from the network drive and reopened the copied one on local C: drive. Now when I build solution Test Explorer shows all tests. I went back and opened the copy on the network drive and again Test Explorer shows no tests. It says to build the solution to see a list of tests, but after successfully building the solution which includes the main project and the unit test project it still displays the same message. See image below:
Why is it having project located on network drive causes Unit Testing to fail like this with no failure message at all?
We finally got this to work on a network share using the following commands:
setx COMPLUS_LoadFromRemoteSources 1
caspol -m -ag 1.2 -url file://<path>* FullTrust
For example, if the path is \\computer\share\
, then the second command will be:
caspol -m -ag 1.2 -url file://\\computer\share\* FullTrust
(note the asterisk at the end of the path)
Close VS first, run the commands, restart VS. This worked for me without having to clean/build my project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With