dotnet run should no suppress console output
See original GitHub issueSteps to reproduce
I’m using dotnet watch run
on my Vue.js SPA project I built using the ASP.NET Core SPA templates. I added TS-Lint support to webpack via the tslint-loader
. My csproj contains the following code (default to the SPA template) that runs webpack before a build:
<Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<!-- In development, the dist files won't exist on the first run or when cloning to
a different machine, so rebuild them if not already present. -->
<Message Importance="high" Text="Performing first-run Webpack build..." />
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
<Exec Command="node node_modules/webpack/bin/webpack.js" />
</Target>
Using dotnet run
or more importantly dotnet watch run
in my case, supresses all console output, so I can’t see any TS-Lint errors.
Expected behavior
dotnet run
should not suppress console output or at least have an option to no do so.
Actual behavior
dotnet run
supresses console output.
Environment data
dotnet --info
output:
.NET Command Line Tools (2.0.2)
Product Information:
Version: 2.0.2
Commit SHA-1 hash: a04b4bf512
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.2\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Suppress Build Output When Running `dotnet run`
Is it possible to suppress the build warnings which are output when dotnet run causes a build to occur, e.g. after a code...
Read more >dotnet run command - .NET CLI
The dotnet run command provides a convenient option to run your application ... To disable implicit restore, use the --no-restore option.
Read more >Disable logging of dotnet core console output
This seems to prevent the application from writing to the daemon and syslog logs. My question is - is this advisable and are...
Read more >Suppressing the startup and shutdown messages in ASP. ...
In this post, I show how you can disable the startup message shown in the console when you run an ASP.NET Core application....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@RehanSaeed Thanks for reporting this issue! With the fix currently in dotnet/cli#8100, you should be able to pass the
-v:<verbosity>
option to enable the restore/build output.@peterhuene you are already adding this in your PR for --no-build meaning no implicit restore.