Tag not monitored by Microsoft.
Hi @Phong Nguyen ,
Welcome to Microsoft Q&A!
Please have a try with the following workarounds:
- Update your VS2022 to the latest version with Visual Studio Installer.
- Change the target framework to .NET 7.0 and rebuild your project:
- Right click on project > Properties > Application > General > Target framework > switch to NET 7.0.
- Open your project file and check the target framework:
<TargetFramework>net7.0</TargetFramework>
If the .NET 7.0 is not appeared in Target framework, please close all running VS instances and go to Visual Studio installer > Modify > Individual components > ensure that .NET 7.0 Runtime is checked.
- Check the installed versions of .NET (open a Developer Command Prompt for VS 2022 and run this command):
dotnet --list-sdks
You can refer to: NETSDK1045: The current .NET SDK does not support 'newer version' as a target.
Sincerely,
Anna
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.