11
votes

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.

3
Share the steps of your build and release pipelines, including parameter values. Also, did you follow the steps provided in the error message?Daniel Mann
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.Sarah
Please add the pipeline steps, what you are doing in Azure devops and add it in your question.Mohit Verma
Hi Leo, sorry I didnt see these messages till now, working on the suggestions now..Sarah
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 usefulNick.McDermaid

3 Answers

14
votes

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.

4
votes

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
0
votes

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