Closed dfederm closed 1 day ago
Discussed the issue internally.
Problem: The build results cache was not initially intended to be used cross MSBuild versions (i.e. to be produced by one version and used by another). When a functionality to use the build caches created outside the local build was added, we became unable to modify BuildResult
class (including adding fields) because it deserializes the build results from the cache file with a fixed structure. BuildResult
and ResultsCache
also has no notion of a version, thus flexible deserialization from the cache based on the version is not possible.
Resolution: We are going to introduce in a non-breaking way the notion of a cache/result version. The caches will not be forwards compatible (produced by newer version and used by older) but backwards compatible with the previous two released versions (produced by older version and used by newer one). We also will add an escape hatch which will allow to produce old-style result caches even on a newer version to make the transition to versioned caches smoother.
Issue Description
I am seeing the following errors when using the result caching feature:
Specifically the result cache file was produced by MSBuild 17.10, but I'm currently using MSBuild 17.11.
It appears that a field was added to the
BuildResult
in #9987 which is likely causing this issue.Steps to Reproduce
See detail above
Expected Behavior
See detail above
Actual Behavior
See detail above
Analysis
No response
Versions & Configurations
No response