Do I have to target specific runtimes? (I used to be able to have one installer for everyone)
When I use "Publish Selection" in visual studio, I appear to have to choose a target runtime. I would see more point to this if was able to publish to native AOT, but my app incorporates WinForms, so it can't do that (far as I can tell).
Consequently it looks like I'm going to need to publish 4 different downloads, and I'm going to need to somehow educate my user base (who aren't very I.T. literate) to find out what processor they have running.

24 Replies
Its very unlikely that your users are using anything but win-x64
Ah, ok.
according to a survey I googled up a few weeks ago, 0.45% of windows users today use an x86 installation
How about ARM though?
probably similar numbers
what ARM devices can you think of that support windows? 🙂
there might be some kiosk-style devices, but other than that... I cant think of any
besides winforms does not run on arm
Doesn't it? Oh. I did not know that.
maybe if there is a win-arm it might but like raspberry pi with linux it wont
winforms is windows only
same for WPF
Avalonia does run on arm
regardless, you can pretty much rule out arm and probably x86 too.
and the reason why it needs the RID is because you are packaging it self-contained
that means your executable contains the runtime inside it
so it needs to know what runtime version to add 🙂
Ah, ok, so if I did "Framework Dependent" , I could do "Portable", but then I might have to get them to install some version of the .Net framework ?
.NET, not .NET Framework
but yeah, they'd need to install the .NET 8 runtime
so if your users are not tech-savy, I recommend going self-contained
maybe even single-file
I also personally recommend avoiding the VS publish-wizard and just use the
dotnet publish
CLI tool insteadYes, I've been told that before.
👍
the vs publish is fine, the problem is that it just doesn't know how to error for certain things
so u need to go cli to see the actual error
like when u select conflicting options
or leave the runtime out
it doesn't show a proper error
you can actually set most of your publish options in the csproj directly, like runtime identifiers and self-contained
also its easier if u want to make a installer to go from the vs wizard
VS only allows the terrible one-click installers no?
for anything non-trivial you'd need WIX
I dont remember now, let me see

clickonce yeah
not very found of it, for maui I think it makes msxi
That's wrong. WinForms does run on Windows ARM64.
If you do want to utilize platform specific features, you will have to publish against individual platforms. That's what I did for Jexus Manager, https://github.com/jexuswebserver/JexusManager/releases/tag/v13.0.23.0
It uses WiX to produce the installers. The specific installer detects the CPU type and decides if it can be installed. End users can download three packages and try them one by one if they don't know much about CPU type.
You might create similar installers for your app.
I did say "maybe if there is a win-arm"
Only "win-arm64" is feasible now. ARM 32 bit is officially deprecated by ARM, so no longer supported by Windows.
BTW, WinForms for ARM (32 bit) existed ever since Windows 8/RT (though not officially supported there).
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View