WPF app crashed because the .NET runtime was upgraded by Microsoft Update.
See original GitHub issueDescription
When our app is running(the .NET runtime version is 6.0.10), the .NET runtime was upgraded to 6.0.11 by the Microsoft Update, our product would crash.
Reproduction Steps
The issue can be reproduced with the following steps:
- Turn on the following setting: Windows Update -> Advanced options Enable the following item:
Receive updates for other Microsoft products.
- Create a simple C#/WPF project with VS2019 or 2022. Since the latest .NET runtime is 6.0.11, so please ensure the used .NET runtime is 6.0.10 or lower version.
- Build and run it.
- During the app running, run “check for update” from the system Settings. You will see the .NET runtime is upgraded to 6.0.11.
- After the upgrade completes, check the app state.
- If it doesn’t get crashed, close the app manually. ==> You will see the app crashed.
Expected behavior
The app shouldn’t crash either during running or when exiting.
Actual behavior
The app crashes during running or when exiting.
Per debugging the dump file in VS IDE, the exception message was:
System.DllNotFoundException: 'Unable to load DLL 'vcruntime140_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)'
Regression?
No
Known Workarounds
No workaround.
Configuration
I tested .NET runtime 6.0.9 and 6.0.10 with the simple C#/WPF application in VS2019 and VS2022.
Other information
No response
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
WPF Apps crash on Windows 10/11 after ...
My company develops .NET WPF apps (32-bit, targeting .NET Framework 4.7.2, and 4.5 for one of the old ones) written in C# using...
Read more >Issue with KB5017262 & KB5017270 cause WPF ...
our customers reporting that since the upgrade of the above KB, our WPF application crash with the below error: System.Reflection.
Read more >WPF app crash when submit to Microsoft Store
Launch the product. Notice that the product crashes and displays an error message(System.ApplicationException: Could not resolve target runtime ...
Read more >WPF application crash on start up (64 bit)
running 32 WPF bit applications works fine, only 64 bit is crashing. trying to repair .net framework did not work.
Read more >WPF Enterprise App crashes on Windows 10/11 after ...
WPF Enterprise App crashes on Windows 10/11 after Windows Updates installed - "StoryFragments part failed to load" Our enterprise app (32/64 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Each time VS-Installer updates the .NET SDK then all already running .NET apps (for example LINQPad) crash at the latest when closing them. (and the VS updater only updates .NET every 2 or 3 times, never telling before whether it will do that).
Thank you, Lindexi. We couldn’t do like that in our product for the sake of the future upgrade of the .NET runtime. For example, if .NET runtime released important updates such as security related, if we use the self-contained way, we need to release the new version of our product. If we don’t use the self-contained way which is used by our product currently, users can upgrade the .NET runtime in their environments then continue to use our existing release product.