-
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
Warnings are not reported for repeated builds #9134
Comments
@svick, this is because, the second time you run 'dotnet build', various up-to-date checks succeed and the target that produced the warning does not run. |
@tannergooding Then maybe warnings from previous runs should be saved somewhere and if some target doesn't run because it's up to date, its old warnings are still printed? |
@svick, that seems like a general MSBuild feature request (which would impact both Desktop and .NET Core), rather than something CLI should be doing. If you feel the same, could you open a bug against https://github.com/Microsoft/MSBuild? |
@tannergooding Done. |
I think you want to use the
This does, however, mean a full rebuild. |
Steps to reproduce
dotnet new classlib
Change Class1.cs to:
dotnet build
dotnet build
Expected behavior
The second
dotnet build
prints the CS1998 warning, just like the first one.Actual behavior
The second
dotnet build
does not print any warnings:Environment data
dotnet --info
output:.NET Command Line Tools (2.1.300-preview2-008251)
Product Information:
Version: 2.1.300-preview2-008251
Commit SHA-1 hash: 94fd3fd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.300-preview2-008251\
Microsoft .NET Core Shared Framework Host
Version : 2.1.0-preview2-26131-06
Build : b13a0d5c331f374afd35ded57b9a4b4ab128864c
The text was updated successfully, but these errors were encountered: