2

I used Visual studio setup/installer project template to build a setup for my App last year(in VS19) and it worked well . after some changes I was forced to migrate to.Net6 and I tried to build a setup with this tool( in Vs22). I was able to install the app using the MSI file generated but the app wouldn't run. the tool doesn't generate any dependencies for the primary output and I don t know why. could that be the problem ?

setup folder

I tried different frameworks with no results.

Reza Aghaei
  • 120,393
  • 18
  • 203
  • 398
Zack_Aria
  • 23
  • 4
  • Hi, do you read Reza's answer, does it work for you? :) – Bowman Zhu-MSFT Feb 28 '23 at 08:40
  • 1
    Hi, it didn't work when i first tried it because the project CSV file was messed up. i had to creat a new project and add a new setup. after that i selected publish item instead of primary Output and it did work . – Zack_Aria Mar 01 '23 at 10:05

1 Answers1

0

Option 1 - Add Published Items instead of Primary Project Output

You can add publish items instead of primary output. To do so:

  1. Right click on your setup project > Add > Project output
  2. Choose the Windows app from dropdown
  3. In the list choose Publish Items

Press OK, and do the rest of the configurations you need, rebuild and install the setup project.

This doesn't show all dependencies, but it deploys the whole things that which are considered as part of published items which are necessary for the app. You can later add required prerequisites like .NET runtime.

enter image description here

Reza Aghaei
  • 120,393
  • 18
  • 203
  • 398