Home > database >  Setup File doesnt install the Exe-File
Setup File doesnt install the Exe-File

Time:12-13

i recently startet programming my first software, in C# with Microsoft Visual Studios, which is a Note Taking App. When i debug it, everything is fine. The Problem: I added another Project to the Project, which is the Setup Project to create a Setup File. When i go to the Setup Project and add a new Projectoutput and then select Primary Output it should also inculde the Exe-File... But it doesnt. It only includes the .dll, .dll.config and .runtimeconfig.json files. So the result is, when i send a potentially customer the Setup File to install the application, some files get installed except the EXE-File....

Of course my very first step was to google for a solution, but i didnt found anything helpful. Then i tried some steps on my own. Firstly i tried to delete my Setup-Project and create a new one. Secondly i read all the compiler warnings in Visual Studios, but all of them were the hint that the loading of symbols got skipped. Thirdly i got paranoid and searched for the Exe-File in the Main Project, which was there.

CodePudding user response:

If your project is .NET Core 3.1 or later versions, you should choose "Publish Items" instead of "Primary Output" when add project output:

enter image description here enter image description here

You can find instructions here

Select Publish Items instead of Primary Output to get the correct output for .NET Core 3.1, .NET 5.0, or .NET 6.0 projects. To bring up this dialog, select Add > Project Output... from the project's context menu.

  • Related