NUnit + BadImageFormatException
I got NUnit to run by telling VS to copy the NUnit.Framework dll locally. However, when i tried starting nunit i got the following exception:
---------------------------
Exception Details
---------------------------
System.BadImageFormatException: The format of the file 'Testing.Collections.Tests' is invalid.
File name: "Testing.Collections.Tests"
Server stack trace:
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.AppDomain.Load(String assemblyString)
at NUnit.Core.TestSuiteBuilder.Load(String assemblyName)
at NUnit.Core.TestSuiteBuilder.Build(String assemblyName, Int32 assemblyKey)
at NUnit.Core.RemoteTestRunner.BuildSuite()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at NUnit.Core.TestDomain.LoadAssembly(String assemblyFileName, String testFixture)
at NUnit.Util.NUnitProject.LoadTest(TestDomain testDomain, String testFixture)
at NUnit.Util.TestLoader.LoadTest()
=== Pre-bind state information ===
LOG: DisplayName = Testing.Collections.Tests
(Partial)
LOG: Appbase = C:\Development\cyrusn\Testing\Testing.Collections.Tests\bin\Debug
LOG: Initial PrivatePath = C:\Development\cyrusn\Testing\Testing.Collections.Tests\bin\Debug
Calling assembly : nunit.framework, Version=2.1.4.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77.
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Testing.Collections.Tests
LOG: Attempting download of new URL .
---------------------------
OK
---------------------------
My guess is that NUnit doesn't support assemblies that use the new runtime features like generics. I'm going to see if I can work around this at all.