tjmoore / dotnet-version-check

Reports .NET runtime version information and triggers a prompt to install .NET Core runtime if applicable
MIT License
0 stars 0 forks source link

Only directs user to download page #2

Open tjmoore opened 4 years ago

tjmoore commented 4 years ago

After testing this out, this has a major flaw in that all the .NET boostrap does is launch a browser with link to the .NET Core download page.

This leaves it down to the user to decide what to install, which is not going to be obvious with various choices.

It also ends the process so the installer will just carry on or otherwise has to check the last error code to detect abnormal finish due to no runtime installed.

Also, on Windows Server, the browser by default blocks everything, including downloading the runtime files.

tjmoore commented 4 years ago

Issue already raised here: https://github.com/dotnet/core-setup/issues/8902

Workaround with an installer is to instead rely on exit code and download/install via a direct link to required runtime exe. Therefore revised the code to split into a console and windows app. The console app just reports runtime and returns 0 exit code or otherwise the app host will return the relevant error code that an installer can check. Windows app is also there just as an example where it provides the prompt.