如何.NET库(.dll)从高版本集成(.NET 4)从较低版本的二进制文件(.NET 2) [英] how to integrate .net library (.dll) from higher version (.net 4) with binaries from lower version (.net 2)

查看:380
本文介绍了如何.NET库(.dll)从高版本集成(.NET 4)从较低版本的二进制文件(.NET 2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经对外.NET库编译使用.NET框架4(它的供应商最近才在.NET 4中) 我的code目前运行在.NET Framework 3.5的 如何使用外部库在我的应用程序? 移动整个应用程序到.NET 4需要时间和测试,所以也许在将来,我会做到这一点,但现在,有哪些可能性?

I have external .net library compiled with .net framework 4 (it's provider moved recently to .net 4) My code currently runs on .net framework 3.5 How to use that external library in my application ? Moving whole application to .net 4 needs time and testing, so maybe in a future i will do that, but now, what are the possibilities ?

推荐答案

有没有可能性,随.NET 3.5无法加载4.0集的CLR版本。元数据格式被改变。您的有无的给力您的应用程序使用.NET 4.0 CLR版本。 requestedRuntime>用VS2010重新编译,目标4.0,或通过使用包含℃的config文件做到这一点。元素来索要V4.0

There are no possibilities, the CLR version that comes with .NET 3.5 cannot load 4.0 assemblies. The metadata format was changed. You have to force your app to use the .NET 4.0 CLR version. Do so by recompiling it with VS2010, targeting 4.0, or by using a .config file that contains the <requestedRuntime> element to ask for "v4.0".

有关.NET 4.0的兼容性非常出色BTW。

Compatibility for .NET 4.0 is excellent btw.

这篇关于如何.NET库(.dll)从高版本集成(.NET 4)从较低版本的二进制文件(.NET 2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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