SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x8013141A)

前端 未结 5 1230
孤街浪徒
孤街浪徒 2021-01-02 12:13

VS 2010, win server 2003, .Net 3.5 solution, which were migurated from .Net 1.1

All projects in solution are Delay signed. The soluton can be build successfully for

5条回答
  •  情歌与酒
    2021-01-02 12:42

    This problem is related to Strong Name Validation. Open your AssemblyX in Ildasm.exe(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin). Note its PublicKeyToken, lets say pkt123 for an example. Now open VS Command prompt in administrator mode and run the sn.exe command. Such as:

    sn -Vr *,pkt123
    

    Build your solution again and everything should be fine by now.

    But if not and you receive same error now also, then you need to run a different version of sn.exe. To locate that, go to Visual Studio command prompt.

    c:\Program Files(x86)>dir /s sn.exe
    

    It may take 5-10 seconds and should give a list of sn.exe files. Go to the path and execute the sn.exe, required or belongs to you, as shown above. If not sure which one to execute, execute all the sn.exe. That should and must solve your problem. If not, let me know and let me carry forward the RnD again.

提交回复
热议问题