What Nuget Packages are Required for ASP.NET Core 6 Application Parts Projects?
When creating an ASP.NET Core 6 application with separate assemblies for app parts, it's necessary to reference certain NuGet packages to ensure correct functionality.
Question: What Nuget packages are required for the project providing the app parts?
Answer:
When using the Microsoft.NET.Sdk SDK, add the following to the library project's .csproj file:
<ItemGroup> <FrameworkReference Include="Microsoft.AspNetCore.App" /> </ItemGroup>
Follow-up Update:
To define the required entry point and allow referencing the ASP.NET Core 6 SDK, add an internal Program class with a Main method:
internal static class Program { public static void Main() => throw new NotImplementedException(); }
The above is the detailed content of What NuGet Packages Are Needed for ASP.NET Core 6 App Parts Projects?. For more information, please follow other related articles on the PHP Chinese website!