1

The following YAML produced only web projects, my repo has 2 web api projects, 1 blazor and one regular asp.net core but only the asp.net core and blazor get published to 'drop' and the web api projects are ignored. path of my .sln and files

\front-ends\webproject\webproject.csproj - regular razor project, this gets added to the drop as webproject.zip

\front-ends\blazorproject\blazorproject.csproj - blazor project, this gets added to the drop as blazorproject.zip

\services\api1\api.csproj - not showing in the drop

\services\api2\api2.csproj - not showing in the drop

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  buildConfiguration: 'Release'

steps:
- task: UseDotNet@2 
  displayName: ".NET Core 6"
  inputs:
    version: '6.0.x'
    packageType: sdk


- task: NuGetCommand@2
  inputs:
    command: 'restore'
    restoreSolution: '**/*.sln'
    feedsToUse: 'select'
    vstsFeed: 'f5775ae3-da0e-4b38-82f0-ce288b91309b'
- task: DotNetCoreCLI@2
  displayName: "Publish"
  inputs:
    command: 'publish'
    arguments: '-r win-x64 --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'

- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Build.ArtifactStagingDirectory)'
    artifactName: 'drop'

1 Answer 1

1

Add publishWebProjects: false to the `task: DotNetCoreCLI@2 (publish) as the default value is true

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question