I was trying to use NUnit the other day with Xna and sadly my first test wouldn’t pass with this exception:

MyApp.Core.Tests.PlayerTests (TestFixtureSetUp):

SetUp : System.BadImageFormatException : Could not load file or assembly ‘MyApp.Core, Version=, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

The quick fix is to use the x86 version of the application nunit-x86.exe and all is well. Hopefully someone can google this in the future.

comments powered by Disqus