Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install .Net Framework 4.5 Targeting Pack

please help.

I have installed quite a lot of framework and development pack. as you can see in the image.

downloaded .net framewoek

unfortunately I want to access an ancient project. this project runs on .net framwork 4.5, and must not be upgraded.

I have visual studio 22 installed, but whenever i open the solution, i get the following error as seem in the image bellow.

dot net 4.5 error

At the moment I have succeeded in installing the target park for 4.5.2 but it is not helping.

I have tried to install the .net framework 4.5 runtime, but i get the error bellow.

enter image description here

Please help

like image 734
Rikudou En Sof Avatar asked Aug 31 '25 01:08

Rikudou En Sof


1 Answers

Look @ article - https://www.gnostice.com/docs/docstudio_net/guide/_faq_buildinganddeployment_vs2022_and_netframework45.html

Total 3 solutions:

Option 1: Install Visual Studio 2019. This will enable support for building even in Visual Studio 2022.

Option 2: Download the Windows 8 SDK from here and when installing it choose the option to install .NET Framework 4.5.

Option 3: Follow the steps below to manually copy over the targeting pack to your machine.

  1. Download Microsoft.NETFramework.ReferenceAssemblies.net45 from NuGet

  2. Open the package as a zip file

  3. Copy the files from build\.NETFramework\v4.5 folder to Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5

like image 144
ayc Avatar answered Sep 02 '25 13:09

ayc