c# - 如何修复 "The application is improperly formatted"错误?

标签 c# winforms

我发布的应用程序在我的计算机 (windows 10) 上运行良好,但在目标计算机 (windows 7) 上运行不正常

我尝试在不签署 ClickOnce list 的情况下发布,我已将所有引用副本本地设置为 true,我确保目标机器 .NET 版本相同,我已经完成了所有关于堆栈溢出的类似主题,并且没有任何帮助。

Cannot continue. The application is improperly formatted. Contact the application vendor for assistance.

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)

SOURCES Deployment url : file:///I:/Systems/Systems%20Team/Piotr/USELESS/MBID.application

ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of I:\Systems\Systems Team\Piotr\USELESS\MBID.application resulted in exception. Following failure messages were detected: + Exception reading manifest from file:///I:/Systems/Systems%20Team/Piotr/USELESS/MBID.application: the manifest may not be valid or the file could not be opened. + Deployment manifest is not semantically valid. + Deployment manifest identity contains missing or unsupported processor architecture.

COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.

WARNINGS There were no warnings during this operation.

OPERATION PROGRESS STATUS * [05/06/2019 12:34:14] : Activation of I:\Systems\Systems Team\Piotr\USELESS\MBID.application has started.

ERROR DETAILS Following errors were detected during this operation. * [05/06/2019 12:34:14] System.Deployment.Application.InvalidDeploymentException (ManifestParse) - Exception reading manifest from file:///I:/Systems/Systems%20Team/Piotr/USELESS/MBID.application: 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.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation) at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(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) - Deployment manifest is not semantically valid. - Source: System.Deployment - Stack trace: at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole() at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) --- Inner Exception --- System.Deployment.Application.InvalidDeploymentException (InvalidManifest) - Deployment manifest identity contains missing or unsupported processor architecture. - Source: System.Deployment - Stack trace: at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForDeploymentRole()

COMPONENT STORE TRANSACTION DETAILS No transaction information is available.

我需要让这个东西工作。

最佳答案

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

关于c# - 如何修复 "The application is improperly formatted"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56460047/

相关文章:

c# - 不确定如何在集合上运行Where来返回集合

c# - 在 c# winform 中的所有控件顶部绘制黑色矩形

c# - 测试复杂实体

c# - 自动从 XML 模式创建 GUI

c# - 在 linq 表映射中将多个表分配给单个类

c# - 为什么要在 Query 方法中添加 CommandType?

c# - 将 excel 函数转换为 c# Math.pow 不会产生相同的值

c# - 如何重命名 winforms 应用程序?

c# - ExecuteScalar() 总是返回 NULL

c# - MSI 为安装人员提出问题