使用Azure管道CI工具时从.sln中排除子.vcxproj

时间:2019-02-06 15:21:16

标签: visual-studio continuous-integration azure-devops azure-pipelines

以下是我的azure-pipelines.yml。这是用于Visual Studio(Windows)项目的通用类,它在master上触发并尝试构建主.sln文件。问题是我有三个子.vcxproj文件,分别称为project1.vcxprojproject2.vcxprojproject3.vcxproj,其中CI不需要其中之一(假设project1.vcxproj)(如果建立的话会破坏CI。我想配置我的.yml文件,以便可以排除该子项目并仍然构建解决方案的其余部分,该怎么做?

# Universal Windows Platform
# Build a Universal Windows Platform project using Visual Studio.
# Add steps that test and distribute an app, save build artifacts, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
  vmImage: 'VS2017-Win2016'

variables:
  solution: '**/*.sln'
  buildPlatform: 'x86|x64|ARM'
  buildConfiguration: 'Release'
  appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\'

steps:
- task: NuGetToolInstaller@0

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    platform: 'x86'+
    solution: '$(solution)'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload'

0 个答案:

没有答案