Hey guys.
I've been messing with the Microsoft Visual Studio Installer Projects 2022 Extension in VS2022. I am able to create an installer for my app, and that works just fine.
I'm having trouble specifically with the "RemovePreviousVersions" setting and running the install again to effectively "update" the installed application.
Right now, it will install over the previous installation if I raise the version number in settings before building the project, however, it doesn't seem to uninstall the previous version, and it also doesn't overwrite all of the necessary files. It replaced "MyApplication.runtimeconfig.json" and "MyApplication.pdb". It did not replace the executable or dll named after project. Running the executable, it was the previous version of the application, and not the newer one that the installer is using. I had to uninstall the app, and then reinstall using the same version of the installer I used to "update" it, and then it was the correct version.
I was under the impression I could do this, because that is the information I found online. I'm not having any luck with it, but I'm not sure if I did something wrong.
Looking at Microsoft's documentation, I see that they say it does not "Support minor upgrades and patching" but does "Support major upgrades." Does this mean if I am changing my version number, it will only "update" the installation if I increment the major version number, ie - 1.0.0 > 2.0.0, rather than going from 1.0.0 > 1.0.1?
I've been deciding between writing the software to automatically detect version changes from a server location and handle the update, or just use an installation tool to handle it since that would be easier, lol, but here I am.
(Side note: I would generally look into the issue a lot more, but google isn't giving very useful results. It is mainly showing me how to use the VS2022 Installer to install or update VS2022.)
I've been messing with the Microsoft Visual Studio Installer Projects 2022 Extension in VS2022. I am able to create an installer for my app, and that works just fine.
I'm having trouble specifically with the "RemovePreviousVersions" setting and running the install again to effectively "update" the installed application.
Right now, it will install over the previous installation if I raise the version number in settings before building the project, however, it doesn't seem to uninstall the previous version, and it also doesn't overwrite all of the necessary files. It replaced "MyApplication.runtimeconfig.json" and "MyApplication.pdb". It did not replace the executable or dll named after project. Running the executable, it was the previous version of the application, and not the newer one that the installer is using. I had to uninstall the app, and then reinstall using the same version of the installer I used to "update" it, and then it was the correct version.
I was under the impression I could do this, because that is the information I found online. I'm not having any luck with it, but I'm not sure if I did something wrong.
Looking at Microsoft's documentation, I see that they say it does not "Support minor upgrades and patching" but does "Support major upgrades." Does this mean if I am changing my version number, it will only "update" the installation if I increment the major version number, ie - 1.0.0 > 2.0.0, rather than going from 1.0.0 > 1.0.1?
I've been deciding between writing the software to automatically detect version changes from a server location and handle the update, or just use an installation tool to handle it since that would be easier, lol, but here I am.
(Side note: I would generally look into the issue a lot more, but google isn't giving very useful results. It is mainly showing me how to use the VS2022 Installer to install or update VS2022.)