Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] Ignore trimmer warnings from NUnit.
NUnit is not trimmer-safe, and produces a lot of trimmer warnings. Ideally we'll fix NUnit or come up with an alternative (see #19911), but that's a significant amount of work. We also want to turn warnings into errors (to avoid adding more trimmer warnings by accident). So we disable trimmer warnings from NUnit. The method is somewhat complex, because there's no built-in way to ignore warnings for a given assembly, but both ILC and ILLink provides a way to collapse multiple warnings into a single warning (with a specific code) on a per assembly basis, and we can levarage this: * We enable all warnings for all assemblies (by setting `TrimmerSingleWarn=false`). * We enable the single-warning mode for NUnit only. * We ask the trimmer to not warn about the specific warning code given for the single-warning produced. The end result is that we won't get any trimmer warnings for NUnit. Ref: #19911
- Loading branch information