2010-05-12 60 views
6

我是MSpec的忠實粉絲,所以很自然地我想用VS2010。我將MSpec runner定義爲Visual Studio中的外部工具,以便能夠始終將其作爲工具欄項目顯示。在Visual Studio 2010和.NET 4中使用MSpec亞軍

不管怎樣,每當我試圖用.NET 4.0解決方案,我得到以下錯誤使用MSpec亞軍(mspec.exe):

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解決方案之外,是否還有其他解決方案,我真的不想這麼做?

在此先感謝。
Sergi

回答

6

使用我的net4分支,其中包含與.NET 4.0兼容的MSpec版本。我們正在努力將這些更改整合到MSpec的主文件中。

http://github.com/agross/machine.specifications/tree/net4

更新:目前的版本是可在Codebetter's TeamCity server(選擇來賓登錄)

+0

謝謝!我希望能從你或Aaron Jensen那裏得到答案;) – 2010-05-12 16:20:45

+0

:)我們現在還有一個.NET 4.0 build,可以在http://teamcity.codebetter.com上找到。 – 2010-05-12 22:22:11

+0

此URL是否應該更新?鏈接被破壞 - 也許https://github.com/agross/machine.specifications? – t3rse 2011-04-27 21:18:34

7

我通過運行帶有mspec-clr4.exe而不是測試修復了這個問題。