13

Before upgrading to Visual Studio 2010, I want to make sure I can still target version 2.0 of the framework. I couldn't find a statement about this from Microsoft. Is it possible?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jon B
  • 51,025
  • 31
  • 133
  • 161

7 Answers7

13

According to this page, you can. Just make sure you have .NET 3.5 SP1 installed.

Visual Studio 2010 includes only the .NET Framework 4. To target earlier versions of the .NET Framework, you must have the .NET Framework 3.5 Service Pack 1 (SP1) installed. The .NET Framework 3.5 SP1 includes the .NET Framework 2.0, the .NET Framework 3.0, and the .NET Framework 3.5 SP1.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Matthew Jones
  • 25,644
  • 17
  • 102
  • 155
6

Yes, this is possible. It is known as multi-targeting and is a feature most definitely supported in Visual Studio 2010.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
2

Someone else asked this on The Code Project. The answer is yes. It supports 2.0 -> 4.0.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
leppie
  • 115,091
  • 17
  • 196
  • 297
1

Yes

There is a geekswithblogs post showing the multi-targeting functionality.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kamiikoneko
  • 785
  • 5
  • 12
  • 24
  • The reference is (effectively) broken. It would redirect to *[Geekswithblogs.net, the End of an Era](http://julian.farm/geekswithblogs/?url=/mtreadwell/archive/2004/06/06/6123.aspx)*. – Peter Mortensen Jan 25 '22 at 16:34
0

Here is how you change the Target Framework in Visual Studio 2010.

  1. Right click the Project.

  2. Click the "Compile" tab

  3. At the bottom click "Advanced Compile Options..."

  4. Choose the framework from "Target framework (all configurations):"

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
reformed2
  • 31
  • 1
0

This feature was included in Visual Studio 2008 as a way to handle 2.0 through 3.5 projects, so it would be an epic failure on Microsoft's part not to include the same functionality in their next release. With 2010 you should be able to support projects in the 2.0 to 4.0 framework ranges (and beyond possibly depending on the framework upgrades).

TheTXI
  • 37,429
  • 10
  • 86
  • 110
  • 1
    While I agree with you, Visual Studio 2008 used the same 3.5 Build Engine for all systems, even when targetting 2.0. .NET 4.0 is a new CLR and therefore likely a new Build engine, so it's actually a new feature, because you can now switch between build engines :) – OregonGhost May 27 '09 at 14:47
0

Yes. According to Jason Zander's Weblog and for more information take a look at Scott Hanselman's ASP 4 - Whirlwind Tour around .NET 4 (and Visual Studio 2010) Beta 1

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
João Guilherme
  • 1,371
  • 1
  • 15
  • 27