Događaj
Power BI DataViz Svetsko prvenstvo
14. feb 16 - 31. mar 16
Sa 4 šanse za ulazak, možete osvojiti konferencijski paket i stići do LIVE Grand Finale u Las Vegasu
Saznajte višeOvaj pregledač više nije podržan.
Nadogradite na Microsoft Edge biste iskoristili najnovije funkcije, bezbednosne ispravke i tehničku podršku.
Napomena
This isn't the latest version of this article. For the current release, see the .NET 9 version of this article.
Upozorenje
This version of ASP.NET Core is no longer supported. For more information, see the .NET and .NET Core Support Policy. For the current release, see the .NET 9 version of this article.
Važno
This information relates to a pre-release product that may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
For the current release, see the .NET 9 version of this article.
Napomena
The Microsoft.AspNetCore.All
metapackage isn't used in ASP.NET Core 3.0 and later. For more information, see this GitHub issue.
Napomena
We recommend applications targeting ASP.NET Core 2.1 and later use the Microsoft.AspNetCore.App metapackage rather than this package. See Migrating from Microsoft.AspNetCore.All to Microsoft.AspNetCore.App in this article.
This feature requires ASP.NET Core 2.x targeting .NET Core 2.x.
Microsoft.AspNetCore.All is a metapackage that refers to a shared framework. A shared framework is a set of assemblies (.dll files) that are not in the app's folders. The shared framework must be installed on the machine to run the app. For more information, see The shared framework.
The shared framework that Microsoft.AspNetCore.All
refers to includes:
All the features of ASP.NET Core 2.x and Entity Framework Core 2.x are included in the Microsoft.AspNetCore.All
package. The default project templates targeting ASP.NET Core 2.0 use this package.
The version number of the Microsoft.AspNetCore.All
metapackage represents the minimum ASP.NET Core version and Entity Framework Core version.
The following .csproj
file references the Microsoft.AspNetCore.All
metapackage for ASP.NET Core:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
</ItemGroup>
</Project>
In ASP.NET Core 2.1 or later, you can specify the Microsoft.AspNetCore.All
package reference without a version. When the version isn't specified, an implicit version is specified by the SDK (Microsoft.NET.Sdk.Web
). We recommend relying on the implicit version specified by the SDK and not explicitly setting the version number on the package reference. If you have questions about this approach, leave a GitHub comment at the Discussion for the Microsoft.AspNetCore.App implicit version.
The implicit version is set to major.minor.0
for portable apps. The shared framework roll-forward mechanism runs the app on the latest compatible version among the installed shared frameworks. To guarantee the same version is used in development, test, and production, ensure the same version of the shared framework is installed in all environments. For self-contained apps, the implicit version number is set to the major.minor.patch
of the shared framework bundled in the installed SDK.
Specifying a version number on the Microsoft.AspNetCore.All
package reference does not guarantee that version of the shared framework is chosen. For example, suppose version "2.1.1" is specified, but "2.1.3" is installed. In that case, the app will use "2.1.3". Although not recommended, you can disable roll forward (patch and/or minor). For more information regarding dotnet host roll-forward and how to configure its behavior, see dotnet host roll forward.
The project's SDK must be set to Microsoft.NET.Sdk.Web
in the project file to use the implicit version of Microsoft.AspNetCore.All
. When the Microsoft.NET.Sdk
SDK is specified (<Project Sdk="Microsoft.NET.Sdk">
at the top of the project file), the following warning is generated:
Warning NU1604: Project dependency Microsoft.AspNetCore.All does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
This is a known issue with the .NET Core 2.1 SDK and will be fixed in the .NET Core 2.2 SDK.
The following packages are included in Microsoft.AspNetCore.All
but not the Microsoft.AspNetCore.App
package.
Microsoft.AspNetCore.ApplicationInsights.HostingStartup
Microsoft.AspNetCore.AzureAppServices.HostingStartup
Microsoft.AspNetCore.AzureAppServicesIntegration
Microsoft.AspNetCore.DataProtection.AzureKeyVault
Microsoft.AspNetCore.DataProtection.AzureStorage
Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv
Microsoft.AspNetCore.SignalR.Redis
Microsoft.Data.Sqlite
Microsoft.Data.Sqlite.Core
Microsoft.EntityFrameworkCore.Sqlite
Microsoft.EntityFrameworkCore.Sqlite.Core
Microsoft.Extensions.Caching.Redis
Microsoft.Extensions.Configuration.AzureKeyVault
Microsoft.Extensions.Logging.AzureAppServices
Microsoft.VisualStudio.Web.BrowserLink
To move from Microsoft.AspNetCore.All
to Microsoft.AspNetCore.App
, if your app uses any APIs from the above packages, or packages brought in by those packages, add references to those packages in your project.
Any dependencies of the preceding packages that otherwise aren't dependencies of Microsoft.AspNetCore.App
are not included implicitly. For example:
StackExchange.Redis
as a dependency of Microsoft.Extensions.Caching.Redis
Microsoft.ApplicationInsights
as a dependency of Microsoft.AspNetCore.ApplicationInsights.HostingStartup
We recommend migrating to the Microsoft.AspNetCore.App
metapackage for 2.1 and later. To keep using the Microsoft.AspNetCore.All
metapackage and ensure the latest patch version is deployed:
Povratne informacije za ASP.NET Core
ASP.NET Core je projekat otvorenog koda. Izaberite vezu da biste pružili povratne informacije:
Događaj
Power BI DataViz Svetsko prvenstvo
14. feb 16 - 31. mar 16
Sa 4 šanse za ulazak, možete osvojiti konferencijski paket i stići do LIVE Grand Finale u Las Vegasu
Saznajte višeObuka
Modul
Modernize ASP.NET Framework to ASP.NET Core with the .NET Upgrade Assistant - Training
In this module, you'll learn to when, why, and how to modernize an ASP.NET Framework app to ASP.NET Core using the Upgrade Assistant.
Dokumentacija
Use ASP.NET Core APIs in a class library
Learn how to use ASP.NET Core APIs in a class library.
Migrate from ASP.NET Core 2.2 to 3.0
Learn how to migrate an ASP.NET Core 2.2 project to ASP.NET Core 3.0.
NETSDK1080: PackageReference to Microsoft.AspNetCore.App is not necessary - .NET CLI
Learn about .NET SDK error NETSDK1080, which warns about an unnecessary entry in your project file.
How to migrate away from Microsoft.AspNetCore.App