Search code examples
.netvisual-studiowindows-10.net-framework-version

Open .net framework 4.5 project in VS 2022. Is there any workaround?


Is there anyway to open and work on .net framework 4.5 project in visual studio 2022.

May be problem is not with VS2022 but as .net framework 4.5 developer pack is not available any more .. my project can not be changed target version .. Is there any workaround?

enter image description here enter image description here


Solution

    • Download Microsoft.NETFramework.ReferenceAssemblies.net45 from nuget.org
    • Open the package as zip (or rename the package file and change its extension from .nupkg to .zip then open it)
    • copy the files from build\.NETFramework\v4.5\ to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
    • Close Visual Studio and then reopen it

    For more details: Building a project that target .NET Framework 4.5 in Visual Studio 2022