After the crash of the VS 2013 computer, the assembly "Antlr3.Runtime" does not load

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

I did my R&D and the closest solution I got is to delete all files from

C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Temporary ASP.NET Files \ Root \

And also clean these

C: / Users [username] / AppData / Local / Temp / Temporary ASP.NET/ Files

Plus I rebooted the Antlr3.Runtime dll, but so far no luck.

+5
source share
5 answers

I am struggling with this problem, and after two hours of searching and trying, I found a simple solution here.

  • Delete all files in C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Temporary ASP.NET files \ root \
  • Delete all files in C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET files \ root \
  • Clear C: / Users / [username] / AppData / Local / Temp / Temporary ASP.NET/ files (if any).
  • Delete all files in C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET files \ vs \ .

enter image description here

+3
source

The only solution for you here is to create a new project, run it in debug (to make sure it works), and then copy your entire project to the newly created one (you can try using tfs to merge in to save time).

The fact is that as soon as the studio is crushed, it is destroyed, because this particular Antlr3.Runtime becomes mixed, and also cannot recreate itself. This is a problem to be aware of.

+1
source

Try manually copying this file (Antlr3.Runtime.dll) to the bin folder.

0
source

Please refer to this question.

Enter% TEMP% in Explorer and delete all temporary files.

.

0
source

Before I encountered this problem, it is best to clear the temporary folder and delete all the files in the bin folder of the project. Clean solution and adjustment, Tadang! it’s good for you to go :) I hope this helps someone come here to find an answer in the future.

0
source

All Articles