Development for .NET 4.0 (Windows XP) with Visual Studio 2012

slfan picture slfan · Jun 20, 2012 · Viewed 14.6k times · Source

.NET 4.5 is an in-place-upgrade and therefore replaces .NET 4.0. Consequently when I install .NET 4.5 with Visual Studio 2012 I can no longer develop applications for .NET 4.0.

As .NET 4.5 is not supported under Windows XP, how can I maintain my existing .NET 4.0 applications which still have to run under Windows XP after I installed Visual Studio 2012?

Until now I could always devlop .NET applications for every version, even .NET 1.1, as long as VS2003 was installed. I don't have a problem with Microsoft not supporting .NET 4.5 on XP, I think it's allright to cut off old stuff. But as we have still customers using Windows XP, we need to be able to create .NET 4.0 programs at the same time as .NET 4.5.

EDIT:

I just had my first incompatibility issue: I installed VS 2012 on a Windows Server 2012. I created a project targeting .NET 4.0. In blend 4.0 I create a copy of a control template of a checkbox. The generated template contains references on colors which are available only under .NET 4.5. The solution cannot be compiled any longer. However the same case works fine on my Windows 7 installation.

I assume that the installation of .NET 4.5 has replaced the control templates for my standard controls. Therefore I cannot create copies any longer.

Answer

bernard paulus picture bernard paulus · Nov 26, 2012

Ironically, it seems Mono supports much of the .NET 4.5 functionality, and that it can be installed on Windows XP.

If your need C# 5.0's async and your client refuses to upgrade it's OS, this can be an option.