dotnet/runtime

Add an editorconfig option to supress LibraryImport suggestion for blittable PInvokes

Open

#111.593 geöffnet am 19. Jan. 2025

Auf GitHub ansehen
 (6 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)C# (5.445 Forks)batch import
area-Interop-coreclrcode-analyzerhelp wanted

Repository-Metriken

Stars
 (17.886 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)

Beschreibung

The current LibraryImport analyzer always suggests to convert to it from DllImport, even when it's not necessary due to the signature being blittable. This is especially annoying when multitargeting with older TFMs without LibraryImport. As discussed on Discord, there should be an option to opt out of this with an editorconfig switch.

cc @jkoritzinsky @tannergooding

Contributor Guide