dotnet / dotnet/dotnet-api-docs
System.AppDomain.FirstChanceException does not document best practice for netcore/net5.0+ event handlers, advises using unsupported CERs.
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
**Issue description**
https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.firstchanceexception?view=net-7.0
https://github.com/dotnet/dotnet-api-docs/blob/e15fd6a32cae6a52fca00d71887ba3e9ad2b880d/xml/System/AppDomain.xml
The documentation, for both netfx and netcore, [notes](https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.firstchanceexception?view=net-7.0#:~:text=We%20recommend%20that%20you%20implement%20event%20handlers%20for%20this%20event%20as%20constrained%20execution%20regions%20(CERs)):
> We recommend that you implement event handlers for this event as constrained execution regions (CERs)
However, as per [this](https://learn.microsoft.com/en-us/dotnet/framework/performance/constrained-execution-regions), CERs are not supported in netcore. What are the best practice guidelines for implementing `FirstChanceException` handlers in netcore?
**Target framework**
- [x] .NET Core (all versions)
- [ ] .NET Framework
- [ ] .NET Standard
dotnet --info output or About VS info
```console
```
Contributor guide
Assessment
This issue has not been assessed yet.