简体   繁体   English

从.NET 4.0项目(VSTO)引用在.NET 4.5.1中内置的库

[英]Reference a library built in .NET 4.5.1 from a .NET 4.0 project (VSTO)

I am building an Outlook 2010 VSTO. 我正在构建Outlook 2010 VSTO。 The highest framework allowed by Microsoft for this is 4.0. Microsoft为此允许的最高框架是4.0。 I have 3rd party libraries that I have to use, but they were built in .NET 4.5.1. 我有必须使用的第三方库,但它们是在.NET 4.5.1中构建的。 With that said I can't reference the needed libraries. 话虽如此,我无法引用所需的库。

I have no idea how to work around this. 我不知道该如何解决。 I have tried creating and referencing a second project that targets the updated framework to run my calls through, but because the second projects framework is a higher version, the VSTO can't see it during runtime. 我尝试创建和引用第二个项目,该项目针对更新的框架来运行我的调用,但是由于第二个项目框架是更高版本,VSTO在运行时看不到它。

Does anybody have any ideas as to how I can communicate with these libraries? 是否有人对我如何与这些库进行交流有任何想法? I should note that all the machines that will use this will have the .NET 4.5.1 Framework. 我应该注意,将使用此功能的所有计算机都将具有.NET 4.5.1 Framework。

You need to get a third-party library for the .net framework 4.0. 您需要获取.net Framework 4.0的第三方库。

Also you may consider developing a shared COM add-in instead of VSTO. 您也可以考虑开发共享的COM加载项而不是VSTO。 Or just use Add-in Express which supports targeting .net 4.5. 或仅使用支持目标.net 4.5的Add-in Express

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 4.0 项目中引用 .net framework 4.5.1 程序集 - Reference a .net framework 4.5.1 assembly in a 4.0 project 从PCL项目生成.NET 4.0库,其中代码完全相同 - Produce a .NET 4.0 library from a PCL Project where code is identical 在.NET 4.6项目中引用.NET Core Library - Reference a .NET Core Library in a .NET 4.6 project 我可以从.NET标准库中引用共享项目吗? - Can I reference a Shared Project from a .NET Standard Library? 如何从 Xamarin iOS 绑定项目引用 .NET 标准库? - How to reference a .NET standard library from a Xamarin iOS binding project? 我可以在版本4.6.2的Visual Studio项目中使用针对4.5.1 .net框架的库吗? - Can I use a library which is targeted to 4.5.1 .net framework in a visual studio project of version 4.6.2 无法从完整.NET项目中引用.NET Core类库 - Unable to project reference a .NET Core Class Library from Full .NET Project 如何将Windows Store应用程序项目从.NET 4.5升级到.NET 4.5.1 - How can I upgrade a Windows Store App-project from .NET 4.5 to .NET 4.5.1 为什么.net 4.0项目不能引用4.5程序集? - Why cant a .net 4.0 project reference a 4.5 assembly? 是否可以在面向 4.0 的项目中引用面向 .net 4.5 的程序集? - Is it possible to reference an assembly that targets .net 4.5 in a project that targets 4.0?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM