DEV Community

Cover image for Target .NET 5 in Azure App Service
Tidjani Belmansour, Ph.D.
Tidjani Belmansour, Ph.D.

Posted on

Target .NET 5 in Azure App Service

Today is a big day: .NET 5 has officially been released as part the .net conf. Awesome!

What's more awesome is that we can now deploy .NET 5 applications on Azure App Service. And what's more than "more awesome" is that we can do that for both Windows and Linux App Services. Isn't that awesome? ;)

Targetting .NET 5 in an App Service

If you create a new web app and check the list of available runtimes, you'll see .NET 5 (Early Access) under the .NET category:

.net 5 in azure app service

Early access ?!

Early access is a new feature of Azure App Service that will allow us to rapidly have access to the latest releases of various runtimes and SDKs without having to wait for an App Service release cycle to include that support. This is not only for .NET but also for other supported programming languages such as Python and Node.

As of today (November 10, 2020), Early access has some limitations, one of which is that Application Insights is not supported for .NET 5 applications.

To learn more about Early access, visit: https://github.com/Azure/app-service-linux-docs/blob/master/Runtime_Support/early-access.md

What about existing web apps?

If you're running a Linux-based App Service, go to Configuration then to General settings and, under Stack settings, select .NET and you'll be targetting .NET 5 (both Major version and Minor version will adjust to use .NET 5). Don't forget to hit Save:

existing linux app service: switch to .net 5

If you're running a Windows-based App Service, the procedure is slightly different. Go to Configuration then to General settings and, under Stack, select .NET and under .NET Framework version, select .NET 5:

existing windows app service: switch to .net 5

It's interesting to note that when switching runtimes, the Early access suffix isn't mentioned...

In conclusion

Starting today, we can use all the goodness provided by .NET 5 in our Azure App Services and it's as easy as selecting .NET 5 as our App Service's runtime.

Let's keep in touch

You can reach me on Twitter or LinkedIn.

See you soon !

Top comments (3)

Collapse
 
lechus profile image
Leszek

Could mention docker linux images.
That should work out of the box?

Collapse
 
tidjani profile image
Tidjani Belmansour, Ph.D.

That's a good question. Didn't try it TBH but I guess that it would work out of the box. If not, there's always the option to embed the framework.

Collapse
 
tidjani profile image
Tidjani Belmansour, Ph.D.

Thanks for the addition, The Sharp Ninja ! :)