c# - Excel VSTO 加载项部署错误

标签 c# .net visual-studio-2013 vsto installshield-le

我正在使用 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/

相关文章:

.net - ASP.NET 单元测试 - WatiN 和 Windows 7/Internet Explorer 8

c# - 您可以在静态上下文中引用非静态方法吗?

c# - 当我按 F5 时,会打开一个 "Attach to Process"窗口

c# - 如何在 C# 中使用正则表达式解析 OData $filter?

c# - 使 EF 将字节数组映射为二进制而不是 varbinary

c# - System.Interactive.Async 中 IAsyncEnumerable 的鸭子枚举错误

javascript - 是否可以在 Visual Studio 2013 Ultimate 中调试 MVC 中的 angularjs?

c++ - 我们如何使用 Visual Studio 2013 在 C++ 中访问变更集编号?

javascript - 如何使用 .net 5.0 中下拉列表中的值在 html bootstrap 表中动态插入行?

c# - 什么时候使用 [Obsolete] 或干脆删除代码?