VS2010 Tip – How to run unit tests in 64bit process

One of the reason I used to prefer NUnit was that I could run my tests as x86 or x64 depending on what I needed. I was always strange that Microsoft unit testing framework didn’t have this ability.

Luckily for use it seems that Microsoft heard our pain and decided to enable us to run our unit tests in 64bit context.

And its very simple to enable – once you know it’s there.

Just head to the test configuration (yep – Local.testsettings) and under Hosts you can set if to run the tests as a 32bit or 64bit process.

image

That’s it

One thought on “VS2010 Tip – How to run unit tests in 64bit process

  1. simply get an error saying “Could not load assembly”… “Incorrect Format”

    Please be more specific with your answer.

    thats it…sure is not!

    What settings are required forBuild >> Configuration Manager? (for each project)

    what settings for Advanced compile for each project?

    what settings for Platform for each project?

    with the simple “thats it” solution posted above,

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 )

Google+ photo

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

Connecting to %s