I have found a solution! I uninstalled every single .NET SDKs (including runtimes) from the visual studio installer (the individual components tab) and also the in the required workspaces.
Then it prompted me with this message when I create a new C++ project:
So then what I naturally did is, I go back into visual studio installer, reinstalled the required components in the workspaces.
Tried it again and it worked!
