views:

129

answers:

2

Hi, I have a framework 2.0 asp.net website, I want to change it's framework version to 3.5. Is it possible to do this manually from web.config file? I don't want to change from visual studio property pages. I need to change from web.config, what should I do?

A: 

Why not changed it in IIS settings

jerjer
What is this IIS setting?
Darin Dimitrov
+1  A: 

There's isn't anything special that you need to do. If you don't use any assembly from .NET 3.5, then do nothing as both framework versions use the same CLR 2.0 so there should be absolutely no difference at runtime. If you want to use some 3.5 assemblies (such as System.Core), just reference them in your project and deploy.

One thing that you might want to change is the C# compiler version used for aspx and ascx pages in case you are doing some LINQ stuff, anonymous objects, collection initializers, ... in these pages (which by the way you should try to avoid because this belongs to code behind but anyway):

<system.codedom>
    <compilers>
        <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <providerOption name="CompilerVersion" value="v3.5"/>
            <providerOption name="WarnAsError" value="false"/>
        </compiler>
    </compilers>
</system.codedom>
Darin Dimitrov