Hello Horus,
Welcome to Microsoft Q&A forum and thank you for sharing us screenshots to check.
For your description:
I cannot see older net core sdk in projects template (below .net core 2.1).
I notice that you are using Visual Studio 2022 Enterprise version 17.4.5, so it’s true, Visual Studio 2022 doesn’t support older .NET Core(below .NET Core 2.1). This document: Visual Studio 2022 Support for .NET Development has listed the supported .NET implementations:
Visual Studio 2022 supports the following .NET implementations:
.NET Framework versions 4.8.1, 4.8, 4.7.2, 4.7.1, 4.7, and 4.6.2
.NET Core 7.0, 6.0, 5.0, 3.1, 3.0, 2.2, and 2.1.
…
For your question:
Is there any approach similar to making available .Net Framework 4 and 4.5 for VS 2022, or it’s necessary a VSIX.
Like what the above document says, and .NET Framework 4.0 and .NET Framework 4.5 are not listed there.
But perhaps you can try a workaround(before removing/copying files, please back up the related folders/files just in case):
Download the Microsoft.NETFramework.ReferenceAssemblies.net45 NuGet package to a clean folder, open it as zip(or edit the file extension to .zip), navigate to its sub-folder(build\.NETFramework\v4.5
), copy all of the files/folders to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
folder(you can skip the same files when the process stops on copying and pasting the files). You can try the similar steps for using .NET Framework 4.0.
After performing above operations, please restart VS, and you can either change the project target framework to .NET Framework 4.5 or target to .NET Framework 4.5 when you are creating a new project in VS 2022.
Besides, some old version of .NET Core and .NET Framework are end of life. This document: Servicing - End of life (EOL) has mentioned that:
Your use of out-of-support .NET versions may put your applications, application data, and computing environment at risk. You are strongly recommended to not use out-of-support software.
So I may suggest you try to use a higher version of .NET Framework/.NET/.NET Core or try to update your project(s) to target a higher version of .NET Framework/.NET/.NET Core.
Feel free to contact us, have a nice day.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.