15

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.

5
  • 1
    I believe this may be a symptom of .Net 4.5 being an in-place upgrade... I believe if you target .Net 4.5 and don't use any 4.5 only features, it should run in .Net 4.0 though
    – Earlz
    Sep 24, 2012 at 14:41
  • it says that this version of framework is still installed. Surely it gives a better error message than that? Sep 24, 2012 at 15:14
  • Have you installed the .net 4 framework ? What does C:\Windows\Microsoft.NET\Framework have in it ? Sep 24, 2012 at 17:43
  • Micah, I have some folder at the framewor folder: v2.0.50727, v3.0, v3.5 and v4.0.30319. When I try to install framework 4, it says that I have a newer version of .net framework. Sep 24, 2012 at 18:55

4 Answers 4

4

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
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).

1
  • 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. Sep 27, 2012 at 11:24
0

I think that your issue is probably some mishap with the installation of .NET Framework. I installed Visual Studio 2012 Beta and have all kind of troubles with compatibility between framework versions. The only remedy was reinstalling Visual Studio, including .NET Framework.

Check out How to: Target a Version of the .NET Framework (MSDN).

3
  • 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. Sep 24, 2012 at 16:10
  • 1
    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... Sep 24, 2012 at 21:24
  • 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. Sep 24, 2012 at 22:58
0

After creating new a project, go to its properties (select your project in Solution Explorer then right click and select properties) and select the target framework!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.