Hi @oscar nilsson,
Welcome to Microsoft Q&A!
Does the VS work before?
To confirm it again, please search "Edit the system environment variables" in Windows Search box > Open it > Environment Variables… > System variables > select Path > Edit… > check if there are two paths to dotnet:
C:\Program Files\dotnet
C:\Porgram Files (x86)\dotnet
You can click on the Move up button to move the entry C:\Program Files\dotnet before the x86 one. Or delete this one: C:\Porgram Files (x86)\dotnet.
If it doesn’t work, please try to manually download and install the latest .NET SDK with 64-bit version.
Then, re-launch the VS2022 and create a new project to check it again.
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.