Clickonce: <Filename>, has a different computed hash than specified in manifest


Clickonce Log

=============

Following errors were detected during this operation.
* [9/27/2008 4:11:03 PM] System.Deployment.Application.InvalidDeploymentException (HashValidation)
  – File, <Filename>, has a different computed hash than specified in manifest.
  – Source: System.Deployment
  – Stack trace:
   at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash)
   at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection)
   at System.Deployment.Application.ComponentVerifier.FileComponent.Verify()
   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)
   at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

 

Workaround

===========

This workaround must be applied to all machines that publish this solution or gets this Error)

change %windir%\Microsoft.Net\Framework\v2.0.50727\Microsoft.Common.targets (should
be on or around line 3173, easy way to search is search on PublishOnlyDependsOn):
You should have similar Configuration information, add _CopyManifestFiles

===========================================

<PropertyGroup>
<PublishOnlyDependsOn>
SetGenerateManifests;
PublishBuild;
BeforePublish;
GenerateManifests;
CleanPublishFolder;
_CopyManifestFiles;
_CopyFilesToPublishFolder;
_DeploymentGenerateBootstrapper;
ResolveKeySource;
_DeploymentSignClickOnceDeployment;
AfterPublish
</PublishOnlyDependsOn>
</PropertyGroup>


Comments (4)

  1. e_valizadeh says:

    i’ve done this, it worked for several times, but this error occures againthanks.

    here is error summary :

    ERROR SUMMARY

    Below is a summary of the errors, details of these errors are listed later in the log.

    * Activation of file://192.168.11.6/ehsan-valizadeh/test2/HAMARAADSL.application resulted in exception. Following failure messages were detected:

    + File, HAMARAADSL.exe, has a different computed hash than specified in manifest.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY

    No transaction error was detected.

    WARNINGS

    * The file named DundasWinChart.dll does not have a hash specified in the manifest. Hash validation will be ignored.

    * The file named Microsoft.Practices.ObjectBuilder.dll does not have a hash specified in the manifest. Hash validation will be ignored.

    * The file named Microsoft.Practices.EnterpriseLibrary.Data.dll does not have a hash specified in the manifest. Hash validation will be ignored.

    * The file named Microsoft.Practices.EnterpriseLibrary.Common.dll does not have a hash specified in the manifest. Hash validation will be ignored.

    * The file named DundasChartWizard.dll does not have a hash specified in the manifest. Hash validation will be ignored.

    OPERATION PROGRESS STATUS

    * [2009/08/19 8:34:50 PM] : Activation of file://192.168.11.6/ehsan-valizadeh/test2/HAMARAADSL.application has started.

    * [2009/08/19 8:34:50 PM] : Processing of deployment manifest has successfully completed.

    * [2009/08/19 8:34:50 PM] : Installation of the application has started.

    * [2009/08/19 8:34:50 PM] : Processing of application manifest has successfully completed.

    * [2009/08/19 8:34:51 PM] : Request of trust and detection of platform is complete.

    ————————————————-

    any idea?

    thanks.

  2. Gauravb says:

    You need to regenerate the application manifest. This happens when you change file contents and do not update your manifests accordingly.

  3. Gauravb, is your workaround applicable to other NetFx versions (3.5, 4.0, 4.5)? And could you explain please, why it works and what it the root cause of the issue with "File, <Filename>, has a different computed hash than specified in manifest." exception.

    Thanks,

    Eugene

  4. Andrew Petersen says:

    I am receiving this same error and understand that the manifest files need to be updated using mage.exe. I have not found a good solution on how this can be done. I am not sure what commands need to be ran and which files need to be updated.

    I have deleted my bin and obj folders to make sure the files are being re-created, but no luck.

Skip to main content