Skip to content
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

Add references for all assemblies passed in via --ref #1886

Merged
merged 1 commit into from
May 3, 2024

Conversation

dpaoliello
Copy link
Contributor

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

@kennykerr
Copy link
Contributor

@mikebattista?

@mikebattista mikebattista merged commit 2c54f11 into microsoft:main May 3, 2024
1 check passed
@mikebattista
Copy link
Contributor

Thanks for the contribution.

Our build and release pipelines are being refactored which is slowing things down. Once that's completed, we can resume updates.

@dpaoliello dpaoliello deleted the refs branch May 3, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants