-
Notifications
You must be signed in to change notification settings - Fork 51
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
Launcher.exe can't upgrade a NET 4.8 to 5.0 exe if processor is x86 #149
Comments
@alansingfield: Can you give me a clue how to 'poke' in the custom Launcher.exe? |
Looks like I was looking for a complicated solution to a simple problem - just copying my custom Launcher.exe over the one in C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Engine did the trick. Took me a while to work out it had worked though since I pinned my test app to the Taskbar and it would seem that doesn't use Launcher.exe!! Running from the Desktop icon however, it did work |
Hello Simmotech, The -AddLauncher parameter is only available on the newer version of MAGE (use dotnet mage rather than mage.exe).
But, as you've seen, it's not that useful - all it does is create a file called Launcher.exe in the target directory, which you can do yourself just as well. I've uploaded the script that I use to create the ClickOnce files in my CI process, I'm sure there's room for improvement but it seems to do the trick: |
Hello! Thank you very much for the info provided here. Tried the approach from your first comment as a POC on a simple console net6 x64 app with a custom Launcher and dotnet mage 6, and that worked! Will check auto update for my case now using this approach. Hope, it will work too. P.S. It would be really great if we could specify the target processor architecture for Launcher using dotnet mage:
|
Upd. Managed to configure auto update for amd64 processor architecture from net472 to net6 pretty much the same way you have done it for x86 for net5. |
Same as dotnet/sdk#32445 @NikolaMilosavljevic did you plan to do something? Thx u. |
Launcher's architecture is MSIL. It does complicate direct upgrade from a version of application that is based on .NET FX (and uses architecture other than MSIL) to a modernized, .NET version of the app. There are currently no plans to provide various arch-specific versions of the launcher. |
Closing this issue. |
Description
The Launcher.exe created by -AddLauncher will not work with -Processor x86
My existing .NET 4.8 ClickOnce project is marked as Processor x86, and I am now migrating to .NET Core.
I need to keep Processor x86 set on the ClickOnce manifest because otherwise, all the existing client installs will not upgrade, it would have to be a new installation.
But - because the Launcher.exe is compiled with the MSIL option, ClickOnce sees the mismatch between this and x86 and refuses to start it.
Other information
The workaround was for me to create my own Launcher.exe with I use instead of running MAGE -AddLauncher.
This must be compiled with the following settings:
Of these, the most interesting / unexpected behavior of MAGE is the special treatment the file "Launcher.exe" gets.
It is a hard-coded name within the MAGE executable, when MAGE sees this file in the source folder it:
More notes on the -AddLauncher option
It seems to be doing things in a very unusual manner.
When you specify the executable name after -AddLauncher, it loads an embedded version of Launcher.exe, and edits the resources within it to bake in the chained executable name.
Would it not be possible to simply add some parameters into the section?
The text was updated successfully, but these errors were encountered: