MsBuild Task on Azure DevOps: with different configuration for dependent projects

倖福魔咒の 提交于 2020-06-17 15:53:52

问题


i have one solutions with multiple projects.

DSS.DMN.Client project dependens on other projects(have references)

This is how my yaml files looks like

- task: MSBuild@1
  displayName: 'Build solution Client'
  inputs:
    platform: anyCPU
    maximumCpuCount: true
    configuration: 'Integration' 
    solution: DSS.DMN.Client

- task: CopyFiles@2
  inputs:
    SourceFolder: '$(Build.SourcesDirectory)'
    Contents: '**\bin\**'
    TargetFolder: '$(Build.ArtifactStagingDirectory)'

- task: PublishBuildArtifacts@1    
  displayName: 'Publish Artifact: drop'
  inputs:
    PathtoPublish: '$(build.artifactstagingdirectory)'

the thing is that Client have configuration as INT but the other two dependent projects have configuration as debug.

now when i run the build i get the error:

##[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(777,5): Error : The OutputPath property is not set for project 'DSS.DMN.AVModule.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='INT'  Platform='AnyCPU'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.

the problem is build is trying to find INT configration for the project for DSS.DMN.AVModule.csproj though it have only debug configuration.

question: How do i provide differernt configation on my build pipeline for different project in a single build?

来源:https://stackoverflow.com/questions/61661254/msbuild-task-on-azure-devops-with-different-configuration-for-dependent-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!