Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'System.Web.Abstractions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

I am getting the below error any idea?? I get this error message only when the controller call ValidateForm() method.

Could not load file or assembly 'System.Web.Abstractions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

like image 443
Miral Avatar asked Dec 10 '25 06:12

Miral


1 Answers

The correct version of the assembly is 3.5.0.0. I guess you are using something compiled against a custom build version of this assembly. You could use a bindingRedirect to instruct the CLR to load the correct version of the assembly.

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="System.Web.Abstractions"
                              publicKeyToken="31bf3856ad364e35"
                              culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0"
                             newVersion="3.5.0.0"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>
like image 97
Darin Dimitrov Avatar answered Dec 12 '25 18:12

Darin Dimitrov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!