Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello every one

I had a project that deployed via click-once and published and then installed just fine

then after adding ReportViewerControl via NuGet , it is published Ok

when I tried to install it I got the following error :
Cannot continue. The application is improperly formatted.

Details :
PLATFORM VERSION INFO
Windows : 10.0.14393.0 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.6.1586.0 built by: NETFXREL2
clr.dll : 4.6.1637.0 built by: NETFXREL3STAGE
dfdll.dll : 4.6.1586.0 built by: NETFXREL2
dfshim.dll : 10.0.14393.0 (rs1_release.160715-1616)

SOURCES
Deployment url
: file:///D:/Projects/Published/UltimatePharmaForms.application

IDENTITIES
Deployment Identity
: UltimatePharmaForms.application, Version=17.3.30.1138, 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 D:\Projects\Published\UltimatePharmaForms.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///D:/Projects/Published/Application%20Files/UltimatePharmaForms_17_3_30_1138/UltimatePharmaForms.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
* The manifest for this application does not have a signature. Signature validation will be ignored.

OPERATION PROGRESS STATUS
* [31/03/2017 10:48:49 PM] : Activation of D:\Projects\Published\UltimatePharmaForms.application has started.
* [31/03/2017 10:48:49 PM] : Processing of deployment manifest has successfully completed.
* [31/03/2017 10:48:49 PM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [31/03/2017 10:48:49 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///D:/Projects/Published/Application%20Files/UltimatePharmaForms_17_3_30_1138/UltimatePharmaForms.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 don't understand anything from it :(
Can you please help me figure out why this error is happening and how to solve it ?
Thanks very much.

What I have tried:

Disable signing the click-once manifest
Disable signing the assembly
Change Target Framework to 4.6.1
Change Target Framework to 4.6.2
Posted
Updated 10-Aug-21 23:04pm
Comments
Graeme_Grant 2-Apr-17 8:42am    
- Exception reading manifest from file:///D:/Projects/Published/Application%20Files/UltimatePharmaForms_17_3_30_1138/UltimatePharmaForms.exe.manifest: the manifest may not be valid or the file could not be opened. 

Have you checked that the file is being included in the package?
Ahmad_kelany 2-Apr-17 10:24am    
Thanks for your reply,
Yes I checked and it's included.
Graeme_Grant 2-Apr-17 10:32am    
Does "reportviewercontrol 14" have any dependencies of its own that are not manually added to the install build?
Ahmad_kelany 2-Apr-17 10:59am    
That I don't know, the project builds and runs perfectly in debug mode with no errors,
and the failing installation attempt is done on the same machine that I develop on.

 
Share this answer
 
I solved it by commenting out the content of application tag in app.manifest file.
<application>
  <!-- A list of all Windows versions that this application is designed to work with.
  Windows will automatically select the most compatible environment.-->

  <!-- If your application is designed to work with Windows Vista, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->

  <!-- If your application is designed to work with Windows 7, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->

  <!-- If your application is designed to work with Windows 8, uncomment the following supportedOS node-->
  <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->

  <!--The ID below indicates application support for Windows 8.1 -->
  <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>-->

  <!--The ID below indicates application support for Windows 10 -->
  <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>-->

</application>

Note: If clickonce is signed then removing only the vista one would do the trick otherwise removing the entire section.
Hope this helps!!!
 
Share this answer
 
I had a similar issue however i realised that i had an ampersand (&) in my assembly name. Removing the character solved my issue. I hope this helps you out.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900