We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Visual Studio Version:
VS2019, Rider 2019.2.2, Command Line
$ dotnet --info .NET Core SDK (reflecting any global.json): Version: 3.0.100 Commit: 04339c3a26 Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.0.100\ Host (useful for support): Version: 3.0.0 Commit: 7d57652f33 .NET Core SDKs installed: 2.0.3 [C:\Program Files\dotnet\sdk] 2.1.2 [C:\Program Files\dotnet\sdk] 2.1.4 [C:\Program Files\dotnet\sdk] 2.1.100 [C:\Program Files\dotnet\sdk] 2.1.201 [C:\Program Files\dotnet\sdk] 2.1.202 [C:\Program Files\dotnet\sdk] 2.1.302 [C:\Program Files\dotnet\sdk] 2.1.500 [C:\Program Files\dotnet\sdk] 2.1.502 [C:\Program Files\dotnet\sdk] 2.1.509 [C:\Program Files\dotnet\sdk] 2.1.801 [C:\Program Files\dotnet\sdk] 2.1.802 [C:\Program Files\dotnet\sdk] 2.2.103 [C:\Program Files\dotnet\sdk] 2.2.104 [C:\Program Files\dotnet\sdk] 2.2.402 [C:\Program Files\dotnet\sdk] 3.0.100 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Summary:
csproj's directives like
<NoWarn> NU1702 </NoWarn>
and
<WarningsAsErrors> NU1702;1702 </WarningsAsErrors>
are ignored by dotnet build.
dotnet build
Steps to Reproduce:
netcoreapp2.0
netcoreapp3.0
A
net472
B
<PropertyGroup> <TreatWarningsAsErrors>True</TreatWarningsAsErrors> <WarningsAsErrors>NU1702</WarningsAsErrors> </PropertyGroup>
Expected Behavior: A compilation error.
Actual Behavior: The compilation succeeds, with a warning NU1702, which is not treated as an error.
NU1702
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:
<PropertyGroup> <WarningsAsErrors>NU1702</WarningsAsErrors> </PropertyGroup>
I also tried with
<PropertyGroup> <TreatSpecificWarningsAsErrors>NU1702;1702</TreatSpecificWarningsAsErrors> </PropertyGroup>
and even by placing those directives in the PropertyGroup node where <TargetFramework> is.
PropertyGroup
<TargetFramework>
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 usage
NoWarn
I noticed different behaviors depending on:
The text was updated successfully, but these errors were encountered:
Closed in lieu of NuGet/Home#8797.
Sorry, something went wrong.
No branches or pull requests
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: