CsWinRT
CsWinRT copied to clipboard
CsWinRT runtime assembly and all projection assembly should disable built-in marshalling
Summary
See https://learn.microsoft.com/en-us/dotnet/standard/native-interop/disabled-marshalling. CsWinRT's runtime assembly and all projection assemblies should use [assembly: DisableRuntimeMarshalling]. This would also ensure that no accidental marshalling could be triggered, as seen in the other issues around using managed signatures in function pointers and P/Invoke-s.
Rationale
- Disabling built-in marshalling makes code more AOT-friendly
- It also ensures that built-in marshalling isn't accidentally used, which is slower