Clickonce“应用程序格式不正确”

时间:2015-10-01 11:30:55

标签: c# .net winforms visual-studio clickonce

您好我正在尝试将我的应用程序发布为clickonce应用程序。我无法启动或下载应用程序,它总是说:“应用程序格式不正确”

它与.manifest文件

有关

这是错误日志:

INFO FOR PLATFORM VERSION
    Windows: 6.1.7600.0 (Win32NT)
    Common Language Runtime: 4.0.30319.34209
    System.Deployment.dll: 4.0.30319.34209 built by: FX452RTMGDR
    clr.dll: 4.0.30319.34209 built by: FX452RTMGDR
    dfdll.dll: 4.0.30319.34209 built by: FX452RTMGDR
    dfshim.dll: 4.0.31106.0 (Main.031106-0000)

SOURCES
    Deployment URL: http://bss-bln.host56.com/Ticketinfo/Ticketinformation_Kunde.application
                        Server: Apache

IDENTITIES
    Deployment Identity: Ticketinformation_Kunde.application, Version = 1.0.0.13, Culture = en, PublicKeyToken = aaa338d336dbcce2, processorArchitecture = MSIL

APPLICATION SUMMARY
    * Pure Online application.
    * Parameters for trust position URL is set.
ERROR SUMMARY
    The following is a summary of the errors. Details of these errors are listed later in the log.
    * Activation of http://bss-bln.host56.com/Ticketinfo/Ticketinformation_Kunde.application resulted in exception. Following failure messages were detected:
        + Exception while reading the manifesto 'http://bss-bln.host56.com/Ticketinfo/Application%20Files/Ticketinformation_Kunde_1_0_0_13/Ticketinformation_Kunde.exe.manifest': The manifest may not be valid or the file could not be opened.
        + Unexpected end of file. The following items were not closed: br, br. Line 3, position 254th

ERROR SUMMARY FOR THE COMPONENT STORE TRANSACTION
    It has been found No transaction error.

WARNINGS
    During this process, there were no warnings.

PROGRESS STATUS PROCESS
    * [01/10/2015 13:29:40]: The activation of http://bss-bln.host56.com/Ticketinfo/Ticketinformation_Kunde.application was launched.
    * [01/10/2015 13:29:40]: The processing of the deployment manifesto was successfully completed.
    * [01/10/2015 13:29:40]: The installation of the application is started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [01/10/2015 13:29:41] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Except from reading the Manifesto 'http://bss-bln.host56.com/Ticketinfo/Application%20Files/Ticketinformation_Kunde_1_0_0_13/Ticketinformation_Kunde.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, Manifest Type manifest type, Uri SourceUri)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest (assembly manifest DeploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, Download Options options, Uri & appSourceUri, String & appManifestPath)
            at System.Deployment.Application.DownloadManager.DownloadApplicationManifest (assembly manifest DeploymentManifest, String targetDir, Uri deploymentUri, Uri & appSourceUri, String & appManifestPath)
            at System.Deployment.Application.ApplicationActivator.DownloadApplication (SubscriptionState substate, Activation Description actDesc, Int64 transactionId, TempDirectory & downloadTemp)
            at System.Deployment.Application.ApplicationActivator.InstallApplication (SubscriptionState & substate, Activation Description actDesc)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation (Uri activationUri, Boolean IsShortcut, String textualSubId, String deploymentProviderUrlFromExtension, Browser Settings Browser settings, String & errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker (Object state)
        --- Exception ---
        System.Xml.XmlException
        - Unexpected end of file. The following items were not closed: br, br. Line 3, position 254th
        - Source: System.Xml
        - Stack Trace:
            at System.Xml.XmlTextReaderImpl.Throw (String res, String arg)
            at System.Xml.XmlTextReaderImpl.ParseElementContent ()
            at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read ()
            at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read ()
            at System.Xml.XmlTextReaderImpl.Skip ()
            at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read ()
            at System.Xml.XmlTextReaderImpl.Skip ()
            at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read ()
            at System.Xml.XmlCharCheckingReader.Read ()
            at System.Xml.XsdValidatingReader.Read ()
            at System.Deployment.Application.ManifestReader.FromDocument (string localPath, Manifest Type manifest type, Uri SourceUri)

DETAILS FOR COMPONENT STORE TRANSACTION
    There are no transaction information is available.

这是我的.manifest文件:

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" 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" 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">
  <asmv1:assemblyIdentity name="Ticketinformation_Kunde.exe" version="1.0.0.8" publicKeyToken="0000000000000000" language="de" processorArchitecture="msil" type="win32" />
  <description asmv2:iconFile="favicon.ico" asmv2:publisher="Business Solutions for Services GmbH" asmv2:product="Ticketinformation Kunde" asmv2:supportUrl="http://sp.bss-bln.de/otrs/customer.pl" co.v1:errorReportUrl="http://sp.bss-bln.de/otrs/customer.pl" xmlns="urn:schemas-microsoft-com:asm.v1" />
  <application />
  <entryPoint>
    <assemblyIdentity name="Ticketinformation_Kunde" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
    <commandLine file="Ticketinformation_Kunde.exe" parameters="" />
  </entryPoint>
  <co.v1:useManifestForTrust xmlns="urn:schemas-microsoft-com:asm.v1" />
  <trustInfo>
    <security>
      <applicationRequestMinimum>
        <PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
        <defaultAssemblyRequest permissionSetReference="Custom" />
      </applicationRequestMinimum>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!--
          UAC-Manifestoptionen
          Wenn Sie die Zugangsebene für das Windows-Benutzerkonto ändern möchten, ersetzen Sie den 
          requestedExecutionLevel-Knoten durch eines der folgenden Elemente.

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

         Löschen Sie den requestedExecutionLevel-Knoten, wenn Sie 
         zum Gewährleisten der Abwärtskompatibilität die Datei- und Registrierungsvirtualisierung verwenden möchten.
    -->
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentOS>
      <osVersionInfo>
        <os majorVersion="5" minorVersion="1" buildNumber="2600" servicePackMajor="0" />
      </osVersionInfo>
    </dependentOS>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="preRequisite" allowDelayedBinding="true">
      <assemblyIdentity name="Microsoft.Windows.CommonLanguageRuntime" version="4.0.30319.0" />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="MySql.Data.dll" size="457216">
      <assemblyIdentity name="MySql.Data" version="6.9.7.0" publicKeyToken="C5687FC88969C44D" 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>njY9DdsO0hqeWSIV0A9SEldM3Iw=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ObjectListView.dll" size="411648">
      <assemblyIdentity name="ObjectListView" version="2.8.0.20666" publicKeyToken="B1C5BF581481BCD4" 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>uzPfiE5JcBS9CPZcomzPrHxUI6k=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="System.Net.Http.dll" size="180832">
      <assemblyIdentity name="System.Net.Http" version="2.0.0.0" publicKeyToken="B03F5F7F11D50A3A" 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>vnPECG7jPdg4oYzUFMTu1U4KLqc=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="de\System.Net.Http.resources.dll" size="18528">
      <assemblyIdentity name="System.Net.Http.resources" version="2.0.0.0" publicKeyToken="B03F5F7F11D50A3A" language="de" 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>Fg1hDAh1my6yMsa4zfgpxXBibr4=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="Ticketinformation_Kunde.exe" size="276912">
      <assemblyIdentity name="Ticketinformation_Kunde" 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>BzZ25jMbQIOYFA5h7C0imwRzkBU=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
  <file name="favicon.ico" size="4286">
    <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>+186ydejomchlxjKQf90VGzkEEc=</dsig:DigestValue>
    </hash>
  </file>
  <file name="Ticketinformation_Kunde.exe.config" size="5938">
    <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>OR5AgY87w2XiQ+f73gt1T5BNH+8=</dsig:DigestValue>
    </hash>
  </file>
</asmv1:assembly>

1 个答案:

答案 0 :(得分:0)

看起来你*.manifest文件已损坏。当您直接链接到您的文件时,我查看了*.manifest文件,发现它包含html。修复您的*.manifest文件,然后重试。您的清单文件应该看起来像here