Skip to content

Design-time build failure discards the entire project-model cache (warm open == cold open) #3337

Description

@JakeRadMSFT

Summary

When a solution is opened and its design-time build (project-model build) reports a failure, none of the projects get persisted to the project-model cache — not even the ones that built successfully. On the next open, the cache is empty (0 loaded, N missing) and the full design-time build runs again. Warm-cache opens therefore behave identically to cold opens for any solution that contains even a single project that fails its design-time build.

Impact

  • Solutions with one problematic project never benefit from the warm project-model cache.
  • Every open pays the full design-time-build cost (tens of seconds on large solutions), permanently.
  • The failure is silent — users just see consistently slow opens with no indication why.

Observed behavior

On a large solution (~277 projects) where one or more projects fail the design-time build:

  • Every open logs cache: 0 loaded, 277 missing.
  • Warm-cache time-to-IntelliSense ≈ cold time-to-IntelliSense (~20 s), whereas comparable solutions with a fully-succeeding design-time build load from cache in well under a second.

Expected behavior

Cache persistence should be per-project and fault-tolerant: projects that build successfully should be written to the cache and reused on the next open, even if some other project in the solution fails its design-time build. A single failing project should not invalidate the entire warm cache.

Notes

  • Root cause appears to be all-or-nothing cache-write semantics on design-time-build failure, independent of which project failed.
  • Reproduced on macOS (Apple Silicon), but the cache-write logic is platform-independent.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions