Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace PackageReference to Microsoft.AspNetCore.App with FrameworkReference #3612
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.
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:
@tomkerkhove It uses whatever shared framework is installed. If you have a .NET Core runtime, then that runtime will contain a matching shared framework for ASP.NET Core, so that’s the version that is being used. If you update your runtime later and get a new shared framework, then that is going to be the framework that is being used. Just like now, the shared framework version is implicitly defined by the runtime and will roll forward for runtime updates.
The forward rolling behavior already exists with 2.1 and only applies to patch level updates. Nothing will change in that regard. It’s just that the way this actually works will be polished. So instead of a version-less
No, this is not changing. You can still use multiple .NET core versions side by side.
The version of AspNetCore will be determined from the value of the TargetFramework property. netcoreapp3.0, netcoreapp3.1, netcoreapp4.0, etc.
The rollforward behavior is unaffected by this. This proposal is primarily about how the SDK works, not how the app behaves. See
I can imagine a case where someone would run AspNetCore 2.0 on .NET Core 2.1. That wouldn't be possible anymore, right?
Then you can have something like...
platform and shared APIs common to all
Sever-Client APIs, P2P, Hosting, RPC..
GPIO APIs, std. IoT sensor APIs, device communication protocols, etc..
the current ML.NET and the like
Universal UI elements, XAML, and various shared UI support
Form -> TV, Mobile, WorkSpace, Tablet, Wearable, etc...
Xamarin, UWP, Tizen, Mobile specific controls and platform support
WPF, WinForms, UWP, Desktop specific controls and platform support
… and so on...!
Ain't that would be a wonderful world of .NET!
@Nirmal4G that would be a massive breaking change for little benefit.
Core framework should provide fundamentals for each type of platform that the framework is supporting... this should increase platform & support discovery, and among other things... Many people still not yet aware of .NET being used in ML and IoT space...
We need more like these...
Not really, we haven't made that many significant breaking changes in ASP.NET Core. The biggest one was the authentication system between 1.0 and 2.0. We wouldn't change the namespace like this, it's just badness. It breaks all libraries and there's extremely little to gain from it.