Skip to content

Code Quality: Improve startup error message when Windows App Runtime …#18208

Open
workbysaran wants to merge 1 commit intofiles-community:mainfrom
workbysaran:sg/improve-startup-error-message-msrt
Open

Code Quality: Improve startup error message when Windows App Runtime …#18208
workbysaran wants to merge 1 commit intofiles-community:mainfrom
workbysaran:sg/improve-startup-error-message-msrt

Conversation

@workbysaran
Copy link
Contributor

Resolved / Related Issues
Improved the startup experience when the Windows App Runtime is missing or corrupted. Previously the app would silently terminate showing only a brief loading cursor with no feedback. The improvement catches the COM registration failure ('REGDB_E_CLASSNOTREG') on the first Windows App Runtime call, shows a user-facing error dialog and rethrows a descriptive exception so the failure is recorded in Windows Event Viewer.

Related #17763

Steps used to test these changes

  1. Install Files on a machine with the Windows App Runtime missing or corrupted
  2. Launch Files and confirm the error dialog appears with a clear message instead of a silent crash
  3. Open Event Viewer > Windows Logs > Application and confirm a descriptive entry is recorded

{
// These strings are intentionally hardcoded and cannot be moved to resource files.
// The Windows App Runtime (which powers the resource loading system) may itself be unavailable at this point
private const string MissingRuntimeMessage = "Files failed to start. A required Windows component could not be loaded. Try reinstalling Files from the Microsoft Store.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files can also be installed from outside the Store, is it possible to add a link to the download page? https://files.community/download

@yair100 yair100 added the needs - additional info Needs more information from the reporter label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs - additional info Needs more information from the reporter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants