-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedarea-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.This issue / pr will introduce a breaking change, when resolved / merged.
Milestone
Description
Problem
Most NuGet packages provide both compilation and runtime assets. Microsoft.NETCore.App and Microsoft.AspNetCore.App effectively only provide the first - compilation references. Users must install other runtime assets to make .NET Core apps work but this is not obvious or intuitive, and not always possible: for example, Azure Web Apps, AWS, Google Cloud, etc. This violates a reasonable expectation of using a NuGet package, and has been a continual source of confusion for users.
See #3307 for more context.
Proposed solution
Change the item type used to reference the shared framework in a .csproj file.
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
Unlike PackageReference, a FrameworkReference item:
- May not actually be a NuGet package. (It might be -- but that's an implementation detail hidden from users.)
- There is no
Version
attribute - The version of the FrameworkReference is controlled by
TargetFramework
.
Open questions:
- How does a user specify the runtime patch version? TFMs only include major.minor
- How is
FrameworkReference
preserved when putting a class library in a NuGet package? - Are
FrameworkReference
items transitive acrossProjectReference
?
Requirements
- Make Microsoft.AspNetCore.App a ref only package (tracked with Make Microsoft.AspNetCore.App a ref-assembly only package #3608)
- Update ASP.NET Core project templates to use FrameworkReference items
- Work with the SDK and tooling team to support this new item type (initial work already done in Support FrameworkReference items sdk#2486)
dotnetchris
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedarea-infrastructureIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkIncludes: MSBuild projects/targets, build scripts, CI, Installers and shared frameworkbreaking-changeThis issue / pr will introduce a breaking change, when resolved / merged.This issue / pr will introduce a breaking change, when resolved / merged.