I have a seperate MSTest project that runs tests against two other c# projects within the same solution. The tests are all MSTests and run succesfully in both the Visual Studio Test Explorer and Resharper (with MSTest set). Both are using my *.testsettings file that specifies the dependencies. Trying to get dotCover to generate coverage results gives me a FileNotFoundException on both the ddls from the referenced projects. This is similar to the exception I got with VS Test Explorer before adding dependencies in the testsettings file. Both dotCover and Resharper have the same test settings in options. Any ideas why dotCover cannot resolve the dependencies when Resharper can?
1 Answers
I've come across the same problem and had to do the following to get Resharper running dotCover again correctly for my solution:
Delete the resharper cache for your solution. It will be located something like :
%LOCALAPPDATA%\JetBrains\Transient\ReSharperPlatformVs14\v09\SolutionCaches\{folder with solution name in it}
Numbers may be different based on which version of Resharper you have (I have 2017.2 Ultimate).
Delete the visual studio solution cache:
{solutionfolder}\.vs\{solutionname}\v14\*.suo
Again, numbers depend on which version of visual studio you have (I have VS2015)
Finally, you may have to give a hint in the test project files to run the correct version of the .net framework. Insert the following into the <configuration>
node of your app.config file in your test project(s):
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
Again, your supported runtime depends on which version of the .net framework your project is configured to use (in my case, .net 4.5.2).