-
Notifications
You must be signed in to change notification settings - Fork 255
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
TreatSpecificWarningsAsErrors support for NuGet warnings #8797
Comments
@arialdomartini I don't believe NuGet supports |
It's also not possible to suppress the NU1702 warning with: is there any solution that NU1702 does not generates a warning? |
Dup of #6288. Instead of |
@rizi, if you haven't already seen it, there is a workaround listed in #8093 where you can add |
Thx, I must have missed that. |
Original: dotnet/project-system#5562.
(Opened on behalf of https://github.com/arialdomartini)
Visual Studio Version:
VS2019, Rider 2019.2.2, Command Line
Summary:
csproj's directives like
and
are ignored by
dotnet build
.Steps to Reproduce:
netcoreapp2.0
or anetcoreapp3.0
projectA
net472
calledB
A
's csproj and add to it:B
fromA
dotnet build
Expected Behavior:
A compilation error.
Actual Behavior:
The compilation succeeds, with a warning
NU1702
, which is not treated as an error.Additional notes:
The reference from NetCoreApp to .NET 4.7.2 project raises a
NU1702
warning, which should be treated as an error, given the directive:I also tried with
and
and even by placing those directives in the
PropertyGroup
node where<TargetFramework>
is.Possible related issues:
Cannot disable NuGet warnings with dotnet 2.0
TreatSpecificWarningsAsErrors does not work
Framework Conditioned warning properties are not respected for multi-targeting projects
Suppressing warnings through project properties UI adds tfm condition in csproj file for multi targeting project
Nuget restore build task ignores
NoWarn
usageTreatSpecificWarningsAsErrors does not work
I noticed different behaviors depending on:
B
being referenced as a project in the same solutionB
being referenced as a NuGet packageB
being using the classic csproj file format vs the new SDK csproj formatThe text was updated successfully, but these errors were encountered: