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

Using PROPVARIANT results in TypeLoadException #211

Closed
BasTossings opened this issue Mar 17, 2021 · 1 comment
Closed

Using PROPVARIANT results in TypeLoadException #211

BasTossings opened this issue Mar 17, 2021 · 1 comment

Comments

@BasTossings
Copy link

BasTossings commented Mar 17, 2021

As soon as my application loads the assembly I built using CsWin32 I get the following exception:

Could not load type '_Anonymous_e__Union' from assembly '<my assembly utilizing CsWin32>' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.

I mean, it's right to complain I guess, blittable types are unioned with managed types. But how would anyone ever be able to use the current generated Windows.Win32.StructuredStorage.PROPVARIANT if this is the case?

@AArnott
Copy link
Member

AArnott commented Mar 17, 2021

Duplicate of #197

Thanks for reporting. Till we can fix this, note the workaround here: #197 (comment)

@AArnott AArnott closed this as completed Mar 17, 2021
AArnott pushed a commit that referenced this issue Sep 20, 2023
Bumps [dotnet-coverage](https://github.com/microsoft/codecoverage) from 17.7.3 to 17.8.0.
- [Commits](https://github.com/microsoft/codecoverage/commits)

---
updated-dependencies:
- dependency-name: dotnet-coverage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

No branches or pull requests

2 participants