为什么这个程序集失败了强名称验证?

时间:2016-08-17 18:04:28

标签: c# .net visual-studio dll strongname

我在http://www.codeproject.com/Articles/15397/Cabinet-File-CAB-Compression-and-Extraction

的C#项目中使用CabLib.dll

我在Windows 10上使用Visual Studio 2015。

当我尝试发布该应用时,我收到此错误:Strong name signature not valid for this assembly CabLib.dll.

System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
    - Strong name signature not valid for this assembly CabLib.dll.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.ComponentVerifier.VerifyStrongNameAssembly(String filePath, AssemblyManifest assemblyManifest)
        at System.Deployment.Application.ComponentVerifier.VerifyComponents()
        at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
        at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
        at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
        at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
        at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

我可以使用VS Dev Cmd提示符中的SN.exe工具获取.dll的公共令牌,但是当我使用SN -v cablib.dll时,我收到错误Failed to verify assembly -- Strong name validation failed.

我在哪里可以获得有关此故障的更多信息?

0 个答案:

没有答案