Closed riverar closed 1 year ago
Oh dear. That's a terrible experience. It certainly is not supposed to do that.
Is this the expected way to bring in PCSTR? Was hesitant to file a bug as I wasn't sure if I was just doing something iffy.
Usually PCSTR will be brought in transitively. But if you own the only code that references it, you'll have to request it as you've done here. But PCSTR is a special type that doesn't appear in the metadata. That, and our recent support for multiple metadata files, may be why CsWin32 is misreporting an ambiguity. when you ask for it.
Actual behavior
To workaround a previously reported issue, I copied/pasted CsWin32 generated output into a separate .cs and compiled it with my app. To resolve PCSTR references, I added
Windows.Win32.Foundation.PCSTR
to theNativeMethods.txt
. This results in the confusing error below:Expected behavior
A clear error or no error at all.
Repro steps
TBD
Context
0.3.2-beta
]net6.0-windows10.0.17763.0
]LangVersion
(if explicitly set by project): [e.g.9
]