Try for free Book a demo

Introduction to Azure Functions 3.0

Microsoft Azure

6 Mins Read | Last modified on March 4th, 2024

Azure Function 3.0

Azure Functions has recently released its new version “Azure Functions 3.0” and it is generally available now. This blog is all about the upgraded version and how far it is scaled up from the previous versions. Any business architecture will involve Azure Functions, this need provokes the necessity of upgradation in such resources.

Upgrades

The update in Azure Functions incorporates an extension of languages and breaking changes between Azure Functions 2.0 and 3.0. The new version brings in new competencies including the skill to target .NET Core 3.1 and Node 12. Let us look at the enhancements done on some parameters in the course of the version update.

Languages

Azure Functions 3.0 fosters the availability and improvement in the versions of languages cast in the Functions 2.0 and 1.0. The comparison of the three versions of Azure Functions runtime is tabulated to bring in a clear picture of the availability and improvements in each version.

Languages

Functions 1.0     

Functions 2.0      

Functions 3.0

C#

GA

(.NET Framework 4.7)

GA

(.NET Core 2.2)

GA

(.NET Core 3.1)

JavaScript                  

GA

(Node 6)         

GA

(Node 8 and 10)

GA

(Node 10 and 12)

F#

GA

(.NET Framework 4.7)

GA

(.NET Core 2.2)

GA

(.NET Core 3.1)

Java

NA

GA

(Java 8)

GA

(Java 8)

PowerShell          

NA

GA

(PowerShell Core 6)

GA

(PowerShell Core 6)

Python

NA

GA

(Python 3.6 and 3.7)

GA

(Python 3.6, 3.7 and 3.8)

TypeScript  

NA

GA’

GA’

GA– The corresponding language is generally available and fully supported

GA’– Supported via trans piling to JavaScript

To know more on the languages supported look into, Supported languages in Azure Functions | Microsoft Docs

Key Notes

There are certain points to be remembered regarding the new version release, that is

  • The new version is highly backward compatible, so the existing app running on the old language versions should be able to upgrade to the new version and run without any changes in the code.
  • Applications running on the earlier versions 1.0 and 2.0 will receive the same support and it is not devalued due to new release.
  • Regarding the security, customers working with older versions of Azure Functions will obtain security updates for both Azure Functions runtime and the underlying .NET runtime

Migrating from 2.0 to 3.0

Almost the business processes run on Functions 2.0, it seemed to be widely used among business architecture development. An enhancement in the version simply refers to migration from an existing version to the upgraded version. Azure Functions 3.0 is extremely backward compatible with functions 2.0. While progressing to 3.0, it is essential to run extensive tests before changing the major version in production applications.

Changes between 2.0 and 3.0

Functions 3.0 provides an escalation in the languages that have been used in version 2.0. Certain changes are to be concerned while shipping from current version to the upgraded version,

JavaScript

In this new release, JavaScript has been moved from Node 8 and 10 to Node 10 and 12.

  • Output bindings allocated through done or return values now behave the same as setting in context.bindings.
  • Timer trigger object is camelCase instead of PascalCase
  • Event Hub triggered functions with dataType binary will receive an array of binary instead of a string
  • The HTTP request payload can no more be retrieved through bindingData.req.
  • It can still be regained as an input parameter, req, and context.bindings.
  • js 8 is no longer supported and will not execute in 3.0 functions.

.NET

The major boon in Functions 3.0 is the implementation of .NET Core 3.1. This .NET Core 3.1 is a Long-Term Support (LTS) release where synchronous server operations are disabled by default and it is onboard since December 2019.

The major augmentation in this release are,

  • Partial class support for Razor components
  • Pass parameters to top-level components
  • New component tag helper
  • Prevent default actions for events in Blazor apps
  • Stop event propagation in Blazor apps
  • Detailed errors during Blazor app development
  • Support for shared queues in HttpSysServer
  • Breaking changes for SameSite cookies

Take a look into, What’s new in ASP.NET Core 3.1 | Microsoft Docs to explore more on the above-mentioned changes.

Visual Studio Runtime Versions

Azure Functions tools for Visual Studio supports the three major runtime versions. The version settings are defined in the .csproj file in the following properties:

Version 1.0

XML

<TargetFramework>net461</TargetFramework>

<AzureFunctionsVersion>v1</AzureFunctionsVersion>

Version 2.0

XML

<TargetFramework>netcoreapp2.1</TargetFramework>

<AzureFunctionsVersion>v2</AzureFunctionsVersion>

Version 3.0

XML

<TargetFramework>netcoreapp3.1</TargetFramework>

<AzureFunctionsVersion>v3</AzureFunctionsVersion>

Appraising 2.0 Apps to 3.0 in Visual Studio

An existing function directing 2.0 can be viewed and moved to 3.0 by editing the .csproj file and updating the values. Visual Studio manages runtime versions automatically based on project metadata. However, it is possible if a 3.0 app has never been created before, that is Visual Studio does not have the templates and runtime for 3.0 on your machine. This may present itself with an error like “no Functions runtime available that matches the version specified in the project.” To fetch the latest templates and runtime, go through the exercise to create a new function project. When you get to the version and template select screen, wait for Visual Studio to complete fetching the latest templates. Once the latest .NET Core 3 templates are fetched and displayed you should be able to run and debug any project configured for version 3.0. It is important to know that Version 3.x functions can only be developed in Visual Studio if using Visual Studio version 16.4 or newer.

Azure Functions 3.0 in Turbo360

Turbo360 is well known for its management and monitoring capabilities, it also provides upgradation in parallel with the Microsoft Azure. Regarding Azure Functions, the new version Functions 3.0 can be effortlessly managed and monitored in Severless360. Staring the management capabilities, Azure Functions can be stopped and restarted and the invocation logs, success count and the error count can also be pitched right from the Turbo360 portal.

Stepping into the monitoring phase, Turbo360 stipulates out of box monitoring skills. These five types of monitors available (data monitor, threshold monitor, status monitor, watch monitor and business process monitor) through which the Azure Functions or any Azure resources supported by Turbo360 is provided with high-level monitoring. Watch monitor exclusively delivers monitoring for Azure Functions and Logic Apps.

Adding up on all these features Turbo360 also pictures a customized dashboard for Azure Function where the status of the functions being associated can be viewed in the numerical count or graphically. For more details about Turbo360 check out, turbo360

Conclusion

Azure Functions has brought in an effective update based on runtime versions and extends it’s at most support in migrating from the previous versions to Functions 3.0.

This article was originally published on Mar 26, 2020. It was most recently updated on Mar 4, 2024.

Related Articles