vb.netvisual-studio-2010clickoncevb.net-2010

Publish ClickOnce installation error "Exception reading from manifest" using VB.NET


I'm using Visual Studio 2010 and VB.NET. My target environment is .NET Framework 4.0.

So I'm facing this problem when I'm publishing my project by using the provided Setup.exe file. After the verifying application requirement popped up, an alert popped up with text:

Cannot Continue. The application is improperly formatted. Contact the application vendor for assistance.

When I clicked on the "Detail" button, it showed me this error:

PLATFORM VERSION INFO
Windows                 : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.239
System.Deployment.dll   : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll                 : 4.0.30319.239 (RTMGDR.030319-2300)
dfdll.dll               : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll              : 4.0.31106.0 (Main.031106-0000)

SOURCES
Deployment URL          : file:///I:/ProjectBMTRelease/ProjectBMT.application

IDENTITIES
Deployment Identity     : ProjectBMT.application, Version=1.0.0.6, Culture=neutral, PublicKeyToken=7439f62500c0364d, processorArchitecture=x86

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 I:\ProjectBMTRelease\ProjectBMT.application resulted in exception. Following failure messages were detected:
    + Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.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:       0x80070c81
         Start line:    0
         Start column:  0
         Host file:
    + Exception from HRESULT: 0x80070C81

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [6/23/2012 5:21:36 PM] : Activation of I:\ProjectBMTRelease\ProjectBMT.application has started.
* [6/23/2012 5:21:36 PM] : Processing of deployment manifest has successfully completed.
* [6/23/2012 5:21:36 PM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [6/23/2012 5:21:36 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
    - Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.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)
        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:       0x80070c81
         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
    - Exception from HRESULT: 0x80070C81
    - 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.

I checked my project's manifest file, but I am not good enough to find any problem there. For other information, I created simple "Hello World !" application to see if it will get published well, and it did.

What is the solution?


Solution

  • Check the following:

    Try enabling detailed logging and see if that provides more information.