Skip to content

[Breaking change]: Template engine packages no longer support netstandard2.0 #54204

@MichaelSimons

Description

@MichaelSimons

Description

The .NET SDK template engine NuGet packages no longer target netstandard2.0. The affected packages are:

  • Microsoft.TemplateEngine.Abstractions
  • Microsoft.TemplateEngine.Core
  • Microsoft.TemplateEngine.Core.Contracts
  • Microsoft.TemplateEngine.Edge
  • Microsoft.TemplateEngine.Orchestrator.RunnableProjects
  • Microsoft.TemplateEngine.Utils
  • Microsoft.TemplateEngine.IDE
  • Microsoft.TemplateLocalizer.Core

PR: dotnet/sdk#54041

Version

.NET 11 Preview 4

Previous behavior

These packages included a netstandard2.0 target, allowing them to be consumed by projects targeting .NET Standard 2.0 (including .NET Framework 4.6.1+ and .NET Core 2.0+).

New behavior

These packages now only target net9.0, net11.0, and net472. Projects that previously consumed these packages via the netstandard2.0 target and do not target one of the remaining frameworks will no longer be able to use them.

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

NuGet dropped netstandard support starting with version 7.0. Microsoft.TemplateEngine.Edge depends on NuGet packages (NuGet.Configuration, NuGet.Credentials, NuGet.Protocol), which made it increasingly difficult to maintain netstandard2.0 compatibility — the project had to pin these packages to older versions and disable CentralPackageTransitivePinningEnabled to prevent transitive dependency conflicts.

Recommended action

Update consuming projects to target net9.0 or later, or net472 (or later .NET Framework). If you were relying on the netstandard2.0 target to consume these packages from a .NET Standard class library, retarget that library to one of the supported frameworks.

Feature area

SDK

Affected APIs

All public APIs in the listed packages remain the same; only the supported target frameworks have changed.

Metadata

Metadata

Assignees

Labels

🗺️ mapQUESTOnly used as a way to mark an issue as updated for quest. RepoMan should instantly remove it.breaking-changeIndicates a .NET Core breaking change

Type

No type
No fields configured for issues without a type.

Projects

Status
🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions