I have this issue in which I'm currently targeting .NET Framework 4.7.2 in my solution but the Azure Web App Service only supports up to .NET Framework 4.7.1. So, my question is this: As long as I only use 4.7.1 features, should it work without issue on the Azure Web App Service (which only supports up to 4.7.1) even though I'm targeting 4.7.2? Are the .NET Frameworks backwards compatible? So far, I haven't seen any issues. I just want to make sure there will be no future complications. Ideally, I would like to keep targeting 4.7.2 so that I can start using the 4.7.2 features once it becomes available on Azure Web App Service.
-
2Check the changelog to see what's different…? https://learn.microsoft.com/en-us/dotnet/framework/whats-new/index#v472 – deceze Jul 20 '18 at 12:30
-
But is it backwards compatible? Should anything using 4.7.1 or prior work without issue with 4.7.2? – TheDude Jul 20 '18 at 12:33
-
3@TheDude The answer is in the release notes. If there were any breaking changes they would appear there. In any case it's a point release so it's *supposed* to be backwards compatible – Panagiotis Kanavos Jul 20 '18 at 12:48
-
@Panagiotis: Thanks for the response. So, just out of curiosity, how does it work exactly if you target 4.7.2 and only 4.7.1 is available? Does it automatically target the next lower version if 4.7.2 is not there? – TheDude Jul 20 '18 at 12:50
-
There is a runtime check that verifies that the version you targeted is actually installed on the machine. That check is going to fail, it [looks like this](https://stackoverflow.com/a/10033128/17034). Albeit that Azure might well do its own thing. There is otherwise very little point to targeting 4.7.2, it is merely a maintenance release that fixes a few bugs, the kind that *might* produce observable difference in program behavior. Exceedingly rare that it does. Targeting the version you actually tested on is best. – Hans Passant Jul 20 '18 at 14:01
2 Answers
The .NET Framework 4.7.2 builds on previous versions of the .NET Framework 4.x by adding many new fixes and several new features while remaining a very stable product.
The .NET Framework 4.7.2 is included with the Windows 10 April 2018 Update
The .NET Framework 4.7.2 can be used to run applications built for the .NET Framework 4.0 through 4.7.1.
Azure App Service now supports 4.7.2
I think that you did a good thing in upgrading and targeting .NET Framework 4.7.2 ; I also have an Azure App Service and upgraded it to 4.7.2 and it is running very well. As said before, it brings updates and fixes, and it is backward compatible on almost all cases.
Note that the recommended is that the target machine have a .Net version Equal or Greater of the of the .NET Framework 4.x than your compiled version.
See:
https://learn.microsoft.com/en-us/dotnet/framework/whats-new/index#v472
https://learn.microsoft.com/en-us/dotnet/framework/install/on-windows-10

- 16,527
- 15
- 80
- 134
-
Thanks for the response. So, just out of curiosity, how does it work exactly if you target 4.7.2 and only 4.7.1 is available? Does it automatically target the next lower version if 4.7.2 is not there? – TheDude Jul 20 '18 at 12:48
-
The target machine must have a .Net version Equal or Greater of the of the .NET Framework 4.x than your compiled version. – Tony Jul 20 '18 at 12:50
-
1Thanks for the help. That second link answered my question. It states plainly: "The .NET Framework 4.7.2 can be used to run applications built for the .NET Framework 4.0 through 4.7.1." – TheDude Jul 20 '18 at 12:57
-
@TheDude ... How does that answer your question? You're not trying to run in 4.7.2, you're trying to run on 4.7.1. You're trying to *build* with 4.7.2 and run with a lower version. – Dave Newton Jul 20 '18 at 13:02
-
@Dave: So are there any drawbacks with that? Can you build with 4.7.2 and run with a lower version? That's what I'm really trying to get at. – TheDude Jul 20 '18 at 13:12
-
Really something curious, I checked¹ and my App Service app is compiled with 4.7.2 but I checked on Azure portal and the latest avaliable is 4.7.1, but the app is working fine, since more than 20 days I did that publish. (¹ using this https://stackoverflow.com/a/24149178/194717) – Tony Jul 20 '18 at 13:12
-
@TheDude No clue. I was just pointing out that what you quoted is the opposite of what you're asking. – Dave Newton Jul 20 '18 at 13:27
-
There is some confusion, maybe some undocumented feature, that is allowing run a App Service compiled with 4.7.2 to run on 4.7.1 at Azure. – Tony Jul 20 '18 at 13:29
-
None of my app services support 4.7.2. They are running 4.7.1. Check your version using the link below, but I highly doubt it's 4.7.2. The default runtime of a 4.7.2 app is often 4.5, but that doesn't mean your app will necessarily work. For example there are some versioning issues in 4.7.1 as a runtime or build version. https://blogs.msdn.microsoft.com/waws/2016/11/02/how-to-determine-the-installed-net-version-in-azure-app-services/ – Dean Swiatek Sep 24 '18 at 20:11
@TheDude, you cannot build an app on 4.7.2 and hope to run it on lower version like 4.7.1. At runtime the target framework version check will fail as it will find the Framework version (4.7.2) as missing.
The other way round (i.e. target 4.7.1 and run on 4.7.2) is fine as the higher versions are backwards compatible.

- 9
- 2
-
David Debo, from Microsoft, said this should be fine: https://github.com/Azure/app-service-announcements-discussions/issues/37 – TheDude Jul 26 '18 at 03:23
-
The default runtime I believe is 4.5 for a 4.7.2 app, so it may work however not always. – Dean Swiatek Sep 24 '18 at 20:14