<< Updated on Dec 9 2019 with go-live announcement of Azure Functions on .NET Core 3.1 >>
We're extremely excited to announce you can now develop and publish Azure Functions built on top of the .NET Core 3.1 runtime.
Azure Functions 3.0 is now go-live and ready for production. It is a highly backwards compatible release. One of the immediate benefits of this release is you can write Azure Functions targeting
netcoreapp3.1. You should also be able to move existing ~2 apps to ~3 without issue. A list of considerations on changes between 2.x and 3.x can be found in our docs.
npm install -g azure-functions-core-tools@3
brew tap azure/functions brew install azure-functions-core-tools@3 # If you already have func installed brew link --overwrite azure-functions-core-tools@3
You have a few options here. You could create a new project using our Visual Studio, Visual Studio Code, or CLI tools. For other tools, once you install the 3.x core tools you should be set. If attempting to target .NET Core 3.1 just be sure to update your .csproj file template with
netcoreapp3.1. Also be sure to target the `
Microsoft.NET.Sdk.Functions package version of at least
If you want to develop using .NET Core 3.1, you must use Visual Studio 2019 16.4 or newer.
- Open Visual Studio and select to create a new Azure Functions project
- You should see an indicator at the bottom as it downloads the runtime and templates of "Making sure all templates are up to date." This could take a few minutes, but wait for it to finish.
- Once the templates are up to date, go back one screen and forward so template options are refreshed.
- Select the now available "Azure Functions v3" option from the template drop-down.
- Create your project.
- If you want to target .NET Core 3.1, edit the project properties and select .NET Core 3.1.
You should be set! You can now debug, test, and publish this function.
You can publish your function using the regular tools. Depending on the tool you will likely see a prompt to update your
FUNCTIONS_EXTENSION_VERSION application setting from the default
~3. This does need to occur before a 3.x app can run successfully in Azure.
If you have an existing app and want to test it out with the new release, the following settings would need to be modified:
Locally once you start using the 3.x CLI your apps will debug and run in the 3.0 environment automatically. For apps in the cloud, you simply need to update the app setting of
~3 - but make sure to do some validation tests first before changing anything in production 😅.
If using Visual Studio, make sure you've already followed all of the steps in the "Creating with Visual Studio 2019" section to ensure you have the latest templates and project options available before attempting to upgrade. You may need to go to the new app template screen to get the 3.x bits to pull in on your machine, so if you get an error like "no runtime available that matches the version," try creating a new 3.x app from scratch first to make sure VS has fetched all the latest bits.
To change a project between ~2 and ~3 locally, update the
.csproj file of the project and change:
Microsoft.NET.Sdk.Functionspackage version to at least
- Optionally, you can change to target
netcoreapp3.1if you want to target the latest .NET Core version
You should not change the
host.json version to
host.json schema version is different than the function runtime version, and is still 2.0.
While you can begin using 3.x in production today, we are tracking a few work items around tooling and platform features before we announce full GA for tools and runtime in January 2020. You can see some of those work items called out in GitHub