Could not load file or assembly 'System.Web.Optimization' or one of its dependencies after restart

2

I am making my first ASP MVC application and it was working just fine, up until I suddenly got "blue screen of death", restarted computer and now my application suddenly does not work. At first, it did not compile at all, as I was getting the message

Could not load file or assembly 'System.Web.Optimization' or one of its dependencies.

So I re-installed this assembly and tried again. This time, the application was built and everything seemed fine. Except it wasn't. Now, when I try to start the application I am getting the message:

Could not load file or assembly 'System.Web.Optimization' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'System.Web.Optimization' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

and this:

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Optimization' could not be loaded.

=== Pre-bind state information === LOG: DisplayName = System.Web.Optimization (Partial) WRN: Partial binding information was supplied for an assembly: WRN: Assembly Name: System.Web.Optimization | Domain ID: 2 WRN: A partial bind occurs when only part of the assembly display name is provided. WRN: This might result in the binder loading an incorrect assembly. WRN: It is recommended to provide a fully specified textual identity for the assembly, WRN: that consists of the simple name, version, culture, and public key token. WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. LOG: Appbase = file:///D:/CSharpProjects/PIMCompact/ LOG: Initial PrivatePath = D:\CSharpProjects\PIMCompact\bin Calling assembly : (Unknown). === LOG: This bind starts in default load context. LOG: Using application configuration file: D:\CSharpProjects\PIMCompact\web.config LOG: Using host configuration file: C:\Users\Biljana\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/Users/Biljana/AppData/Local/Temp/Temporary ASP.NET Files/root/453ab2f6/733a9da5/System.Web.Optimization.DLL. LOG: Attempting download of new URL file:///C:/Users/Biljana/AppData/Local/Temp/Temporary ASP.NET Files/root/453ab2f6/733a9da5/System.Web.Optimization/System.Web.Optimization.DLL. LOG: Attempting download of new URL file:///D:/CSharpProjects/PIMCompact/bin/System.Web.Optimization.DLL. LOG: Using application configuration file: D:\CSharpProjects\PIMCompact\web.config LOG: Using host configuration file: C:\Users\Biljana\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Redirect found in application configuration file: 1.1.0.0 redirected to 1.1.0.0. LOG: Post-policy reference: System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 ERR: Failed to complete setup of assembly (hr = 0x80070057). Probing terminated."

I have no idea what happened, as I did not remove or delete anything before "blue screen" and how this is connected. Suddenly my application is useless. I do have this reference, however, and this also in web.config

  <dependentAssembly>
    <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
  </dependentAssembly>

So, what happened?

Edit: I reinstalled this dll, then it asked for another one, after that one, another one etc. This has no end in sight. Is there a way to just reinstall completely all dlls in solution?

c#
asp.net
.net
asp.net-mvc
.net-assembly
asked on Stack Overflow May 29, 2018 by Biljana M. • edited May 30, 2018 by Biljana M.

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0