Skip to content

Commit b8beea4

Browse files
authored
Add breaking change documentation for project.json removal from dotnet restore (#47986)
1 parent 19f90a8 commit b8beea4

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

docs/core/compatibility/10.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
107107
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
108108
| [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 |
109109
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
110+
| [project.json not supported in `dotnet restore`](sdk/10.0/dotnet-restore-project-json-unsupported.md) | Source incompatible | Preview 7 |
110111
| [SHA-1 fingerprint support deprecated in `dotnet nuget sign`](sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md) | Behavioral change | Preview 1 |
111112
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
112113
| [MSBuild custom culture resource handling](sdk/10.0/msbuild-custom-culture.md) | Behavioral change | Preview 1 |
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: "Breaking change - project.json is no longer supported in dotnet restore"
3+
description: "Learn about the breaking change in .NET 10 where dotnet restore no longer supports project.json based projects."
4+
ms.date: 08/16/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/47968
7+
---
8+
9+
# project.json no longer supported in dotnet restore
10+
11+
Starting with .NET 10, the [`dotnet restore` command](../../../tools/dotnet-restore.md) no longer supports `project.json` based projects. Such projects are ignored during the restore operation.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 7
16+
17+
## Previous behavior
18+
19+
The `dotnet restore` command restored dependencies for `project.json` based projects.
20+
21+
## New behavior
22+
23+
The `dotnet restore` command ignores `project.json` based projects and no longer restores their dependencies.
24+
25+
## Type of breaking change
26+
27+
This change can affect [source compatibility](../../categories.md#source-compatibility).
28+
29+
## Reason for change
30+
31+
The `project.json` format was originally available only in .NET Core previews (through Preview 2 of .NET Core 1.0) and was completely replaced by PackageReference in 2017. The format has been marked as deprecated since 2017.
32+
33+
When the `project.json` format was replaced, users migrated these projects using the [`dotnet migrate`](../../../tools/dotnet-migrate.md) command, but that command was removed from the CLI in the .NET Core 3.0 SDK.
34+
35+
The removal of `project.json` support completes this transition and allows the .NET team to focus on delivering a better experience for PackageReference-based projects.
36+
37+
## Recommended action
38+
39+
Migrate your `project.json` projects to use PackageReference format instead.
40+
41+
If you have .NET Core based `project.json` projects, you can use older versions of the .NET SDK that still include the [`dotnet migrate` command](../../../tools/dotnet-migrate.md) to convert them to the modern project format.
42+
43+
For more information about migrating from `project.json`, see [Migrating from project.json to .csproj](/nuget/archive/project-json#migrate-projectjson-to-packagereference).
44+
45+
## Affected APIs
46+
47+
None.

docs/core/compatibility/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ items:
114114
href: sdk/10.0/dotnet-tool-pack-publish.md
115115
- name: "`dotnet restore` audits transitive packages"
116116
href: sdk/10.0/nugetaudit-transitive-packages.md
117+
- name: project.json not supported in `dotnet restore`
118+
href: sdk/10.0/dotnet-restore-project-json-unsupported.md
117119
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
118120
href: sdk/10.0/default-workload-config.md
119121
- name: "`dotnet package list` performs restore"

0 commit comments

Comments
 (0)