Could not load file or assembly Exception from HRESULT: 0x80131040

前端 未结 6 928
隐瞒了意图╮
隐瞒了意图╮ 2020-12-24 12:42

I created my first MVC 4 project and it works perfectly on local server. But when I publish it on to local folder and upload the folder contents to hosting server. I try to

相关标签:
6条回答
  • 2020-12-24 13:11

    Add following dll files to bin folder:

    DotNetOpenAuth.AspNet.dll
    DotNetOpenAuth.Core.dll
    DotNetOpenAuth.OAuth.Consumer.dll
    DotNetOpenAuth.OAuth.dll
    DotNetOpenAuth.OpenId.dll
    DotNetOpenAuth.OpenId.RelyingParty.dll
    

    If you will not need them, delete dependentAssemblies from config named 'DotNetOpenAuth.Core' etc..

    0 讨论(0)
  • 2020-12-24 13:16

    What worked for me immediately was:

    • I located bin folder (picture below shows).

    • moved all dll in other folder for safety.

    • then rebuild ed the project.

    • after solved the issue, deleted old dll files.

    0 讨论(0)
  • 2020-12-24 13:22

    Finally found the answer!! Go to References --> right cilck on dll file that causing the problem --> select the properties --> check the version --> match the version in properties to web config

    <dependentAssembly>
        <assemblyIdentity name="YourDllFile" publicKeyToken="2780ccd10d57b246"               culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-YourDllFileVersion" newVersion="YourDllFileVersion" />
      </dependentAssembly>
    
    0 讨论(0)
  • 2020-12-24 13:25

    Try this:

    • Edit the *.pubxml file in the PublishProfiles folder
    • set DeleteExistingFiles true
    • update all nugget packages, rebuild, republish and voila, issue resolved!

    ...worked for me when I had the same problem.

    0 讨论(0)
  • 2020-12-24 13:28

    Check if the project having HRESULT: 0x80131040 error is being used/referenced by any project. If yes, kindly check if these project have similar .dll being referenced and the version is the same. If they're are not of same version number, then it is causing the said error.

    0 讨论(0)
  • 2020-12-24 13:34

    If your solution contains two projects interacting with each other and both using one same reference, And if version of respective reference is different in both projects; Then also such errors occurred. Keep updating all references to latest one.

    0 讨论(0)
提交回复
热议问题