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

Class names containing a verbatim (@) character cause the source generator to stop #132

Closed
SteveDunn opened this issue May 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@SteveDunn
Copy link
Owner

Describe the bug

When a class name has a verbatim character, it causes the source generator to stop

Steps to reproduce

[ValueObject]
public partial class @class { }

... produces:
warning CS8785: Generator 'ValueObjectGenerator' 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 'Whatever_@class.g.cs' contains an invalid character '@' at position 9.

Expected behaviour

For it to no stop the source generator.

It looks like the filename it chooses based on the class name is invalid.

@SteveDunn SteveDunn added the bug Something isn't working label May 7, 2022
SteveDunn added a commit that referenced this issue May 7, 2022
Fixes #132 - class names cannot contain verbatim (@) identifiers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant