Closed riverar closed 1 year ago
This is a roslyn limitation. https://github.com/dotnet/roslyn/issues/52184 is related (though more complex than the simple repro we see for CsWin32).
The feedback ticket I filed on this issue specifically is here. It's already been closed as won't fix, but feel free to vote it up and maybe they'll reconsider.
@AArnott Thanks, will make some noise!
Actual behavior
It's not clear if this is a CsWin32 issue or more general .NET / Visual Studio issue.
When attempting to use code generated types, Visual Studio typically provides a Quick Action to import the appropriate namespace to avoid fully qualifying the type. For example, using Quick Actions on a naked
HWND
should recommend importingWindows.Win32.Foundation
and offer use of the fully qualified type name.Built-in types work great.
Code-generated types do not.
Expected behavior
I expect to see a
using Windows.Win32.Foundation;
Quick Action.Repro steps
0.2.104-beta
as a dependency.NativeMethods.txt
:HWND
and click the light bulb (or typeCTRL + .
).