Search code examples
c#visual-studioplatform

Cannot change the platform from x86 to Any CPU


I am using VS 2015. Somehow I mistakenly set something, making the platform of one project of my solution fixed to either x86 or x64. I would like to change it back to the "Any CPU", just like the default setting. But I find out I can't~ So How can I change it back?

There is a picture showing the situation of the properties page and the configuration manager

======Update=====

  1. No, I am not developing UWP-App for win10 app or something else. Just a traditional C# winform.
  2. As for "Did you try to click on New... and select "Any CPU" from there?". Yes I have, but as far as I am concerned, it does not work, no matter what I select from "Copy setting from". Here is an image showing what I see.

Solution

  • You can right click on the project and then select the Unload project. And again right click the project and edit your .csproj. In that, you can edit the Configuration Manager setting.

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>