错误:应用程序的强名称验证失败

huangapple go评论91阅读模式
英文:

Error: Strong name validation failed for application

问题

我面临的问题是System.IO.FileLoadException类型的未处理异常发生在未知模块中。无法加载文件或程序集ServiceName, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5bfb54a682cb6e6d或其依赖项之一。强名称验证失败(HRESULT: 0x8013141A异常)。我尝试了许多方法,如下所示:

  1. "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\sn.exe" -Vr C:\Code\cfc\bin\ServiceName.dll
  2. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\ServiceName,5bfb54a682cb6e6d]
  3. 在VS命令提示符中运行Sn -Vr *

所有这些尝试都失败了。请帮助我解决这个问题。我已经挣扎了两天。提前感谢!

英文:

I'm facing issue An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module.
Could not load file or assembly 'ServiceName, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5bfb54a682cb6e6d' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
. I've tried many ways like below

  1. "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8.1 Tools\x64\sn.exe" -Vr C:\Code\cfc\bin\ServiceName.dll
  2. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\ServiceName,5bfb54a682cb6e6d]
  3. Sn -Vr * in VS Commandprompt

All these tries were failed. Kindkly help me to solve this issue. struggling since 2 days. Thanks in Advance!!

答案1

得分: 0

感谢!@wenbingeng-MSFET
要找到 sn.exe,只需运行 c:\Program Files(x86)>dir /s sn.exe。它将提供 sn 的列表。然后转到相应的目录,然后执行 sn -Vr *,5bfb54a682cb6e6d。在我的情况下,我有两个 sn.exe。这解决了我的问题。

英文:

Thanks! @wenbingeng-MSFET
to find sn.exe just ran c:\Program Files(x86)>dir /s sn.exe. It will gives list sn's. And went to the respective directories then executed sn -Vr *,5bfb54a682cb6e6d. In my case I've two sn.exe's. It fixed my issue.

huangapple
  • 本文由 发表于 2023年6月15日 18:43:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76481707.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定