Description
The ProviderAliasAttribute was originally defined in the Microsoft.Extensions.Logging library. In .NET 10, it has been moved to the Microsoft.Extensions.Logging.Abstractions library. To minimize potential breaking changes, the type is type-forwarded from Microsoft.Extensions.Logging, allowing existing code to continue working without modification.
Version
.NET 10 Preview 4
Previous behavior
ProviderAliasAttribute was originally defined in the Microsoft.Extensions.Logging library.
New behavior
ProviderAliasAttribute has been moved to Microsoft.Extensions.Logging.Abstractions and is type-forwarded from Microsoft.Extensions.Logging to maintain compatibility.
Type of breaking change
Reason for change
This change allows users who depend on Microsoft.Extensions.Logging.Abstractions and use ProviderAliasAttribute to avoid taking a dependency on Microsoft.Extensions.Logging.
Recommended action
This change should not be breaking in most common scenarios. The only potential breaking case occurs when a project references an older version of Microsoft.Extensions.Logging alongside the .NET 10 version of Microsoft.Extensions.Logging.Abstractions. In that situation, a compilation error may occur due to ProviderAliasAttribute being defined in both assemblies. To resolve this, users should upgrade to the .NET 10 version of Microsoft.Extensions.Logging.
Feature area
Extensions
Affected APIs
ProviderAliasAttribute
Associated WorkItem - 434157
Description
The ProviderAliasAttribute was originally defined in the Microsoft.Extensions.Logging library. In .NET 10, it has been moved to the Microsoft.Extensions.Logging.Abstractions library. To minimize potential breaking changes, the type is type-forwarded from Microsoft.Extensions.Logging, allowing existing code to continue working without modification.
ProviderAliasAttribute: Better move toMicrosoft.Extensions.Logging.Abstractionsruntime#114532ProviderAliasAttributemoved toMicrosoft.Extensions.Logging.Abstractionssolution. runtime#114606Version
.NET 10 Preview 4
Previous behavior
ProviderAliasAttributewas originally defined in theMicrosoft.Extensions.Logginglibrary.New behavior
ProviderAliasAttributehas been moved toMicrosoft.Extensions.Logging.Abstractionsand is type-forwarded fromMicrosoft.Extensions.Loggingto maintain compatibility.Type of breaking change
Reason for change
This change allows users who depend on
Microsoft.Extensions.Logging.Abstractionsand useProviderAliasAttributeto avoid taking a dependency onMicrosoft.Extensions.Logging.Recommended action
This change should not be breaking in most common scenarios. The only potential breaking case occurs when a project references an older version of
Microsoft.Extensions.Loggingalongside the .NET 10 version ofMicrosoft.Extensions.Logging.Abstractions. In that situation, a compilation error may occur due toProviderAliasAttributebeing defined in both assemblies. To resolve this, users should upgrade to the .NET 10 version ofMicrosoft.Extensions.Logging.Feature area
Extensions
Affected APIs
ProviderAliasAttribute
Associated WorkItem - 434157