Skip to content

Visual Studio occasionally gets a "TypeInitializationException" within the code generation #34

Description

@mdekrey

Occasionally, builds within Visual Studio fail with an error similar to:

Warning (active)	CS8785	Generator 'OpenApiCSharpGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'TypeInitializationException'

Note: This particular issue pertains to the TypeInitializationException; if you are getting a different exception, that is a different issue.

Underlying cause is still TBD.

Workaround: When this happens, the VBCSCompiler.exe stays running (otherwise it is a temporary process); use TaskManager to kill the VBCSCompiler.exe process. Visual Studio will be able to compile correctly again.

Activity

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

    .NETbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions