Vincent Leung .NET Tech Clips

The latest tech clips from the .NET community

Running NUnit 2.5 against Visual Studio 2010 .Net 4 code

 

I discovered that if you add the following to the relevant NUnit config file you can run a test dll built for .NET 4.0 in Visual Studio 2010 beta

Under <configuration> add:

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

and under <runtime> add:

<loadFromRemoteSources enabled="true" />

June 18, 2009 - Posted by Vincent Leung | NUnit, TDD, VS2010 | | 6 Comments

6 Comments »

  1. True, that realy works. Just put it to NUnit.exe.config and not to config of your test project (I did that error on start) :)

    Comment by MrMarchpane | July 2, 2009 | Reply

  2. Great tip, thanks. I found it also works in v2.4 (I’m using 2.4.8; updating to 2.5 is on the to-do list!).

    Comment by Alastair Smith | October 29, 2009 | Reply

    • Also, for VS2010 beta 2, the version number can be updated to 4.0.21006, but it seems that the build number isn’t checked as the beta 1 version number you listed above worked correctly for me too.

      Comment by Alastair Smith | October 29, 2009 | Reply

  3. Thanks Vincent. I was starting to get worried that NUnit would not work with .Net 4.0

    Comment by Leo Moore | November 2, 2009 | Reply

  4. Hi, which config should I edit?

    Comment by Bjørn | November 5, 2009 | Reply

  5. [...] Running NUnit 2.5 against Visual Studio 2010 .Net 4 code [...]

    Pingback by Emil’s Blog » Blog Archive » NUnit with Visual Studio 2010 Beta 2 | November 16, 2009 | Reply


Leave a comment