Target Framework Not Installed – But it is!

I recently got this message when trying to open a project created by another developer…

Project Target Framework Not Installed Error

I was surprised because everything on my PC was up to date.
I tried installing the runtime but it told me that it was already installed.
I checked the registry and that confirmed that I had the latest version.

How to check the Framework version

The version information is stored in the registry in this location

 Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full 

The setting Release contains the value, for version 4.8 the value is 528040

Framework version in RegEditor

See https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed for more on that.

The Fix

It would seem that the Framework versions in the Target Framework dropdown in Visual Studio, require them to be developer versions – In 15 years I’ve never had this problem, but that’s how it seems.

So to fix you simply need to install the Developer Pack of the framework.

From the message above select the option for ‘Download the targeting pack for…’, this will take you to a web page.
Or just go to https://dotnet.microsoft.com/download/visual-studio-sdks?utm_source=getdotnetsdk&utm_medium=referral

Install and reopen the solution.

Leave a Reply

Your email address will not be published. Required fields are marked *