Strong name signature not valid for this assembly stdole.dll

 ̄綄美尐妖づ 提交于 2019-12-12 12:23:23

问题


I've just started to get the following error in my ClickOnce application. When installing and running the same application, after seemingly successful installation I get an error message:

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.

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)


回答1:


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-dll and apply it depending on the version of Visual Studio you are using.

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.

Details from the webpage:

  1. 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

  2. Open the path “C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies”, there is file stdole.dll wich was 25kb large and signed

  3. Replaced the unsigned dlls with the signed ones and did another publish




回答2:


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.

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.



来源:https://stackoverflow.com/questions/36590655/strong-name-signature-not-valid-for-this-assembly-stdole-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!