如何在.NET 3.5的项目引用.NET 4.0组件 [英] How to reference .NET 4.0 assembly within .NET 3.5 projects

查看:753
本文介绍了如何在.NET 3.5的项目引用.NET 4.0组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想这样做使用.NET 4.0的一些办公室互操作的东西,但使用VS2008和.NET3.5发展我的项目的其余部分。

I would like to do some Office Interop stuff using .NET 4.0, but developing the rest of my project using VS2008 and .NET3.5.

我怎么能现在用我的其他解决方案中从.NET 4.0组件的功能。加载CLR 4.0组件到2.0 AppDomain中是行不通的,会吗?

How can I now use the functionality from the .NET 4.0 assembly within my other solution. Loading CLR 4.0 assemblies into a 2.0 AppDomain won't work, will it?

推荐答案

总之:你不能。

.NET 4.0是一个完全新的CLR(4.0),而据我所知,不能混杂在.NET 3.5和/或VS 2008中使用了,不好意思。

.NET 4.0 is a totally new CLR (4.0) and as far as I know, cannot be intermixed with .NET 3.5 and/or used from VS 2008, sorry.

您可以使用.NET 2.0程序集从.NET 4.0 code,如果你也有一个保证,在.NET 2.0框架是你的目标机器上在与同一时间(并排侧)。 NET 4。

You could use .NET 2.0 assemblies from your .NET 4.0 code, if you also have a guarantee that the .NET 2.0 framework is on your target machine at the same time (side-by-side) with .NET 4.

这篇关于如何在.NET 3.5的项目引用.NET 4.0组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆