Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent crash (FileLoadException) when running apps built with 6.0.200 #24240

Closed
caesay opened this issue Mar 5, 2022 · 2 comments
Closed

Silent crash (FileLoadException) when running apps built with 6.0.200 #24240

caesay opened this issue Mar 5, 2022 · 2 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@caesay
Copy link

caesay commented Mar 5, 2022

Describe the bug

When running a UI (WinForms or WPF) application which was compiled with dotnet 6.0.2, on a Windows computer with only dotnet 6.0.0 or 6.0.1 Desktop Runtime installed, the program has a fatal silent crash on start-up (no dialogs or warnings to download dotnet). Compiling the application with an older version of the SDK resolves the error. Subsequently installing dotnet 6.0.2 Desktop Runtime on the computer also resolves the error.

Checking event viewer reveals this error message:

Application: VidCoder.exe
CoreCLR Version: 6.0.121.56705
.NET Version: 6.0.1
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException: Could not load file or assembly 'PresentationFramework, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'PresentationFramework, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

This is particularly problematic because it's a silent crash for end users, meaning they will file bug reports with developers, and the issue will not be apparent to the developer (because the developer will have 6.0.2 installed and can't reproduce the problem).

The ideal behaviour is that apps compiled with 6.0.200 installed would also run on computers with 6.0.0 or 6.0.1 installed.

To Reproduce

  • Create a WPF application
  • Target framework net6.0-windows10.0.19041.0
  • Compile with dotnet publish -c Release -r win-x64 on a windows computer with the latest SDK installed.
  • Verify with ILSpy that entry dll now has a hard reference to PresentationCore 6.0.2 (among other 6.0.2 references) - image below
  • Run application on computer with dotnet 6.0.0 or 6.0.1 installed.
  • Check event viewer to see reason for crash.

Image of AssemblyRef table:
Image of AssemblyRef

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Mar 5, 2022
@KalleOlaviNiemitalo
Copy link

The dependency problems were also reported as dotnet/wpf#6109 and dotnet/winforms#6663.

@caesay
Copy link
Author

caesay commented Mar 5, 2022

Looks like this issue is well covered in other repos esp dotnet/core#7176 so I will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants