Skip to content

Reading Large Additional Files in Incremental Source Generators #71441

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

You must be logged in to vote

invoking dotnet build after a simple code change (like changing a parameter name)

The incremental pipeline is only used in Visual Studio for running your generator as a part of the IDE editing experience; a command line build like dotnet build will always run the generator from scratch since we don't have a place to really persist that between runs. If you don't need to consume anything from the compilation, then you might be better off instead moving this to an MSBuild task where you could try to do version checking and reuse a previously generated result.

Have you tried running your generator under a profiler? Which part is slow?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wsugarman
Comment options

Answer selected by wsugarman
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