'Visual Studio Setup project is requiring x64 .NET Core Desktop despite targeting x86 platform

I have a visual studio setup project which targets x86 as the platform. The application itself and all libraries target AnyCPU. It is a .NET Core 3.1 WPF Desktop Application.

I've also set the prerequisites to .NET Desktop Runtime 3.1.22 [x86] (and I have NOT selected x64).

Despite this, I Get the following message when I run the installer:

enter image description here

This setup requires the x64 .NET Core Desktop Runtime version 3.1.0. Please install the .NET Core Desktop Runtime and run this setup again. The .NET Core Desktop Runtime can be obtained from the web.

As a work-a-round, I included x64 in the prerequisites so that it automatically downloads and installs it if it's missing, but is there any way I can avoid the user unnecessarily downloading an extra runtime?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source