Project files have these settings in a PropertyGroup named Globals:
<PropertyGroup Label="Globals">
...
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>
...
</PropertyGroup>
I wasn't able to find any documentation about how to set these on the command line with MSBuild.
msbuild xx.csproj/xx.sln /t:build /p:WindowsTargetPlatformVersion=xx;WindowsTargetPlatformMinVersion=xx
... More details please refer to the document in stijn's comment. – Colene