NSight causes .NET Runtime crash

My .NET 6 C# application uses Direct3D9 via the SlimDX library. It also uses Direct2D via the SharpDX library.

When I start it through Nvidia NSight, the application just crashes. The Windows event viewer shows the following error message:

Application: Application.exe
CoreCLR Version: 6.0.1623.17311
.NET Version: 6.0.16
Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FF950102361 (00007FF94FF30000) with exit code c0000005.

Should NSight work with .NET applications? Since this is an error in the runtime (rather than application code), I’m having a hard time finding the problem.

Thank you for using Nsight Graphics. What version of Nsight Graphics are you trying to use and what GPU and GPU Driver version are you using?

Thanks for your response.

I am using Insight Graphics Version 2023.2.0.0 (build 32901921) (public-release).
GPU: RTX 3050 Laptop, in a Lenovo Ideapad 16ACH6 laptop with AMD 5900HX CPU.
Driver version according to NVIDIA Control Panel: 531.68

Please let me know if you need any further information.