Visual Studio Installer Project doesn't include my software exe

Peter Shaw 41 Reputation points
2024-01-04T05:43:06.6233333+00:00

Hi,

I wrote a C# windows desktop software. I added an installer for it. The problem is the Setup project only includes a dll of my software in its Primary output, it doesn't include my software exe.

My Visual Studio is Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.3.6.

Microsoft .Net Framework Version 4.8.09032

I add the setup project as the following steps: Right click on the Solution -> Add -> new project -> Search Setup -> Setup Wizard

Next

Fill a setup project name

Create

Setup Wizard

Next

Create a setup for a Windows application

Next

Select "Primary output from MyAppName"

Next

Next

Finish

Primary output properties:

sourcePath of KeyOutput is pointed to program folder\obj\Debug\net6.0-windows\myApp.dll

The main properties of my software project:

In the Application section:

Output type: Windows Application

Target framework: .Net 6.0

Target OS: Windows

Target OS version: 7.0

Enable Windows Forms for this project.

Assembly name: $(MSBuildProjectName) MySoftwareName

In the Build section:

Output:

Base output path: bin\

Base intermediate output path: obj\

Thank you for your help.

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
228 questions
{count} votes

1 answer

Sort by: Most helpful
  1. David Lowndes 2,555 Reputation points MVP
    2024-01-04T09:18:08.5633333+00:00

    Use "Publish Items" rather than "Primary Output". See here for more information.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.