Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I get a DLL installed by the setup project instead of an EXE and how to fix it?

I create a new C# project WPF Application - A project for a .NET Core WPF Application. Framework: .NET Core 3.1.

Project loaded. (you have an empty form) Right click on your project and check that you have "Output type" Windows application. (It means when you click on build it creates an EXE file in BIN folder of your project) Then add a new project to the solution : Setup Wizard by extension Microsoft Visual Studio Installer Projects. Then follow steps as is here -> https://stackoverflow.com/a/6090929/15917420

In the end it packages DLL into installator file instead EXE.

So if you take setup.exe and install it, it installs DLL. Do you have same problem or am I missing something?

If I create WPF with .NET Framework I dont have this problem.

Thank you

EDIT: recorded video: https://drive.google.com/file/d/11ElC0F62klxQOI-beOn6LhcZbyOb7QDT/view?usp=sharing

like image 711
Bestije Hitsu Avatar asked Nov 17 '25 02:11

Bestije Hitsu


1 Answers

I had the same issue. Microsoft has published this: https://learn.microsoft.com/en-us/visualstudio/deployment/installer-projects-net-core?view=vs-2019

Basically is says that for .NET Core projects, you have to use the "published items" instead of "primary output" when building the setup project. It also has a couple of other hints too.

like image 98
mly Avatar answered Nov 19 '25 17:11

mly