Skip to content

SourceGenerators as a replacement for VS extensions? #50255

Answered by jasonmalinowski
msedi asked this question in Q&A
Discussion options

You must be logged in to vote

Today you'll run into a few problems. A source generator is capable of producing .cs files, so your wrapper could be easily produced. As you observed though we don't support generating embedded resources nor non-.cs files, so for now you wouldn't be able to do that. We're currently working on designs though for that so we absolutely expect those should be doable in future versions.

There reason why this cannot be done during typing is that the process takes a while (some 5-10 seconds)

What parts of the process you describe are the slow ones? At this point we don't have a great plan for generators that take a really long time like this, but that's something further we'd have to work on. …

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@msedi
Comment options

@jasonmalinowski
Comment options

@jasonmalinowski
Comment options

@msedi
Comment options

@jasonmalinowski
Comment options

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