I've recently started to learn Azure Functions. I set up some on the portal, but now I want to develop them in Visual Studio.
I have VS 2017 in version 15.3.2 and I also installed Azure development workload. I've seen on tutorials that I'm supposed to have "Azure Functions" in the Cloud tab when adding new project - but it isn't there. I checked this on my personal and work computer.
I've found "Azure Functions and Web Jobs Tools" add-on on VS Gallery. It adds "Azure Functions" options, but it isn't working as I wished. I don't have dedicated forms for adding new functions and things like that.
Is there any bug in this addon? Do you know if I have to install something more?
From the Visual Studio menu, select File > New > Project. In Create a new project, enter functions in the search box, choose the Azure Functions template, and then select Next. In Configure your new project, enter a Project name for your project, and then select Create.
The unit of deployment for functions in Azure is the function app. All functions in a function app are deployed at the same time. After you enable continuous deployment, access to function code in the Azure portal is configured as read-only because the source of truth is set to be elsewhere.
After your have created a new Azure Function project in VS2017, it's actually an bare-bone project with host.json and local.settings.json.
To create the Azure Function, follow the steps below:
Right-click on the project and choose Add -> New Item -> Azure Function
Choose from one of the Azure Function Templates
You should see a Azure Function C# code file created for you.
Here's a good guide for getting started with Azure Function project in VS2017 15.3 and above.
https://blogs.msdn.microsoft.com/webdev/2017/05/10/azure-function-tools-for-visual-studio-2017/
The blog post referenced by @juvchan has an answer to this exact question
I installed Visual Studio 2017 15.3 and the Azure development workload, but I don’t see the Azure Functions project type or am receiving an error trying to build or run a function app
While pulled in automatically by the Azure development workload, Azure Function tools are distributed via the Visual Studio gallery which gives us the flexibility to update them as needed to react to changes on the Azure side which don’t always happen on the Visual Studio schedule.
If for some reason the tools don’t get automatically updated from the gallery, in Visual Studio, go to Tools | Extensions and Updates, and look at the “Updates” tab. If it shows an update is available for “Azure Functions and Web Job Tools” manually update them by clicking the “Update” button.
This fixed it for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With