Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

New Project Screenshot

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?

like image 744
CobaltBabyBear Avatar asked Oct 31 '12 07:10

CobaltBabyBear


2 Answers

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.

like image 107
Jon Skeet Avatar answered Sep 30 '22 18:09

Jon Skeet


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 Target

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.

like image 22
Chris DaMour Avatar answered Sep 30 '22 18:09

Chris DaMour