在 Windows 7 64 位和 Windows XP 32 位上创建 ClickOnce 应用程序 (mage.exe)

发布于 2024-12-22 14:16:54 字数 5006 浏览 0 评论 0原文

我的应用程序通过命令行工具 法师。如果我在 Windows XP 32 位 (Visual Studio 2008) 上构建 ClickOnce 应用程序,并双击 xxx.application 文件,则它可以正常工作。

同一项目在 Windows 7 64 位 (Visual Studio 2008) 上运行,ClickOnce 应用程序创建良好,但启动 xx.application 文件会生成错误(见下文)。

我使用的是 MS-SDK 6.0A“...Program Files\Microsoft SDKs\Windows\v6.0A\Bin\mage.exe”

这是为什么?

错误信息

PLATFORM VERSION INFO

    Windows                  : 6.1.7601.65536 (Win32NT)
    Common Language Runtime  : 4.0.30319.239
    System.Deployment.dll    : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll                  : 4.0.30319.239 (RTMGDR.030319-2300)
    dfdll.dll                : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll               : 4.0.31106.0 (Main.031106-0000)


SOURCES

    Deployment url           : file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop.application


IDENTITIES

    Deployment Identity      : M4Desktop.app, Version=2.2.0.26921,
    Culture=neutral, PublicKeyToken=7825390df6ab8bb8,
    processorArchitecture=msil

APPLICATION SUMMARY

    * Installable application.


ERROR SUMMARY

    Below is a summary of the errors, details of these
    errors are listed later in the log.
    * Activation of C:\m4\branches\oebb2.2.0\Deployment\M4Desktop.application resulted in
      exception. Following failure messages were detected:
      + Exception reading manifest from file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop_2.2.0.26921/M4Desktop.exe.manifest:

        the manifest may not be valid or the file could not be opened.

      + Application manifest is not semantically valid.
      + Specified <entryPoint> is not valid. Check that the path to the entrypoint is
        well-formed and the entrypoint exists in the deployment.


COMPONENT STORE TRANSACTION FAILURE SUMMARY

    No transaction error was detected.


WARNINGS

    There were no warnings during this operation.

OPERATION PROGRESS STATUS     * [22.12.2011 10:42:49] : Activation of
C:\m4\branches\oebb2.2.0\Deployment\M4Desktop.application has started.
    * [22.12.2011 10:42:49] : Processing of deployment manifest has
successfully completed.     * [22.12.2011 10:42:49] : Installation of the
application has started.


ERROR DETAILS     Following errors were detected during this operation.
    * [22.12.2011 10:42:49]
System.Deployment.Application.InvalidDeploymentException
(ManifestParse)

      - Exception reading manifest from file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop_2.2.0.26921/M4Desktop.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)
        - Specified <entryPoint> is not valid. Check that the path to the entrypoint is well-formed and the entrypoint exists in the deployment.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()

COMPONENT STORE TRANSACTION DETAILS

My application creates a ClickOnce application via the command line tool Mage. If I build the ClickOnce application on Windows XP 32-bit (Visual Studio 2008), and double click the xxx.application file, it's working fine.

The same project run on Windows 7 64 bit (Visual Studio 2008), and the ClickOnce application is created fine, but starting the xx.application file generates an error (see below).

I'm using the MS-SDK 6.0A "...Program Files\Microsoft SDKs\Windows\v6.0A\Bin\mage.exe"

Why is this?

Error message

PLATFORM VERSION INFO

    Windows                  : 6.1.7601.65536 (Win32NT)
    Common Language Runtime  : 4.0.30319.239
    System.Deployment.dll    : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll                  : 4.0.30319.239 (RTMGDR.030319-2300)
    dfdll.dll                : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll               : 4.0.31106.0 (Main.031106-0000)


SOURCES

    Deployment url           : file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop.application


IDENTITIES

    Deployment Identity      : M4Desktop.app, Version=2.2.0.26921,
    Culture=neutral, PublicKeyToken=7825390df6ab8bb8,
    processorArchitecture=msil

APPLICATION SUMMARY

    * Installable application.


ERROR SUMMARY

    Below is a summary of the errors, details of these
    errors are listed later in the log.
    * Activation of C:\m4\branches\oebb2.2.0\Deployment\M4Desktop.application resulted in
      exception. Following failure messages were detected:
      + Exception reading manifest from file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop_2.2.0.26921/M4Desktop.exe.manifest:

        the manifest may not be valid or the file could not be opened.

      + Application manifest is not semantically valid.
      + Specified <entryPoint> is not valid. Check that the path to the entrypoint is
        well-formed and the entrypoint exists in the deployment.


COMPONENT STORE TRANSACTION FAILURE SUMMARY

    No transaction error was detected.


WARNINGS

    There were no warnings during this operation.

OPERATION PROGRESS STATUS     * [22.12.2011 10:42:49] : Activation of
C:\m4\branches\oebb2.2.0\Deployment\M4Desktop.application has started.
    * [22.12.2011 10:42:49] : Processing of deployment manifest has
successfully completed.     * [22.12.2011 10:42:49] : Installation of the
application has started.


ERROR DETAILS     Following errors were detected during this operation.
    * [22.12.2011 10:42:49]
System.Deployment.Application.InvalidDeploymentException
(ManifestParse)

      - Exception reading manifest from file:///C:/m4/branches/oebb2.2.0/Deployment/M4Desktop_2.2.0.26921/M4Desktop.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)
        - Specified <entryPoint> is not valid. Check that the path to the entrypoint is well-formed and the entrypoint exists in the deployment.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()

COMPONENT STORE TRANSACTION DETAILS

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风筝有风,海豚有海 2024-12-29 14:16:54

就我而言,问题是 标记之间的 processorArchitecture 值不匹配。

通过命令行 Mage 生成清单时,我没有添加 -p x86 选项。

ClickOnce 应用程序中包含的一些 DLL 文件是使用 x86 解决方案 构建的,但 Mage 默认使用 processorArchitecture=x86 生成 assembleIdentity

我正在使用 Windows 7 64 位和 Windows XP 32 位上的 Visual Studio 2008。

请参阅下面的清单文件的相关部分。

未工作清单

  <asmv1:assemblyIdentity
      name="M4Desktop.exe"
      version="2.2.0.27055"
      publicKeyToken="7825390df6ab8bb8"
      language="neutral"
      processorArchitecture="msil"
      type="win32" />
  <application />
  <entryPoint>
    <assemblyIdentity
        name="M4DesktopUpdater"
        version="1.0.0.0"
        publicKeyToken="D2F6EAED73E3B4FE"
        language="neutral"
        processorArchitecture="x86" />
    <commandLine
        file="M4DesktopUpdater.exe"
        parameters="" />
  </entryPoint>

工作清单

  <asmv1:assemblyIdentity
      name="M4Desktop.exe"
      version="2.2.0.27055"
      publicKeyToken="7825390df6ab8bb8"
      language="neutral"
      processorArchitecture="x86"
      type="win32" />
  <application />
  <entryPoint>
    <assemblyIdentity
        name="M4DesktopUpdater"
        version="1.0.0.0"
        publicKeyToken="D2F6EAED73E3B4FE"
        language="neutral"
        processorArchitecture="x86" />
    <commandLine
        file="M4DesktopUpdater.exe"
        parameters="" />
  </entryPoint>

In my case the problem was non-matching values processorArchitecture between the <assemblyIdentity> and <entryPoint> tags.

When generating the manifest via command line Mage I didn't add the -p x86 option.

Some DLL files included in the ClickOnce application where built with x86 solution, but Mage generated assemblyIdentity with processorArchitecture=x86 by default.

I'm working with both Visual Studio 2008 on Windows 7 64-bit and also Windows XP 32-bit.

See below for relevant parts of the manifest file.

Not working manifest

  <asmv1:assemblyIdentity
      name="M4Desktop.exe"
      version="2.2.0.27055"
      publicKeyToken="7825390df6ab8bb8"
      language="neutral"
      processorArchitecture="msil"
      type="win32" />
  <application />
  <entryPoint>
    <assemblyIdentity
        name="M4DesktopUpdater"
        version="1.0.0.0"
        publicKeyToken="D2F6EAED73E3B4FE"
        language="neutral"
        processorArchitecture="x86" />
    <commandLine
        file="M4DesktopUpdater.exe"
        parameters="" />
  </entryPoint>

Working manifest

  <asmv1:assemblyIdentity
      name="M4Desktop.exe"
      version="2.2.0.27055"
      publicKeyToken="7825390df6ab8bb8"
      language="neutral"
      processorArchitecture="x86"
      type="win32" />
  <application />
  <entryPoint>
    <assemblyIdentity
        name="M4DesktopUpdater"
        version="1.0.0.0"
        publicKeyToken="D2F6EAED73E3B4FE"
        language="neutral"
        processorArchitecture="x86" />
    <commandLine
        file="M4DesktopUpdater.exe"
        parameters="" />
  </entryPoint>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文