安装时单击消息框:强名称签名对程序集microsoft.mshtml.dll无效

前端之家收集整理的这篇文章主要介绍了安装时单击消息框:强名称签名对程序集microsoft.mshtml.dll无效前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我刚开始在clickonce应用程序中出现以下错误.我之前在我的机器上安装了visual studio 2013“应用程序验证没有成功.无法继续.

当我点击进入细节时,我得到了

Activation of C:\Temp\ClickOnce\myApp\myApp.application resulted in exception.
Following failure messages were detected:
Strong name signature not valid for this assembly Microsoft.mshtml.dll.

我也得到两个警告但我不相信它们是问题的原因

>此应用程序的清单没有签名.签名验证将被忽略.
>此应用程序的清单没有签名.签名验证将被忽略.

错误详细信息列为

ERROR DETAILS
    Following errors were detected during this operation.
    * [02/12/2013 15:54:31] System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
        - Strong name signature not valid for this assembly Microsoft.mshtml.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)

我没有签署clickonce清单.选中“启用clickonce安全设置”.选择“这是完全信任的应用程序”

我把它排序了.我要做的就是进入我的项目右键单击,添加对程序集的引用 – 扩展名,并且在Microsoft.mshtml下列出了两个dll文件.我徘徊在他们每个人身上,看到他们的路径是
c:/program files/Microsoft.NET/Primary Interop Assemblies/Microsoft.html.dll

c:/program files/Microsoft Visual Studio 12.0/Visual Studio Tools For Office/PIA/Common/Microsoft.mshtml.dll.

我的项目引用是Visual Studio中的第二个 – 我在项目属性下更改了对主互操作程序集中的引用我转到了发布选项卡并单击了我将发布状态设置为包含的应用程序文件.然后我去了项目属性/引用并双击microsoft.mshtml来打开它的属性,我将’embed interop types’设置为false并将’copy local’设置为true(因为copy local灰显为false).

在此之后,我将其上传到我的clickonce服务器,并能够下载并安装它.

猜你在找的Windows相关文章