I'm pretty new to Azure and using the portal, wrote an Azure Function. Now I would like to continue working on it using Visual Studio 2017. I can't seem to find a way to open/edit this existing function in Visual Studio though.
I'm sure I could create a new Azure Function in VS, copy code over, setup/connect to storage, etc. and deploy a new instance and delete the current instance, but would like to avoid that.
Ideally, was hoping there was some kind of open/connect to Azure account in VS, or maybe an "edit in VS" button in the portal, etc.
TIA!
Create an Azure Functions project 1 From the Visual Studio menu, select File > New > Project. 2 In Create a new project, enter functions in the search box, choose the Azure Functions template, and then select Next. 3 In Configure your new project, enter a Project name for your project, and then select Create. ... More items...
Visual Studio Code lets you publish your Functions project directly to Azure. In the process, you create a function app and related resources in your Azure subscription. The function app provides an execution context for your functions. The project is packaged and deployed to the new function app in your Azure subscription.
In this post, we are going to walk through taking our portal created function and getting it downloaded where it can be edited in Visual Studio. From the Azure Portal select App Services. Next, select the Function App you want to get the code for.
In Visual Studio Code, open Extensions and search for azure functions, or select this link in Visual Studio Code: vscode:extension/ms-azuretools.vscode-azurefunctions. Select Install to install the extension for Visual Studio Code: After installation, select the Azure icon on the Activity bar.
Well, as close as you can get to that is to go to the portal, your Function App, then click Download app content
button and ask for Visual Studio solution:
This will give you a zip file with Functions, including csproj
file.
The problem is that portal functions are C# scripts (csx
files), and Visual Studio isn't great to work with them. When you create a new Function App in Visual Studio 2017, it will make a precompiled function project - a normal class library with cs
files.
Unfortunately, there is no automated way to convert script functions to precompiled ones.
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