I'm new to NUnit and I just download it and installed .But while opening project i got exception as " Load Failed" System.IO.FileNotFoundException...

Why am I getting this exception? Please help

Thanks in Advance

Error log:-


Server stack trace: 
   at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   at NUnit.Core.CoreExtensions.InstallAdhocExtensions(Assembly assembly)
   at NUnit.Core.Builders.TestAssemblyBuilder.Load(String path)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
   at NUnit.Core.TestSuiteBuilder.BuildSingleAssembly(TestPackage package)
   at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
   at NUnit.Core.SimpleTestRunner.Load(TestPackage package)
   at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
   at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
   at NUnit.Core.RemoteTestRunner.Load(TestPackage package)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
  • could u post error log?are you getting System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. like this? Commented May 27, 2013 at 10:36

3 Answers 3


Have you tried installing it using NuGet? Download and install NuGet.

I recommend never installing any package without NuGet (unless absolutely necessary, which is rare). It has a convenient plugin directly with Visual Studio (I assume you're using VS).

Also you should make sure package restore during build is enabled in the project configuration (so you never commit packages).


You could try to build and execute the sample project that comes with the framework. When i try to build the example, i just had to update the reference to the DLL; but nothing more, you can try it ;-)

  • Could you clarify how doing this will help solve the OPs problem?
    – corsiKa
    Commented May 28, 2013 at 20:41

You haven't described the scenario under which the exception occurs. Normally this exception occurs if the following conditions are true:

  1. This problem normally occurs when you are trying to refer an assembly that is either not correct or whose public key token does not match the correct one.
  2. The worker process does not have permissions to read/write to the process Temp directory
  3. There are compilation errors in the code that XmlSerializer generated.
  4. You may have System.ServiceModel referenced, but it may be a different version. Make sure that what you are referencing is Version= (or any desired framework)

Check this out. It may also help for you to add your error logs to your original question.

Hope it helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.