File conflict with System.Diagnostics.EventLog.Messages.dll
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Version: 6.0.11
**Problem description:**
Self-contained WPF apps seem to include a wrong version of `System.Diagnostics.EventLog.Messages.dll` in the output directory.
Starting with .NET 6.0.9 the runtime for desktop applications now contains the `System.Diagnostics.EventLog.Messages.dll`.
That DLL is binary different to the one used by the ASP.NET Core runtime.
**Actual behavior:**
When a project uses both, the desktop runtime and the ASP.NET Core runtime, it randomly picks one of those DLLs.
**Expected behavior:**
The desktop runtime and the ASP.NET Core runtime should contain binary identical native DLLs to prevent any file conflicts.
**Minimal repro:**
1. Install the latest .NET 6 SDK (currently 6.0.403)
2. Create a new WPF project (`dotnet new wpf`)
3. Add a reference to the ASP.NET Core framework to the .csproj file (``)
4. Publish the app (`dotnet publish --self-contained true -r win-x64`)
5. Compare the used runtime assets. They are different:
`~\.nuget\packages\microsoft.aspnetcore.app.runtime.win-x64\6.0.11\runtimes\win-x64\lib\net6.0\System.Diagnostics.EventLog.Messages.dll`
`~\.nuget\packages\microsoft.windowsdesktop.app.runtime.win-x64\6.0.11\runtimes\win-x64\lib\net6.0\System.Diagnostics.EventLog.Messages.dll`
Comparing both files using Beyond Compare hints that the DLL from the desktop runtime seems to be x86 even though win-x64 is used:

Contributor guide
Assessment
This issue has not been assessed yet.