Skip to content

[Bug]: ResultsCache ignores some of the BuildRequest data, may return incorrect results #9458

@ladipro

Description

@ladipro

Issue Description

ResultsCache ignores BuildRequestDataFlags.ProvideProjectStateAfterBuild and RequestedProjectState, which may lead to incorrect over-sharing and returning incomplete results. BuildResult.ProjectStateAfterBuild is used by design-time builds in Visual Studio where this issue was discovered.

Steps to Reproduce

The repro is provided as a private MSBuildLocator branch:
microsoft/MSBuildLocator@main...ladipro:MSBuildLocator:results-cache-bug

Build and run the BuilderApp project to reproduce.

Expected Behavior

Build succeeds.

Actual Behavior

Build fails because the second submission returns null ProjectStateAfterBuild despite having constructed the build request with BuildRequestDataFlags.ProvideProjectStateAfterBuild.

Analysis

The two build requests appear to be treated as identical by the results cache. The cached results of the first build request are returned when the second build request is submitted.

Versions & Configurations

Visual Studio 17.9.34322.171

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasebug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions