您的位置:首页 > 其它

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

2014-05-07 13:21 204 查看
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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: