-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace PackageReference to Microsoft.AspNetCore.App with FrameworkReference #3612
Comments
There are a lot of work items related to this captured in the following issues (and the issues linked from them): We're using ZenHub, which you might need to install to see all of the linked issues. |
If |
@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. |
Hm but does that mean it no longer uses what is shipped with the app but rather what is installed on the machine and we're moving away from running multiple versions in parallel? |
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? |
Correct. Moving forward, you can simply think of ASP.NET Core as being part of .NET Core. |
Then why not move ASP.NET Core into .NET Core through |
Then you can have something like... Microsoft.NET.Coreplatform and shared APIs common to all Microsoft.NET.WebSever-Client APIs, P2P, Hosting, RPC.. Microsoft.NET.IoTGPIO APIs, std. IoT sensor APIs, device communication protocols, etc.. Microsoft.NET.MLthe current ML.NET and the like Microsoft.NET.UIUniversal UI elements, XAML, and various shared UI support Vendor.NET.UI.FormForm -> TV, Mobile, WorkSpace, Tablet, Wearable, etc... Vendor.NET.UI.MobileXamarin, UWP, Tizen, Mobile specific controls and platform support Vendor.NET.UI.DesktopWPF, 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. |
@davidfowl That's the whole reason for .NET Core, right? So that you wouldn't have to stop innovating... in this case convergence...! |
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... System.Learning (ML.NET) |
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. |
Anyway I started this discussion on .NET home repo. We'll continue from there... We're going off-topic on this thread. |
Great change |
Changes: * Add packages references for EF Core, when necessary * Add packages references for SpaServices to Spa templates * Remove PackageReference to Microsoft.AspNetCore.App altogether See dotnet/aspnetcore#3612 for more context
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.
Unlike PackageReference, a FrameworkReference item:
Version
attributeTargetFramework
.Open questions:
FrameworkReference
preserved when putting a class library in a NuGet package?FrameworkReference
items transitive acrossProjectReference
?Requirements
The text was updated successfully, but these errors were encountered: