.net 4 中的 nunit 与 testdriven.net 问题

发布于 2024-09-04 21:11:59 字数 748 浏览 7 评论 0原文

问候, 目前我们将项目迁移到 .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).

Greeting,
currently we migrate our project to .net 4. also we use .nunit 2.5.5 with testdriven.net 3.
I got this error, when I run tests.

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).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

伊面 2024-09-11 21:11:59

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

您可以尝试从安装了 VS2008 的计算机上复制它。你会在这里找到它:
\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

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

It looks like NetSpec has a reference to the VS2008 version of the MSTest assembly (Microsoft.VisualStudio.QualityTools.UnitTestFramework). I'm guessing you don't have VS2008 installed on this machine.

What you could try is copying it from a machine that does have VS2008 installed. You'll find it here:
\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

If you place it in the same folder as NetSpec, it should be copied when you compile your test project.

终陌 2024-09-11 21:11:59

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

It looks like it's trying to use the build-in Visual Studio testing (MSTest) rather than NUnit. Did the upgrade by any chance add a project reference to this assembly?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文