关于部分Nunit不能单步执行的问题

Nunit不能单步执行的罪魁祸首是因为我们的配置文件出现了问题。这样我们需要将我们原有的配置文件重新配置一下

这个配置文件是nunit.exe.config

我们可以直接将下面的代码copy以下放到你 的nunit.exe.config中去。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!--
     Application settings for NUnit-gui.exe. Do NOT put settings
	 for use by your tests here.
	-->
  <appSettings>
    <!--
     Uncomment to specify the url to be used for help. If not used, the
     default value is something like
		file://localhost/C:/Program Files/NUnit 2.2/doc/index.html
	 This setting is provided in case your default browser doesn't
	 support this format.
	-->
    <!-- <add key="helpUrl" value="http://www.nunit.org" /> -->
  </appSettings>

  <runtime>
    <!-- We need this so test exceptions don't crash NUnit -->
    <legacyUnhandledExceptionPolicy enabled="1" />

    <!-- Look for addins in the addins directory for now -->
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="lib;addins" />
    </assemblyBinding>

    <!--
    The following <assemblyBinding> section allows running nunit under 
    .NET 1.0 by redirecting assemblies. The appliesTo attribute
    causes the section to be ignored except under .NET 1.0
    on a machine with only the .NET version 1.0 runtime installed.
    If application and its tests were built for .NET 1.1 you will
    also need to redirect system assemblies in the test config file,
    which controls loading of the tests.
   -->
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
       appliesTo="v1.0.3705">

      <dependentAssembly>
        <assemblyIdentity name="System"
                          publicKeyToken="b77a5c561934e089"
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0"
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly>
        <assemblyIdentity name="System.Data"
                          publicKeyToken="b77a5c561934e089"
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0"
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly>
        <assemblyIdentity name="System.Drawing"
                          publicKeyToken="b03f5f7f11d50a3a"
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0"
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly>
        <assemblyIdentity name="System.Windows.Forms"
                          publicKeyToken="b77a5c561934e089"
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0"
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly>
        <assemblyIdentity name="System.Xml"
                          publicKeyToken="b77a5c561934e089"
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0"
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

    </assemblyBinding>
<loadFromRemoteSources enabled="true" />


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

</configuration>


转载于:https://www.cnblogs.com/xincunshannian/p/4032546.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值