In our situation, we ran several unit test DLLs through VSTest in Jenkins.
Call example:
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "./TestDLL1.UnitTests/bin/Debug/TestDLL1.UnitTests.dll" "./TestDLL2.UnitTests/bin/Debug/TestDLL2.UnitTests.dll" "./TestDLL3.UnitTests/bin/Debug/TestDLL3.UnitTests.dll" /Enablecodecoverage /UseVsixExtensions:false /Logger:trx
In some test projects, there were Fakes for the same DLL, and most of the Fake settings were all. One test project only faked one class, as shown below in XML, to prevent a warning that "some fakes cannot be generated."
<Fakes xmlns="http://schemas.microsoft.com/fakes/2011/" Diagnostic="true"> <Assembly Name="Utilities"/> <StubGeneration> <Clear /> </StubGeneration> <ShimGeneration> <Clear /> <Add FullName="UIUtils.ExceptionDisplay"/> </ShimGeneration> </Fakes>
For some reason, VSTest used the above version for other test projects. Changing one test project to create all the fakes fixes the problem with a System.TypeLoadException. We can consolidate our fakes in the future in order to be able to more easily limit which classes are faked, but at the moment this was a much faster solution to the problem.
If only there was an easier way to suppress the warning "Some fakes cannot be generated" ...
Axiomenvy
source share