|
The Constrained Execution Regions are only supported in .NET Framework (MSDN: CER).
CER delineates a region of code where "out-of-band" exceptions (ThreadAbortException, OutOfMemoryException, StackOverflowException) cannot be thrown. This feature mostly exists for SQL in-process hosting CLR and in our code it is used as an additional layer of safety when disposing unmanaged resources.
Regarding usage in targets other than net452 with regard to exceptions thrown:
- The ThreadAbortException is not supported in .NET Standard and is not available in .NET 5 and .NET Core: MSDN: Thread.Abort Method.
- Other exceptions can still be thrown within CER in targets other than net452.
As a summary, nothing could be done in scope of this ticket, since the code to support CER is already at place for net452 and is not available for other targets.
|