'Unable to change ANy CPU to x64 or x86

I have a website project and in build configuration I am not able to change Any CPU to x64/x86 by clicking on the dropdown and selecting New. See image attached. How can I resolve this ?

I am using VS2022. It's a .Net 4.7.2 project.

enter image description here



Solution 1:[1]

Click -> Active solution platform -> <New...>

enter image description here

Choose x86/x64 from Type or select the new platform and click OK.

enter image description here

We will see x86/x64 which we can select.

enter image description here

EDIT

if you get the error

new project platforms cannot be created because this new solution platform is not supported by any of the projects

please uncheck the Create new project platforms

enter image description here

Sources

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

Source: Stack Overflow

Solution Source
Solution 1