microsoft / microsoft/microsoft-ui-xaml

Dependency version conflict after switching to .net 8.

Open
#9,937 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-ProjectSystem bug team-Core team-Markup
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

It looks like a bug in the build process or in the references, and it is something related particularly to WinUI. All other projects were switched to .net 8 without any issues. Totally I have 13 warnings like this

> Consider app.config remapping of assembly "System.IO.MemoryMappedFiles, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "0.0.0.0" [] to Version "8.0.0.0" [C:\Misc\Project\Visualizer\bin\x64\Debug\net8.0-windows10.0.22621\win10-x64\System.IO.MemoryMappedFiles.dll] to solve conflict and get rid of warning.

I can provide the whole list of warnings if that is necessary. What I found so far is that many if not all .net 8 assemblies like System.Core.dll reference other assemblies specifying version as 0.0.0.0, for example it references "System.IO.MemoryMappedFiles, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". At the same time there are other assemblies which are dependencies of deeper levels of other assemblies like netstandard.dll, System.Reflection.Metadata.dll, DirectWriteForwarder.dll, System.Printing.dll which reference the same assembly of the actual version, 8 in this case, "System.IO.MemoryMappedFiles, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Looks like that System.Printing.dll itself is referenced from "PresentationFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which is part of WinUI3.

Let me represent my understanding of what happens in a more structural manner

> "PresentationFramework, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
> -> "System.Printing, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
> -> "System.IO.MemoryMappedFiles, Version=**8.0.0.0**, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>
> "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" (.NETCoreApp v8.0)
> -> "System.IO.MemoryMappedFiles, Version=**0.0.0.0**, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Versions of System.IO.MemoryMappedFiles don't match.

### Steps to reproduce the bug

Switch from .net 8-N to .net 8.

### Expected behavior

No build time warnings regarding versions conflicts.

### Screenshots

_No response_

### NuGet package version

None

### Windows version

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is identified in the report. Reproduce the build after switching from .NET 8-N to .NET 8, inspect the reported assembly-version warnings around WinUI, and confirm completion when the version-conflict warnings no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.