.Net 2.0

Jun 3, 2008 at 3:27 PM
Is there anything specifically preventing this from compiling (or running) under 2.0. Unfortunately we have a conservative upgrade policy at work, so im stuck for the moment.
Coordinator
Jun 3, 2008 at 5:40 PM


l0t3k wrote:
Is there anything specifically preventing this from compiling (or running) under 2.0. Unfortunately we have a conservative upgrade policy at work, so im stuck for the moment.


I've made pretty heavy use of automatic properties, lamda expressions, etc. (Resharper almost demands it) so you could port it back to 2.0, but it would take some work. Sorry.
Oct 8, 2008 at 4:57 AM
The library actually compiles quite easily under .NET 2.0, but you must compile it using the C# 3.5 compiler.
When using vs.net 2008, target the library to .NET 2.0, and add the following class to the library :

namespace System.Runtime.CompilerServices
{
    public class ExtensionAttribute : Attribute { }
}


That's it.
It works so far I've tested.

Automatic properties, lambda expressions and extensions are just C# 3.5 compiler features, and therefore compatible with the .NET framework 2.0.
Coordinator
Oct 10, 2008 at 5:02 AM
Well you learn something new every day - I wasn't aware of that!