How well do deployed .NET Framework apps handle .net update?
For example, if I have .Net 4.5 Framework application deployed on Windows server, how well does it handle any .NET Framework updates?
If I keep .NET 4.5 version on the server, and install .net framework 4.8 or .NET Core, could this stil be problematic, since the 4.5 is still installed?
What about
Security Updates for Microsoft .NET Framework
, this shouldn't cause any problems, right?4 Replies
taht shoudln't cause any problem
And adding an additional version shouldnt be a problem as well, right?
As long as your start your application with .netfx 4.5 yeah
Idk for the security things
.NET Framework 4.x updates are cumulative. For example, if you install 4.8 on a server, it will overwrite any previous 4.x install. Similarly, any security patch for 4.x will overwrite any previous security patch for 4.x. (This is ok since security patches are cumulative.)
.NET Framework 4.x has a concept of compatibility quirks. For example, every so often we'll change a default behavior of a .NET runtime component, like some internal implementation detail of
List<T>
, or when an exception is thrown or not thrown.
The target framework your app is built against controls this compatibility quirk. For example, if you compile your application with a target framework of 4.5 and then your application runs on a machine with 4.8 installed, we'll try to preserve the defaults and behavioral peculiarities of .NET Framework 4.5 when running your app, since we want to ensure maximum compatibility.
The target framework is selected when you compile your app. It's the thing in the VS dropdown where you select that you want to target 4.5, or 4.5.1, or 4.5.2, etc.
.NET 6 and beyond are side-by-side updates. Installing .NET 6 has no impact whatsoever on .NET Framework 4.x applications. The different major version frameworks have no knowledge of each others' existence.
Similarly, installing .NET 7 won't impact .NET 6 apps, etc. They all merrily coexist.
.NET 6 and .NET 7 are different products. If you only install .NET 7 (without installing .NET 6) and you try to run a .NET 6 app, you'll receive an error because it will be unable to find .NET 6.
You can always tweak config manually to say "I know you're compiled against .NET 6, but I really want you to run on .NET 7." But presumably you'll know if you have done this. 🙂
(.NET apps don't do this by default; you have to force it via an explicit config switch.)