From: https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference
How to update function app files
The function editor built into the Azure portal lets you update the function.json
file and the code file for a function. To upload or update other files such as package.json
or project.json
or dependencies, you have to use other deployment methods.
Function apps are built on App Service, so all the deployment options available to standard web apps are also available for function apps. Here are some methods you can use to upload or update function app files.
To use App Service Editor
- In the Azure Functions portal, click Function app settings.
- In the Advanced Settings section, click Go to App Service Settings.
- Click App Service Editor in App Menu Nav under DEVELOPMENT TOOLS.
- click Go.
- After App Service Editor loads, you'll see the
host.json
file and function folders under wwwroot
.
- Open files to edit them, or drag and drop from your development machine to upload files.
To use the function app's SCM (Kudu) endpoint
- Navigate to:
https://<function_app_name>.scm.azurewebsites.net
.
- Click Debug Console > CMD.
- Navigate to
D:\home\site\wwwroot\
to update host.json
or D:\home\site\wwwroot\<function_name>
to update a function's files.
- Drag-and-drop a file you want to upload into the appropriate folder in the file grid. There are two areas in the file grid where you can drop a file. For .zip files, a box appears with the label "Drag here to upload and unzip." For other file types, drop in the file grid but outside the "unzip" box.
To use FTP
- Follow the instructions here to get FTP configured.
- When you're connected to the function app site, copy an updated
host.json
file to /site/wwwroot
or copy function files to /site/wwwroot/<function_name>
.
To use continuous deployment
Follow the instructions in the topic Continuous deployment for Azure Functions.
From: https://docs.microsoft.com/en-us/azure/azure-functions/functions-runtime-overview
Azure Functions Runtime Overview
The Azure Functions Runtime provides a new way for you to take advantage of the simplicity and flexibility of the Azure Functions programming model on-premises. Built on the same open source roots as Azure Functions, Azure Functions Runtime is deployed on-premises to provide a nearly identical development experience as the cloud service.
The Azure Functions Runtime consists of two pieces:
- Azure Functions Runtime Management Role
- Azure Functions Runtime Worker Role
Azure Functions Management Role
The Azure Functions Management Role provides a host for the management of your Functions on-premise. This role performs the following tasks:
- Hosting of the Azure Functions Management Portal, which is the the same one you see in the Azure portal. This lets you develop your functions in the same way as you would in the Azure portal.
- Distributing functions across multiple Functions workers.
- Providing a publishing endpoint so that you can publish your functions direct from Microsoft Visual Studio.
If you read the MSDN blog link that you provided, I think both your questions are answered there. (Although you will have to point to the local (on-premises) rather than the cloud (Azure).
How to publish a Function project to Azure directly from Visual Studio
To publish a Function project to Azure directly from Visual Studio,
right click the project and choose “Publish”. On the publish page, you
can either create a new Function App in Azure or publish to an
existing one. Note: even though the Folder option is currently
appears, it’s not intended for use with Azure Functions at this time.
How to locally deploy a Function project in Visual Studio
To add a function to the application right click the project and
choose “Add Item”, then choose the “Azure Function” item template.
This will launch the Azure Function dialog that enables you to choose
the type of function you want, and enter any relevant binding
information. For example, in the dialog below, the queue trigger asks
you for the name of the function, the name of the connection string to
the storage queue, and the name of the queue (path)
This generates a new class that has the following elements:
- A static Run method, that is attributed with [FunctionName] attribute.
The [FunctionName] attribute indicates that the method is the entry
for an Azure Function.
- The first parameter has a QueueTrigger
attribute, this is what indicates is a queue trigger function (and
takes the binding information as parameters to the attribute. In this
case the name of the queue and the connection string’s setting name)
Once you have a function, local development works like you would
expect. You can run and debug it locally, add NuGet packages, create
unit tests, and anything else you would do for a class library.