如何解决“应用程序格式不正确”的错误?

时间:2019-06-05 11:57:37

标签: c# winforms

我正在发布在我的计算机上正常运行的应用程序(Windows 10),但在目标计算机上却无法运行(Windows 7)

我尝试发布时未签署ClickOnce清单,我将所有引用副本都设置为true,我确保目标计算机.NET版本是相同的,在堆栈溢出时我经历了所有类似的主题,并且没有任何帮助。

  

无法继续。该应用程序格式不正确。请与应用程序供应商联系以获得帮助。

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

来源                   部署网址:file:/// I:/Systems/Systems%20Team/Piotr/USELESS/MBID.application

     

错误摘要                   下面是错误的摘要,这些错误的详细信息在日志的后面列出。                   *激活I:\ Systems \ Systems Team \ Piotr \ USELESS \ MBID.application导致异常。检测到以下失败消息:                                   +从文件:/// I:/Systems/Systems%20Team/Piotr/USELESS/MBID.application读取异常清单:清单可能无效或无法打开文件。                                   +部署清单在语义上无效。                                   +部署清单标识包含缺少或不受支持的处理器体系结构。

     

组件存储交易失败摘要                   没有检测到交易错误。

     

警告                   该操作期间没有警告。

     

操作进度状态                   * [05/06/2019 12:34:14]:I:\ Systems \ Systems Team \ Piotr \ USELESS \ MBID.application的激活已开始。

     

错误详细信息                   在此操作期间检测到以下错误。                   * [05/06/2019 12:34:14] System.Deployment.Application.InvalidDeploymentException(ManifestParse)                                   -从文件:/// I:/Systems/Systems%20Team/Piotr/USELESS/MBID.application中读取异常清单:清单可能无效或无法打开文件。                                   -来源:System.Deployment                                   - 堆栈跟踪:                                                   在System.Deployment.Application.ManifestReader.FromDocument(String localPath,ManifestType manifestType,Uri sourceUri)中                                                   在System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass处(SubscriptionStore子商店,Uri&sourceUri,TempFile&tempFile,SubscriptionState&subState,IDownloadNotification通知,DownloadOptions选项,ServerInformation&serverInformation)                                                   在System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass处(SubscriptionStore子商店,Uri&sourceUri,TempFile&tempFile,SubscriptionState&subState,IDownloadNotification通知,DownloadOptions选项)                                                   在System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation处(Uri activationUri,布尔值isShortcut,字符串textualSubId,字符串deploymentProviderUrlFromExtension,BrowserSettings browserSettings,String&errorPageUrl,Uri&deploymentUri)                                                   在System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri,布尔值isShortcut,字符串textualSubId,字符串DeploymentProviderUrlFromExtension,BrowserSettings browserSettings,字符串&errorPageUrl)   ---从之前引发异常的位置开始的堆栈结束跟踪---                                                   在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()                                                   在System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri,布尔值isShortcut,字符串textualSubId,字符串DeploymentProviderUrlFromExtension,BrowserSettings browserSettings,字符串&errorPageUrl)                                                   在System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(对象状态)                                   -内部异常-                                   System.Deployment.Application.InvalidDeploymentException(ManifestSemanticValidation)                                   -部署清单在语义上无效。                                   -来源:System.Deployment                                   - 堆栈跟踪:                                                   在System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole()                                                   在System.Deployment.Application.ManifestReader.FromDocument(String localPath,ManifestType manifestType,Uri sourceUri)中                                   -内部异常-                                   System.Deployment.Application.InvalidDeploymentException(InvalidManifest)                                   -部署清单标识包含缺少或不受支持的处理器体系结构。                                   -来源:System.Deployment                                   - 堆栈跟踪:                                                   在System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole()

     

组件存储交易详细信息                   没有交易信息。

我需要使这个东西工作。

1 个答案:

答案 0 :(得分:1)

在发布了专门针对32位计算机的版本后,按照Panagiotis Kanavos的建议,它可以正常工作。