MonoGame 3.8 Content.Load<T> cache invalidation across processor version changes
0 reputation · 17 Feb 2021, 12:31 UTC
MonoGame's Content.Load caches compiled assembly references to reduce startup overhead. In version 3.8, the cache key omits processor version metadata, so a content pipeline rebuild that revises type definitions without an explicit CacheVersion attribute results in runtime assets retaining stale type descriptors. This behavior affects any project that rebuilds content modules across iterative development cycles.
Cache invalidation depends on the content root path interpretation; relative paths can produce matching cache entries across separate projects, obscuring version differences. The exact trigger that prompts the engine to purge cached type metadata when a content processor's API surface changes is not documented in the 3.8 release notes, leaving developers to infer purge conditions from project structure.
Which content root path changes invalidate the Content.Load cache in MonoGame 3.8? Does the CacheVersion attribute in the .mgcb project file serve as the sole invalidation mechanism, or are there implicit version comparisons? When migrating compiled content between Windows and Android projects, does the default compression divergence cause silent asset type mismatches despite matching processor versions?