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" />
About these ads

June 18, 2009 - Posted by | NUnit, TDD, VS2010

10 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

  6. Very Good!

    Comment by Josto | February 17, 2010 | Reply

  7. Outstanding! Great hint.

    Comment by John | February 21, 2010 | Reply

  8. Worked great! The current build number for released .NET 4.0 is “v4.0.30319.”

    Comment by Michael Murray | May 13, 2010 | Reply

  9. The actual .NET Framework version installed on your machine can be found from C:\WINDOWS\Microsoft.NET\Framework. Find the version of the .NET installed by looking into the folders.

    Comment by Dipen Lama | September 8, 2010 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: