【问题标题】:Specified <entryPoint> is not valid. Check that the path to the entrypoint is well-formed and the entrypoint exists in the deployment指定的 <entryPoint> 无效。检查入口点的路径是否格式正确并且入口点存在于部署中
【发布时间】:2020-08-25 21:45:11
【问题描述】:

我正在使用 clickonce 部署一个应用程序,效果很好。

构建文件夹的结构是:

所有的东西都在不同的文件夹下,按版本号命名。

还有Entry Point(.exe 文件) 通过 mage.exe 生成.manifestfile 和.application 到目前为止一切正常。我可以本地安装,在线安装和更新。

问题是当我更改构建文件夹的结构时,我使用 1.0.0.7 我在 1.0.0.7 下新建了一个名为“Release”的文件夹,将所有文件移动到“Release”中。(我不能发布图片,所以画出来)

 1.0.0.7
   |----- Release
      |----- .dll
      |----- .exe 
      |----- ...(everything)
   |----- HelloWorld.exe.manifest

使用 mage.exe 创建一个.manifest,并更新.application。 在我看来,这应该是工作。每一步都与上述相同(1.0.0.0/6)。 只添加一个Release 文件夹

**当我点击.application安装时,出现错误**,本地安装和在线安装,即使我在安装之前卸载旧版本。

错误:无法继续。应用程序格式不正确。联系他的应用程序供应商寻求帮助。

日志内容:

PLATFORM VERSION INFO
    Windows             : 6.1.7601.65536 (Win32NT)
    Common Language Runtime     : 4.0.30319.42000
    System.Deployment.dll       : 4.6.1590.0 built by: NETFXREL2
    clr.dll             : 4.6.1590.0 built by: NETFXREL2
    dfdll.dll           : 4.6.1590.0 built by: NETFXREL2
    dfshim.dll          : 4.0.41209.0 (Main.041209-0000)

SOURCES
    Deployment url          : file:///C:/job/clickOnce_pubish/HelloWorldLauncher.application

IDENTITIES
    Deployment Identity     : helloWorld.app, Version=1.0.0.7, Culture=neutral, PublicKeyToken=d77022dd53fe7e1e, 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:\job\clickOnce_pubish\HelloWorldLauncher.application resulted in exception. Following failure messages were detected:
        + Exception reading manifest from file:///C:/job/clickOnce_pubish/1.0.0.7/HellowWorld.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
    * [2017/9/19 18:52:36] : Activation of C:\job\clickOnce_pubish\HelloWorldLauncher.application has started.
    * [2017/9/19 18:52:36] : Processing of deployment manifest has successfully completed.
    * [2017/9/19 18:52:36] : Installation of the application has started.

ERROR DETAILS
    Following errors were detected during this operation.
    * [2017/9/19 18:52:36] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from file:///C:/job/clickOnce_pubish/1.0.0.7/HellowWorld.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.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
    No transaction information is available.

我比较了 1.0.0.7 下的.manifest 和其他版本,唯一的区别是一个'Release'

1.0.0.6 | 1.0.0.7
------- | ------- 
file="HelloWorld.Desktop.exe" |commandLine file="Release\HelloWorld.Desktop.exe"
codebase="HelloWorldModule.dll"|codebase="Release\HelloWorldModule.dll"|
...|Release\...

有人可以帮助我吗?非常感谢。

【问题讨论】:

    标签: .net windows clickonce


    【解决方案1】:

    我遇到了这个问题,结果是目标架构与 AnyCPU 不匹配

    为了解决这个问题,我必须在运行清单生成和编辑工具时添加匹配的架构

    mage ... -Processor msil ...
    

    附加链接:

    https://docs.microsoft.com/en-us/dotnet/framework/tools/mage-exe-manifest-generation-and-editing-tool

    https://docs.microsoft.com/pl-pl/dotnet/framework/configure-apps/file-schema/runtime/assemblyidentity-element-for-runtime

    【讨论】:

      【解决方案2】:

      它可能已经过时了,但你有一个简单的错误:

      从 file:///C:/job/clickOnce_pubish/1.0.0.7/HellowWorld.exe.manifest 读取清单时出现异常:清单可能不是有效或无法打开文件。编辑。

      检查您的脚本。清单名称中有多余的“w”

      【讨论】:

        猜你喜欢
        • 2012-10-20
        • 1970-01-01
        • 1970-01-01
        • 2017-10-13
        • 1970-01-01
        • 1970-01-01
        • 2023-03-09
        • 2016-04-29
        • 2020-12-19
        相关资源
        最近更新 更多