Wierd issue: Could not load file or assembly nunit.core

2 Jan

Today when i was working on some test code, i suddenly started getting this errorcould not load file or assembly nunit.core ( look in the end of the entry for the actual stack trace). This was only happening on the build server.

The build server is based on Cruise control and pulls code from subversion. Initially i did the standard Microsoft approach. Reboot:) that did not work. Then i tried Reinstalling NUnit and that did not work.

It turned out to be a config file ( app.config) file issue. Subversion had written merge tags in the app config file. NUnit instread of telling that the issue was about an invalid config, file chokes completelya and gives a completely clueless message.

Once i cleaned up the app config things started working again like a charm:)

Here is the actual stack stace in case some else googles in the future for something similar

System.IO.FileNotFoundException…

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)

at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)

at System.AppDomain.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)

at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)

at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityAttributes)

at NUnit.Util.TestDomain.MakeRemoteTestRunner(AppDomain runnerDomain)

at NUnit.Util.TestDomain.Load(String assemblyFileName, String testFixture)

at NUnit.Util.TestLoader.LoadTest(String testName)

One Response to “Wierd issue: Could not load file or assembly nunit.core”

Trackbacks/Pingbacks

  1. Greg’s Blog » Blog Archive » Don’t believe NUnit! - January 5, 2007

    [...] config text. I simply had a closing tag in the wrong place – still syntactically correct, however. This link is by someone else who hit the exact same problem, and he has written about in more [...]

Leave a Reply

Please log in using one of these methods to post your comment:

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.