Azure-docs: Best practice for creating "Run from package" ZIP missing

Created on 15 Feb 2019  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true seems to build the packages like MSDeploy needs it:

image

This is not how the package should be structured for "Run from package" ZIP deployments.

I think it would make sense to add a section about how to create this package.

My assumption is that msbuild /t:Publish and zipping the output is the right way of achieving this.
Can somebody confirm this?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

azure-functionsvc cxp product-question triaged

All 7 comments

@timmkrause Thank you for posting your question. We will review and provide an update on this.

@timmkrause Document states that you have to create a .zip of the function app project folder.

When you are developing on a local computer, it's easy to create a .zip file of the function app project folder on your development computer.

Its just a simple zip of the existing function app project folder

Below are few more articles that you can refer to understand the Run-From-Package command:

https://github.com/Azure/app-service-announcements/issues/110
https://github.com/Azure/app-service-announcements/issues/84
https://docs.microsoft.com/en-us/azure/app-service/deploy-zip

I don't think that is a good idea. I should deploy a package where my .csproj and .cs files are included? What if Debug and Release folders are part of the package in a local scenario?

I will go with /t:Publish /p:PublishDir="$(Build.ArtifactStagingDirectory)/MyFunction" and zipping that folder within a build pipeline step. For me it feels like more control and a cleaner ZIP file.

@timmkrause you are correct that for a compiled project like C#, the "project root" folder is actually generated in the bin/release folder, and is documented here.
image
This article doesn't address the msbuild way to do this—assuming that customers are using Visual Studio or Core Tools for publishing, which does this correctly for you. We are working on a Azure DevOps deployment article that should cover this, but in the meantime, I have created an internal work item to track your suggested improvement to this article (1455913).

@KetanChawda-MSFT We can #please-close this comment, unless @timmkrause has any further suggestions to improve this article. Thanks Timm!

Sounds good, thanks! To me it would make sense to add these two links (maybe other scenarios as well?) to articles/azure-functions/deployment-zip-push.md so that users are aware of what to "Zip deploy".

@timmkrause We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bityob picture bityob  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

jebeld17 picture jebeld17  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments