Running nunit-console on a solution file leads to System.IO.FileLoadException

[亡魂溺海] 提交于 2019-12-04 08:10:55

Try using the Fusion Log Viewer to see what assembly is failing to load. It should tell you not only what file it is failing on, but where it tried looking for that file.

Vojta

In my case nunit-console.exe did not respect the assembly redirection from web|app.config. unless you provide /domain=multiple

My Problem: EntityFrameworkTesting.Moq -> requests Moq, Version=4.2.1409.1722

I had already a newer assembly referenced.

The solution for me was to add /domain=multiple parameter. see the NUnit docs

So I run:

D:\tools\NUnit-2.6.4\bin\nunit-console.exe %SOLUTION_PATH%\Project.sln /config:Release /framework:net-4.0 /domain=multiple /xml=nunit-result.xml
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!