Skip to content

Commit

Permalink
Expand on source link breaking change (#38777)
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren authored Dec 14, 2023
1 parent 6315599 commit 9ab88a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
13 changes: 13 additions & 0 deletions docs/core/compatibility/sdk/8.0/source-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ms.date: 11/08/2023

The [Source Link](https://github.com/dotnet/sourcelink) build tooling is now included in the .NET SDK. Source Link enables packages and applications to embed information about the source control information of the built artifacts. As a side effect, commit information is included in the `InformationalVersion` value of built libraries and applications.

> [!NOTE]
> This change affects any project that's built with the .NET 8 SDK, even those that target .NET 7 or an earlier version.
## Previous behavior

Prior to this change, the default `InformationalVersion` of a library or application was the `Version` property.
Expand All @@ -30,3 +33,13 @@ Source Link enables rich editor tooling, like go-to-definition support for non-l
## Recommended action

If your build process or code doesn't expect Source Revision information in `InformationalVersion`, you can disable the new behavior by setting the `IncludeSourceRevisionInInformationalVersion` property to `false` in your project file.

```xml
<PropertyGroup>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
```

## See also

- <xref:System.Reflection.AssemblyInformationalVersionAttribute>
7 changes: 5 additions & 2 deletions docs/core/whats-new/dotnet-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -783,13 +783,13 @@ public class SecondModelNoNamespace
}

[OptionsValidator]
public partial class FirstValidatorNoNamespace
public partial class FirstValidatorNoNamespace
: IValidateOptions<FirstModelNoNamespace>
{
}

[OptionsValidator]
public partial class SecondValidatorNoNamespace
public partial class SecondValidatorNoNamespace
: IValidateOptions<SecondModelNoNamespace>
{
}
Expand Down Expand Up @@ -1265,6 +1265,9 @@ The [template engine](https://github.com/dotnet/templating) provides a more secu

[Source Link](../../standard/library-guidance/sourcelink.md) is now included in the .NET SDK. The goal is that by bundling Source Link into the SDK, instead of requiring a separate `<PackageReference>` for the package, more packages will include this information by default. That information will improve the IDE experience for developers.

> [!NOTE]
> As a side effect of this change, commit information is included in the `InformationalVersion` value of built libraries and applications, even those that target .NET 7 or an earlier version. For more information, see [Source Link included in the .NET SDK](../compatibility/sdk/8.0/source-link.md).
### Source-build SDK

The Linux distribution-built (source-build) SDK now has the capability to build self-contained applications using the source-build runtime packages. The distribution-specific runtime package is bundled with the source-build SDK. During self-contained deployment, this bundled runtime package will be referenced, thereby enabling the feature for users.
Expand Down

0 comments on commit 9ab88a0

Please sign in to comment.