Project-system: Can't remove Any CPU from Project Platforms list

Created on 28 Aug 2017  路  4Comments  路  Source: dotnet/project-system

I'm using VS 2017 15.3.2.

With this csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net47</TargetFramework>
  </PropertyGroup>
</Project>

If I add an x64 or x86 configuration (Build, Configuration Manager...), that works fine and edits the proj like this:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net47</TargetFramework>
    <Platforms>AnyCPU;x86;x64</Platforms>
  </PropertyGroup>
</Project>

I can remove either the x64 or x86 configuration from the project, but not the Any CPU one. If I try to do so, I get the following error:

---------------------------
Microsoft Visual Studio
---------------------------
The operation could not be completed. The parameter is incorrect. 
---------------------------
OK   
---------------------------

image

Bug Feature-Configurations Resolution-Fixed Triage-Approved

All 4 comments

Is there a timeline for the fix or a workaround?

As a workaround you can remove it by editing the csproj file by hand.

This no longer shows an error dialog, but it also doesn't work as expected. It is removed from the UI, but not the project file. Re-open the UI and the platform is back in the dropdown list.

Was this page helpful?
0 / 5 - 0 ratings