Skip to content

[Breaking change]: Unify --arch behavior with --runtime in the dotnet CLI #37058

Closed

Description

@baronfel

Description

In dotnet/sdk#34026 we discovered that the --arch option was still forcing SelfContained to true despite the change we made in https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/runtimespecific-app-default to break that relationship. In RC2 we've corrected this, but we need to document this behavior change because it's different from what folks have been using with --arch for the majority of the .NET 8 cycle.

Version

.NET 8 RC 2

Previous behavior

--arch implied --self-contained.

New behavior

--arch doesn't imply anything about --self-contained.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
  • Behavioral change: Existing binaries may behave differently at run time.

Reason for change

Behavior unification with https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/runtimespecific-app-default, since --arch is an alias for --runtime.

Recommended action

If your application needs to be self contained, set --self-contained on your CLI calls, or set MSBuild properties in the vein of <SelfContained>true</SelfContained> or <PublishSelfContained>true</PublishSelfContained>.

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 166833

Activity

  1. added
    breaking-change
    on Sep 12, 2023
  2. changed the title [-][Breaking change]: [/-] [+][Breaking change]: Unify --arch behabior with --runtime in the dotnet CLI[/+] on Sep 12, 2023
  3. changed the title [-][Breaking change]: Unify --arch behabior with --runtime in the dotnet CLI[/-] [+][Breaking change]: Unify --arch behavior with --runtime in the dotnet CLI[/+] on Sep 12, 2023
  4. added
    🗺️ reQUEST
    on Oct 2, 2023
  5. added
    📌 seQUESTered
    and removed
    🗺️ reQUEST
    on Oct 3, 2023
  6. moved this from 🔖 Ready to 🏗 In progress in dotnet/docs October 2023 sprinton Oct 5, 2023
  7. ghost added
    in-pr
    on Oct 5, 2023
  8. moved this from 🏗 In progress to 👀 In review in dotnet/docs October 2023 sprinton Oct 5, 2023
  9. ghost removed
    in-pr
    on Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredbreaking-change

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions