Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clickonce messagebox on install: Strong name signature not valid for assembly microsoft.mshtml.dll

Tags:

clickonce

I've just started to get the following error in my clickonce application. I have just installed visual studio 2013 on my machine prior to this "Application validation did not succeed. Unable to continue.

when i click into details I get

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.

I also get two warnings but I do not believe they are the cause of the problem

  • The manifest for this application does not have a signature. Signature validation will be ignored.
  • The manifest for this application does not have a signature. Signature validation will be ignored.

Error Details are listed as

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)

I am not signing the clickonce manifests. "Enable clickonce security settings" is checked. "This is a full trust application" is selected

like image 627
Oliver Avatar asked Dec 02 '13 16:12

Oliver


1 Answers

I got this sorted. what I had to do was go into my project right click, add reference to go assemblies - extensions and there were two dll files listed under Microsoft.mshtml. I hovered over each of them and seen that the path of one was

c:/program files/Microsoft.NET/Primary Interop Assemblies/Microsoft.html.dll

and

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

The refernce my project had was the second one in visual studio - I changed the reference to the one in Primary Interop Assemblies under project properties I went to the publish tab and clicked on the application files I set publish status to include. Then I went to project properties/references and double clicked on microsoft.mshtml to open its properties, I set 'embed interop types' to false and 'copy local' to true (as copy local was grayed out to false).

after this I uploaded it to my clickonce server and was able to download and install it.

like image 51
Oliver Avatar answered Oct 24 '22 09:10

Oliver