KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.44k stars 191 forks source link

Suggestion: Make preprocess runnable #512

Open yuehuang010 opened 3 years ago

yuehuang010 commented 3 years ago

Suggestion/Feature: Make the preprocess more useful so that the preprocess could be runnable. The issue is that while are expanded, they remain present. Compared to MSBuild /preprocess, it comment out as they are already expanded.

Using the preprocess from binlog is helpful to reproduce task and runtime errors. While the goal isn't 100% reproduce the build on another machine, but it will help reproduce some errors. And reproducible errors make developers happy.

Thanks Felix

KirillOsenkov commented 3 years ago

This will require:

The reason I left the Project start and end lines is so that outlining works. You can collapse the entire project and it's still valid XML.

I'll need to think about maybe having two modes, one where projects are collapsible via outlining, and one where project start and end tags are deleted so the preprocess XML is buildable.