Sdk: dotnet run by default, is too verbose - Use --verbosity instead

Created on 16 Jun 2016  路  19Comments  路  Source: dotnet/sdk

By default, a simple dotnet run should just run. No details at all.

Perhaps there's a -v1 or -v2? Basically verbose is great, but run should
just run. THIS is not needed:

C:\Users\Scott\Desktop\foo>dotnet run
Project foo (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
Hello World!

So:

| command | output |
| --- | --- |
| run | no output |
| run -v | current verbose output |
| run - (need suggestions here) | The current run behavior, basically "info level" output |

enhancement

Most helpful comment

@plioi I would agree, as long as the default verbosity is lowered. I don't need to see Project foo (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. everytime, if ever.

All 19 comments

Other dotnet commands have --verbosity as an option. dotnet help shows that --verbose is a 'common' option. For consistency, all commands could instead have --verbosity.

@plioi I would agree, as long as the default verbosity is lowered. I don't need to see Project foo (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. everytime, if ever.

@herecydev Especially when I'm targeting a few frameworks, and my build script invokes dotnet build and dotnet test a couple times. Most of the script's output is "Skipping compilation".

Looks like a dupe of dotnet/sdk#5528.

I agree that this is not optimal and is something we should do.

@plioi your example is not using dotnet run though. I assume you are also referring to build having this passed to it?

@blackdwarf Right. If the immediate request regarding 'dotnet run' is corrected, but in a different way than is already established on some other commands, we'll wind up with a funky CLI. --verbose is insufficient, --verbosity would be best across all the commands.

@plioi agreed, was just asking to make sure we're on the same page. 馃槃

@glennc advises that dotnet mydll.dll is the way an end-user would run it, while dotnet run is intended only for use during development time. I guess that's why it's naturally more verbose...

@ljw1004 no, there is some work to do to figure out when dotnet run should output. Regardless of whether it is design time or not, it is too verbose and I'm working on a proposal on how to fix this.

@blackdwarf you mean no to the implication that dotnet run should be verbose not no to it being a design time command. Right?

@glennc yes, "no, it is still too verbose, even though it is meant for dev-time scenarios" is what I meant. :)

It really feels like this needs to get done. I blogged recently about doing "Auto testing" with dotnet watch test, and the verbose output is super annoying. I noticed it, and the comments noticed it. /cc @blackdwarf

With the new MSBuild-enabled CLI, I was able to get "dotnet run" down to only printing out build warnings and errors. It no longer prints out other build messages, like "skipping build", etc.

The reason it still prints out warnings and errors is because that is what the "quiet" mode of MSBuild does. I still felt build errors needed to be printed out, so you know why your app couldn't be executed. And I felt they needed to be printed out in red text to catch your eye.

Try the latest builds using .csproj and let us know what you think.

@eerhardt @shanselman It was really unexpected behavior, thank you!
(as an example redirecting stdout from dotnet app to stdin of another app was really annoying)

As @eerhardt said, in the latest tooling dotnet run will print out just the app output or warnings or errors if there are any. With this, I will close the issue as "fixed". Please reopen if needed. Thanks!

@blackdwarf What's the latest tooling exactly? I just downloaded dotnet-dev-osx-x64.1.0.0-preview2-1-003177.pkg a few seconds ago and it still has this issue.

@0xced the latest tooling is the latest from rel/1.0.0. Alternatively you can download the Preview 4 release. Links are in the README.

Late to the party here, but... is there a way to get the verbose output back, if desired? I tried both with dotnet run --verbose and dotnet run -v but neither option gives me any more output than just dotnet run.

We added a verbosity option in the 2.1.300 version of the CLI. Which is not available officially yet, only as nightlies, but we will have a preview of it officially available soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natemcmaster picture natemcmaster  路  58Comments

danmosemsft picture danmosemsft  路  137Comments

davkean picture davkean  路  163Comments

idavis picture idavis  路  57Comments

ericstj picture ericstj  路  54Comments