Reputation: 20091
I am trying to use Auto-implemented properties in VS2005. I have .NET 3.0 framework loaded on my machine, but Visual Studio is still compiling with .NET 2.0. How do I tell it to use .NET 3.0?
Upvotes: 0
Views: 301
Reputation: 30418
Unfortunately, I don't think it is possible to do this, since that is a feature of the C# compiler. Visual Studio 2005 is hard-coded to use the C# 2.0 compiler. You need to upgrade to Visual Studio 2008 to use the new C# 3.0 features.
Upvotes: 6
Reputation: 532465
Autogenerated properties require C#3.0 which isn't available in VS2005. You need to use VS2008 to get the autogenerated property syntax.
Upvotes: 3
Reputation: 2045
Go to your project properties. Under the application tab you can change your Target Framework
Upvotes: 0