本文介绍了使用VSTO 40的Outlook 2010插件和目标.NET Framework 3.5无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2010和VSTO 4.0创建了一个Outlook 2010插件。针对.NET fw 3.5。我想通过添加自定义选项卡来自定义资源管理器功能区。当我启动outlook 2010时,我在事件查看器中收到以下错误,并且插件管理器说:"加载插件时出现运行时错误"。


 


自定义URI:和settings / eiuser200 / my documents / visual studio 2010 / Projects / OutlookAddIn1 / OutlookAddIn1 / bin / Debug / OutlookAddIn1。 vsto
例外:< compatibleFrameworks xmlns =" urn:schemas-microsoft-com:clickonce.v2">
  < framework targetVersion =" 3.5"轮廓= QUOT;客户" supportedRuntime = QUOT; 2.0.50727" />
< / compatibleFrameworks>


< / compatibleFrameworks>
   **************异常文本**************
Microsoft.VisualStudio.Tools.Applications.Deployment.FrameworkVersionMismatchException:< compatibleFrameworks xmlns = QUOT;瓮:架构 - 微软-COM:clickonce.v2">
&NBSP; < framework targetVersion =" 3.5"轮廓= QUOT;客户" supportedRuntime = QUOT; 2.0.50727" />
< / compatibleFrameworks>
&NBSP;&NBSP;在Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.Install(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager,OfficeAddInDeploymentManager officeDeploymentManager,AddInInformation& info)
  在Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager,OfficeAddInDeploymentManager officeAddInDeploymentManager,AddInInformation&安培;信息)
&NBSP;&NBSP;在Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.ProcessInstallerOperation(ClickOnceAddInDeploymentManager clickOnceAddInDeploymentManager,OfficeAddInDeploymentManager officeAddInDeploymentManager,布尔showUIDuringDeployment)
&NBSP;&NBSP;在Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation,String manifestName,String documentName,Boolean showUIDuringDeployment,IntPtr hostServiceProvider,IntPtr& executor)


我可以定位3.5框架使用VSTO 4.0并仍然利用新的Outlook 2010平台功能(资源管理器功能区,后台视图)?


谢谢,
Furqan

解决方案

I have created an Outlook 2010 addin using Visual studio 2010 and VSTO 4.0. targeting .NET fw 3.5. I am trying to customize explorer ribbon by adding a custom tab. When I launch outlook 2010, i get the following error in event viewer and the addin manager says: "There was a runtime error when loading the addin".

Customization URI: and settings/eiuser200/my documents/visual studio 2010/Projects/OutlookAddIn1/OutlookAddIn1/bin/Debug/OutlookAddIn1.vsto
Exception: <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
  <framework targetVersion="3.5" profile="Client" supportedRuntime="2.0.50727" />
</compatibleFrameworks>

</compatibleFrameworks>
   ************** Exception Text **************
Microsoft.VisualStudio.Tools.Applications.Deployment.FrameworkVersionMismatchException: <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
  <framework targetVersion="3.5" profile="Client" supportedRuntime="2.0.50727" />
</compatibleFrameworks>
   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)

Can I target 3.5 framework with VSTO 4.0 and still leverage the new Outlook 2010 platform features (Explorer ribbon,backstage view)?

Thanks,
Furqan

解决方案


这篇关于使用VSTO 40的Outlook 2010插件和目标.NET Framework 3.5无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 00:04