-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve GUI error dialog when no runtime is installed #57089
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,11 +61,12 @@ namespace | |
if (pal::getenv(_X("DOTNET_DISABLE_GUI_ERRORS"), &gui_errors_disabled) && pal::xtoi(gui_errors_disabled.c_str()) == 1) | ||
return; | ||
|
||
pal::string_t dialogMsg = _X("To run this application, you must install .NET.\n\n"); | ||
pal::string_t dialogMsg; | ||
pal::string_t url; | ||
const pal::string_t url_prefix = _X(" - ") DOTNET_CORE_APPLAUNCH_URL _X("?"); | ||
if (error_code == StatusCode::CoreHostLibMissingFailure) | ||
{ | ||
dialogMsg = pal::string_t(_X("To run this application, you must install .NET Desktop Runtime ")) + _STRINGIFY(COMMON_HOST_PKG_VER) + _X(" (") + get_arch() + _X(").\n\n"); | ||
pal::string_t line; | ||
pal::stringstream_t ss(g_buffered_errors); | ||
while (std::getline(ss, line, _X('\n'))) { | ||
|
@@ -81,6 +82,7 @@ namespace | |
{ | ||
// We don't have a great way of passing out different kinds of detailed error info across components, so | ||
// just match the expected error string. See fx_resolver.messages.cpp. | ||
dialogMsg = pal::string_t(_X("To run this application, you must install .NET.\n\n")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably reword this to something like: "To run this application, you must install missing framework for .NET." - The "missing .NET" case is handled above, this is the "missing framework case" (and we MUST NOT use the ".NET framework" wording - since that would make it sound like the .NET Framework product. |
||
pal::string_t line; | ||
pal::stringstream_t ss(g_buffered_errors); | ||
while (std::getline(ss, line, _X('\n'))){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the architecture to the error. I think we should also add this to the missing framework error.
There are multiple places for this, but the most important ones are:
runtime/src/native/corehost/fxr/fx_resolver.messages.cpp
Line 115 in e6e7ef9
and
runtime/src/native/corehost/fxr/fx_resolver.messages.cpp
Line 119 in e6e7ef9
I would just add "(x86)" to the message after the framework name (or version).
It's a minor change, but I think this will be crucial for the ARM64 cases.