Tobias
Tobias

Reputation: 31

nunit problem loading exe

following situation:

--> basically in the nunit environment program.exe is used like a dll. 'misusing' an exe as dll is possible as i just wrote a little test application that also references program.exe and uses some classes defined in there and this runs fine ...

BUT in nunit i get a BadImageFormatException as soon as tests are loaded that use code defined in program.exe

is this a bug in nunit's reflection mechanism or is there a reason for that?

thx tobi

Upvotes: 3

Views: 1203

Answers (1)

Jakob Christensen
Jakob Christensen

Reputation: 14956

This can happen if the .exe is compiled for x86 and you are running the tests on a 64 bit OS. If this is the case you may choose to use nunit-x86.exe for running the tests.

Upvotes: 5

Related Questions