Solved

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

Posted on 2011-09-22
6
2,186 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
  • 3
  • 3
6 Comments
 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
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
Comment Utility

<?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
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now