首页 > 解决方案 > 指定平台后在其他平台上运行的 MSBuild:x64 - Azure 管道

问题描述

我有具有多个 .vcxproj 和 .csproj 的 dotnet 解决方案。

它还具有如下配置

GlobalSection(SolutionConfigurationPlatforms) = preSolution
    Debug|Any CPU = Debug|Any CPU
    Debug|ARM = Debug|ARM
    Debug|ARM64 = Debug|ARM64
    Debug|x64 = Debug|x64
    Debug|x86 = Debug|x86
    Release|Any CPU = Release|Any CPU
    Release|ARM = Release|ARM
    Release|ARM64 = Release|ARM64
    Release|x64 = Release|x64
    Release|x86 = Release|x86
    SELFHOST|Any CPU = SELFHOST|Any CPU
    SELFHOST|ARM = SELFHOST|ARM
    SELFHOST|ARM64 = SELFHOST|ARM64
    SELFHOST|x64 = SELFHOST|x64
    SELFHOST|x86 = SELFHOST|x86
EndGlobalSection

我通过指定平台 = x64 在 Azure 构建管道中运行 Visual Studio 构建。

- task: VSBuild@1
  displayName: Build the Solution
  inputs:
    solution: '$(Build.SourcesDirectory)\$(SolutionFile)'
    msbuildArgs: '/p:TargetPlatformVersion=$(TargetPlatformVersion) /p:LatestTargetPlatformVersion=$(TargetPlatformVersion) /p:Prefer32bit=false'
    platform: 'x64'
    configuration: 'Debug'
    clean: true
    maximumCpuCount: true
    logProjectEvents: false
    createLogFile: true
    logFileVerbosity: 'diagnostic'

我看到带有以下消息的日志

Building solution configuration "Debug|x64"
====Other Logs===== 
Building solution configuration "Debug|x86"

我想知道为什么它在指定平台后建立在“调试| x86”上:'x64'。

任何帮助,将不胜感激?

问候,

纳雷什·埃德

标签: msbuild

解决方案


推荐阅读