visual-studio - MSBuild 忽略所需的配置
问题描述
我正在尝试从命令行(通过 PowerShell 脚本)构建 Visual Studio 2019 解决方案,我需要有 2 个构建 - 一个用于 64 位,一个用于 32 位(通过脚本)。
从 Configuration Manager 我已将 x86 和 x64 平台添加到平台:
我正在使用以下命令行使用 MSBuild 进行构建:
& $msbuildPath ../MyApp.Desktop.sln -t:Rebuild -p:Configuration=Release /p:Platform=x86
& $msbuildPath ../MyApp.Desktop.sln -t:Rebuild -p:Configuration=Release /p:Platform=x64
但它似乎忽略了,因为我声明或者它总是构建在配置管理器中设置的“活动”平台/p:Platform
并不重要。但是,如果我在平台中输入一个无效值(例如 x123),则构建将失败,因为它不存在。x86
x64
我怎样才能使 MSBuild 真正按照所述构建/p:Platform
?
解决方案
推荐阅读
- google-cloud-platform - Terraform 总是尝试替换 gcp 计算实例而不进行更改
- python - 如何在谷歌协作中使用 python 从 csv 文件中读取特定列
- c++ - 快速构建 - 默认参数(C++ 包)
- c# - 显示来自一对多关系.net的数据
- python - 处理字段值 pandas 内的逗号和双引号
- angular - JHipster Angular clinet 应用程序拦截每个“http/https”请求,然后添加 http://localhost
- python - sparql 查询的重复结果
- google-oauth - 使用 Google oAuth2 和 Google Fit API 的费用
- python - 带移位的计算列
- javascript - 导出多个函数但始终先运行默认函数