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

Build warning - CSC : warning CS8784 #23

Open
mikkelhegn opened this issue Jun 17, 2024 · 1 comment
Open

Build warning - CSC : warning CS8784 #23

mikkelhegn opened this issue Jun 17, 2024 · 1 comment

Comments

@mikkelhegn
Copy link
Contributor

On biulding a project created following the instaructions in the README, I recevie the following warning. The build does succeed, and produces a runable Wasm.

CSC : warning CS8784: Generator 'VtableIndexStubGenerator' failed to initialize. It will not contribute to the output and compilation e
rrors may occur as a result. Exception was of type 'TypeLoadException' with message 'Could not load type 'Microsoft.Interop.Marshalling
GeneratorFactoryKey`1' from assembly 'Microsoft.Interop.SourceGeneration, Version=9.0.10.30401, Culture=neutral, PublicKeyToken=b03f5f7
f11d50a3a'.'. [C:\Users\mikkelhegn\test\MyApp\MyApp.csproj]
CSC : warning CS8784: Generator 'LibraryImportGenerator' failed to initialize. It will not contribute to the output and compilation err
ors may occur as a result. Exception was of type 'TypeLoadException' with message 'Could not load type 'Microsoft.Interop.MarshallingGe
neratorFactoryKey`1' from assembly 'Microsoft.Interop.SourceGeneration, Version=9.0.10.30401, Culture=neutral, PublicKeyToken=b03f5f7f1
1d50a3a'.'. [C:\Users\mikkelhegn\test\MyApp\MyApp.csproj]
@jsturtevant
Copy link
Contributor

I asked on the .net Discord channel: https://discord.com/channels/143867839282020352/1141126727028985877/1304582707287818314

The first one CSC : warning CS8784: Generator 'VtableIndexStubGenerator' failed to initialize. is used for COM and only used in CI so will not cause any issues.

The second one CSC : warning CS8784: Generator 'LibraryImportGenerator' failed to initialize. Would be an issue if you used custom marshallers or anything with [LibraryImport] in user code.

It maybe that this might be because the versions of the native-aot-llvm compiler are miss matched with the .net version you are using, i.e. the .NET SDK version used is 8 and the native-aot-llvm is build against 9 (or now 10)

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