Skip to content

Publish Azure

Shivam Gupta edited this page Nov 17, 2022 · 3 revisions

Publish Azure Function to Azure

Visual Studio can publish your local project to Azure. Before you can publish your project, you must have a function app in your Azure subscription. If you don't already have a function app in Azure, Visual Studio publishing creates one for you the first time you publish your project.

Steps:

  1. In Solution Explorer, right-click the project and select Publish. In Target, select Azure then Next.
  1. Select Azure Function App (Windows) for the Specific target, which creates a function app that runs on Windows, and then select Next.
  1. In the Function Instance, choose Create a new Azure Function...
  1. Create a new instance using the values specified in the following table:
  1. Select Create to create a function app and its related resources in Azure. The status of resource creation is shown in the lower-left of the window.

  2. In the Functions instance, make sure that the Run from package file is checked. Your function app is deployed using Zip Deploy with Run-From-Package mode enabled. Zip Deploy is the recommended deployment method for your functions project resulting in better performance.

  1. Select Finish, and on the Publish page, select Publish to deploy the package containing your project files to your new function app in Azure. After the deployment completes, the root URL of the function app in Azure is shown in the Publish tab.

  2. In the Publish tab, in the Hosting section, choose Open in Azure portal. This opens the new function app Azure resource in the Azure portal.

Your Function App is deployed successfully, verify it from Azure Portal and by triggering it.