Skip to content

[GenerateOneOf] Code Generation dosen't work unless file is in namespace #202

@JUB-Yoush

Description

@JUB-Yoush

Running into an issue when trying to run the example code listed https://github.com/mcintyre321/OneOf?tab=readme-ov-file#oneofbase-source-generation

The source code generator was throwing a warning and the build was failing

CSC : warning CS8785: Generator 'OneOfGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName '<global namespace>_StringOrNumber.g.cs' contains an invalid character '<' at position 0. (Parameter 'hintName')'.

adding the file to a namespace fixed this issue. Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions