關(guān)于nunit調(diào)試VS2010中的4.0程序集的問題
目前nunit的老版本不支持.net framework 4.0程序的測試。運(yùn)行4.0程序集需要下載nunit的新版本 http://www.nunit.org/
目前我使用的版本是nunit 2.5.5,但是發(fā)現(xiàn)下斷點(diǎn)了以后不能調(diào)試。于是gogole了一下,發(fā)現(xiàn)這篇文章http://frater.wordpress.com/2010/05/04/debugging-nunit-tests-under-visual-studio-2010/
其中,有兩個(gè)配置 nunit.exe.config 步驟:
1. 在 <configuration> 下 加
...
<startup>
<requiredRuntime version="v4.0.30319" />
</startup>
<startup>
<requiredRuntime version="v4.0.30319" />
</startup>
2. 在 <runtime> 加
<runtime>
...
<loadFromRemoteSources enabled="true" />
...
</runtime>
...
<loadFromRemoteSources enabled="true" />
...
</runtime>
其中l(wèi)oadFromRemoteSources 的配置選項(xiàng)為:<loadFromRemoteSources enabled="true|false" />
另外,更加你的.net framework版本選擇是哪個(gè)版本:v4.0.20506 和 4.0.30319
如果是4.0.30319配置為:<requiredRuntime version="v4.0.30319" />
如果是4.0.20506 配置為:<requiredRuntime version="v4.0.20506" />
出處: http://www.rzrgm.cn/GoodHelper/archive/2010/06/23/vs2010_nunit_debug.html
歡迎轉(zhuǎn)載,但需保留版權(quán)
作者:劉冬.NET
博客地址:http://www.rzrgm.cn/GoodHelper/
歡迎轉(zhuǎn)載,但須保留版權(quán)

浙公網(wǎng)安備 33010602011771號(hào)