Don't overwrite .csproj files if they are identical to the output
Proposal: support incremental generation, such that everything isn't overwritten every time it is run.
Step1. Keep track of output files (ie, .csproj(s) which protobuild generated) and all input files that it affected the generation process of that output file (ie, the related templates).
Step2. Serialize this information in some plain text intermediate files. These could be useful for assigning the 'inputs' and 'outputs' when protobuild from within a buildtask, for example.
Step3. When the incremental flag is set, only generate output items that have modified inputs since the last build. (slight simplification of whats really involved, but you get the idea).
@hach-que
The goal with this being not having Protobuild touch files that don't need to change. This keeps VS from triggering reloads of projects if nothing actually changed.
Could be as simple as generating projects/solutions in memory then loading the existing solution/project and doing a comparison before writing the new file to disk. Would add a tiny amount of extra time to generation, but would make things nicer.
I want to support this (it's been on my list for a while), but not as a special flag. My plan is to just compare the output of the generation with the current files on disk, and not overwrite the .csproj if it's the same.
That's fine as a built in feature. It would be a fine improvement. But id still really like to have a clean manifest file dumped for hooking up to my own msbuild task's @outputs. This would allow me to write a more reusable targets in which I do not need to explicitly list the generated project files.
I'm confused as to what you're trying to achieve. Are you trying to modify the resulting .csproj files? That can be done with AdditionalProjectTransforms.xslt or by overriding the other XSLT files.
Oh, no. I was thinking of something more like a "generated_files.txt" that gets dumped out after calling protobuild -generate, containing a simple newline separated list of files that were generated.
The list of .csproj files is predictable. It's just the Folder and Name in the .definition files inside the Build/Projects folder.
Oh ok, that sounds easy enough, thanks!