Commit 5df4f06
Suppress IL2050 and CA1420 from CsWin32-generated P/Invoke in UnitTest
The Microsoft.Windows.CsWin32 source generator emits a CoRegisterClassObject P/Invoke (Windows.Win32.PInvoke.Ole32) that uses COM marshalling. This trips IL2050 (COM interop correctness cannot be guaranteed after trimming) and CA1420 (managed parameter/return types require runtime marshalling, which is disabled repo-wide via the centralized DisableRuntimeMarshalling). This is generated code we don't control, so suppress both in UnitTest.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 14ba87c commit 5df4f06
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
0 commit comments