asp.net - Visual Studio 2008 Development Server uses C# 2.0 compiler -


I have an exam website with VS 2008 which just uses code behind files, such as Foo.Aspx . In this way, the web server compiles them on the fly. The problem I am running is that I can not use any of the C # 3.0 features if I do:

var x = 1;

or

public square fu {public int x {get; Set;}}

or

Foo x = new Foo () {x = 5};

Then the VS will work fine (everything is highlighted and intelligently), but when I run the site, it just throws the compiler errors.

Is there a way, or do you have to compile the DLL to target the 3.0 runtime? If it is, then it is lame ..

Mike

There is only 2.0 runtime, There is no 3.0 or 3.5 runtime. They are just additional library and I believe that a different C # compiler

See

Are you sure that the machine you are on is 3.0 or 3.5 installed? If it is local on the same machine that you have Studio 2008, then it should

Because you need C # 3 compiler and BCL, but the CLR version will still be 2.0.

Therefore, please provide new versions installed on the machine running on IIS. .


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -