-Ajay
I think you need to post this question as a new thread. If I understand how this forum thing works people who filter down to only see unanswered questions won't even see your post since this thread is marked as answered?
jedediah wrote:
Let's say I decide to target the .NET 1.1 runtime. In Whidbey, how to I setup my project to throw a compiler error if I use any 2.0 features?
As to your question, I don't think it is possible to do what you want.
In theory you could use /langversion:ISO-1 to avoid using newer features (like generics) that aren't in ISO-1. The IDE equivalent is Project | Properties |Build | Advanced | Language version.
But I don't think that would keep you from using newer namespaces, method signatures, etc. and some generated source files (like Resources.Designer.cs) make use of non ISO-1 features.
The Visual Studio .NET 2003 Project Properties Pages allow you to specify a supported runtime (1.1, 1.0 or both) however that only generated an app.config file that targetted the relevant runtime, the compiler still generated 1.1 code.
Visual Studio 2005 doesn't seem to support the same property and converting a project from 1.1 to 2.0 causes all the supportedRuntime and requiredRuntime settings to be stripped from the config file.