-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The binlog for a static_assert excludes the most important piece of information #8019
Comments
The good news is that the desired information is indeed captured in the binlog:
|
In that case is it being captured at the wrong output level (e.g. diagnostic but should be minimal)? Full diagnostic output is far too verbose in most cases. |
No, it's there in minimal:
This looks like a rendering problem by the log viewer (my guess is it's not rendering file/line info for |
This issue was moved to KirillOsenkov/MSBuildStructuredLog#622 |
Thank you @rainersigwald |
Good bug. The binlog viewer didn't have special support for And now you can also navigate to the source location if the source file is on the same machine or embedded into the binlog. |
Issue Description
We use some header files that have static asserts in them (see https://github.com/microsoft/wil). When those static asserts are violated there is a build break. The error output has the file/line information for the static_assert in WIL. However, the most important information is the file/line of the code in our project that uses WIL. This output is in the console but is missing from msbuild and the binlog file.
Steps to Reproduce
msbuild MSBuildOutputReproProject.sln /bl
ConsoleApplication1.cpp
StaticAssertHeader.h
Console output
Binlog content
Note that
ConsoleApplication1.cpp(11)
is missing from the binlog. This is the most important piece of information in the output.Expected Behavior
The binlog should contain the full set of compiler output. It is missing the most important line with the file/line information.
Actual Behavior
The file/line information for the calling code is missing. Without this it is not possible to locate the error in a large code base. I must pipe the output to a txt file and search it for the errors. That is a much worse experience than using the binlog viewer.
Analysis
Versions & Configurations
MSBuild version 17.3.1+2badb37d1 for .NET Framework
17.3.1.41501
This device is running Windows 11 (2022 update).
The text was updated successfully, but these errors were encountered: