【发布时间】:2019-10-19 08:08:15
【问题描述】:
项目文件在名为 Globals 的 PropertyGroup 中有这些设置:
<PropertyGroup Label="Globals">
...
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>
...
</PropertyGroup>
我找不到任何有关如何使用 MSBuild 在命令行上设置这些的文档。
【问题讨论】:
-
标准命令行功能对这些不起作用吗? docs.microsoft.com/en-us/visualstudio/msbuild/…
-
如果你对msbuild不熟悉,命令格式见:
msbuild xx.csproj/xx.sln /t:build /p:WindowsTargetPlatformVersion=xx;WindowsTargetPlatformMinVersion=xx... 更多细节请参考stijn评论中的文档. -
@LanceLi-MSFT 我不知道我可以使用 /p 参数简单地“按原样”提供项目文件中的值。请添加您的评论作为答案,我会接受。
标签: visual-studio msbuild windows-runtime visual-studio-2019 c++-winrt