Closed JeremyKuhne closed 10 months ago
@JeremyKuhne Your repro steps appear to be to generate RGBQUAD
, but that is merely a struct that defines no methods at all. Can you give me a better API to generate to emit the warning?
FWIW, I can't find anything in CsWin32 that would ever generate Marshal.QueryInterface method calls.
BITMAPINFO
generates this particular RGBQUAD
inline array wrapper.
I'm able to repro this in a unit test now. Woot.
Actual behavior
.NET 8 has changed a number of APIs from
ref
toin
. This causes warnings in CsWin32 generated code. For example:Expected behavior
Conditionalized generation to use
in
when targeting .NET or higher. Something like this (example from System.Drawing):Repro steps
Target any daily drop of .NET 8 after 8/3 and include
BITMAPINFO
(there are a number of others that fail).Context
net8.0
(8.0.0-rc.1.23402.13)LangVersion
(if explicitly set by project): latest