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" />
Share this:
June 18, 2009 - Posted by Vincent Leung | NUnit, TDD, VS2010
10 Comments »
Leave a Reply Cancel reply
Top Posts
- Silverlight toolkit Accordion control tutorial
- Consuming an ASP.NET web service or page method using jQuery
- Unity IoC in 30 seconds
- Multiple-Constructor Injection using Unity IOC
- LINQ Cheat Sheet
- An awesome Powerpoint presentation on Windows Azure Platform
- A quick introduction of using jTemplate against AJAX JSON data
- Setup SVN Local Repository - Step by Step
- Calling Google AJAX Language API in C# .NET
- RFID Login for Windows 7 Walk Through
Recent Comments
- http://forum.nas-central.org/ucp.php?mode=login on Creating a simple Facebook Application using WPF
- home contents insurance quotes on Creating a simple Facebook Application using WPF
- Robbie on Creating a simple Facebook Application using WPF
- Stephany on Creating a simple Facebook Application using WPF
- Beatrice on Creating a simple Facebook Application using WPF
Top Rated
Blog Stats
- 714,602 hits
Vincent Leung
More than 15 years experience in Windows software development using C# and .NET
Specialties:
C# 3.0, .NET 3.5, LINQ, ASP.NET 3.5, WCF, MVC, jQuery, Ajax, SilverlightArchives
- May 2012 (1)
- April 2012 (1)
- March 2012 (2)
- January 2012 (1)
- December 2011 (2)
- November 2011 (1)
- July 2011 (1)
- March 2011 (2)
- December 2010 (3)
- November 2010 (5)
- October 2010 (36)
- September 2010 (17)
- August 2010 (22)
- July 2010 (21)
- June 2010 (5)
- May 2010 (16)
- April 2010 (19)
- March 2010 (11)
- February 2010 (11)
- January 2010 (19)
- December 2009 (8)
- November 2009 (22)
- October 2009 (36)
- September 2009 (32)
- August 2009 (14)
- July 2009 (11)
- June 2009 (11)
- May 2009 (14)
- April 2009 (11)
- March 2009 (32)
- February 2009 (38)
- January 2009 (12)
- December 2008 (21)
- November 2008 (31)
- October 2008 (1)
- September 2008 (3)
- August 2008 (10)
- July 2008 (20)
- June 2008 (21)
- May 2008 (12)
- April 2008 (13)
- March 2008 (22)
- February 2008 (29)
- January 2008 (25)
- December 2007 (15)
- November 2007 (42)
- October 2007 (32)
- September 2007 (26)
- August 2007 (24)
Categories
- .NET (30)
- Amazon (1)
- Applications (1)
- Architecture (46)
- ASP.NET (92)
- Azure (12)
- BCL (1)
- Book (3)
- BugFix (1)
- Business (13)
- CardSpace (4)
- Career (11)
- CSS (1)
- Data (14)
- ADO.NET Data Services (4)
- ADO.NET Entity Framework (1)
- Dynamic Data (3)
- EntityFramework (3)
- Database (37)
- MS SQL Compact (1)
- MySQL (5)
- Design (17)
- Expression Blend (17)
- Facebook (15)
- Fun (14)
- Google (13)
- Hobbies (11)
- Home Server (2)
- HTML5 (3)
- IIS (11)
- IOC (5)
- JavaScriptLibrary (31)
- Kinect (1)
- Language (23)
- C# (9)
- JavaScript (9)
- Python (2)
- Ruby (1)
- LINQ (36)
- Live Framework (2)
- Media Center (3)
- Media Encoder (1)
- Metro Style (1)
- Mock (3)
- OData (2)
- OpenSource (1)
- OpenXml (2)
- Random Thoughts (3)
- Security (7)
- Silverlight (234)
- Prism (6)
- RIA Services (11)
- TDD (5)
- NUnit (1)
- Tools (89)
- Uncategorized (18)
- Visual Studio (26)
- VS2010 (17)
- VS2008 (15)
- WCF (30)
- WF (2)
- Windows (67)
- WinForm (1)
- WPF (21)
- Xbox (1)
- XNA (2)
- Yahoo (4)
- YouTube (1)
Meta

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)
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!).
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.
Thanks Vincent. I was starting to get worried that NUnit would not work with .Net 4.0
Hi, which config should I edit?
[...] 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 |
Very Good!
Outstanding! Great hint.
Worked great! The current build number for released .NET 4.0 is “v4.0.30319.”
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.