I had a similar problem a short while ago. I wasn’t able to find a real fix for it and no one here had any advice, so I eventually uninstalled both Unity & Visual Studio, then reinstalled Unity & let Unity install Visual Studio so it would install with the correct settings.
I wish I knew what to have you check or fix, as that would be so much easier, but actually getting that information is the hardest part. I recommend doing what I did to save yourself the headache.
Uninstalling them shouldn’t effect your project. You may have to reopen your scene, but that’s about it.
Good luck!