I have a test website with VS 2008 that just uses code behind files, such as Foo.aspx.cs. Thus, the web server compiles them on the fly. The problem I'm running into is I can't use any C# 3.0 features. If I do:
var x = 1;
or
public class Foo { public int x {get;set;} }
or
Foo x = new Foo() {x = 5};
Then VS will work fine (everything gets highlighted and Intellisensed), but when I run the site it just throws up compiler errors..
Is there a way to fix this, or do you have to compile a DLL to target the 3.0 runtime? If so that's insanely lame..
Mike