部署 Office 2010 插件
我创建了两个插件,一个是共享插件(适用于 Excel、Word 和 Outlook),另一个适用于 Outlook。
它们在我的机器(我开发它的地方)上运行良好。
使用的框架:4.0
我已经通过 VS2010 创建了一个“安装项目”,步骤如下 使用 Windows Installer 部署 Office 解决方案。
当我运行它的安装程序时,共享插件运行良好。但 Outlook 插件不起作用。
这是“事件查看器”的日志
Event Type: Error Event Source: VSTO 4.0 Event Category: None Event ID: 4096 Date: 4/26/2011 Time: 7:37:52 PM User: N/A Computer: XXX Description: Customization URI: file:///C:/Program Files/XXXX/XXXX/XXXX.vsto Exception:
*****异常文本******* Microsoft.VisualStudio.Tools.Applications.Deployment.FrameworkVersionMismatchException: 在 Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.Install(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager、OfficeAddInDeploymentManager officeDeploymentManager、AddInInformation& 信息) 在 Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager、OfficeAddInDeploymentManager officeAddInDeploymentManager、AddInInformation& 信息) 在 Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager、OfficeAddInDeploymentManager officeAddInDeploymentManager、布尔值 showUIDuringDeployment) 在 Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(字符串解决方案位置、字符串清单名称、字符串文档名称、布尔值 showUIDuringDeployment、IntPtr hostServiceProvider、IntPtr& 执行器)
***** 加载的程序集 ***< /em>**** mscorlib 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3620 (GDR.050727-3600)
代码库:file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
Microsoft.VisualStudio.Tools.Office.Runtime.v10。 0 程序集版本:10.0.0.0 Win32 版本:10.0.21022.1
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime .v10.0.dll
系统 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3614 (GDR.050727-3600)
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/
System.dll System.Core 汇编版本:3.5.0.0 Win32 版本:3.5.30729.1 构建者:SP
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/
System.Core.dll System.AddIn 汇编版本:3.5.0.0 Win32 版本:3.5.30729.1 构建者:SP
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
Microsoft.VisualStudio.Tools.Applications.Hosting。 v10.0 程序集版本:10.0.0.0 Win32版本:10.0.21022.1
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting .v10.0.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0 程序集版本:10.0.0.0 Win32版本:10.0.21022.1
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime .v10.0.dll
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0 程序集版本:10.0.0.0 Win32版本:10.0.21022.1
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument .v10.0.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0 汇编版本:9.0.0.0 Win32版本:9.0.30729.4130
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime .v9.0.dll
系统.Windows.Forms 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3053 (netfxsp.050727-3000)
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3053 (netfxsp.050727-3000)
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Deployment 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3053 (netfxsp.050727-3000)
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
System.Configuration 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3053 (netfxsp.050727-3000)
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/
System.Configuration.dll System.Xml 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3082 (QFE.050727-3000)
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/
System.Xml.dll System.Security 汇编版本:2.0.0.0 Win32 版本:2.0.50727.3613 (GDR.050727-3600)
代码库:file:///C:/WINDOWS/ assembly/GAC_MSIL/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll
有关详细信息,请参阅帮助和支持中心 http://go.microsoft.com/fwlink/events.asp。
据我了解,它甚至没有考虑使用框架 4.0 加载插件
谁能告诉我哪里做错了并提出解决方案。
谢谢阿达什
I've created two addins, one is shared addin (for Excel, Word and Outlook) and another one is for Outlook.
They work fine on my machine (where I developed it).
Framework used: 4.0
I've created a 'setup project' throught VS2010 following steps in
Deploying an Office Solution by Using Windows Installer.
When I run setup of it, shared addin runs fine. But the outlook addin does not work.
This is log of 'Event Viewer'
Event Type: Error Event Source: VSTO 4.0 Event Category: None Event ID: 4096 Date: 4/26/2011 Time: 7:37:52 PM User: N/A Computer: XXX Description: Customization URI: file:///C:/Program Files/XXXX/XXXX/XXXX.vsto Exception:***** Exception Text ******* Microsoft.VisualStudio.Tools.Applications.Deployment.FrameworkVersionMismatchException: at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.Install(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager, OfficeAddInDeploymentManager officeDeploymentManager, AddInInformation& info) at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager, OfficeAddInDeploymentManager officeAddInDeploymentManager, AddInInformation& info) at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager, OfficeAddInDeploymentManager officeAddInDeploymentManager, Boolean showUIDuringDeployment) at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor)
***** Loaded Assemblies ******* mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3620 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
Microsoft.VisualStudio.Tools.Office.Runtime.v10.0 Assembly Version: 10.0.0.0 Win32 Version: 10.0.21022.1
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v10.0.dll
System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
System.Core Assembly Version: 3.5.0.0 Win32 Version: 3.5.30729.1 built by: SP
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
System.AddIn Assembly Version: 3.5.0.0 Win32 Version: 3.5.30729.1 built by: SP
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0 Assembly Version: 10.0.0.0 Win32 Version: 10.0.21022.1
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v10.0.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0 Assembly Version: 10.0.0.0 Win32 Version: 10.0.21022.1
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0.dll
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0 Assembly Version: 10.0.0.0 Win32 Version: 10.0.21022.1
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0 Assembly Version: 9.0.0.0 Win32 Version: 9.0.30729.4130
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Deployment Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
System.Configuration Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
System.Security Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3613 (GDR.050727-3600)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
From what I understand, it is not even considering loading addin with framework 4.0
Can anyone tell me where I have done wrong and suggest a solution.
Thank you
Adarsh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到解决方案...
搜索一段时间后发现一个链接到 Office 解决方案部署先决条件 和 适用于 Office 运行时安装方案的 Visual Studio 工具。安装VSTO 4.0解决了这个问题。
然后又有新的问题了...
签署大会后就解决了。
Found solution...
After searching a while found a links to Office Solution Prerequisites for Deployment and Visual Studio Tools for Office Runtime Installation Scenarios. Installing VSTO 4.0 solved the problem.
Then got new problem ...
which got solved after signing the assembly.