Hello @xue,
Welcome to Microsoft Q&A forum.
Please press Win + R => run winver
command and share us the detailed Windows version number.
Please try to update Windows OS and make sure thar there’s no pending updated Windows Updates and no Windows Update errors, then reboot your machine.
Since installing Visual Studio needs administrator permissions, can you confirm that you right clicked the setup file and selected run as administrator
to install VS 2022?
To narrow down this issue, I suggest you open VS Installer => click More => click Repair to repair VS and make sure that the repair process finishes running and no errors prompt.
Besides, please navigate to this directory C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ProjectTemplates
and confirm that the templates such as VC, CSharp and Python exist.
Please feel free to let us know if this error disappears.
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.