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

Do not use '.NET Core' anymore in error messages #68260

Merged
merged 3 commits into from
Apr 25, 2022

Conversation

vitek-karas
Copy link
Member

Added a test for a single-file FDD running over old hostfxr

In reaction to #67427.

Added a test for a single-file FDD running over old hostfxr
@ghost
Copy link

ghost commented Apr 20, 2022

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Added a test for a single-file FDD running over old hostfxr

In reaction to #67427.

Author: vitek-karas
Assignees: vitek-karas
Labels:

area-Host

Milestone: -

Include apphost version, .NET location and so on. Similar to other improved error messages now.
@vitek-karas
Copy link
Member Author

@elinor-fung could you please take another look? I followed the same format as the other "improved" error messages.

Copy link
Member

@elinor-fung elinor-fung left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Minor comment/question about possible cleanup around the dialog for GUI apps.

{
pal::string_t url = get_download_url();
trace::error(_X(" _ To run this application, you need to install a newer version of .NET Core."));
Copy link
Member

Choose a reason for hiding this comment

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

Can we get rid of the check for the _ prefix now?

const pal::char_t custom_prefix[] = _X(" _ ");

Copy link
Member Author

Choose a reason for hiding this comment

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

Isn't it necessary for the pre 7.0 runtimes?
7.0 doesn't use it anymore, but the apphost still needs to work downlevel for some rather weird cases.

Copy link
Member

Choose a reason for hiding this comment

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

I thought apphost itself was the only thing actually writing with that prefix? Because with downlevel hostfxr, we couldn't actually redirect the errors from hostfxr.

Copy link
Member Author

Choose a reason for hiding this comment

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

What about 7.0 apphost running against 6.0 hostfxr - the hostfxr might still use the _ prefix somewhere (I didn't check). In that case the error info will be redirected from hostfxr to apphost and if it contains _ it should be parsed.

Copy link
Member

Choose a reason for hiding this comment

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

I was pretty sure we only ever used it for apphost, but I didn't actually go back and check.

Either way, the UX and changes you have right now look good to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just searched 3.1 and it only uses the prefix in apphost - but I'm still nervous about doing this. Honestly I would rather keep it.

It now includes the apphost version and architecture, just like we do if there's no runtime at all.

Also some PR feedback fixes.
@vitek-karas
Copy link
Member Author

I improved the dialog for the case of old runtime, it now looks very similar to the case where there's no runtime at all. Most notably it contains apphost version and architecture:
image

@vitek-karas vitek-karas merged commit ffe71b9 into dotnet:main Apr 25, 2022
@vitek-karas vitek-karas deleted the ImproveOldFxMessage branch April 25, 2022 21:16
@ghost ghost locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants