Can't Change Project to x86 in Configuration Manager
Asked Answered
B

2

6

I have a solution with over 170 projects in it. I recently needed to add two more projects to this solution. For reasons that are not relevant to this question, the solution is built as at x86.

When I open Configuration Manager, and scroll to my new projects, they say "Any CPU". To change that I select <New...>:

Selecting New

It brings up a dialog to make the new entry. I fill it out like this:

New Profile

When I select OK, it flashes for a second, then goes back to "Any CPU":

Still Any CPU

I also tried selecting <Edit...> and I get this:

Edit has no options

The Remove button is locked out and I don't have any other options.

How can I get an x86 option setup for my new projects?

Brann answered 4/3, 2022 at 3:49 Comment(0)
D
4

I faced a similar problem when I converted C# projects into C# SDK style projects. I found that after conversion, the project type GUID in the solution file did not change from Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = ... to Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = ....

Solution of this problem in my case was to delete this project from VS solution and add it again. You can also manually edit solution file (.sln) and change wrong project-type-GUID.

In your case, try to check the project type GUID in the solution file and change GUID manually. The list of project type GUIDs can be viewed here.

Delila answered 11/3, 2022 at 13:46 Comment(1)
This was part but not the whole solution for me. With the C# SDK project format the default platform is 'AnyCPU'. I had to add '<Platforms>x86;x64</Platforms>' for the additional platforms for this project to show up.Armenta
T
0

I had the same issue, but the other answer/comment didn't work for me.

I fixed the issue by adding <PlatformTarget>x64</PlatformTarget> and <Platforms>x64</Platforms> to the csproj file inside the <PropertyGroup> element. Then visual studio prompted me to reload the project and the issue was solve. Configuration manager used the intented configuration

i.e :

<PropertyGroup>
  
    <PlatformTarget>x64</PlatformTarget>
    <Platforms>x64</Platforms>
</PropertyGroup>
Thorrlow answered 16/10, 2024 at 15:2 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.