We have had some customers ask why they are unable to target earlier frameworks .NET 2.0, 3.0 or 3.5 using Visual Studio 2010. Targeting earlier frameworks (also known as Multi-targeting) is in-fact fully supported in VS 2010, but there is apre-requisite that .NET Framework 3.5 Sp1 must be installed on the machine for VS 2010 to be able to targetany of the earlier frameworks 2.0, 3.0 or 3.5.
During VS 2010 installation, only the latest 4.0 version of the .NET framework will be installed on your machine as part of the Visual Studio installation. So if 3.5 Sp1 was not already present on your machine, you will see only the .NET Framework 4 in the target framework dropdown of the New Website / New Project dialogs (In these dialogs, framework dropdown is available in VS Professional and higher skus only) when creating a new website or in the property pages when changing the target of an existing website (In property pages, framework dropdown is available in the VWD Express sku as well). You can click on the ‘More Frameworks’ link and that will take you to the download page for .NET 3.5 Sp1 (see Figure 1).
Once .NET 3.5 Sp1 is installed on your machine, restart Visual Studio and you should be able to see the lower frameworks .NET 2.0, 3.0 and 3.5 in the Visual Studio dropdowns (see figure 2).
Multi-targeting – Learn More
To learn about the multi-targeting capabilities of Visual Studio 2010, see our earlier blog posts and MSDN documentation:
- Visual Studio Multi-Targeting Overview (MSDN Documentation)
- Multi-targeting of web projects using Visual Studio 2010
- Targeting earlier .NET frameworks 2.0, 3.0, 3.5 using Visual Studio 2010
- Visual Studio 2010 Property Grid Filtering
Bala Chirtsabesan | Visual Web Developer Team