In a similar topic of this question I'm wondering whether there are any advantages for using a dll that is specifically compiled for .NET 4.
For example: log4net and nunit only officially release libraries that are compiled for .NET 2.0 but these work fine in a .NET 4.0 application. Is there an advantage of taking these libraries and re-compiling them for .NET 4.0?
Obviously the new features in the framework can be targetted by using the newer runtimes, but I'm talking about just straight re-compiling.
If you recompile them using the C# 4 compiler, you will get various improvements in IL generation, including field-like events and better lock
statements.
You'll get some of these improvements even if you target .Net 2.0.