Geeks With Blogs

News

qrcode

Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.

 Subscribe


Lance's TextBox » About Me » My Resume »Twitter

I'm trying to run nunit tests of a 32-bit assembly on a 64-bit machine. When I load the assembly (compiled with VS target platform set to x86) into nunit, I get a FileNotFound exception. The problem is that nunit is running as 64-bit. I found this post by Matevz Gacnik pointing me in the right direction to get around this problem. Here is the fix:

You can use corflags to find out what settings the nunit assembly already has:

C:\> corflags "C:\Program Files (x86)\NUnit-Net-2.0 2.2.9\bin\nunit-console.exe"

Then you can add the 32BIT flag to force it to run as 32-bit:

C:\> corflags "C:\Program Files (x86)\NUnit-Net-2.0 2.2.9\bin\nunit-console.exe" /32BIT+

See also:
CorFlags Conversion Tool at MSDN,
Explanation of CLR, platform selection, and corflags.

Technorati : , , ,

Posted on Thursday, December 28, 2006 9:57 AM Programming , Software | Back to top


Comments on this post: nunit testing 32-bit apps on 64-bit machine

# re: nunit testing 32-bit apps on 64-bit machine
Requesting Gravatar...
Thank you, that solved my problem, I lost a day with NUnit.
The fix works for the UI (nunit.exe) as well.

Left by Andrey on Apr 14, 2008 4:39 AM

# Likewise
Requesting Gravatar...
Yup, I was getting the same problem too, and your workaround is now part of my automated build.
Left by David Keaveny on Jun 15, 2009 11:46 AM

# re: nunit testing 32-bit apps on 64-bit machine
Requesting Gravatar...
The NUnit 2.5 has nunit-console-x86.exe
Make sure you use all tools with "-x86" suffix.
Left by Ryan Wibawa on Dec 16, 2009 2:22 PM

Your comment:
 (will show your gravatar)


Copyright © Lance Robinson | Powered by: GeeksWithBlogs.net | Join free