BartoszCichecki / LenovoLegionToolkit

Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
GNU General Public License v3.0
5.44k stars 244 forks source link

[BUG]: LLT installer does not seem to install .NET Runtime properly #623

Closed partingscientist closed 1 year ago

partingscientist commented 1 year ago

Version

2.11.1

OS

Windows 10 21H2 Build 19044.2728

Device

Legion 5 15ARH05

BIOS version

EUCN28WW

What's wrong?

I'm not fully familiar with .NET, but I would assume that the .NET Runtime installed by LLT installer will persist in my machine. However, when updating to version 2.11.1 from version 2.11.0, the installer re-prompts me to download Microsoft.WindowsDesktop.App 6.0.14 (according to this, hopefully I'm not mistaken) even though it should be installed when updating to 2.11.0. Furthermore, the installed runtime does not persist after updating to 2.11.1.

How to reproduce the bug?

  1. Ensure the installed .NET Runtime on your machine is older than version 6.0.14.
  2. Install LLT 2.11.0. The installer should prompt you that an update to the machine's .NET Runtime is needed as part of the software's dependencies.
  3. Install LLT 2.11.1. Note that the installer re-prompts you to install the previously installed .NET Runtime.
  4. Run dotnet --list-runtimes from PowerShell. Note that Microsoft.WindowsDesktop.App 6.0.14 is missing from the list even though it has supposedly been installed twice.

What is the behavior that you expected?

I would expect that I do not need to reinstall the runtime and the runtime should persist in my device.

Logs

log_2023_03_18_15_19_30.txt

Do you have Lenovo software installed?

Did you disable any Lenovo software using Lenovo Legion Toolkit?

Additional information

I do have Runtime version 7 installed on my machine for other purposes. I would assume it's backwards compatible which allows me to run the software still.

BartoszCichecki commented 1 year ago

Hey, I periodically bump the .NET version so that people who don't run Windows update still get security updates for .NET. Version 6.0.14 was released a month ago and most people got it over Windows Update already, some even got 6.0.15 which was released 4 days ago (link).

You are right that the installer will take care of it and that these installs should "persist" as you described. If that is not the case, well .NET unfortunately does this sometimes where it can't figure out what's installed and what not.

The process is not really dependent on the LLT installer, as it just checks installed versions and starts an installer if needed. You can fix it manually. You can download latest 6.0.15 (newest as of today) from here: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.15-windows-x64-installer and install it manually.

I do have Runtime version 7 installed on my machine for other purposes. I would assume it's backwards compatible which allows me to run the software still.

That is not the case. While LLT is compiled with .NET 7, .NET 6 needs to be installed on the machine. Even version of .NET are Long Term Support versions, while odd are STS versions. I decided to stick to LTS versions, because they get security updates for much longer. Eventually, I will update to version 8 when it's released later this year.

BartoszCichecki commented 1 year ago

After taking second look, it might be that I used wrong URLs :D So installing the one above should fix the issue, in the meanwhile, let me make another hotfix.

BartoszCichecki commented 1 year ago

Resolved in: d26c900b8e5c213e084cad7e39325e05b8639cf4