Skip to content

NU1510: redundant System.Collections.Immutable reference in CodegenTests #583

Description

@jeremydmiller

Every restore emits:

src/CodegenTests/CodegenTests.csproj : warning NU1510: PackageReference
System.Collections.Immutable will not be pruned. Consider removing this package
from your dependencies, as it is likely unnecessary.

CodegenTests does genuinely use the type — src/CodegenTests/VariableTests.cs:62 references ImmutableHashSet<string> — but System.Collections.Immutable has been in-box since .NET Core 3.x, and this project targets net9.0;net10.0. The explicit PackageReference adds nothing; the type resolves from the framework either way.

Fix is deleting one line from src/CodegenTests/CodegenTests.csproj; VariableTests.cs keeps compiling on the framework-provided type.

Trivial, but it's the only remaining restore warning in the solution now that #579 clears the MessagePack advisories, so removing it gets restore to fully clean — which makes future warnings actually visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions