Home >Backend Development >C++ >How to Reference ASP.NET Core 6 SDK in App Parts Projects?
NuGet Package References for ASP.NET Core 6 Application Parts Projects
In ASP.NET Core 6, the Microsoft.AspNetCore.App package is no longer used for referencing the ASP.NET Core SDK in app parts projects. Instead, a combination of the Microsoft.NET.Sdk SDK and a FrameworkReference item is required.
Adding Required References
To add the necessary package references to an ASP.NET Core 6 application parts project, follow these steps:
This will add the necessary references to the ASP.NET Core SDK and allow you to register app parts assemblies using extension methods as shown below:
Defining Entry Point
To satisfy the build requirement of defining an entry point, you can add an internal Program class to your project file:
With these changes, your app parts project will be able to successfully integrate additional areas into your ASP.NET Core 6 application.
The above is the detailed content of How to Reference ASP.NET Core 6 SDK in App Parts Projects?. For more information, please follow other related articles on the PHP Chinese website!