dotnet/runtime

Add an editorconfig option to supress LibraryImport suggestion for blittable PInvokes

开放

#111,593 创建于 2025年1月19日

 (6 条评论) (3 个反应) (0 位负责人)C# (5,445 个派生)batch import
area-Interop-coreclrcode-analyzerhelp wanted

仓库指标

星标
 (17,886 个星标)
PR 合并指标
 (平均合并 12天 11小时) (30 天内合并 661 个 PR)

描述

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

贡献者指南