First of all, I think you need to look at what the framework version of your project is.
Starting with Visual Studio 2022, Visual Studio no longer includes applications for .NET Framework components for .NET Framework 4.0-4.5.1 as these versions are no longer supported. Visual Studio 2022 and later versions cannot build a . NET Framework 4.0 to Application of the NET Framework 4.5.1. To continue building these apps, you can use Visual Studio 2019 or earlier.
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.