Skip to content

[Breaking change]: StripSymbols=true is now the default option for PublishAot #35108

Description

@MichalStrehovsky

Description

dotnet/runtime#85139

When .NET 7 introduced Native AOT deployment, we exposed a StripSymbols property that optionally allows to strip debugging symbols from the produced executable on Linux into a separate file. The default value of the property was false.

In .NET 8 we're changing it to true.

Version

.NET 8 (other)

Previous behavior

Debugging symbols on Linux with PublishAot were placed into the produced executable by default with an opt-in to place them into a .dbg file.

New behavior

Debugging symbols on Linux with PublishAot are placed into a .dbg file with an opt-out to place them into the executable.

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

Based on feedback, we established the .NET users prefer the .NET symbols convention instead of the platform-native convention. The option was not discoverable enough.

Recommended action

  • If you rely on debugging symbols being present in the main executable, add <StripSymbols>false</StripSymbols> to your project file to restore the previous behavior.
  • If you choose to use the new default, verify the debugging symbols in .dbg files are properly archived if you expect you'll need to debug the generated executables.

Feature area

Deployment

Affected APIs

No response


Associated WorkItem - 91240

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🏁 Release: .NET 8Work items for the .NET 8 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking change

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions