Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-09-22
6
Medium Priority
?
2,672 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
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

810 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