How to open an existing azure function in visual studio?

Viewed 4514

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!

1 Answers

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:

Download app content

With Visual studio project

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.

Related