Use SmartAssembly custom attributes to specifically exclude parts of your code from obfuscation, pruning, sealing and error reporting. Refer to documentation to learn more: https://documentation.red-gate.com/sa8/using-custom-attributes
$ dotnet add package RedGate.SmartAssembly.AttributesNo README available.