Enhancement: Only Install .NET Desktop Runtimes
Closed this issue · 8 comments
On initial install or if upgrading from a prior .NET targeted Reloaded-II to a newer .NET targeted version (ex NET 8 -> NET 9), Reloaded-II will automatically install the .NET 9 Runtimes for the user. Currently, it is unnecessarily installing 4 runtimes instead of just two.
On initial install (on a clean Windows 11 24H2 installation):
After which the following are installed:
Per Microsoft, it is not necessary to install the .NET Runtime distributables if the .NET Desktop Runtimes are installed:
In my own testing, removing the "Microsoft .NET Runtime - 9.0.0 (x64)" and "Microsoft .NET Runtime - 9.0.0 (x86)" is safe and changes no functionality with using Reloaded-II. It is only necessary to install the Desktop Runtimes. This speeds up the initial install process, and any future upgrades if we only explicitly install these two distributables.
Have you confirmed the files for all 4 runtimes are actually downloaded?
If they are, there is an opportunity for faster setup, however, you wouldn't be saving any disk space. Desktop Runtime's copy of Runtime has the same files as Runtime.
If you install both separately and delete just Runtime, then the difference in used storage space will amount to just about ~0MB
Yes, all 4 runtimes are downloaded. In the case of an in-place upgrade UAC pops up and I can see all the runtime names.
You are correct the saved space will not change. The install time is what will be less.
Figures. The code doesn't hardcode the fact that one runtime contains the other; partly because that wasn't always the case. Back in the day they were separate downloads.
Yep, I'm not sure when they changed it (maybe NET 8?) Either way, it's a PR I'll open.
Around .NET 5 IIRC
Closing as this is not possible with how the 3P dependency detects/manages NET versions.
NetCoreInstallChecker is first party though.