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

CS8785 when generating code for class in global namespace #193

Open
deerchao opened this issue Dec 27, 2024 · 0 comments
Open

CS8785 when generating code for class in global namespace #193

deerchao opened this issue Dec 27, 2024 · 0 comments

Comments

@deerchao
Copy link

Program.cs

// See https://aka.ms/new-console-template for more information
using OneOf;

Console.WriteLine("Hello, World!");

[GenerateOneOf]
public partial class StringOrNumber : OneOfBase<string, int> { }

Error:

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.

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

1 participant