Project-system: Need ability to attach MSBuild loggers to VS build, design-time build, etc.

Created on 26 Oct 2016  路  6Comments  路  Source: dotnet/project-system

It would be super helpful if one could easily specify a custom MSBuild logger (e.g. https://github.com/KirillOsenkov/MSBuildStructuredLog) to the VS project build (and ideally the entire solution build), as well as design-time build/IntelliSense build.

Not sure of the UX, maybe a Tools Options -> Build and Run textbox, or on the Build properties page?

This would be super helpful for diagnosing fast-up-to-date check failures. Now all we have is a message that an input item is newer than output item, however why is that input item even part of the project? Who passes it? Sometimes I even see the output.dll as the input item for the project! To investigate issues like these we need more detailed logging.

Area-External Feature Request

Most helpful comment

I think this is covered by https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools, but let me know if there's something more that's needed.

All 6 comments

There's no UX yet but can you implement a IBuildLoggerProvider for CPS projects - https://github.com/Microsoft/VSProjectSystem/blob/master/doc/extensibility/IBuildLoggerProvider.md

Now that /bl is in standard msbuild, has the situation around this changed? It would be extremely useful to be able to tell visual studio to output binlogs, (as well as view them but I guess that's another issue)

@panopticoncentral has a side project where he's hooking this up. He's on holidays at the moment, he might be able provide you more information when he gets back.

Great to hear, thanks!
I would love for the binlog reader/writer to be public as well (they were internal last time I checked)

You can read/write using StructuredLogger.dll, see http://msbuildlog.com for details. It's exactly the same implementation but outside of MSBuild. This is what viewer itself is using to read .binlogs.

I think this is covered by https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools, but let me know if there's something more that's needed.

Was this page helpful?
0 / 5 - 0 ratings