Closed
Description
Some of our CI jobs that use a daily SDK build are failing. The SDK emits warnings for unused packages, and these warnings are then turned into errors.
See dotnet/core#9752 for info about the pruning warnings.
For example:
/home/tester/runtime/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj : error NU1510: Warning As Error: PackageReference Microsoft.VisualBasic will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj : error NU1510: Warning As Error: PackageReference System.Formats.Asn1 will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Text.Json. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.IO.Pipelines. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Linq.AsyncEnumerable. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.4.Unit.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.IO.Pipelines. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.4.Unit.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Reflection.Metadata. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.4.Unit.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Text.Json. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.IO.Pipelines. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Reflection.Metadata. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Text.Json. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Roslyn4.4.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Text.Json. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.Text.Json. [/home/tester/runtime/Build.proj]
/home/tester/runtime/src/libraries/System.Runtime/tests/System.Text.Encoding.Tests/System.Text.Encoding.Tests.csproj : error NU1511: Warning As Error: A ProjectReference cannot be pruned, System.IO.Pipelines. [/home/tester/runtime/Build.proj]
...