Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it required to update web apps to target .NET 4.8 when Azure App Services update?

Tags:

azure

.net-4.8

This post asked when 4.8 support would be available on Azure App Service: Azure support for .NET 4.8

A commenter asked if it's compulsory to update your apps as well, which is a great question.

Microsoft email blasted all app service customers so they seem to be taking this update pretty seriously, but didn't leave much time (July 14, 2020) if a full update is required.

The question is -- do we have to update to 4.8?

like image 369
Pete Avatar asked Jun 25 '20 14:06

Pete


People also ask

What is the difference between Azure Web App and Azure App Service?

Azure runs App Services on a fully managed set of virtual machines in either a dedicated or shared mode, based on your App Service Plan. ... Web App – used for hosting websites and web applications (previously Azure Websites) API App – used for hosting the RESTful APIs. Not sure to understand the difference?

How do I update my Azure app?

In Azure Portal, go to your Azure App Service with Dynatrace OneAgent site extension. If an update is available, select Update.

What is the relationship between an Azure App Service plan and an azure web app?

An App Service plan defines a set of compute resources for a web app to run. These compute resources are analogous to the server farm in conventional web hosting. One or more apps can be configured to run on the same computing resources (or in the same App Service plan).


1 Answers

In short: Compulsory, no; advisable, yes.

Assuming your apps are already targeting a supported version of .NET (currently >= 4.5.2), then retargeting your apps to 4.8 is not compulsory. Particularly if you do not plan to take advantage of any new features. See .NET docs:

4.x versions of the .NET Framework can be used to run applications built for the .NET Framework 4.0 through that version. For example, .NET Framework 4.7 can be used to run applications built for the .NET Framework 4.0 through 4.7. The latest version (the .NET Framework 4.8) can be used to run applications built with all versions of the .NET Framework starting with 4.0.

As a minimum, you could run some regression tests against your app running on 4.8 before going live. How much testing it takes to gain confidence, and the chances of breaking changes, depends largely on what version you are currently targeting.

Ideally however, if you are in a position to retarget, build and deploy for 4.8, then a lot of unexpected behaviour can be caught even earlier by the compiler. Note that there are sometimes changes that require code changes and again, the likelihood depends very much on what you target at present.

To get an idea of what work you might need to do in your code:

  • Details of breaking changes between versions, up to and include 4.8, are OSS and indexed in the .NET docs on GitHub
  • Broader documentation around migrations are detailed here.

Also worth noting that the likelihood of experiencing problems running an existing 4.x app on 4.8 without retargeting is lesser because:

the .NET Framework uses quirked behavior to mimic the older targeted version. The app runs on the newer version but acts as if it's running on the older version. Many of the compatibility issues between versions of the .NET Framework are mitigated through this quirking model.

EDIT: As of 26.6.2020 I am not aware of any plans to accommodate testing apps running in an App Service on 4.8 before the upgrade date, which means you will only be able to test on 4.8 locally.

like image 191
Ben Hall Avatar answered Oct 26 '22 14:10

Ben Hall