According to MSDocs here, there is a task to publish .NET Core with arguments.
dotnet publish --output $(Build.ArtifactStagingDirectory)
But I have a .NET Framework application, not .NET Core, which means i use MSBuild task not dotnetcore task to build .NET. so i checked out the .NET Framework page and there's literally no information about publishing .NET Framework app...
Does this mean that the same dotnetcore tasks apply/can be used for .NET Framework app then??
steps:
- task: DotNetCoreCLI@2
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: True
# this code takes all the files in $(Build.ArtifactStagingDirectory) and uploads them as an artifact of your build.
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'myWebsiteName'