Question

I maintain a .NET 2.0 library and recently it's users started asking for a .NET 4 version.

I could just duplicate existing project in Visual Studio, set Target Framework to .NET Framework 4.0 and be done with it, but is there any difference between .NET 2 and .NET 4 assemblies running under .NET 4?

I mean, will it change anything if I just rebuild the same source code for .NET 4? Am I expected to have different set of unit test for .NET 2 and .NET 4 builds?

Was it helpful?

Solution

.Net frameworks are backward compatible, so .Net framework 2.0 library should work fine on .Net framework 4.0. I am not sure why your library users are asking for .Net framework 4.0 library, because it doesn't make any difference to them.

However if you want to recompile your .Net 2.0 library to 4.0 then normally there shouldn't be any issues but you should see: Visual C# 2010 Breaking Changes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top