我是MSpec的忠实拥护者,所以我自然也想在VS2010上立即使用它。我将MSpec运行器定义为Visual Studio中的外部工具,以使其始终作为工具栏项可见。
无论如何,每当我尝试将MSpec运行器(mspec.exe)与.NET 4.0解决方案一起使用时,都会出现以下错误:
Could not load file or assembly 'file:///C:\Users\[SOMEUSER]\[SOME_FOLDERS]\bin\Debug\[PROJECT].Specs.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
我仍然可以使用Resharper 5运行者来运行我的规范,所以这不是什么大戏,但是我无休止地困扰我:þ
你们知道问题可能是什么吗?除了将整个Mspec源代码重新编译为.NET 4.0解决方案之外,还有其他解决方案吗,我真的不想这样做吗?
提前致谢。
塞尔吉
最佳答案
使用我的net4
分支,其中包含与.NET 4.0兼容的MSpec版本。我们正在努力将这些更改集成到MSpec的母版中。
http://github.com/agross/machine.specifications/tree/net4
更新:当前版本可在Codebetter's TeamCity server上使用(选择访客登录)
关于visual-studio-2010 - 在Visual Studio 2010和.NET 4中使用MSpec运行程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2816924/