Skip to content

[Breaking change]: project.json is no longer supported in dotnet.exe restore #47968

@nkolev92

Description

@nkolev92

Description

Starting with .NET 10, dotnet.exe restore will no longer support project.json based projects.

https://learn.microsoft.com/en-us/nuget/archive/project-json#migrate-projectjson-to-packagereference Project.json has been marked as deprecated since 2017.

Version

.NET 10 Preview 7

Previous behavior

project.json based projects will be restored

New behavior

project.json based projects will be ignored.

Type of breaking change

  • Binary incompatible: Existing binaries might 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 might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

project.json was originally available in previews only, Preview 2 of .NET COre 1) and in 2017 was completely replaced by PackageReference.

Originally those projects were migrated via the dotnet migrate command, but even that command was removed from the CLI in .NET Core 3.0 SDK. https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-migrate

The removal of project.json just completes the loop.

This will allow us to continue focusing on delivering better experience for PackageReference based projects.

Recommended action

Migrate the project.json projects to PackageReference.

If you have .NET Core based project.json projects, use https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-migrate.

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 481106

Metadata

Metadata

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking change

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions