NUnit 2.0 And.NET 1.1 Together

I spoke at the Wisconsin.NET User Group last night and had a good time. A small part of my talk was on using NUnit to do unit testing and an introduction to Test Driven Development(TDD). In the course of preparing my samples I upgrade to VS.NET 2003 from VS.NET 2002 and thus from.NET v1.0 to v1.1. Unfortunately, I had a heck of a time getting NUnit to work after doing this, and was getting a security exception any time I tried to load a 1.1 compiled assembly.

There are couple of resources I was directed to related to this when I asked the community at ASPAdvice.comfor help. Rachel Reese directed me to Robert McLaws blog on the subject, which in turn linked this very detailed article. However, because I’m dense at times I didn’t actually “get it” as far as what I had to do until James Shaw from www.CoverYourASP.com wrote to inform me of this exact process:

To get NUnit to work with 1.1 assemblies, add this to the NUnit config files in NUnit’s /bin folder (gui and console):

<configuration>
<startup>
<supportedRuntime version="v1.1.4322″ />
</startup>

I did that, started up NUnit, loaded my 1.1 compiled assembly, ran my tests, and everything came up green on the first try. Yay! Hope this helps other NUnit users.

[Listening to: Redshift – Infamy (great Ohio local band)]

If you liked this post, consider subscribing to email updates about my new posts, or sharing it on Hacker News.

Keyboard shortcuts

?
Show this help
Esc
Close this help or an open menu
n
Next (newer) post: Handy Tracing Utility
p
Previous (older) post: Easier ADO.NET Parameters using Enums and Attributes
Tab
Move between links and buttons (Shift+Tab to go back)