Handle conflicts between a ref-only Microsoft.AspNetCore.App and individual packages #3609
Labels
area-infrastructure
Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Milestone
Problem
Follow-up to #3608. By making Microsoft.AspNetCore.App a ref-only package, we introduce the possibility of conflicts with other packages, like Microsoft.Extensions.Logging. Both packages would contain assemblies with the same name and version. The .NET Core SDK may not automatically be able to resolve these conflicts, so we need to provide additional information to the conflict resolver on how to handle this scenario.
Proposed solution
Re-use the mechanism that Microsoft.NETCore.App introduced in 2.0 when moving from granular System.* packages to a ref-only package.
dotnet publish
conflict resolution)PackageConflictOverrides
MSBuild metadata for the conflict resolution taskRequirements
netcoreapp3.0
and Microsoft.AspNetCore.App should be able to reference the packages and projects which use Microsoft.Extensions.Logging < 3.0.0.netcoreapp3.0
and Microsoft.AspNetCore.App should build without errors when Microsoft.Extensions.Logging 3.0.0 is referenced (even though its inclusion should be unnecessary)netcoreapp3.0
project, they should not end up in publish output for framework dependent apps.netcoreapp3.0
project, they should not replace the version in publish output which will come from the runtime-specific version of Microsoft.AspNetCore.App (see Produce platform-specific packages for Microsoft.AspNetCore.App #3607)The text was updated successfully, but these errors were encountered: