1

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.
3
  • Are you creating a UWP-App for win10 app or something else? Also what kind of projects are those (library, runtime, ...)? I am asking, because I noticed that ARM is missing. Commented Mar 27, 2016 at 7:14
  • Did you try to click on New... and select "Any CPU" from there? Commented Mar 27, 2016 at 7:16
  • It just doesn't matter, the Solution Platform name is quite irrelevant to managed projects. Only the Target Platform setting matters. You could go through all the projects and delete the x64 and x86 platforms, keeping only the AnyCPU platform. Clears things up, but it doesn't matter. Commented Mar 27, 2016 at 8:50

1 Answer 1

3

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>
Sign up to request clarification or add additional context in comments.

2 Comments

oh yes it works! Thanks for that! By the way, do you know why I cannot set it through GUI?
if you add more than 1 projects and when you attempt to add an platform to the build configuration of a single project, you will be able to add it to the first project, however when you attempt to add it other projects, you can get this error message, To prevent this issue, you can add a platform to a single project, add it to the entire solution by using the <New...> option in the Active solution platform dropdown of Configuration Manager.