3

我正在使用 C# 和 VSTO 在 Visual Studio 2013 中为 Excel 开发插件(功能区)。到目前为止,一切都很好。现在,我想创建一个安装程序。我正在使用 Visual Studio 的 InstallShield Limited Edition。我按照这里给出的说明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()

我一直在网上搜索,没有答案,只有问题。我无法理解错误消息的性质。有任何想法吗?

4

1 回答 1

0

对于将来遇到此问题的任何人。我发现问题不是真正的问题。我能够关闭错误消息并直接打开 Excel 文件,它工作正常。

我确实将解决方案 ID 添加到文件名之后的清单值:file:///[INSTALLDIR]ExcelWorkbook.vsto|SOLUTIONID|vstolocal。但我不确定这是否真的有所作为。我仍然遇到同样的错误。

我将 ExcelWorkbook.xlsx 的快捷方式添加到最终用户桌面,这有助于确保最终用户将直接打开工作簿,而不是 Excel。

于 2015-09-03T19:04:30.940 回答