Back to Aspnetcore

ASP.NET Core Web SDK

aspnetcore/razor-pages/web-sdk.md

latest2.2 KB
Original Source

ASP.NET Core Web SDK

:::moniker range=">= aspnetcore-3.0"

Overview

Microsoft.NET.Sdk.Web is an MSBuild project SDK for building ASP.NET Core apps. It's possible to build an ASP.NET Core app without this SDK, however, the Web SDK is:

  • Tailored towards providing a first-class experience.
  • The recommended target for most users.

Use the Web.SDK in a project:

xml
<Project Sdk="Microsoft.NET.Sdk.Web">
  <!-- omitted for brevity -->
</Project>

Features enabled by using the Web SDK:

  • Implicitly references:

  • The Web SDK imports MSBuild targets that enable the use of publish profiles and publishing using WebDeploy.

Properties

PropertyDescription
DisableImplicitFrameworkReferencesDisables implicit reference to the Microsoft.AspNetCore.App shared framework.
DisableImplicitAspNetCoreAnalyzersDisables implicit reference to ASP.NET Core analyzers.
DisableImplicitComponentsAnalyzersDisables implicit reference to Razor Components analyzers when building Blazor (server) applications.

For more information on tasks, targets, properties, implicit blobs, globs, publishing, methods, and more, see the README file in the WebSdk repository.

:::moniker-end :::moniker range="< aspnetcore-3.0"

Overview

Microsoft.NET.Sdk.Web is an MSBuild project SDK for building ASP.NET Core apps. It's possible to build an ASP.NET Core app without this SDK, however, the Web SDK is:

  • Tailored towards providing a first-class experience.
  • The recommended target for most users.

Use the Web.SDK in a project:

xml
<Project Sdk="Microsoft.NET.Sdk.Web">
  <!-- omitted for brevity -->
</Project>

The Web SDK imports MSBuild targets that enable the use of publish profiles and publishing using WebDeploy.

:::moniker-end