Skip to content

IIncrementalGenerator Database Examples? #70887

Answered by sharwell
jw56578 asked this question in Q&A
Discussion options

You must be logged in to vote

External I/O (including but not limited to reading or writing files on disk) is not allowed in a source generator. All non-source inputs to a source generator need to be gathered during earlier steps of the build, and provided to the source generator through the <AdditionalFiles> mechanism in the compiler. A pre-build step to gather this information in a file could be designed to read data from an SQL server.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by CyrusNajmabadi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Question Resolution-Answered The question has been answered
3 participants