运行 MSpec 时出错 - 如何排除故障?

发布于 2024-09-01 23:24:41 字数 541 浏览 10 评论 0原文

我正在关注本指南 安装并使用MSpec,但是在他第一次运行MSpec的步骤中,我收到以下错误:

无法加载文件或程序集“file:///[...]\Nehemiah\Nehemiah.Specs\bin\Debug\Nehemiah.Specs.dll”或其依赖项之一。该程序集是由比当前加载的运行时更新的运行时构建的,无法加载。

据我所知,我所做的一切或多或少都与他在这一步中所做的完全一样,除了由于他使用 VS2008 而我使用 VS2010 而出现差异之外,到目前为止一切都有效。 Nehemijah.Specs 项目(以及整个解决方案)在 Visual Studio 和我的构建服务器上都可以毫无问题地构建,并且我在事件查看器中找不到任何有用的东西(尽管我可能没有在这里寻找正确的位置.. 。)

该怎么办?

I am following this guide to installing and using MSpec, but at the step where he runs MSpec for the first time, I get the following error:

Could not load file or assembly 'file:///[...]\Nehemiah\Nehemiah.Specs\bin\Debug\Nehemiah.Specs.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

I have - to my knowledge - done everything more or less exactly like he did up to this step, except where differences arise because he's using VS2008 and I'm using VS2010, and everything has worked so far. The project Nehemijah.Specs (and the entire solution) builds without problem, both in Visual Studio and on my build server, and I can't find anything useful in Event Viewer (although I might not be looking in the right place here...)

What to do?

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

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

发布评论

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

评论(1

猥︴琐丶欲为 2024-09-08 23:24:42

看来您正在针对 .NET Framework 4 编译 Nehemiah.Specs.dll 程序集。为了运行您的规范,您需要 .NET 4 版本的 MSpec,其中包含控制台运行程序 (mspec.exe) 适合此版本的框架。您可以在 CodeBetter 的 CI 服务器。

运行 .NET 4 规范程序集的其他可能性是

  • TestDriven.Net 3.0
  • ReSharper 5.0

Runner,这两种工具也包含在发行版中。

It appears you're compiling the Nehemiah.Specs.dll assembly against the .NET Framework 4. In order to run your specifications you need the .NET 4 build of MSpec which contains a console runner (mspec.exe) that is suitable for this version of the framework. You can find the a zip file containing the build on CodeBetter's CI server.

Other possibilities of running .NET 4 spec assemblies are

  • TestDriven.Net 3.0
  • ReSharper 5.0

Runners for both tools are also included in the distribution.

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