Skip to content

[Breaking change]: Source Link is included in the .NET SDK #37674

@baronfel

Description

@baronfel

Description

The Source Link build tooling is included in the .NET SDK as of .NET SDK 8.0.100-preview.4, which enables packages and applications to embed information about the source control information of the built artifacts. As a side effect, by default commit information will be included in the InformationalVersion of build libraries and applications.

Version

.NET 8 Preview 6

Previous behavior

Prior to this change, the default InformationalVersion of a library or application would be the Version property.

New behavior

After this change, the default InformationalVersion of a library or application would be the Version property as well as the SourceRevisionId property.

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

Source Link enables very rich editor tooling, like go-to-definition support for non-local source files. We think this benefit is worth including by default for all artifacts.

Recommended action

If your build process or code is not expecting Source Revision information in the InformationalVersion, you can disable this behavior by setting the IncludeSourceRevisionInInformationalVersion property to false.

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 177280

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 changesource incompatibleSource code may encounter a breaking change in behavior when targeting the new version.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions