First let me add some context to error I get, I have installed .NET 4.5.1 Preview and first thing that I noticed in VS 2012 is that .NET 4.5.1 isn\'t listed in available framewo
Building .NET Framework 4.5.1 applications is supported in Visual Studio 2012. You need to either install Visual Studio 2013 Preview or Windows SDK for Windows 8.1 Preview to get the .NET Framework 4.5.1 Preview Targeting pack on the same machine as Visual Studio 2012 to build applications with .NET Framework 4.5.1 preview.
Thanks
Nithya [MSFT]
i solved changing the ToolsVersion in .csproj file.
From
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
To
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Here's a blog post that Microsoft wrote on this topic.
Building apps with the .NET Framework 4.5.1 Preview in Visual Studio 2012
To fix this I had to upgrade the NuGet.targets and change the following two lines
From
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
To
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
Also it would be nice to get some answers related to .NET 4.5.1 Preview not showing up in VS 2012 up until I installed the VS 2013.
Nice chat with myself.