vb.net - 使用VB.NET发布ClickOnce安装报错 "Exception reading from manifest"

标签 vb.net visual-studio-2010 clickonce vb.net-2010

我正在使用 Visual Studio 2010 和 VB.NET .我的目标环境是 .NET框架 4.0。

因此,当我使用提供的 Setup.exe 文件发布我的项目时,我遇到了这个问题。弹出验证应用程序要求后,弹出带有文本的警报:

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.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:///I:/ProjectBMTRelease/ProjectBMT.application

IDENTITIES
Deployment Identity     : ProjectBMT.application, Version=1.0.0.6, Culture=neutral, PublicKeyToken=7439f62500c0364d, processorArchitecture=x86

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 I:\ProjectBMTRelease\ProjectBMT.application resulted in exception. Following failure messages were detected:
    + Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.exe.manifest: the manifest may not be valid or the file could not be opened.
    + Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
        -HRESULT:       0x80070c81
         Start line:    0
         Start column:  0
         Host file:
    + Exception from HRESULT: 0x80070C81

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [6/23/2012 5:21:36 PM] : Activation of I:\ProjectBMTRelease\ProjectBMT.application has started.
* [6/23/2012 5:21:36 PM] : Processing of deployment manifest has successfully completed.
* [6/23/2012 5:21:36 PM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [6/23/2012 5:21:36 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
    - Exception reading manifest from file:///I:/ProjectBMTRelease/Application%20Files/ProjectBMT_1_0_0_6/ProjectBMT.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 (ManifestParse)
    - Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed:
        -HRESULT:       0x80070c81
         Start line:    0
         Start column:  0
         Host file:
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
        at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream)
        at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
    --- Inner Exception ---
    System.Runtime.InteropServices.COMException
    - Exception from HRESULT: 0x80070C81
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
        at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

我检查了我的项目的 list 文件,但我还不够好,无法发现那里有任何问题。对于其他信息,我创建了简单的“Hello World!”申请看看它是否会顺利发布,结果确实如此。

解决方案是什么?

最佳答案

检查以下内容:

  • 用户的计算机上是否安装了 .NET 4?

  • 您是如何发布应用程序的,您使用的是 Visual Studio 吗?

  • 发布后您是否对部署进行了任何更改?

  • 如果您手动将文件移动到部署位置,结构是否与原始结构相同?

尝试启用详细日志记录,看看是否能提供更多信息。这 文章 Enhanced Logging in ClickOnce Deployment 向您展示如何做到这一点。

关于vb.net - 使用VB.NET发布ClickOnce安装报错 "Exception reading from manifest",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11168778/

相关文章:

.net - 为什么我的项目不能使用 NUnit 引用?

c# - ClickOnce安装错误

c# - 我可以在 C# 中创建经典的 VB 数组吗?

c++ - 如何在运行时 C++ 中包含头文件和函数?

php - 如何在 php 中解码 TripleDESCryptoService 字符串?

javascript - 如何从 Visual Studios 2010 ASP.net 网站中的 javascript 调用 Visual Basic 函数?

MSBuild ClickOnce 错误 : "Deployment and application do not have matching security zones"

c# - Azure 上具有 ClickOnce 应用程序的 Asp.net MVC 网站

vb.net - 奇怪的符号阻止我的批处理文件在 VB.net 中运行

vb.net - 您可以将委托(delegate)函数作为可选参数传递吗?