Closed amis92 closed 4 years ago
That sounds like a general limitation of msbuild. Most aspects of incremental build in msbuild simply omit messages from the skipped steps. Is there some reason this is an important problem to solve for code generation in particular?
Not really. It was more like, for my specific RecordGenerator, I wanted to output some diagnostics for when generator skipped some things (e.g. sealed-class-only stuff) to inform user why he doesn't get everything.
But it does seem like just an Analyzer job, and I'll probably, at some point, do it like that :)
Well I've got my answer, I think this can be closed.
Our tool has the ability to output into msbuild log (via standard/error out).
However, since we attempt to support incremental build, if we skip some generation, some output may "disappear" on incremental build.
Is caching the output (warnings/errors) viable? So that when we skip something, we still provide an output as if the generation ran?