nunit与.NET4中的testdriven.net问题

nunit与.NET4中的testdriven.net问题,nunit,.net-4.0,testdriven.net,Nunit,.net 4.0,Testdriven.net,问候,, 目前,我们将项目迁移到.NET4。我们还将.nunit 2.5.5与testdriven.net 3结合使用。 我在运行测试时遇到了这个错误 Test 'TestCase1' failed: System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=ne

问候,, 目前,我们将项目迁移到.NET4。我们还将.nunit 2.5.5与testdriven.net 3结合使用。 我在运行测试时遇到了这个错误

Test 'TestCase1' failed: System.IO.FileNotFoundException : Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    at NetSpec.TestingExtensions.ShouldEqual(Object o, Object expected)
    at NetSpec.TestingExtensions.ShouldBe(Object o, Object expected)
    Personnel\CivilServant\SubCategorySpec.cs(37,0): at Azarakhsh.Domain.Test.Personnel.CivilServant.when_validate_a_subCategoey.should_have_code()

0 passed, 1 failed, 0 skipped, took 9.35 seconds (NUnit 2.5.5).

看起来它正在尝试使用内置Visual Studio测试(MSTest),而不是NUnit。升级是否偶然添加了对此程序集的项目引用?

看起来NetSpec引用了MSTest程序集的VS2008版本(Microsoft.VisualStudio.QualityTools.UnitTestFramework)。我猜这台机器上没有安装VS2008

您可以尝试从安装了VS2008的机器上复制它。您可以在这里找到它: \程序文件(x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblys\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll


如果将其与NetSpec放在同一文件夹中,则在编译测试项目时应将其复制。

测试项目没有任何对Microsoft.VisualStudio.QualityTools.UnitTestFramework的引用