?
Solved

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

Posted on 2011-09-22
6
Medium Priority
?
2,611 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 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