Skip to content

Commit 7c3ec33

Browse files
authored
SDK breaking changes (#37982)
1 parent 1719380 commit 7c3ec33

File tree

4 files changed

+77
-3
lines changed

4 files changed

+77
-3
lines changed

docs/core/compatibility/8.0.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Breaking changes in .NET 8
33
titleSuffix: ""
44
description: Navigate to the breaking changes in .NET 8.
5-
ms.date: 10/05/2023
5+
ms.date: 11/08/2023
66
no-loc: [Blazor, Razor, Kestrel]
77
---
88
# Breaking changes in .NET 8
@@ -135,7 +135,9 @@ If you're migrating an app to .NET 8, the breaking changes listed here might aff
135135
| [--arch option doesn't imply self-contained](sdk/8.0/arch-option.md) | Behavioral change |
136136
| ['dotnet restore' produces security vulnerability warnings](sdk/8.0/dotnet-restore-audit.md) | Behavioral change |
137137
| [SDK uses a smaller RID graph](sdk/8.0/rid-graph.md) | Behavioral change/Source incompatible |
138+
| [Source Link included in the .NET SDK](sdk/8.0/source-link.md) | Source incompatible |
138139
| [Trimming may not be used with .NET Standard or .NET Framework](sdk/8.0/trimming-unsupported-targetframework.md) | Behavioral change |
140+
| [Unlisted packages not installed by default for .NET tools](sdk/8.0/unlisted-versions.md) | Behavioral change |
139141
| [Version requirements for .NET 8 SDK](sdk/8.0/version-requirements.md) | Source incompatible |
140142

141143
## Serialization
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "Breaking change: Source Link included in the .NET SDK"
3+
description: Learn about a breaking change in the .NET 8 SDK where Source Link is included, and commit information is included in InformationalVersion.
4+
ms.date: 11/08/2023
5+
---
6+
# Source Link included in the .NET SDK
7+
8+
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.
9+
10+
## Previous behavior
11+
12+
Prior to this change, the default `InformationalVersion` of a library or application was the `Version` property.
13+
14+
## New behavior
15+
16+
Starting in .NET 8, the default `InformationalVersion` of a library or application is the `Version` property *and* the `SourceRevisionId` property.
17+
18+
## Version introduced
19+
20+
.NET 8 Preview 4
21+
22+
## Type of breaking change
23+
24+
This change can affect [source compatibility](../../categories.md#source-compatibility).
25+
26+
## Reason for change
27+
28+
Source Link enables rich editor tooling, like go-to-definition support for non-local source files. This benefit is worth including by default for all artifacts.
29+
30+
## Recommended action
31+
32+
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.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "Breaking change: Unlisted packages not installed by default for .NET tools"
3+
description: Learn about a breaking change in the .NET 8 SDK where `dotnet tool install` no longer installs tools from unlisted versions of NuGet packages.
4+
ms.date: 11/07/2023
5+
---
6+
# Unlisted packages not installed by default for .NET tools
7+
8+
The [dotnet tool install](../../../tools/dotnet-tool-install.md) commands no longer install tools from [unlisted versions](/nuget/nuget-org/policies/deleting-packages#unlisting-a-package) of NuGet packages by default. You can still force the install by specifying the unlisted version as an exact version surrounded with brackets, for example `--version [5.0.0]`.
9+
10+
## Previous behavior
11+
12+
Previously, when you installed a .NET tool, the .NET SDK installed tools (and versions of tools) without considering whether the tool package was unlisted.
13+
14+
## New behavior
15+
16+
Starting in .NET 8, unlisted tool versions aren't installed unless you specify the exact version using the `--version` option and brackets around the version number. For example, `--version [5.0.0]`.
17+
18+
## Version introduced
19+
20+
.NET 8 GA
21+
22+
## Type of breaking change
23+
24+
This change is a [behavioral change](../../categories.md#behavioral-change).
25+
26+
## Reason for change
27+
28+
The correct default behavior is to ignore [unlisted packages](/nuget/nuget-org/policies/deleting-packages#unlisting-a-package) when installing tools. Unlisted versions are purposefully hidden from search on NuGet.org.
29+
30+
## Recommended action
31+
32+
To install an unlisted tool, specify the exact version of the tool surrounded with brackets, for example `--version [5.0.0]`.

docs/core/compatibility/toc.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,12 @@ items:
156156
href: sdk/8.0/arch-option.md
157157
- name: SDK uses a smaller RID graph
158158
href: sdk/8.0/rid-graph.md
159-
- name: Trimming may not be used with .NET Standard or .NET Framework
159+
- name: Source Link included in the .NET SDK
160+
href: sdk/8.0/source-link.md
161+
- name: Trimming can't be used with .NET Standard or .NET Framework
160162
href: sdk/8.0/trimming-unsupported-targetframework.md
163+
- name: Unlisted packages not installed by default
164+
href: sdk/8.0/unlisted-versions.md
161165
- name: Version requirements for .NET 8 SDK
162166
href: sdk/8.0/version-requirements.md
163167
- name: Serialization
@@ -1532,8 +1536,12 @@ items:
15321536
href: sdk/8.0/arch-option.md
15331537
- name: SDK uses a smaller RID graph
15341538
href: sdk/8.0/rid-graph.md
1535-
- name: Trimming may not be usedwith .NET Standard or .NET Framework
1539+
- name: Source Link included in the .NET SDK
1540+
href: sdk/8.0/source-link.md
1541+
- name: Trimming can't be used with .NET Standard or .NET Framework
15361542
href: sdk/8.0/trimming-unsupported-targetframework.md
1543+
- name: Unlisted packages not installed by default
1544+
href: sdk/8.0/unlisted-versions.md
15371545
- name: Version requirements for .NET 8 SDK
15381546
href: sdk/8.0/version-requirements.md
15391547
- name: .NET 7

0 commit comments

Comments
 (0)