Targeting pack for .NET 4.5.2 not installed

66,055

Solution 1

Official list of all targeting packs: https://www.microsoft.com/net/targeting. Make sure you download the "developer pack", not "runtime".

Direct links to offline installers: 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2

This problem seems to affect Visual Studio 2013 and Visual Studio 2015. The targeting packs are included in Visual Studio 2017.

Outdated links:

How I found that link

First, choose option 1, "Change the target to .NET Framework 4.5"

Next, go to the project options of the affected project, select "Application" and then choose "Install other frameworks..." from the list of target frameworks:

Screenshot Change target framework

This brings you to a website where you can choose your version of Visual Studio and download the targeting pack (called developer pack).

Website screenshot

Solution 2

I had the same issue. When I loaded the project it always asked for the .NET framework 4.5.2 and I was not able to install it because it always said that it was already there.

What worked for me was to install the Microsoft .NET Framework 4.5.2 Developer Pack from https://www.microsoft.com/en-us/download/details.aspx?id=42637

Give it a try. It may work for you as well.

Solution 3

You need to download the .NET Framework 4.5.2 Developer Pack That link compile all the frameworks in one place

http://scottge.net/2015/07/04/a-complete-list-of-microsoft-sdks-for-download/

Solution 4

I had this issue with .NET 4.6.2 (VS2017) - I downloaded the Developer pack from the link provided by the error message and installed, but it didn't help.

But then I opened up the Programs and Features in Windows Control Panel, and selected to "Change" Visual Studio 2017. The installer contains a tab entitled "Individual Components", and in there I saw that Targeting Pack for 4.6.2 was not selected.

Selecting them and selecting "Modify" fixed the problem.

Solution 5

I faced the same problem. In spite of installing developer pack, problem did not seem to go away. I did a VS 2015 repair and voila it started working.

Share:
66,055
Thomas Weller
Author by

Thomas Weller

I'm trainer at Mitutoyo CTL Germany and e.g. responsible for students and pupils. I'm also training kids for Electronics and we're building a CPU. On SO I'm mainly answering debugging related questions and I'm proud to be the first and currently only owner of a golden windbg badge. But trust me, there are people who know WinDbg much better than me and do stuff that really astonishes me. Previous positions: Software Developer Senior Project Manager Group Manager Test Manager

Updated on August 23, 2020

Comments

  • Thomas Weller
    Thomas Weller over 3 years

    When opening an already existing solution in Visual Studio, it says

    The C# project "..." is targeting ".NETFramework,Version=v4.5.2", which is not installed on this machine.

    Screenshot error message

    I have already tried

  • Assimilater
    Assimilater over 9 years
    +1, this is helpful, thanks. However, the link to the web page is all that's needed. Not so much changing the framework (annoying if you have multiple projects in a solution)
  • Thomas Weller
    Thomas Weller over 9 years
    @Assimilater: link-only answers are discouraged on Stack Overflow
  • Groo
    Groo about 8 years
    @Thomas: link-only answers are discouraged when the link contains actual information you can include in the answer, but in this case the link contains download links, and steps mentioned in your answer are unnecessary, so I would at least put the link at the top of this answer to make it more helpful. That being said, it seems that the link is not working anymore, and that the correct download link is now getdotnet.azurewebsites.net/target-dotnet-platforms.html.
  • Levi Wallach
    Levi Wallach over 7 years
    Thank you! When trying to download 4.5.2 Framework it kept telling me it already installed it, but I WAS able to install the Developer Pack and after doing so I was able to pick 4.5.2 as the target framework!
  • Elias MP
    Elias MP over 6 years
    Welcome to StackOverflow and thanks for your help. You might want to make your answer even better by adding some explanation.
  • DubiousPusher
    DubiousPusher about 6 years
    I mistakenly tried installing the "Runtime" and that was already installed. I had to specifically install the "Developer Pack." This all makes sense in retrospect but I was definitely confused before I read this answer.
  • tyteen4a03
    tyteen4a03 almost 6 years
    Is this answer still relevant for VS2017? I'm running into this problem but Microsoft says this should be bundled with VS2017. The installer confirms that the developer pack is installed.
  • Thomas Weller
    Thomas Weller almost 6 years
    @tyteen4a03: the linked webseite also says that it should be installed already. Can you uninstall and reinstall it via the Control Panel? Are you sure it is 4.5.2 and not 4.7.2?
  • TomEberhard
    TomEberhard almost 6 years
    Same symptoms with .NET 4.7, same fix: opening up Programs and Features and the "Individual Tabs" and select the versions of .NET that you need.
  • William
    William over 4 years
    I tried installing the .NET Framework 4.5.2. VS 2019 still says the .NET 4.5.2 framework is not installed
  • Alireza Jamali
    Alireza Jamali over 3 years
    LIFE SAVERRRRRRRRRRRRRRRRRRR