Open ericstj opened 5 years ago
Yeah, I've been afraid to do change the text log output to put a TF in there, because I know people parse the logs (if you're reading this: that is not permission for you to parse the logs. Use the structured binary log if you want to do that!).
Opt-in with a /clp: is probably better than nothing, but it's really not optimal. Maybe we could always opt into it from dotnet build
, though, at least for the console logger?
Maybe we could always opt into it from dotnet build, though, at least for the console logger?
I'm fine with this.
Steps to reproduce
Create a cross-targeting project that will emit an error on build. See xTargetError.zip
Build the project with various logger settings.
Expected behavior
Some log setting that provides enough context to identify which configuration of the project is actually emitting the error
Actual behavior
No logger setting provides sufficient data. You need to look at a binlog, or more closely inspect a detailed or normal level log to correlate error to other log statements which might include the TargetFramework value.
Environment data
msbuild /version
output: Microsoft (R) Build Engine version 16.1.67-preview+g13843078ee for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.16.1.67.33811
OS info:
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc): dotnet
Suggested solution
A potential solution for this would be to include global properties in the error spew where the project file is currently emitted.
For example, instead of
Emit
You could make this opt-in with a Console Logger Parameter.
/cc @stephentoub @nguerrera