0

I've built a small desktop application with which I am trying to use a Setup project to allow other users to install it. But whenever I run this installer, it does not produce an executable file. This is my first time making a setup project.

My solution contains two projects. One is the setup project which installs the primary output from the other project. The other project is a WPF App that consists of two xaml files, a xaml.cs file for each, an App.config file, and an icon. It also has a few dependencies including one Assembly, two Frameworks, and a handful of Packages. The app works exactly as intended whenever I start a Visual Studio debugging instance on either Debug or Release configurations.

I followed these instructions to build my Setup and deploy my app.

Whenever I ran the resulting Setup, it installed an XML configuration file, a JSON file, a main application dll file, and a bunch of dll files for my assemblies. I looked into some resources on how to run the main dll file properly, only (A) I'm completely stumped by everything I find on that topic, and (B) I would rather just produce an executable file anyway, since I intend for this Setup project to be used by other people and it would be inconvenient to ask said others to jump through the same hoops just to run it.

Why does my Setup project not produce a .exe file? I see that a .exe file is produced in my bin folder whenever I build my project (and this .exe works), so I would think the setup project should also produce one of those, but it doesn't. What am I doing wrong with my Setup project or anything else?

Chris H.
  • 71
  • 1
  • 8
  • Use WPF on .NET Core 3.0, and then you can generate a single executable for deployment. Then you don't even need an MSI installer (though you can). – Lex Li Oct 25 '19 at 17:04
  • I need more specific terminology/instructions than that. What do you mean "Use WPF on .Net Core 3.0"? I selected the "WPF App" option whenever I created this project in the first place, and the project's properties already list .NET Core 3.0 as its Target Framework. If this is supposed to already generate a single executable for deployment, where can I find/generate it? If not, what do I need to change? Or are you saying that the .exe file I mentioned in the last paragraph of my question IS the single executable I can deploy (I assumed I could not just deploy that one)? – Chris H. Oct 25 '19 at 18:56
  • 2
    Any search engine should lead you to the very first tutorial on .NET Core 3.0 https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#single-file-executables – Lex Li Oct 25 '19 at 20:51

3 Answers3

1

The setup.exe is a bootstrapper over the setup.msi. We can install the content using .msi or by running .exe which inturn runs /gets the data from the msi. To enable setup.exe building, go to solution explorer -> project -> properties -> prerequisites. check the check box on the top "Create setup program to install prerequisite components". apply and rebuld the project. A setup.exe bootstrapper will be created allong with msi.

0

Switch to Release mode, then rebuild your setup project. If everything went well (check the output console), you'll find an MSI file inside {setup project folder}/bin/Release

Guido Cardinali
  • 366
  • 1
  • 13
  • I see the exact same results as if I did it on Debug mode, and the output console told me about no errors. No MSI file, Or .exe for that matter. I should have been more specific about how little I know about this process. For instance, I have literally no idea what an MSI file even is, as far as I know my end goal should be just to make the setup produce a .exe. This is my first time making a Setup project ever. I don't even know how to be 100% certain that I'm including all of the correct dll files or anything, I'm just "pretty sure" I'm including the dlls for the dependencies I'm using. – Chris H. Oct 25 '19 at 18:48
  • Oh wait, let me correct myself a bit. I see MSI is the setup application. That's what I've already been doing before I asked this question -- I AM successfully creating an MSI after I build the setup project. My problem is that after I run the MSI, it does not produce an .exe of the project I install. When I talk about the "results", I'm talking about the files created after running the MSI. My apologies for not being clear enough about that. – Chris H. Oct 25 '19 at 18:52
  • 1
    My bad, you were quite clear. Anyway. that's weird. It should produce an .exe, i've done it a billion times and never had such issue. Must be the setup project not correctly configured. The tutorial you followed is for c++. Start from here: https://learn.microsoft.com/it-it/visualstudio/deployment/deploying-applications-services-and-components?view=vs-2019#create-an-installer-package-windows-desktop – Guido Cardinali Oct 25 '19 at 22:03
  • @Chris H Maybe you can create a shortcut for "primary output" on Desktop to check if the exe can be run. – 大陸北方網友 Oct 28 '19 at 01:52
0

In "system file" from your proyect installer, you shoud to add in "Application Folder" the next source = PublishItemsOutpuGroup. In my case functions well.

Michu
  • 122
  • 12