1
Vote

Target CLR 2.0

description

The only part of CLR 3.5 that is 'required' is extension methods.
 
However, this can be circumvented by defining:
 
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class |
    AttributeTargets.Method)]
public sealed class ExtensionAttribute : Attribute { }
}
 
Inside the assembly. However, if a client assembly targets CLR >=3.0, this yields a compiler warning about two definitions (and suppressing this warning in the Behavioral assembly does not suppress the message for clients).
 
So, either circumvent this issue or reimplement IContextGetter / IContextSetter in some other way that also does not require a subclass (good luck with that).

comments