MS WORD VSTO加载项:从文件中读取异常清单

问题描述 投票:0回答:1

在加载使用Microsoft WORD VSTO Add-in上的VS2019创建的Windows 10 Pro时出现以下错误。之前添加的加载很好。问题:错误的原因可能是什么,如何解决该问题?在网上发现了一些类似的问题(例如one),但还是没有运气。

错误

Name:
From: file:///C:/DotNet2019/VSTO/MyWORDAddinProj/bin/Debug/MyWORDAddinProj.vsto

************** Exception Text **************
System.Deployment.Application.InvalidDeploymentException: Exception reading manifest from file:///C:/DotNet2019/VSTO/MyWORDAddinProj/bin/Debug/MyWORDAddinProj.dll.manifest: the manifest may not be valid or the file could not be opened. ---> System.Deployment.Application.InvalidDeploymentException: 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:      ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80070C81
   at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid)
   at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)
   --- End of inner exception 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)
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
   at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
c# vsto word-addins
1个回答
0
投票

首先,我建议启用日志记录,然后查看生成的日志,有关更多信息,请参见Enhanced Logging in ClickOnce Deployment

此类例外情况太多...首先,请确保您已完成Deploy an Office solution by using ClickOnce文章中所述的所有步骤。但是日志可以告诉您更多信息。另外,您可能会发现Troubleshoot Office solution deployment页面有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.