We want to switch to .net 4.5 cause it offers many improvements.
But...sometimes I found some tricky details about not trivial changes in the framework.
Lets look for TPL unobserved exception handling as an eample:
If you do not wait on a task that propagates an exception, or access its Exception property, the exception is escalated according to the .NET exception policy when the task is garbage-collected. (note, there is no link or clarification for the term "exception policy")
Well, that is seemingly the behavior as it was in .Net v.4.0
But Stephen Toub tells us more:
To make it easier for developers to write asynchronous code based on Tasks, .NET 4.5 changes the default exception behavior for unobserved exceptions. While unobserved exceptions will still cause the UnobservedTaskException event to be raised (not doing so would be a breaking change), the process will not crash by default. Rather, the exception will end up getting eaten after the event is raised, regardless of whether an event handler observes the exception. This behavior can be configured, though. A new CLR configuration flag may be used to revert back to the crashing behavior of .NET 4.
Note that this change doesn’t mean developers should be careless about ignoring unhandled exceptions… it just means the runtime is a bit more forgiving than it used to be.
That is a great surprise. Taking into account there is no update in documentation.
So, I'd like to know what other "silent" changes I'd better know about happened in .Net v4.5
Please, share your knowledge.
P.S. Here word "silent" means the changes which hardly get known from Wat's New articles or even official documentation.
No, they can exist alongside eachother. Just like with previous versions. In fact, 4.0 uses completely different directories to store its assemblies in.
SHA-1 content retirement Support for . NET Framework versions 4.5. 2, 4.6, and 4.6. 1 ended on April 26, 2022, so security fixes, updates, and technical support for these versions will no longer be provided.
Support for . NET Framework 4 on Windows Server 2003 SP2 ended on July 14, 2015, and support on all other operating systems ended on January 12, 2016.
The .NET Framework breaking change document calls this out (and more!).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With