I had the same problem, but when trying to open a project made in VS2019 with VS2017, so I changed this in my project:
Go to: Project->Properties->General->Platform Toolset and change to the current version of your VS.
I had the same problem, but when trying to open a project made in VS2019 with VS2017, so I changed this in my project:
Go to: Project->Properties->General->Platform Toolset and change to the current version of your VS.