Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

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

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()
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

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?
Avatar of dkim18
dkim18

ASKER


<?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

Avatar of dkim18

ASKER

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?
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.
Avatar of dkim18

ASKER

Is that why I am having this install problem?

The client has frame 2.0 I believe. (might have 3.5)
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial