I have an Azure build pipeline, and a Publish task:
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: 'publish'
projects: '**/MyProj.csproj'
arguments: '--configuration $(buildConfiguration) --output $(build.artifactstagingdirectory)\webjob\App_Data\jobs\triggered\MyProjWebJob /p:AssemblyVersion=$(GitVersion.AssemblySemVer)'
zipAfterPublish: false
publishWebProjects: false
As you can see I am specifying an output directory - it is for a webjob and I have to have this format. The problem is, that the publish adds another directory with the name of the project:
$(build.artifactstagingdirectory)\webjob\App_Data\jobs\triggered\MyProjWebJob\my.proj.webjob
and it puts all the artifacts in there, but I do not want this additional directory - when I deploy it can't be there or the webjob isn't accessible. How do I publish without creating this directory?