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

前端 未结 10 1225
伪装坚强ぢ
伪装坚强ぢ 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:03

    Try to unblock the file desbloquer.

    This solved my problem.

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

    I just needed to click "Unblock" in the file properties dialog in Windows Explorer.

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

    This issue comes from the fact that some required files are on "untrusted location" such as the network or a shared location (even on the same computer). If the location is on the same computer, you can use the subst command line option.

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

    The other answers here helped me to figure out this issue in PowerShell. Run Unblock-File <filename> to allow it to be accessed by the script being executed.

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

    None of these solutions worked for me. Instead, I found the way by making sgen.exe.config via https://stackoverflow.com/a/3407750/516512

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

    These solutions did not work for me either.

    In my case, I was accessing files on a mapped network drive. The solution for me was to add my network IP address as a trusted drive by doing the following:

    1. Control Panel
    2. Network and Sharing Center
    3. Internet Options (bottom left of window)
    4. Security Tab
    5. Select "Local intranet"
    6. Click "Sites" button
    7. Click "Advanced" button
    8. Add the IP of your network drive to the zone.

    Not sure what made this work over all other options, but this is what solved the problem for me. All project and solutions now build with no issues.

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