Home >Backend Development >C++ >What NuGet Packages Are Needed for ASP.NET Core 6 App Parts Projects?

What NuGet Packages Are Needed for ASP.NET Core 6 App Parts Projects?

Barbara Streisand
Barbara StreisandOriginal
2024-12-27 19:26:11338browse

What NuGet Packages Are Needed for ASP.NET Core 6 App Parts Projects?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn