Question Deployment of a WPF executable as a self-contained application

mauede

Well-known member
Joined
Sep 1, 2021
Messages
103
Location
Northwood - UK
Programming Experience
Beginner
Some time ago I asked the same question for a console UI application.
Despite my efforts and all the help you gave me, I was unable to deploy a self-contained application.
It looks like Visual Studio does not allow this choice when publishing an executable that targets >NET Framework.
I am to deploy an executable based on WPF. However, it is still targeting .NET Framework 4.8.
My questions:
  • Is it possible to generate a self-contained WPF application? I mean an App, represented by some sort of icon containing all the necessary files that are hidden from the user?
  • If .NET Framework does not allow for producing self-contained executables, then what is the simplest way to convert a WPF application from targeting .NET Framework to targeting .NET Core 6.0?
Thank you so much
 
Just like in your previous thread, we recommend that you look at ClickOnce. ClickOnce will install the files into a per user location and display an icon that points to that program. If .NET 4.8 needs to be installed on the target machine, it will also prompt the user. ClickOnce also has the ability to check for updates. So when you publish a newer version, the program can find the updated version allow the user to update.

The other alternative is to use an installer that lets you package the app as a single executable. Once running, it'll unpack itself and install icons pointing to your program.
 
Just like in your previous thread, we recommend that you look at ClickOnce. ClickOnce will install the files into a per user location and display an icon that points to that program. If .NET 4.8 needs to be installed on the target machine, it will also prompt the user. ClickOnce also has the ability to check for updates. So when you publish a newer version, the program can find the updated version allow the user to update.

The other alternative is to use an installer that lets you package the app as a single executable. Once running, it'll unpack itself and install icons pointing to your program.
I tried to follow the ClickOnce route available with Visual Studio but there are options that are not clear. As I did not feel confident about my choices I basically gave up.
I have not ventured on using the installer that was suggested, or any other installer, as my
colleagues were putting pressure on me to start using my script.
Which one of the two proposed solutions is simpler?
Thank you
 
I tried to follow the ClickOnce route available with Visual Studio but there are options that are not clear. As I did not feel confident about my choices I basically gave up.
You should have posted a specific question here. That's what sites like this are for, moreso than general questions that rely more on opinion. Given that ClickOne can require as little as two clicks to generate a an installer, it's obviously the simpler option. That's of no value if it can't actually do what you need though. Try it and, if it doesn't work, give us specific information about what you did, what happened when you did it and how that differs from your expectation.
 
Back
Top Bottom