One common solution to this known VS bug that you haven’t specified as having tried is changing the build target platform.
-
If your current build target platform is x64, change to x86. If it’s currently x86, change to x64.
-
Clean and Build solution for new target platform.
-
Change back to desired target platform and re-build.