简体   繁体   中英

can I use .net 3.5 binaries for a library with a .net 4.0 application / what are the negatives if any?

Can I use .net 3.5 binaries for a library with a .net 4.0 application / what are the negatives if any? In other words is there any reason I should take more time out to download source for the library and build it under .net 4.0 (assuming it builds without any problems I guess) as opposed to downloading the .net 3.5 binaries.

I'm using C# in VS2010.

thanks

.NET 4.0 is compatible with .NET 3.5 and earlier, but as comments below indicate, best practice would be to recompile with .NET 4.0 when you can.

It is safe (and intended) that you can use assemblies targeting older versions of the framework.

No problems whatsoever. No expected ones anyway but I bet ya microsoft has one up their sleve, they tend to work in mysterious ways :)

It should be fine but there are some issues that can arise but might now be fixed in the release version. See:

http://krishnabhargav.blogspot.com/2010/02/using-net-35-clr-20-dll-inside-visual.html

阅读本文中有关.NET 4.0兼容性的Microsoft建议: .NET Framework中的版本兼容性

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM