While trying to generate my own bindings, ClangSharpSourceToWinmd was reporting the following error:
error CS0648: '' is a type not supported by the language
I tracked it down to a method in the current compilation using a struct from a referenced WinMD (let's call this "Middle.winmd") which had a field from another WinMD (let's call it "Base.winmd"). Looking at the winmd files in ildasm, Middle.winmd was missing a reference to Base.winmd, so there was no way for the current compilation to know where referenced types came from, despite the current compilation referencing both Middle.winmd and Base.winmd.
The fix for this is to add an assembly reference to all assemblies passed in via --ref
While trying to generate my own bindings,
ClangSharpSourceToWinmd
was reporting the following error:I tracked it down to a method in the current compilation using a struct from a referenced WinMD (let's call this "Middle.winmd") which had a field from another WinMD (let's call it "Base.winmd"). Looking at the winmd files in ildasm, Middle.winmd was missing a reference to Base.winmd, so there was no way for the current compilation to know where referenced types came from, despite the current compilation referencing both Middle.winmd and Base.winmd.
The fix for this is to add an assembly reference to all assemblies passed in via
--ref