Skip to content

Fix Docker container MVID mismatch error#2845

Merged
jasontaylordev merged 1 commit intomasterfrom
fix/docker-mvid-mismatch
Feb 25, 2026
Merged

Fix Docker container MVID mismatch error#2845
jasontaylordev merged 1 commit intomasterfrom
fix/docker-mvid-mismatch

Conversation

@jasontaylordev
Copy link
Contributor

Summary

Fixes the MVID mismatch error when running the ServicePulse Docker container:

Process terminated. MVID mismatch between loaded assembly 'Microsoft.Extensions.FileProviders.Embedded' 
(MVID = {aec62d2b-06ce-4272-a78e-ef0089d64d08}) and an assembly with the same simple name embedded in 
the native image 'full-composite.r2r.dll' (MVID = {331dc36b-694a-4022-92d1-da09744c5fbe})

Root Cause

The aspnet:8.0-noble-chiseled-composite base image contains R2R precompiled .NET 8.0.x framework assemblies. When the app references Microsoft.Extensions.FileProviders.Embedded version 10.0.3, there's an MVID conflict with the 8.0.x version baked into the composite image.

Fix

Downgrade Microsoft.Extensions.FileProviders.Embedded from 10.0.3 to 8.0.11 to match the base image's framework version.

Alternative Considered

Switching from aspnet:8.0-noble-chiseled-composite to aspnet:8.0-noble-chiseled (non-composite) would also work but has a slight cold-start performance penalty. The downgrade is preferred since the 10.0.3 package contains no meaningful changes for ServicePulse's use case.

Testing

  • ✅ Docker build succeeds
  • ✅ Container starts without MVID error
  • ✅ HTTP requests return 200 OK

Fixes MVID mismatch error when running the Docker container with the composite base image. The 10.0.3 package conflicts with the 8.0.x assemblies precompiled in the aspnet:8.0-noble-chiseled-composite image.
Copy link
Member

@johnsimons johnsimons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix seems to be fine, but I just wonder if another possible alternative is to upgrade the runtime to v10 on the containers?

@jasontaylordev jasontaylordev merged commit d940ce4 into master Feb 25, 2026
5 checks passed
@jasontaylordev jasontaylordev deleted the fix/docker-mvid-mismatch branch February 25, 2026 23:24
@jasontaylordev
Copy link
Contributor Author

The fix seems to be fine, but I just wonder if another possible alternative is to upgrade the runtime to v10 on the containers?

See #2847

@mikeminutillo mikeminutillo added Type: Bug Type: Bug docker Pull requests that update Docker code labels Feb 26, 2026
@mikeminutillo mikeminutillo added this to the 2.6.0 milestone Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Pull requests that update Docker code Type: Bug Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants