views:

40

answers:

2
Line 108:    <compilers>
Line 109:      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
Line 110:        <providerOption name="CompilerVersion" value="v3.5"/>
Line 111:        <providerOption name="WarnAsError" value="false"/>
Line 112:      </compiler>

Could we recompile the project using .NET Framework Version 2.0.50727, as 3 or 3.5 frameworks aren't on our production server? I developed it in vs2008

+2  A: 

It depends on whether you have used any of the 3.0/3.5 goodness; implicit typing, Linq et al.

Kindness,

Dan

Daniel Elliott
what could be the ideal resolution? do i need to compile it on vs2005?
if you havent used any bits of the upgraded framework you just need to recompile using the .NET 2.0 framework. You can do this in VS 2008 or 2005 ... just look at build properties of your projects within solution.
Daniel Elliott
A: 

There is no need to use VS2005, just open the project properties dialog and change the "Target Framework" back to ".NET Framework 2.0" to make use of VS2008's multi-targeting functionality. As Daniel has mentioned, your project wont compile if you have used any features from the newer .NET versions.

Rory
I dont know what are new features that used in 3.5 which is not there in 2.0. could you please list of few?
As Daniel mentioned, things like implicit typing, LINQ, auto-implemented properties, etc were all new and will not be supported if you switch back to v2. http://msdn.microsoft.com/en-us/library/bb308966.aspx has a list of new features and changes for C# 3 and http://msdn.microsoft.com/en-us/library/aa479861.aspx covers a few of the new features in version 3 of the .NET Framework
Rory