?
Solved

InvalidDeploymentException (ManifestParse) Error when publishing the Visual C# app?

Posted on 2011-09-22
6
Medium Priority
?
2,511 Views
Last Modified: 2013-12-17
Hi,


I am trying to compile this visual c# app.
It uses the icon images.
They are in the res folder in the project.

Do I need to do separately and copy them?

From the VS 2010, it builds and publishes fine.
When I try to install by clicking the setup.exe, this is what I get.
Can you help?

ERROR DETAILS
      Following errors were detected during this operation.
      * [9/22/2011 3:32:35 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
            - Exception reading manifest from file:///C:/QB/WebCrawler/CrawlerCSharp/MyCrawler/Application%20Files/Crawler_1_0_0_1/Crawler.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.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, 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 (ManifestSemanticValidation)
            - Application manifest is not semantically valid.
            - Source: System.Deployment
            - Stack trace:
                  at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()
                  at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
            --- Inner Exception ---
            System.Deployment.Application.InvalidDeploymentException (InvalidManifest)
            - Icon file specified in the application manifest is not valid.
            - Source: System.Deployment
            - Stack trace:
                  at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()
0
Comment
Question by:dkim18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40
ID: 36583385
Look at the beginning of the details : There is a problem in you manifest file : Crawler.exe.manifest

Could you post the content of the file?
0
 

Author Comment

by:dkim18
ID: 36583454

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
  <asmv1:assemblyIdentity version="1.0.0.1" name="Crawler.exe" publicKeyToken="434c9f6e438b5bfa" language="neutral" processorArchitecture="msil" type="win32" />
  <description asmv2:iconFile=".\res\App.ico" xmlns="urn:schemas-microsoft-com:asm.v1" />
  <application />
  <entryPoint>
    <assemblyIdentity name="Crawler" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
    <commandLine file="Crawler.exe" parameters="" />
  </entryPoint>
  <trustInfo>
    <security>
      <applicationRequestMinimum>
        <PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
        <defaultAssemblyRequest permissionSetReference="Custom" />
      </applicationRequestMinimum>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC Manifest Options
            If you want to change the Windows User Account Control level replace the 
            requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />

            Specifying requestedExecutionLevel node will disable file and registry virtualization.
            If you want to utilize File and Registry Virtualization for backward 
            compatibility then delete the requestedExecutionLevel node.
        -->
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentOS>
      <osVersionInfo>
        <os majorVersion="4" minorVersion="10" buildNumber="0" servicePackMajor="0" />
      </osVersionInfo>
    </dependentOS>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
      <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="2.0.50727.0" />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Crawler.exe" size="159744">
      <assemblyIdentity name="Crawler" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
      <hash>
        <dsig:Transforms>
          <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
        </dsig:Transforms>
        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
        <dsig:DigestValue>dXFjYXeayxkNMfkcr5PtH55eNFk=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
  <file name=".\res\App.ico" size="318">
    <hash>
      <dsig:Transforms>
        <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
      </dsig:Transforms>
      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
      <dsig:DigestValue>aGPr8ba1gt5gEo4hprwDIyXEO4g=</dsig:DigestValue>
    </hash>
  </file>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <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 7, uncomment the following supportedOS node-->
      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
    </application>

Open in new window

0
 

Author Comment

by:dkim18
ID: 36583622
This vs c# app is from the codeproject.com.
I published the original source code and am unable to install it.

This was vs 7.1 project and I am using the vs 10 but I changed the target flatform to be .net 2.0.
There is security and signing setting.
I didn't enable the sign the clickone manifest nor enable it in the security tab.
When I published the project, they are changed and both are enabled.
Why is that doing that?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 40
ID: 36584554
Up to framework 3.5 SP1, ClickOnce deployment needed to be signed, manifest as well as application. Since you are targeting version 2.0, you need to sign both.

The only alternative is to target framework 3.5 SP1 or 4.0. Just cross you fingers, skipping a couple of versions of the framework sometimes brings headaches. But most often not.
0
 

Author Comment

by:dkim18
ID: 36586265
Is that why I am having this install problem?

The client has frame 2.0 I believe. (might have 3.5)
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 36587502
You told us that you changed the target platform to 2.0, so the application should be able to run, in your users environment.

But if he has 3.5, you would first be better to target 3.5. And 3.5 came in 2 versions: 3.5 and 3.5 SP1.

You can check which version is installed by going in C:\Windows\Microsoft.NET\Framework on the user computer. If he has a v3.5 folder under Framework, then he has 3.5. If inside that 3.5 folder there is another one called Microsoft .NET Framework 3.5 SP1, then he has the service pack installed. Might be good to check if he as 4.0, just in case.

Target the highest version installed on the user's computer in your compilation.

From what you said, it is not clear if you signed the assembly or not.

I didn't enable the sign the clickone manifest nor enable it in the security tab.
When I published the project, they are changed and both are enabled.
Why is that doing that?


You did not enable it in the first line, but you say that it was in the second line. It does not get enabled automatically.

If the user has framework 2.0, 3.0, or 3.5, your ClickOnce deployment must have a digital signature, on both the manifest and the application itself. The signature should also be a .pfx file, not a .snk.

Only with 3.5 SP1 can you use ClickOnce without a signature.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question