简体   繁体   中英

Visual Studio 2012 Express and .NET 2.0

My installation of VS 2012 Express doesn't show .NET Framework 2.0 when I create a new project. I know that 2.0 is supported on VS 2012 but it doesn't show up in the menu as shown below.

新项目截图

When I create a project with one of the available options (4.0/4.5) and then change it back to 2.0, it gives loads of errors on build.

Is there any way to make VS 2012 to show older versions in the menu?

It sounds like you need to download the targeting pack for 2.0. This page lists the targeting packs available for VS 2012; it looks like it's just a matter of downloading the .NET 3.5 SP1 runtime pack, which should then enable .NET 2, 3 and 3.5 targets.

EDIT: I've just noticed that you're using Express. I don't know whether targeting packs work the same way with the Express edition, but I'd at least give it a try.

You can't set 2.0 (or anythign but 4.0 or 4.5) during the create operation, but you can change it after the project is created via the project properties. This is true for VS express Web and VS express desktop (didn't try others). VS Express 2012目标

You will have to update your references to match appropriate targets. Also various using statements, like System.Linq and System.Threading.Tasks need to be removed.

Obv MS is pushing 4.0 & 4.5 in their products, but support for old stuff is still there thankfully.

The Express version of Visual Studio 2012 does only support the .NET Framework 4.0 and 4.5. If you want to develop applications targeting older version of the .NET Framework you have to choose an other Express versio of Visual Studio, like Visual Studio 2010 Express.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM