-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dotnet
should report .NET not MSBuild version
#37713
Comments
In broad agreement here, with the exception that I'm not sure we even need to echo the SDK version in There's an ongoing discussion about revamping |
I'm fine w/getting rid of the version entirely as long as that includes getting rid of the Preview message. |
Please keep some way to output the MSBuild commit ID abbreviation. |
A surprising number of build problems can be quickly chased down with this info, but if the CLI started passing
Note that if the CLI unconditionally passed |
I very much agree with this statement. Additionally, I start with the assumption that if something is broken, the average user will show us that it's broken (screenshot or copying output) without running any extra commands even if the template asks them to. Including the MSBuild (or full SDK version) would then help us figure out how to reproduce their problem if it turns out to be a recent regression. baronfel's PR looks correct if the goal is just to remove that information from build and add some information to --info, but that seems like it would impede our ability to investigate bugs quickly as well as opening developers up to "oops; forgot I had a global.json" mistakes. |
The proper way to chase down global.json problems is |
I think special casing the MSBuild version doesn't make much sense. It's not at all clear that this is the verison # that the majority of users care about. Clearly, as the proposal suggests, we've still need to provide that information, via OK. Here's a proposal:
|
I feel |
excellent point @KalleOlaviNiemitalo! re: the preview warning @richlander, @rainersigwald has added some handling in the terminal logger in dotnet/msbuild#9610 to de-duplicate so that there's only one warning. We could see what the response is to that, given that Terminal Logger will be the default in the .NET 9 previews. |
This argument applies, in some sense, to a lot of possible problems. I might argue that there's no reason we should log anything to the console at all—after all, you can get all that information out of a standard text log. Same for binlogs—they're just more structured forms of the same information as text logs. What I'm getting at is that we should try to log things if and only if we think it might help the user, and having a global.json somewhere above you is something you might not realize that would affect your build, and having a version of some kind there would help both the user and us (if they submit a bug). You're right that dotnet --info would get them that information, but will that be their first reaction to a build failure? |
There are many reasons why a build can fail. Most of the time, builds fail for reasons unrelated to |
This first dropped in 9.0 preview 2, though it'll also appear in 8.0.300 for the first stable SDK release. |
Thanks! Should we publish a breaking change notice for this? |
Proposed:
Existing:
There are four key ideas there:
dotnet --info
and consider adding additional versions there, like NuGet.Provides a solution for #34526.
@baronfel @jaredpar @aortiz-msft
The text was updated successfully, but these errors were encountered: