This can happen if your project is on a network shared drive or a VM environment where your project is located on the host machine.
In Visual Studio, go to View>Other Windows>Output and see if you have a message like:
> Could not load file or assembly
> '{projectPath}\{project}.dll' or one
> of its dependencies. Operation is not
> supported. (Exception from HRESULT:
> 0x80131515)
To fix it, open a command prompt and type:
setx COMPLUS_LoadFromRemoteSources 1
As an alternative,
- Create an environment variable named COMPLUS_LoadFromRemoteSources
- Set the value to 1
- Restart Studio
(source: http://b2ben.blogspot.com/2014/07/running-visual-studio-tests-from.html, be sure to see the note at the bottom regarding the devenv.exe.config file. Did not work for me either.)