Nunit not working: Error log:- System.IO.FileNotFoundException...



  • 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:-

    System.IO.FileNotFoundException...
    
    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)
    


  • 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).


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2