dotnet / dotnet/wpf

File conflict with System.Diagnostics.EventLog.Messages.dll

Open
#7,284 1 comment 1 reaction 0 assignees View on GitHub
Investigate
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:
![image](https://user-images.githubusercontent.com/43068830/201714969-313414ca-f724-4e2e-85d7-e4968c5a908f.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.