I know the .NET 2.0 version is provided for compatibility purposes. But why some libraries have both versions? Is there any reason to publish a .NET 4.0 version of a library?
Take for example the Oracle.DataAccess library.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Generally, the version of a library that targets a newer version of the framework provides new features that require the new version of the framework in order to work properly. There are lots of new goodies introduced in .NET 4.0 that weren’t present in .NET 2.0.
Developers like working with the latest framework, so all new code is going to be implemented targeting that framework. The older version, targeting the older version of the framework, is provided for compatibility reasons only, as it likely provides only a minimally-necessary subset of features.
Another possibility is that the newer framework provides performance or other improvements for the library code. Those can [sometimes] be backported to earlier versions of the framework, but they’re often non-optimized implementations and should therefore be used only when absolutely necessary.