Skip to content

Support context-isolated multi-target package restores #928

Description

@PrzemyslawKlys

Problem

Controlled build-input provenance can encounter the same multi-target project through distinct MSBuild global-property contexts. When a package reference exists only in an unselected framework/context cross-product, replaying one shared restore matrix can fail because the contexts currently share the project's intermediate restore assets.

The current behavior is fail-closed: provenance generation stops instead of silently accepting incomplete package evidence.

Desired behavior

  • Isolate restore assets per project-reference context.
  • Preserve the root project's project-reference mapping to the matching context.
  • Restore only frameworks actually selected by the evaluated build graph.
  • Keep package provenance deterministic and complete across every selected context.
  • Add behavioral coverage where one context introduces a framework-conditional package reference that another context does not select.

This is a broader restore-context ownership change and should not be approximated by merging assets files or bypassing missing package evidence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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