Over a year ago I started building a tool for internal use and distribute it through an MSI and setup.exe (the setup.exe is necessary to check if the current version is already installed or if an upgrade has to be done, this is automatically provided by the Setup project that comes with Visual Studio 2022). This worked fine until June 2024 on Windows 10.
Then, 4 to 5 weeks ago, I updated Visual Studio 2022 to version 17.10 and went on vacation (that's on me). When I came back, I was still able to build my project's application but I was unable to get my setup project to run and build a proper setup.msi and setup.exe.
Running the project outputs only an unrecoverable issue: 0x80004002. Further investigation revealed nothing useful, sadly.
I then turned to build the setup differently and started a new WiX project (which for some reason is v3.x in Visual Studio 2022, compared to v5 for dotnet). While building my first package I get an error telling me that 32bit components cannot be packed into a 64bit package. This got me thinking that maybe the issue comes from dependencies somehow being installed differently. I was unable to find out how and where this happened, nonetheless I'm able to build an MSI with a 64bit executable (my application as exe) and dll and package it into a 32bit installer package.
I really don't get what happened nor have I any clue how to get the original Setup project to run again.
After updating my machine to Windows 11 today, I got a new error (which I'll try to fix by repairing the Visual Studio 2022 installation):
Ergebnis: Import "Microsoft.Publish.Framework.VisualStudio.PublishPackage._publishService (ContractName="Microsoft.Publish.Framework.VisualStudio.IPublishService")" kann nicht für Teil "Microsoft.Publish.Framework.VisualStudio.PublishPackage" festgelegt werden.
Element: Microsoft.Publish.Framework.VisualStudio.PublishPackage._publishService (ContractName="Microsoft.Publish.Framework.VisualStudio.IPublishService") --> Microsoft.Publish.Framework.VisualStudio.PublishPackage
Has anyone experienced similar problems with Setup projects suddenly not working anymore?