For Visual Studio 2022 support for Visual Studio Installer Projects must now be installed as an official Microsoft extension from here:
https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects
I found this by googling "Visual Studio 2022 Installer Project".
Answer from David on Stack OverflowVideos
The answer was:
In addition to the changes you made (updating the AssemblyFileVersion and AssemblyVersion properties in the output assembly) you also need to update the version of the setup project.
- Select the setup project in solution explorer and hit F4 to bring up the properties
- Increase "Version"
- Say yes to the dialog that comes up asking if you want to update the Product Code
- Save and build the setup project again.
This will enable the upgrade scenario.
And this does work. The reason I'm adding it here is that F4 is not listed on the .vdproj context menu so it's effectively undiscoverable.
There's one more quirk: if you're using Git, then it might not automatically check out the deployment project file (.vdproj), so you have to manually edit it (adding a space is enough) and reload the project, and then make the changes, which rewrites the project anyway.
To expand on @stuartd's answer and @Joel's comment, make sure that RemovePreviousVersions and DetectNewerInstalledVersion are set to true in the .vdproj Properties (F4). That should take care of any previous versions sticking around in the control panel's add/remove programs utility. The UpgradeCode should stay the same across versions and even frameworks.
From: VS 2010 Setup Project is NOT removing previous versions
The best way is to create a setup package, it can be an MSI, EXE or MSIX. You can do this directly from Visual Studio, without using any third party software.
You can create an MSI or EXE using Microsoft's Installer Project template. This is recommended if you are targeting users running on olders OSes like Windows 7/8, etc... or if your application has deep system integrations, like services, shell menu extensions, etc... or it simply needs to be installed per machine (for all users)
If you are targeting only Windows 10 users (1709 or newer) and your application dos not require administrative APIs (resources like services, shell, etcc or sharing files with other applications) you could use Microsoft's support to build MSIX packages.
Deploying and updating and MSIX is much simpler both for you and for the end-users, but it comes with some limitations, as mentioned above, for security reasons.
Also, MSIX requires all setup packages to be digitally signed. You can use a code signing certificate purchased from a certified vendor or your can generate your own certificate (but this needs to be accepted by the end-user machines, so you need a way to deploy this certificate to their machines before giving them the MSIX. If you are inside an enterprise network, this can be easily done, for home users is not recommended).
If you are interested in MSIX, let me know and I can give you more details about digital signing or other questions you might have.
You need an extension that didn't get installed by default:
Microsoft Visual Studio Installer Projects.
Read this topic in microsoft forum (and yes is a Microsoft extension not a third party one)
is-it-possible-to-create-a-setup-filemsi