1
votes

I am currently creating a CI build plan for a new project we are building using .net core and I am running into some issues running the tests.

When I attempt to run the tests from the command window I get the following problem:

c:>mstest.exe /testcontainer:CommonCore.Tests.dll

Loading CommonCore.Tests.dll... CommonCore.Tests.dll Unable to load the test container 'CommonCore.Tests.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

I have included 'System.Runtime' to the dependencies of the project but that seems to have no effect.

enter image description here

Has anyone run into this issue and found a solution?

1
The same error is present when using Debug Test within VS 2015.StingyJack

1 Answers

2
votes

Please use dotnet test to run tests for .net core. Or use vstest.console project.json if you're using VS 2015 Update 3 with dotnet sdk.

If your test project has a net46 target framework, mstest.exe may work. It uses the system wide .net runtime to invoke the test container.