项目文件在名为Globals的PropertyGroup中具有以下设置:
<PropertyGroup Label="Globals">
...
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>
...
</PropertyGroup>
我无法找到任何关于如何使用MSBuild在命令行中设置这些文件的文档。
发布于 2019-10-21 15:37:52
使用简单的/p
参数可以做到这一点。使用以下命令:
msbuild xx.csproj/xx.sln /t:build /p:WindowsTargetPlatformVersion=xx;WindowsTargetPlatformMinVersion=xx
(应该在一行中)可以在运行时指定目标版本。
备注:要运行上面的命令,您应该确保要指定的windows版本已安装在您的计算机上。
https://stackoverflow.com/questions/58461716
复制相似问题