Skip to content

Build warning - CSC : warning CS8784 #23

Open

Description

@mikkelhegn

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]

Activity

  1. jsturtevant commented on Nov 9, 2024

    @jsturtevant
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions