Recently, I created an Azure Function for one of my clients, and the steps mentioned in this article helped me to deploy Azure function from Visual Studio. This article will discuss how to deploy Azure Function from Visual Studio.
Deploy Azure Function from Visual Studio
If you have not created your Azure Function till now, you can Create your Azure Function In Visual Studio and then follow the below steps to deploy it to Azure.
1. The first step is to right-click on the project from Solution Explorer and select the “Publish” Option like below.

2. On the Pick a publish target window, choose the Azure Functions Consumption Plan, and then you can select the Existing plan if you have or Choose the Create New option and then click on the Create Profile button to create the new Azure Functions Consumption Plan.

3. Now, on the App Service window, Provide a name, choose your subscription, Choose your Resource group, Select the Location, and then choose your Existing Storage Account or click on the New button to create a new Azure Storage Account and then finally click on the Create button.

4. Now you can see the publish profile will be created like below. Now click on the Publish button.

5. You can now see the App services we created.

Now click on that, and then click on the Functions from the left navigation, you can see the Function that you published from VisualStudio.

Click on the Function. In my case, it is Function1, then click the Get Function Url. Now click on the Copy button to copy the complete function URL as highlighted below

Now, you can use this URL in the Postman app to check if it works.
The URL will be like below
Open the Postman app again, paste the above URL, choose the POST option, and now click on the Send button. It asks to pass a name on the query string or in the request body.

Now, Choose the raw option, select the JSON format, use the same format as below for the name parameter, and specify a name. You can see it provides us with the expected output below.

So, we discussed Deploying the Azure Function using Visual Studio 2019 by following the above-mentioned steps.
Conclusion
This Azure article discussed how to deploy Azure Function from Visual Studio. Thanks for reading this article !!!

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
