Skip to content

Source generators cannot do not work on file scoped types - any way to resolve? #110830

Answered by tmds
EricEzaM asked this question in Q&A
Discussion options

You must be logged in to vote

The use-case (which is: generate sources scoped for use in a single file) makes sense, but as @huoyaoyuan pointed out
, the implementation (which generate sources in separate files) doesn't support it. You can manually create a namespace which is only used by the file.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tmds
Comment options

tmds Dec 19, 2024
Collaborator

Answer selected by EricEzaM
@EricEzaM
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants