Simplify VS project configs and harden MSBUILD script