1

I published my wpf app, but I get this icon:

enter image description here

How do I replace this icon, and also the setup name from visual studio?

I tried: right click on the project--> properties--> application-->icon and manifest-->and browsed to my icon.

but this changed only the icon on top of the window, like:

enter image description here

Liam
  • 27,717
  • 28
  • 128
  • 190
Flufy
  • 309
  • 2
  • 15
  • What do you mean by setup name? – Matěj Štágl Aug 10 '18 at 08:50
  • I mean instead that visual studio would create `setup.exe` I want it to generate `MyApp.exe` – Flufy Aug 10 '18 at 08:52
  • What about simply renaming setup.exe to MyApp.exe once it is generated? – Matěj Štágl Aug 10 '18 at 08:53
  • @MatějŠtágl And every time that I fix a bug I would need to change the name again? That's a crooked way to do this. – Flufy Aug 10 '18 at 08:55
  • You are not deploying to production on eaćh bugfix, right? – Matěj Štágl Aug 10 '18 at 08:57
  • First off all, there's a difference between publish and build. Use your own setup application or create one from many available providers. This will let you choose icon, name and even STEPS! This question is basically you not understanding how software deployment/publishing works and not a programming related topic. – mrogal.ski Aug 10 '18 at 08:59
  • *"This will let you choose icon, name and even STEPS!"* Really? then tell me **How**. I'm using only visual studio, not Installshield @Mateusz – Flufy Aug 10 '18 at 09:03
  • Flufy watch your tone, before this gets closed – Matěj Štágl Aug 10 '18 at 09:04
  • @Flufy Since you've heard about InstallShield you can use it or google some similar install wizard projects. For the future reference: this site's main purpose is to ask programming related questions. Yours is not, you should find adequate StackExchange site to ask this kind of question – mrogal.ski Aug 10 '18 at 09:09
  • I'm using [ClickOnce](https://msdn.microsoft.com/en-us/library/t71a733d.aspx), that's another way to deploy app, there is no reason to go to some other install wizard. I'm sure that there is solution via visual studio – Flufy Aug 10 '18 at 09:20
  • @Flufy `setup.exe` is the *installer*, not your application's executable. You don't need to and *should not* try to rename it. You need to set the name and icon for your executable, just like you'd do for any Winforms or WPF application. The options for that are in the main project's property pages – Panagiotis Kanavos Aug 10 '18 at 09:27
  • `Really? then tell me How.` the answer to that would be "look at the docs, it's all there". You seem to misunderstand what ClickOnce is - it's *not* a general-purpose installer, it's meant for *intra*net scenarios. General puprose installers can be created eg using the [Visual Studio Installer Projects](https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects) extension. This can generate an msi package with or without a `setup.exe` bootstraper – Panagiotis Kanavos Aug 10 '18 at 09:35
  • @PanagiotisKanavos So if I will create 100 different apps, all of the would have the same `setup.exe` name? – Flufy Aug 10 '18 at 09:35
  • @Flufy you confuse the application with its **setup bootstrapper**. The *bootstrapper* can only exist alongside the application's setup files. – Panagiotis Kanavos Aug 10 '18 at 09:37
  • ClickOnce is not very customizable. You can change the icon of setup.exe *after* the application has been pubished: https://stackoverflow.com/questions/35019832/how-to-change-setup-exe-icon-when-publishing-through-clickonce – mm8 Aug 10 '18 at 09:37
  • @Flufy your application is called `WpfApplication.application`, not `setup.exe`. It's `WpfApplication.application` that runs, checks the source for updates, performs the update if necessary or keeps running otherwise. Perhaps you should explain what kind of application you want to deploy? ClickOnce makes sense for simplified enterprise deployments. If you have a lot of small apps, use UWP and the Windows App Store. Generic applications need installers like those created by the Visual Studio Installer projecs, Installshield etc. – Panagiotis Kanavos Aug 10 '18 at 09:44
  • @mm8 Yes, the second answer there worked for me, can you see how it's possible to rename the app via visual studio? – Flufy Aug 10 '18 at 09:44
  • "The app"? What file do you want to rename? – mm8 Aug 10 '18 at 09:46
  • @mm8 I mean that instead of `setup.exe` name, I want that visual would generate `MyAppSetup.exe` – Flufy Aug 10 '18 at 10:02
  • @Flufy: VS won't let you do this. See my answer. – mm8 Aug 10 '18 at 11:02

1 Answers1

2

I am afraid ClickOnce is not very customizable. You can change the icon of setup.exe after the application has been published as suggested by @Equalsk here:

How to change Setup.exe icon when publishing through clickonce

Then you can also change the name of the file:

How to rename setup file in ClickOnce?

mm8
  • 163,881
  • 10
  • 57
  • 88