Closed peaceshi closed 1 year ago
Thanks for using CsWin32 and reporting on your experience. I'm sorry to say that net35 is not supported. We have some code to help it work in some cases, but much of that is contributed by the community. If you'd like to submit a PR to make this particular area better, we'd welcome it if it includes a regression test. We already have test infrastructure in place including for net35.
The generated code is invalid C# (Guid
expression passed to a Guid*
parameter). The bug also afflicts net461
and earlier, but not net462
and later.
Invalid generated code:
The C# syntax is valid, but the code isn't coherent, which doesn't surprise me because we barely test net35 code generation, whereas we thoroughly test code generation for net472, netstandard2.0 and net6.0.
The fact that this works on net462 is on target. net461 is not a goal, as Microsoft doesn't support that version as a runtime any more.
Microsoft does support net35 as a runtime, but CsWin32 does not, except as I mentioned earlier. The cost/benefit ratio for adding net35 as a fully supported target simply isn't a good bargain.
Yes, no one should be targeting net40-net461, but it could be useful in tracking down what makes the difference. (E.g. the presence of an API from the System.Memory package?)
Actual behavior
CS1503: Argument cannot convert from System.GUID to System.GUID*
Expected behavior
Everything works well after changing to TFM net7.0
Repro steps
Context
0.2.188-beta
net35
Images