Could not load file or assembly HRESULT: 0x80131515 (When adding controller to MVC project that has assembly references on network drive)

前端 未结 10 1227
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 11:55

I\'ve seen this: VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515) and none of the answers work. It also doesn\'t appear when I b

相关标签:
10条回答
  • 2020-11-27 12:18

    Just as an additional solution, we had an issue like this recently. The solution turned out to be unblocking the files, but with a twist. We copied the files to our server in a zip file. When we extracted the files from the zip archive, they were already blocked. We were not able to unblock the files. We would click the unblock button, then OK, and when we looked at the properties, they were still blocked.

    What we had to do is delete all the blocked files, unblock the source zip file, and then extract the files. At that point, the formerly blocked files were unblocked, and the application ran fine. Hope that helps someone avoid some frustration.

    EDIT: I believe you also have to be running windows explorer as administrator to be able to unblock files.

    0 讨论(0)
  • 2020-11-27 12:21

    Try adding your <loadFromRemoteSources enabled="true" /> to C:\[Visual Studio 2010 Install Dir]\Common7\IDE\devenv.exe.config directly below <runtime> and see if that helps :)

    0 讨论(0)
  • 2020-11-27 12:21

    I saw from other forum regarding this issue, and here is the solution someone posted: On the property of the project that contains the DLL assembly that would not load, go to the Build setting, and way at the bottom where it says "Generate serialization assembly:", the default is Auto. Set that to Off. Your solution should then build OK.

    This happened to me when I had the API in a webform solution with multiple project. It worked OK on a single-project solution MVC.

    0 讨论(0)
  • 2020-11-27 12:27
    1. I just needed to click "Unblock" in the file properties dialog.

    2. Please check if your file read only, then uncheck it and do the first step (before wasting further time on this :) )

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