In a previous post I talked about getting NUnit and the .NET Framework 2.0 to
dance happily. While accomplishing that is a simple config file change away,
getting NUnit to be debugging startup target of a VS2005 project is another
story. nunit-gui.exe appeared to hang, though upon closer inspection I realized
that it had died quietly. In NUnit you have to go to Tools -> Exception
Details to see what went wrong. Oddly enough, when it craps out, sometimes it
doesn’t even display a message to the user, but I digress… If I try to debug my
VS2005 project, with NUnit setup as my debugging program target, NUnit launches,
but throws a “Cross-thread operation not valid” exception.
Charles Cook (the XML RPC guy) posted about how to get VS2005
to work completely with NUnit. In short, you need to install the NUnit
2.2.2 listed under the “Iterations” download section. This thread exception is
corrected in the 2.2.2 version.
Furthermore, I had a hard time getting NUnit 2.2.2 to use Fx2.0 again. Only
the following configuration would launch NUnit running 2.0 of the Framework.
<?xml version="1.0"
encoding="Windows-1252"?>
<configuration>
<appSettings>
<add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache"
/>
<!-- <add key="helpUrl" value="http://www.nunit.org" />
-->
</appSettings>
<startup>
<supportedRuntime version="v2.0.50727" />
<supportedRuntime
version="v1.1.4322" />
<supportedRuntime version="v1.0.3705"
/>
<requiredRuntime version="v1.0.3705" />
</startup>
<runtime>
<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>
</runtime>
</configuration>