How to target .NET Framework 4.0 in VS 2022 on Windows 11?

Lee Feng 171 Reputation points
2022-09-05T07:41:23.313+00:00

Working on some old projects targeting .NET Framework 4.0. I used VS 2022 to open the solution and was told to install 4.0 targeting pack.

I can't find the download link on the dotnet website, nor the installation option in Visual Studio Installer.

Anyway to install it?

(Of course I know it's no longer supported. But I cannot just make it target a newer version, because my boss does not let me do that.)

Developer technologies | .NET | .NET Runtime
Developer technologies | Visual Studio | Debugging
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | C#
{count} votes

6 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.