Reputation: 5699
I have a legacy project which targets .net 4.0.1, and I can't change it to 4.5 because of its huge dependency.
I only have visual studio 2012 on my machine, now I am trying to open it. Visual studio ask me to install 4.0.1, I follow to install it, and then it ask me to install visual studio 2010 sp1 first, I try to install sp1. Of course it failed because i don't have visual studio 2010 installed.
What should I do?
Upvotes: 4
Views: 1208
Reputation: 7438
It's quite hard to track it down, but you can still download the Multi-Targeting Pack for Microsoft .NET Framework 4.0.1 (KB2495638) here: http://www.microsoft.com/en-gb/download/details.aspx?id=27757.
This does work with VS2012 (unlike the one VS2012 tries to download for you).
Upvotes: 3
Reputation: 5699
I answer my own question:
Manually change the TargetFrameworkVersion from 4.0.1 to 4.0 in the project .csproj file:
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>.
Just like Hans said we can't make visual studio 2012 work with 4.0.1. but 4.0.1 is very close to 4.0. I think as long as you can compile the project without errors 4.0 should be OK. It works in my case.
Upvotes: 1