C
C#11mo ago
AndrewBindon

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.
No description
24 Replies
Pobiega
Pobiega11mo ago
Its very unlikely that your users are using anything but win-x64
AndrewBindon
AndrewBindonOP11mo ago
Ah, ok.
Pobiega
Pobiega11mo ago
according to a survey I googled up a few weeks ago, 0.45% of windows users today use an x86 installation
AndrewBindon
AndrewBindonOP11mo ago
How about ARM though?
Pobiega
Pobiega11mo ago
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
leowest
leowest11mo ago
besides winforms does not run on arm
AndrewBindon
AndrewBindonOP11mo ago
Doesn't it? Oh. I did not know that.
leowest
leowest11mo ago
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
Pobiega
Pobiega11mo ago
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 🙂
AndrewBindon
AndrewBindonOP11mo ago
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 ?
Pobiega
Pobiega11mo ago
.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 instead
AndrewBindon
AndrewBindonOP11mo ago
Yes, I've been told that before.
Pobiega
Pobiega11mo ago
👍
leowest
leowest11mo ago
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
Pobiega
Pobiega11mo ago
you can actually set most of your publish options in the csproj directly, like runtime identifiers and self-contained
leowest
leowest11mo ago
also its easier if u want to make a installer to go from the vs wizard
Pobiega
Pobiega11mo ago
VS only allows the terrible one-click installers no? for anything non-trivial you'd need WIX
leowest
leowest11mo ago
I dont remember now, let me see
leowest
leowest11mo ago
No description
leowest
leowest11mo ago
clickonce yeah not very found of it, for maui I think it makes msxi
Lex Li
Lex Li11mo ago
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.
leowest
leowest11mo ago
I did say "maybe if there is a win-arm"
Lex Li
Lex Li11mo ago
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
Unknown User11mo ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?