You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two arguments classes in the same project are named identically but belong in different namespace:
using DocoptNet;namespaceNamespace1{[DocoptArguments]sealedpartialclassProgramArguments{conststringHelp="Usage: program";}}namespaceNamespace2{[DocoptArguments]sealedpartialclassProgramArguments{conststringHelp="Usage: program";}}
then build fails with the following error indicating that the source generator failed:
error CS8785: Generator 'SourceGenerator' 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 'ProgramArguments.cs' of the added source file must be unique within a generator.
The text was updated successfully, but these errors were encountered:
atifaziz
changed the title
Source generator fails when arguments classes are named the same but belonging to different namespaces
Source generator fails when arguments classes are named the same but belong to different namespaces
Apr 3, 2022
If two arguments classes in the same project are named identically but belong in different namespace:
then build fails with the following error indicating that the source generator failed:
The text was updated successfully, but these errors were encountered: