We have a project in c# we want to deploy using Azure Pipelines.
When I publish the project in Visual Studio 2019, I get the following structure:
bin\Release\net5.0\publish
-> FolderA
-> files
-> runtimes
-> files
files
When I use the DotNetCoreCLI@2 task with , I get a different structure of files:
publishFolder
-> runtimes
-> files
files
"Folder A" is missing, so launching the service fails.
this is my task in the pipeline:
- task: DotNetCoreCLI@2
displayName: Publish API
inputs:
command: 'publish'
publishWebProjects: false
projects: AzureDevOps.Api/AzureDevOps.Api.csproj
arguments: '--output $(Build.ArtifactStagingDirectory)/API --configuration Release --self-contained true -r linux-x64'
zipAfterPublish: false
modifyOutputPath: true
we are building on a self-hosted Linux (Kubuntu) agent.
Any suggestions?
include
FolderAand have the subfolders present, setself-containedto true in your Azure Pipelines YAML task&