Skip to content

Revert By default use 32bit runtime when 64bit runtime is not installed#12

Merged
Metadorius merged 2 commits intomasterfrom
devo1929/launcher-fix
Mar 26, 2023
Merged

Revert By default use 32bit runtime when 64bit runtime is not installed#12
Metadorius merged 2 commits intomasterfrom
devo1929/launcher-fix

Conversation

@devo1929
Copy link
Contributor

There is a scenario that warrants this removal:

If a user has only the x86 net7 runtime installed and a x64 PRE-net7 (net6) runtime installed, this scenario will happen.
The issue is that once we get to the new net7 updater, it by default simply calls dotnet secondstageupater.dll to perform the update. The problem is that the x64 net6 runtime in the scenario above will be called in this case, because the PATH variable will default to it.

Steps to reproduce:

  • Make sure that only the following versions of dotnet are installed:
    • .net4 (required to be running the net4 based client anyways)
    • .net7 x86
    • .net6 x64
  • Make sure the client is the current net4 version of the client (for example, this might be client version 8.0)
  • Update the client to the net7 version of the client (for example, this might be client version 9.0)
  • Push a change that would create a NEW net7 version of the client. (for example, this might be version 9.1).
  • Restart the client (you should still be on the example client version 9.0)
  • You should be prompted to update to the next net7 version of the client (example client version 9.1). Accept the update.
  • Verify that the client update fails.

This is because once we've made it to the first client version that is on net7 (client version 9.0 in the example above), the updater attempts to call dotnet secondstageupdater.dll for the next update. With the currently installed versions of dotnet above, the PATH variable will default to the x64 net6 installation. So, calling dotnet seconddstageupdater.dll will attempt to use this x64 net6 dotnet which will be unable to launch the net7 based instance of the secondstageupdater.dll

Being that the client launcher is the starting point for ALL that is the user experience of the client (the client itself, the updater, etc...), it makes the most sense to put this necessary check into the launcher itself, rather than the updater. It'll also yep facilitate the possible and eventual move to a net7 launcher.

@Metadorius
Copy link
Member

So what would be the new behavior then?

@devo1929
Copy link
Contributor Author

So what would be the new behavior then?

In the above scenario, it would simply know to prompt you to install x64 net7.

@Metadorius
Copy link
Member

Metadorius commented Mar 26, 2023

So what would be the new behavior then?

In the above scenario, it would simply know to prompt you to install x64 net7.

That I understood, what about the general effect? It would always seek for the .NET 7 of user's OS bitness, did I get it right?

@devo1929
Copy link
Contributor Author

devo1929 commented Mar 26, 2023

So what would be the new behavior then?

In the above scenario, it would simply know to prompt you to install x64 net7.

That I understood, what about the general effect? It would always seek for the .NET 7 of user's OS bitness, did I get it right?

That is correct. This is necessary, due to a change by Microsoft in when the PATH variable gets set during .NET installation.
https://learn.microsoft.com/en-us/dotnet/core/compatibility/deployment/7.0/x86-host-path

@Metadorius Metadorius merged commit cdbdbb0 into master Mar 26, 2023
@SadPencil SadPencil deleted the devo1929/launcher-fix branch November 1, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants