0

I have 2 ways to build a pipeline on Azure DevOps, with YAML pipeline template or with Tasks preset in Classic Editor(which can be converted into Task Group as well). If I select the same template in either one of these ways, the same task in the Classic Editor could be missing from its YAML pipeline template counterpart.

I selected .NET Desktop with both ways. https://i.stack.imgur.com/HYj54.png

In Classic Editor, I could see 2 of these publishing tasks as seen below. https://i.stack.imgur.com/anfTB.png

With YAML Pipeline, the 2 tasks seen above are missing though.

# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/pipelines/apps/windows/dot-net

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

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

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

I can't figure out why this is happening though. Appreciate some help or pointers on this, thanks in advance.

Jkzs
  • 13
  • 2

1 Answers1

2

Both those tasks are not missing, but you might need to manually add them.

Publishing artifacts is no long a standalone task, it's become part of the core capability of YAML pipelines, so it's effective a native step called publish

steps:
- publish: output/files # path to files/directory containing files you want to publish
  artifact: myartifact # Name of the artifact

As for copy files, that's still a task, as documented here

The docs for YAML pipelines are pretty good IMO

As well as a complete reference for the all the built-in tasks

BenColeman
  • 106
  • 1
  • 7