-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest CsWin32 generates code that fail to compile (and unnecessary methods) #1332
Comments
The codegen with
Eg. why is it even trying to emit |
@AArnott the build break was caused by #1290. That new method is:
Same for other random helper methods that should be removed, but at least those are not breaking 😅 |
@Sergio0694 Thank you for your report. I couldn't readily identify any methods besides the faulty |
I opened #1338 as a follow up 🙂 |
Actual behavior
I've updated to the latest version (
0.3.162
) and my project is now failing to compile. Upon inspecting the generated code, it seems CsWin32 is generating a bunch of invalid code in theQueryInterface
methods it's emitting. It's also not clear why these methods are generated in the first place, given I've disabled the friendly overloads. I expect (and want) literally only the vtable methods to be generated, nothing else.You can see this generated call has invalid arguments. Also, this whole method shouldn't be generated at all, really.
Expected behavior
The code should be valid and compile, and no additional "helper methods" should be generated.
Repro steps
NativeMethods.txt
content:NativeMethods.json
content (if present):Context
0.3.162
netstandard2.0
andnet9.0
(I can repro on both)LangVersion
(if explicitly set by project): n/aThe text was updated successfully, but these errors were encountered: