-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
I'm building NuGet packages in my repo, and newer SDKs are now raising a warning (which my project says warnings as errors) but that isn't causing my build to fail.
C:\Program Files\dotnet\sdk\3.0.100\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(198,5): error NU5048: The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl [F:\git\machinelearning\pkg\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.nupkgproj]
Steps to reproduce
- Unzip MSBuildBug.zip
dotnet build
notice the red errors, but the output sayingBuild succeeded.echo $LASTEXITCODE
returns: 0
Expected behavior
I expect the build should fail if there are errors during the build.
Actual behavior
The build prints errors to the console (even in red), but the build succeeds and the $LASTEXITCODE returns 0. So this won't fail any Azure DevOps CI builds.
Environment data
> dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
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