问候语, 我们目前我们的项目迁移到.NET 4也是我们使用一个.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).
有帮助吗?

解决方案

它看起来像NetSpec具有对VS2008版本MSTest的组件(Microsoft.VisualStudio.QualityTools.UnitTestFramework)的参考。我猜你没有这台机器上安装了VS2008。

什么,你可以尝试从一台机器在没有安装VS2008复制它。你可以在这里找到: \程序文件(x86)\微软的Visual Studio 9.0 \ Common7 \ IDE \ PublicAssemblies \ Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

如果你把它放在同一个文件夹NetSpec,应当您编译测试项目复制。

其他提示

它看起来像它试图使用内置的Visual Studio的测试(MSTest的),而不是NUnit的。没有任何机会升级添加项目引用到本次大会?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top