I have a WPF application with a packaging project for publishing it to the Windows Store.
The solution contains a couple of projects, but all of them target AnyCPU in all configurations (verified in the solution's properties).
I'm now getting an error (which I didn't use to get) as follows, but I only get it when packaging it for publication. When I just build and run it, it works fine, even though the startup project is the packaging project!
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference ..., "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
How can this be?
More information
I recently updated VS2022 to 17.4. Perhaps it has some known change?
It's not a warning. It's an error, and doesn't continue packaging the project.