Welcome to MSDN Blogs Sign in | Join | Help

Visual Web Developer Team Blog

Your official information source from the Visual Web Developer team.

News

  • These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified Terms of Use
Targeting earlier .NET frameworks 2.0, 3.0, 3.5 using Visual Studio 2010

The multi-targeting feature of Visual Studio 2010 allows web developers to develop web applications targeting ASP.NET 2.0, 3.0, 3.5 and 4.0. Our earlier posts here and here describe some of the multi-targeting capabilities of Visual Studio 2010.

Targeting frameworks 2.0, 3.0 or 3.5 using VS 2010 requires 3.5 Sp1 to be installed

With VS 2010, only the latest 4.0 version of the .NET framework will be installed on your machine as part of the Visual Studio installation. For VS 2010 to be able to target any of the earlier frameworks 2.0, 3.0 or 3.5, the .NET Framework 3.5 Sp1 must be installed on the machine.

When 3.5 Sp1 is not present

If 3.5 Sp1 was not already present on your machine prior to installation of VS 2010, you will see the following behavior when you start VS 2010:

  • The New Website dialog will show 4.0 as the only available option (as shown in Figure 1)

Figure 1

Figure1

  • If you open the Property pages of the website, you will see that 4.0 is the only available option (as shown in Figure 2)

Figure 2

Figure2

  • Conversion of projects created using Visual Studio 2005 or Visual Studio 2008 to VS 2010 -
    During conversion of a web project created using VS 2005 or VS 2008, instead of the upgrade prompt (shown in figure 6), you will see a dialog (shown in figure 3) that allows you to either upgrade your project to 4.0 or take you to the installation page for .NET 3.5 Sp1.

Figure 3

Figure3

To then be able to target 2.0, 3.0 or 3.5 using VS 2010, you should install the 3.5 Sp1 framework from the installation page. To quickly navigate to the installation page, you can use the 'More Frameworks' link in figure 1 or select the option 'Take me to the Framework Download Web Site' in figure 3.

When 3.5 Sp1 is installed

Once 3.5 Sp1 is installed, then simply restart VS 2010 and the earlier frameworks such as 2.0, 3.0 and 3.5 will now light-up as available target frameworks.

  • The New Website dialog will show 2.0, 3.0, 3.5 and 4.0 (as shown in Figure 4)

Figure 4

Figure4

  • If you open the Property pages of the website, you will see that you can re-target your website to 2.0, 3.0, 3.5 or 4.0 (as shown in Figure 5)

Figure 5

Figure5

  • Conversion of projects created using Visual Studio 2005 or Visual Studio 2008 to VS 2010 -
    During conversion of a web project created using VS 2005 or VS 2008, you will see the more familiar prompt (shown in figure 6) allowing you to continue targeting the lower .NET framework version such as ASP.NET 2.0, 3.0 or 3.5, or optionally, upgrade the project to target the latest .NET framework version ASP.NET 4.0

Figure 6

Figure6

 

 

 

 

 

 

Bala Chirtsabesan | SDET | Visual Studio Web Developer

Posted: Monday, October 12, 2009 8:09 AM by WebDevTools

Comments

Alexis said:

So when beta 2 will be released?

# October 12, 2009 2:19 PM

Nick said:

Which versions of Sql Server Integration Services will we be able to target?  Can I finally get rid of VS2005 if I need to edit SQL2005 SSIS packages?

# October 15, 2009 2:39 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker