我正在使用 C# 和 VSTO 在 Visual Studio 2013 中为 Excel 开发一个插件(功能区)。 到目前为止,一切都很好。现在,我想创建一个安装程序。我正在使用 InstallShield Limited Edition for Visual Studio。我按照此处给出的说明进行操作 http://msdn.microsoft.com/en-us/library/cc442767.aspx (每用户安装,应用程序级加载项)。
编译和设置没有任何问题。但是,当我打开 Excel 时,我收到此警告:
Name:
From: file:///C:/Program Files (x86)/DCDB/ExcelInterface.vsto
************** Exception Text **************
Microsoft.VisualStudio.Tools.Applications.Deployment.InstallAddInFailedException: The customization cannot be run because
the solution ID in the document does not match the customization. Contact your administrator for further assistance.
at Microsoft.VisualStudio.Tools.Office.Runtime.OfficeAddInDeploymentManager.RefreshCustomization(Customization cust,
AddIManifestsDownloadedArgs args)
at
Microsoft.VisualStudio.Tools.Office.Runtime.OfficeAddInDeploymentManager.OnAddInManifestsDownloaded(AddInManifestsDownloade
dArgs args)
at
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.RaiseOnAddInManifestsDownloadedEvent(I
ClickOnceAddInInstaller addInInstaller, Uri deploymentManifestUri, AddInInstallationStatus addinSolutionState, String
productName, String deploymentManifestXml, String applicationManifestXml, String hostManifestXml, String logFilePath,
String version, Uri supportUri)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.<>c__DisplayClass7. <Install>b__0()
我一直在网上搜索,没有答案,只有问题。 我无法理解错误消息的性质。有任何想法吗?
最佳答案
对于将来遇到此问题的任何人。我发现这个问题不是真正的问题。我能够关闭错误消息并直接打开 Excel 文件并且工作正常。
我确实将解决方案 ID 添加到文件名后的 list 值中:file:///[INSTALLDIR]ExcelWorkbook.vsto|SOLUTIONID|vstolocal。 但我不确定这是否真的有所作为。我仍然遇到同样的错误。
我在最终用户桌面上添加了 ExcelWorkbook.xlsx 的快捷方式,这有助于确保最终用户将直接打开工作簿,而不是 Excel。
关于c# - Excel VSTO 加载项部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22707169/