Multi-targeting .NET Framework 4 and Visual Studio 2012

16,531

Solution 1

I solved the problem doing these tasks:

  • Uninstall the Visual Studio 2012
  • Uninstall any reference for the .NET Framework 4.0 or 4.5
  • Clean the register with a tool like Glary Utilities and restart the computer
  • Install the .NET Framework 4.0 and install Microsoft Multi-Targeting for .NET Framework 4.
  • Install Visual Studio 2012 again

Solution 2

You fixed your problem, but it's likely that .NET Framework 4 Targeting Pack (not to be confused with the .NET Framework itself) failed to install for some reason. Did you get a warning at the end of the Visual Studio installation? Either way, in the future, a repair install of Visual Studio 2012 should have fixed the problem (Add or Remove Programs -> Microsoft Visual Studio [Edition] 2012 -> Change -> Repair).

Share:
16,531
Felipe Oriani
Author by

Felipe Oriani

Software Developer since 2004 with focus on back-end development. You can see more about my professional careear at Stack Overflow Careers Profile or LinkedIn profile.

Updated on July 04, 2022

Comments

  • Felipe Oriani
    Felipe Oriani almost 2 years

    I have installed Visual Studio 2012 Professional on my machine. I don't have Visual Studio 2010 installed, but I want to keep developing my applications using .NET Framework 4, but I don't have this option on my Visual Studio 2012. Look at the image:

    Enter image description here

    I don't know what can I do to fix this problem, because I click on "More Frameworks..." link and try to install the Multi-Targeting for .NET 4.0.3 (installed on my machine), but it does not work. It says that this version of framework is still installed. What can I do to fix this problem?

    Obs: I have lots of projects in C# and VB.NET with .NET 4.0, and I need to keep these projects with new projects on .NET 4.0.

  • Felipe Oriani
    Felipe Oriani over 11 years
    You uninstall vs2012 or did you repair the instalation of vs2012? I have another machina with vs2010, and I installed vs2012 and this problem doesn't happen. This machine where I got this problem, does not have vs2010 installed.
  • Dejan Stuparic
    Dejan Stuparic over 11 years
    On machine where you installed only VS2012 .NET 4.0 got overwritten by .NET 4.5 because MS decided that 4.5 will be In-place update. MS says that there are almost no breaking changes between two versions, but you should definitely check that. And off course if you do not use any of 4.5 new features, it should be deployable on 4.0 environment. On my case i uninstalled VS11 Beta completely, and installed VS2010 with .NET 4.0...
  • Felipe Oriani
    Felipe Oriani over 11 years
    Yes, I didn't like this feature. I preffer to set .net 4.0 on my project and use it like 4.0. I will remove vs2012 and still using vs2010.
  • Felipe Oriani
    Felipe Oriani over 11 years
    Hi David... Yes, I got the warning when vs2012 finished the instalation, and I have tried to repair the instalation but it did not work. As my awser, before I install vs2012 again, I installed .netfx 4 and .netfx multi-targeting pack, and installed vs2012 again, and now works fine with both versions .netfx 4 and 4.5.