r/dotnet•
KeyboardG

Compile for x64 requires ClickOnce Reinstall?

We have an .Net 4.8 Windows desktop application deployed via ClickOnce. We recently implemented features requiring more memory and thus not compile explicitly for 64 bit. In our call to Mage.exe I added -Processor "amd64".

It seems that a side effect of this switch though is now when the first run of that 64bit version, ClickOnce sees it as a different app and we must uninstall/reinstall to get the app working. From then on its fine, however as you can imagine, I don't our users to have to go through this.

Is there a way to make the switch to explicitly 64bit without forcing a reinstall through ClickOnce?

Thanks for any feedback.

Posted Nov 27, 2023, 6:59 PM UTC

12
chucker23n•

Yeah, those things are painful in ClickOnce.

One thing you can do as a hack is:

  1. publish a new ClickOnce app to a different URL
  2. for the existing app, publish an "update" that is actually just a dummy app that downloads and runs the new app
  3. to the new app, add clean-up code for the remains of the old code

This will only work if you don't use sandboxing.

2
KeyboardGOP•

Thanks. Yea, this is kind of a bummer to need to work around when we're signing the app. We're saying we're the publisher and this is our app.

1