Thursday, 20 December 2018

Publish Azure Function with Visual Studio 2017

Introduction

In my last post, I demonstrated how to create a new .NET Core Azure Function. In this post, I’ll demo how to publish your Azure Function using Visual Studio.

This post assumes that you’ve created your Azure Function already. If you need to go back over how to do that, click here.

Publish Azure Function with Visual Studio 2017

1) Right click your project and click Publish

image_thumb[25]

2) If you have an existing Azure Function App already deployed in Azure then you can choose Select Existing to use an existing one however I’m creating one from scratch so I’ll choose Create New

image_thumb[26]

3) Log into Azure and fill out all the details then click Create

image_thumb[27]

You’ll be prompted to upgrade the version of Azure Function as we need V2, not V1 for .NET Core. If so, click Yes.

image_thumb[28]

4) After a few seconds, Visual Studio completes the deployment and you can now see your new Azure Function in the Azure Portal

image_thumb[29]

5) On the overview tab, copy the URL into PostMan

image_thumb[30]

5) Click on Manage and copy down your function key. You can create a new key if you want.

image_thumb[31]

6) In PostMan, add the key and the path to the HttpTrigger function as below

https://httptrigger-markgossa.azurewebsites.net/api/HttpTrigger?code=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You can now click Send and see your output

image_thumb[33]

There you have it! .NET Core Azure Function published to Azure in very little time. You can find the project code on GitHub here.

5 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi, This is a great article. Loved your efforts on it buddy. Thanks for sharing this with us. Azure online training.

    ReplyDelete
  3. Wow! this is Amazing! Do you know your hidden name meaning ? Click here to find your hidden name meaning

    ReplyDelete