Introduce a UI option to "log design-time builds"
In the new project system, similar to normal build warnings and errors, design-time build warnings and errors show up in the Error List. The idea here is for a few different reasons:
-
It lets users a little more aware of the sorts of issues that break the design-time build, and hence the language service and other features that rely on it.
-
It lets the project system get of the business of logging specific errors and warnings when references can't be found, are the wrong framework, etc. Instead, we just surface the actual MSBuild warnings/errors that come from the build.
This is great, however, when you get an error/warning there's not an easy way to turn on logging for these builds to figure out why these errors or warnings were logged. CPS does log these builds to the Output window if a specific registry key has been set - however, given the changes in the new installer to support side-by-side VS versions, this registry key now has be set in the privateregistry.bin in %APPDATA%. This is difficult to set, and has to be set every new VS instance that you install.
To simplify this, I propose we add a new option in Projects and Solutions -> Build and Run to set this registry key:

Optionally, we could also generalize this to turn on TRACEDESIGNTIME option for the legacy project system.
Consider also adding this option:
Checkbox: Log last 30 design-time builds to files
Label: Location Textbox [...] (browse for folder button that lets you select a folder for logs, default to %temp%\VisualStudio\DesignTimeBuildLogs"
For each project being built in design-time, save the .binlog file to that folder. Only keep 30 most recent log files in that folder.
Since MSBuild is now getting BinaryLogger in the box: https://github.com/Microsoft/MSBuild/wiki/Binary-Log
It should be easy to instantiate and pass the logger.
I've been having to debug design-time builds a lot recently, so being able to to enable/disable the design-time build output window from a Visual Studio option would be a much nicer experience.
I'd also like to be able to adjust the output verbosity separately from the regular build output.
C++/CPS also wanted a separate verbosity in an offline thread I had with them.
In general i'd like to have binlog option for build from VS (verbosity = "Minimal with binary log") - not just for design time builds.

That would fit under build log file verbosity, right? (Which C# doesn't respect right now)
Yes, that'd be reasonable. As long as I can get a binary log I don't care much what the exact setting is. It would be useful if the build output window printed out the path to the log file once the build is finished, so I don't need to hunt for it.
4+ years later and crickets....
@dcorbin-wintellect you might like to check out https://github.com/dotnet/project-system-tools