You can install Visual Studio 2015 and later in a custom path. You need to add the custom path to MSBuild, based on the listed path patterns. A custom path follows the same patterns shown here, starting after the Program Files (x86) directory.
- C:\Program Files (x86)\MSBuild\14.0\Bin\
- C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\