ClickOnce Manifest Error

James Carmen 6 Reputation points
2022-07-06T05:19:19.987+00:00

Hi,

I'm getting the following error when trying to use clickonce to publish and install a WPF .net core 5 application:

PLATFORM VERSION INFO
Windows : 10.0.19044.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.8.4270.0 built by: NET48REL1LAST_C
clr.dll : 4.8.4515.0 built by: NET48REL1LAST_C
dfdll.dll : 4.8.4270.0 built by: NET48REL1LAST_C
dfshim.dll : 10.0.19041.1 (WinBuild.160101.0800)

SOURCES
Deployment url : file:///C:/Temp/netCore/TestApp.application

IDENTITIES
Deployment Identity : TestApp.application, Version=1.0.0.4, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=msil

APPLICATION SUMMARY
* Installable application.

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Temp\netCore\TestApp.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/Temp/netCore/Application%20Files/TestApp_1_0_0_4/TestApp.dll.manifest: the manifest may not be valid or the file could not be opened.
+ Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c89
Start line: 0
Start column: 0
Host file:
+ Master did not send an update notice for directory at the expected time. (Exception from HRESULT: 0x80070C89)

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

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

OPERATION PROGRESS STATUS
* [6/07/2022 3:16:10 PM] : Activation of C:\Temp\netCore\TestApp.application has started.
* [6/07/2022 3:16:10 PM] : Processing of deployment manifest has successfully completed.
* [6/07/2022 3:16:10 PM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [6/07/2022 3:16:10 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/Temp/netCore/Application%20Files/TestApp_1_0_0_4/TestApp.dll.manifest: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
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, Uri& deploymentUri)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
-HRESULT: 0x80070c89
Start line: 0
Start column: 0
Host file:
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Runtime.InteropServices.COMException
- Master did not send an update notice for directory at the expected time. (Exception from HRESULT: 0x80070C89)
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

If anyone has any advice that would be greatly appreciated.

Thanks!

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,671 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,119 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. James Carmen 6 Reputation points
    2022-07-06T06:42:24.793+00:00

    Managed to find the solution.

    For people looking for the future, i used MageUI.exe to open the manifest file generated, and in trying to save it through there, the form offered a better error message as to what was wrong with the manifest.
    In this case, there were 2 instances of the exe, caused by another application assembly being used in the build.

    1 person found this answer helpful.

  2. Dennis Gascoigne 5 Reputation points
    2023-07-18T07:23:09.46+00:00

    OK - so this is the most useful thing I have found relating to debugging clickonce. Thanks. For those asking the question about how, James Carmen gives plenty of info - but here it is step by step

    • In visual studio, open the developer command line prompt and type MageUI.exe
    • In the MageUI.exe app, open the manifest you are reviewing
    • Click save as and try and save

    In my case, this gave me an error I could easily debug.

    1 person found this answer helpful.
    0 comments No comments