You should share your Pipeline with us, otherwise, we can't tell you what you have to change/fix.
However, here an example that uses the AzureWebApp@1 Task to deploy a .NET Core 3.1 application to an Azure Web App.
trigger:
branches:
include:
- master
stages:
- stage: Build
jobs:
- job: 'BuildArtifact'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UseDotNet@2
inputs:
packageType: sdk
version: 3.1.x
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: PATH/TO/YOUR/Project.csproj
arguments: --output $(System.DefaultWorkingDirectory)/publish_output --configuration Release
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/publish_output'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- publish: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
artifact: drop
- stage: Deploy
dependsOn: Build
condition: succeeded()
jobs:
- deployment: 'Deploy'
pool:
vmImage: 'ubuntu-latest'
environment: Development
strategy:
runOnce:
deploy:
steps:
- task: AzureWebApp@1
displayName: Azure Web App Deploy
inputs:
azureSubscription: YourAzureSubscription
appName: YourAppName
package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip
appType: webAppLinux