14

I pushed my .net core function application using visual studio and now setting up release pipeline. I can publish and execute the application just fine and it works great on the Azure portal. However when I see the builds for releases in azure-devOps that slot fails with the following error.

2019-06-19T23:21:33.3543380Z ##[error]Error: Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task. D:\a\r1\a\_...AVFunctionCore.zip

I am not sure where I need to check in my setup to even start diagnosing the issue.

Here are the pipeline steps. I create a new stage and then select a template of type (Azure app service deployment)

Under tasks

App type is Function App on Windows

Give the app name, resource group , give the slot and package folder as

 $(System.DefaultWorkingDirectory)/**/AVFunctionCore.zip

Everything else on this is left as default.

5
  • Share the steps of your build and release pipelines, including parameter values. Also, did you follow the steps provided in the error message? Commented Jun 20, 2019 at 17:39
  • Thanks Daniel, I am actual new to this.. " Change package format or use Azure App Service Deploy task." where can I do this? I tried looking for it in VS but couldnt find it and dont see that in devops either. Commented Jun 20, 2019 at 19:24
  • Please add the pipeline steps, what you are doing in Azure devops and add it in your question. Commented Jun 21, 2019 at 5:07
  • Hi Leo, sorry I didnt see these messages till now, working on the suggestions now.. Commented Jul 2, 2019 at 19:08
  • To clarify, I did exactly the same thing. I'm using the deployment pipeline that is automatically generated by VS. So basically the automatically generatef pipeline doesn't function. That's not very useful Commented Feb 12, 2020 at 11:32

4 Answers 4

15

Azure function app deploy and release pipeline error

According to the error message:

Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task.

It seems you are not using the correct task to publish the generated package. Since the generated package is .zip, you can try the suggestion as error message said use Azure App Service Deploy task.

Azure App Service Deploy task:

Use this task in a build or release pipeline to deploy to a range of App Services on Azure. The task works on cross-platform agents running Windows, Linux, or Mac and uses several different underlying deployment technologies.

The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and Node.js based web applications.

The task can be used to deploy to a range of Azure App Services such as:

  • Web Apps on both Windows and Linux

  • Web Apps for Containers Function

  • Apps on both Windows and Linux

  • Function Apps for Containers

  • WebJobs

  • Apps configured under Azure App Service Environments

Check this blog Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS for some more details.

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

says "not recommended" on the task
5

I get predefined pipeline from VS integration. So for those you have the same case:

  1. In GUI/Classic mode Release page -> edit pipeline
  2. Edit task in stage section (this is responsible for deploying) enter image description here
  3. Replace Azure Web App task with Azure App Service deploy enter image description here

Comments

1

I have more than one project (web api + azure function) in my solution. For the web app I used the zip file, but for the azure function to work I needed to publish the whole folder.

Azure Function Package or folder: $(System.DefaultWorkingDirectory)/_Backend/drop

Web Api Package or folder: $(System.DefaultWorkingDirectory)/_Backend/drop/ClientAPI.zip

Comments

0

Using the app service deploy task for functions says "Not recommended". My issue was simple and silly - I had a random zip file in my project, a resource, and that was picked up by the azure function publish task:

- task: AzureFunctionApp@2
  inputs:
    azureSubscription: 'XXXX'
    appType: 'functionApp'
    appName: 'XXXX'
    package: '$(System.DefaultWorkingDirectory)/**/*.zip'
    deploymentMethod: 'auto'

All I had to do was to fix the package to pick up the right zip file:

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.BinariesDirectory)'
    includeRootFolder: true
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
    replaceExistingArchive: true

- task: AzureFunctionApp@2
  inputs:
    azureSubscription: 'XXXX'
    appType: 'functionApp'
    appName: 'XXXX'
    package: '$(System.DefaultWorkingDirectory)/**/*.zip'
    deploymentMethod: 'auto'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.