关于nunit调试VS2010中的4.0程序集的问题

  

  目前nunit的老版本不支持.net framework 4.0程序的测试。运行4.0程序集需要下载nunit的新版本 http://www.nunit.org/

  目前我使用的版本是nunit 2.5.5,但是发现下断点了以后不能调试。于是gogole了一下,发现这篇文章http://frater.wordpress.com/2010/05/04/debugging-nunit-tests-under-visual-studio-2010/

  其中,有两个配置 nunit.exe.config 步骤:

  1. 在 <configuration> 下 加

...

   
<startup>  
      
<requiredRuntime version="v4.0.30319" />
   
</startup>

  2.  在 <runtime> 加

<runtime> 

...


  <loadFromRemoteSources enabled="true" />


...

</runtime> 

  其中loadFromRemoteSources 的配置选项为:<loadFromRemoteSources enabled="true|false" />

  另外,更加你的.net framework版本选择是哪个版本:v4.0.20506 和 4.0.30319

  如果是4.0.30319配置为:<requiredRuntime version="v4.0.30319" />  

  如果是4.0.20506 配置为:<requiredRuntime version="v4.0.20506" />  

 

 

  出处:  http://www.cnblogs.com/GoodHelper/archive/2010/06/23/vs2010_nunit_debug.html

  欢迎转载,但需保留版权

 

原文地址:https://www.cnblogs.com/GoodHelper/p/vs2010_nunit_debug.html