My computer crashed while building code in VS2013. After rebooting, when I run my code without debugging, it works fine, but in debug mode I got the following exception:
Failed to load file or assembly "Antlr3.Runtime" or one of its dependencies. Invalid parameter. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Description: An unhandled exception occurred during the execution of the current web request. View the stack trace for more information about the error and its occurrence in the code.
Exception Details: System.IO.FileLoadException: Failed to load file or assembly "Antlr3.Runtime" or one of its dependencies. Invalid parameter. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Source Error:
An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of the exception can be identified using the exception stack trace below.
Assembly load trace: The following information may be useful in determining why the "Antlr3.Runtime" assembly cannot be loaded.
=== Pre-binding status information === LOG: DisplayName = Antlr3.Runtime (Partial) WRN: Partial binding information was provided for the assembly: WRN: Assembly name: Antlr3.Runtime | Domain ID: 2 WRN: Partial binding occurs when only part of the display name of the assembly is provided. WRN: This may cause the middleware to load the wrong assembly. WRN: It is recommended that you provide a fully-defined text identifier for the assembly, WRN: consists of a simple name, version, culture, and public key token. WRN: See White Paper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and general solutions to this problem. LOG: Appbase = file: /// D: /qqq/qqq.Admin/ LOG: Initial PrivatePath = D: \ qqq \ qqq.Admin \ bin
Build call: (Unknown).
LOG: this binding starts in the context of the default load. LOG: Using the application configuration file: D: \ qqq \ qqq.Admin \ web.config LOG: Using the host configuration file: C: \ Users \ DevBatch \ Documents \ IISExpress \ config \ aspnet.config LOG: Using the machine configuration file from C : \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ config \ machine.config. LOG: The policy does not apply to the link at this time (private, custom, partial, or location-based assembly binding). LOG: attempt to load a new file URL: /// C: /Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files / root / 051d9c22 / 9e0bcfb5 / Antlr3.Runtime.DLL. LOG: attempt to load a new file URL: /// C: /Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files / root / 051d9c22 / 9e0bcfb5 / Antlr3.Runtime / Antlr3.Runtime.DLL. LOG: attempt to load a new file URL: /// D: /qqq/qqq.Admin/bin/Antlr3.Runtime.DLL. LOG: Using the application configuration file: D: \ qqq \ qqq.Admin \ web.config LOG: Using the host configuration file: C: \ Users \ DevBatch \ Documents \ IISExpress \ config \ aspnet.config LOG: Using the machine configuration file from C : \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ config \ machine.config. LOG: Post-policy link: Antlr3.Runtime, Version = 3.3.1.7705, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 ERR: Failed to complete the assembly setup (hr = 0x80070057). Study terminated.
Stack trace:
[FileLoadException: Failed to load file or assembly "Antlr3.Runtime" or one of its dependencies. Invalid parameter. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))]
[FileLoadException: Failed to load file or assembly "Antlr3.Runtime, Version = 3.3.1.7705, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" or one of its dependencies. Invalid parameter. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))] System.Reflection.RuntimeAssembly._nLoad (AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark & stackMark, IntPtr pPrivHleleOffleOffleOnBleOffleOnBleOffleOnBleOffleOnBleOffleOnBleOffleOnBleOffleOnBleOffleOnBleOffleOnBleOfferOnflector .Reflection.RuntimeAssembly.nLoad (AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark & stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFunctionNameReflementlemendlefflecturelefer , RuntimeAssembly reqAssembly, StackCrawlMark & stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152 System.Reflection.RuntimeAssembly.Internalring Evolution assemblySecurity, StackCrawlMark & stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77 System.Reflection.RuntimeAssembly.InternalLoad (String assemblyString, Evidence assemblySecurity, StackCrawlMark & stackMark, Boolean forIntrospectionLocation. + 28. System System.Web.Configuration.CompilationSection.LoadAssemblyHelper (String assemblyName, Boolean starDirective) +38
[ConfigurationErrorsException: Failed to load file or assembly Antlr3.Runtime, Version = 3.3.1.7705, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 'or one of its dependencies. Invalid parameter. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))] System.Web.Configuration.CompilationSection.LoadAssemblyHelper (String assemblyName, Boolean starDirective) +736 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppom.fomAppomain. LoadAssembly (AssemblyInfo ai) +130 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies () +91 System.WebPreStartInitMethodsFromReferencedAssemblies () +91 System. isRefAssemblyLoaded) +284 System.Web.Compilation.BuildManager.ExecutePreAppStart () +153 System.Web.Hosting.HostingEnvironment.Initialize (ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory parameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParameterParamparameter tion) +521
[HttpException (0x80004005): Failed to load file or assembly "Antlr3.Runtime, Version = 3.3.1.7705, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" or one of its dependencies. Invalid parameter. (Exclusion from HRESULT: 0x80070057 (E_INVALIDARG))] System.Web.HttpRuntime.FirstRequestInit (HttpContext context) +9931916 System.Web.HttpRuntime.EnsureFirstRequestInit (HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS7WorkerRequest wr, HttpContext context ) +254
Plus I rebooted the Antlr3.Runtime dll, but so far no luck.