Skip to content

EnableReferenceTrimmer cannot be set in Directory.Build.targets #115

@janthomasQS

Description

@janthomasQS

I want to disable ReferenceTrimmer based on other properties defined in the csproj. This has to be done in Directory.Build.targets because otherwise i cannot access properties from the csproj.

If i set EnableReferenceTrimmer in the Directory.Build.targets it does not actually affect ReferenceTrimmer though.
This is because ReferenceTrimmer.targets is loaded before Directory.Build.targets and adds CollectDeclaredReferences to CoreCompileDependsOn already.

Possible solution in my eyes: Add a condition based on EnableReferenceTrimmer to CollectDeclaredReferences

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions