xunit tests in .net frameworl objectModel error

 

The testrunner tries to discover the unit tests in xunit.runner.visualstudio.testadapter.dll. Why? Because it matches the default test sources spec of *.test*.dll.

When changing the default test source spec to *.tests.dll or something else more specific, it will work.

Source: http://erictummers.wordpress.com/2014/02/11/execute-xunit-tests-on-hosted-build-controller/

 

 

You can use xunit to unit test on the hosted build controller by installing the xunit.runner.visualstudio package.

But when the Build is done, there was an error.
Exception discovering tests from C:\a\bin\xunit.runner.visualstudio.testadapter.dll: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

The testrunner tries to discover the unittests in xunit.runner.visualstudio.testadapter.dll. Why? Because it matches the default test sources spec of *.test*.dll.
test sources spec
Change the spec to something more specific (like *unittest.dll) and everything works fine.

posted @ 2020-07-07 20:14  PanPan003  阅读(124)  评论(0编辑  收藏  举报