wpf 强名称签名对此程序集 stdole.dll 无效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36590655/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Strong name signature not valid for this assembly stdole.dll
提问by Kinjal Gor
I've just started to get the following error in my ClickOnceapplication. When installing and running the same application, after seemingly successful installation I get an error message:
我刚刚开始在我的ClickOnce应用程序中收到以下错误。安装并运行相同的应用程序时,看似成功安装后,我收到一条错误消息:
Application Validation did not succeed
应用验证未成功
The error details I can see the problem to be:
我可以看到问题的错误详细信息是:
Strong name signature not valid for this assembly stdole.dll.
强名称签名对此程序集 stdole.dll 无效。
When i click into details I get
当我点击详细信息时,我得到
ERROR DETAILS Following errors were detected during this operation. * [04/13/2016 11:33:22 AM] System.Deployment.Application.InvalidDeploymentException (SignatureValidation) - Strong name signature not valid for this assembly stdole.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)
错误详细信息 在此操作期间检测到以下错误。* [04/13/2016 11:33:22 AM] System.Deployment.Application.InvalidDeploymentException (SignatureValidation) - 强名称签名对此程序集 stdole.dll 无效。- 来源:System.Deployment - 堆栈跟踪:在 System.Deployment.Application.ComponentVerifier.VerifyComponents() 在 System.Deployment.Application.DownloadManager.DownloadDependencies() 的 System.Deployment.Application.ComponentVerifier.VerifyStrongNameAssembly(String filePath, AssemblyManifest assemblyManifest) System.Deployment 中的 SubscriptionState subState、AssemblyManifest deployManifest、AssemblyManifest appManifest、Uri sourceUriBase、String targetDirectory、String group、IDownloadNotification 通知、DownloadOptions 选项)。
回答by SLin
Hey Not sure if you still haven't figured out the problem but please refer to this article: strong-name-signature-not-valid-for-this-assembly-stdole-dlland apply it depending on the version of Visual Studio you are using.
嘿 不确定您是否还没有弄清楚问题,但请参考这篇文章:strong-name-signature-not-valid-for-this-assembly-stdole-dll并根据您的 Visual Studio 版本应用它正在使用。
The Problem is that the ClickOnce application is trying to use an unsigned version of the stdole dll but you need to have that signed.
问题是 ClickOnce 应用程序试图使用 stdole dll 的未签名版本,但您需要对该版本进行签名。
Details from the webpage:
来自网页的详细信息:
Open path “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11” and “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office12”, there is file stdole.dll wich was 16kb large and not signed
Open the path “C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies”, there is file stdole.dll wich was 25kb large and signed
Replaced the unsigned dlls with the signed ones and did another publish
打开路径“C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11”和“C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA” \Office12”,有 16kb 大且未签名的文件 stdole.dll
打开路径“C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies”,有一个25kb大的stdole.dll文件
用签名的 dll 替换未签名的 dll 并再次发布
回答by Nick
This is a remarkably insidious problem that will sneak up on you again and again (dev boxes, build machines, etc). For whatever reason Microsoft keeps an old unsigned version of the assembly in the Visual Studio assembly search path.
这是一个非常阴险的问题,会一次又一次地潜入你的脑海(开发箱、构建机器等)。无论出于何种原因,Microsoft 在 Visual Studio 程序集搜索路径中保留了旧的未签名版本的程序集。
Check out Why is Visual Studio 2015 adding stdole.dll and Microsoft.AnalysisServices.AdomdClient.dll to my project?for some more details and some answers which may help avoid this in the future.
查看为什么 Visual Studio 2015 将 stdole.dll 和 Microsoft.AnalysisServices.AdomdClient.dll 添加到我的项目?有关更多详细信息和一些答案,这些答案可能有助于将来避免这种情况。

