Skip to content

When using new-style csproj with .NET Framework, the default TargetPlatform is x86 rather than AnyCPU #3492

Open
@davidmatson

Description

@davidmatson

Visual Studio Version:
2019 (16.2.0)

Summary:
When using the new-style (CPS?) csproj but targeting .NET Framework, the default TargetPlatform is differe than either .NET Core or old-style .NET Framework csprojs (x86 rather than AnyCPU).

Steps to Reproduce:

  1. File -> New -> Project -> .NET Core exe

  2. Unload the csproj and replace the target framework line with: <TargetFramework>net472</TargetFramework>

  3. Releoad the project and check its properties

Expected Behavior:
Target platform in AnyCPU.

Actual Behavior:
Target platform is x86.

User Impact:
Confusing behavior when restoring NuGet packages, and inconsistency with all other C# project variants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions