Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 3.78 KB

README.md

File metadata and controls

85 lines (57 loc) · 3.78 KB

MSBuild.SDK.SystemWeb

Build Status Docs pages-build-deployment

This MSBuild SDK is designed to allow for the easy creation and use of SDK (shortform) projects targeting ASP.NET 4.x using System.Web.

What's available

NuGet package NuGet downloads

This is the basic SDK that enables Visual Studio to work with an ASP.Net 4.x based project using a short form project file.

NuGet package NuGet downloads

This is a set of templates that allow for the easy creation of projects based on the MSBuild.SDK.SystemWeb project SDK type.

NuGet package NuGet downloads

This is an SDK that allows Visual Studio to work with an ASP.Net 4.x / MVC 5 based Razor Library. This makes it easy to use the RazorGenerator system with an SDK type project.

Read The Docs

How can I use these SDKs?

When using an MSBuild Project SDK obtained via NuGet (such as the SDKs in this repo) a specific version must be specified.

Either append the version to the package name:

<Project Sdk="MSBuild.SDK.SystemWeb/4.0.88">
  ...

Or omit the version from the SDK attribute and specify it in the version in global.json, which can be useful to synchronise versions across multiple projects in a solution:

{
  "msbuild-sdks": {
    "MSBuild.SDK.SystemWeb" : "4.0.88"
  }
}

Since MSBuild 15.6, SDKs are downloaded as NuGet packages automatically. Earlier versions of MSBuild 15 required SDKs to be installed.

For more information, read the documentation.

What are MSBuild SDKS?

MSBuild 15.0 introduced new project XML for .NET Core that we refer to as SDK-style. These SDK-style projects looks like:

<Project Sdk="Microsoft.NET.SystemWeb">
  <PropertyGroup>
    <TargetFramework>net48</TargetFramework>
  </PropertyGroup>
</Project>

At evaluation time, MSBuild adds implicit imports at the top and bottom of the project like this:

<Project>
  <Import Project="Sdk.props" Sdk="Microsoft.NET.SystemWeb" />

  <PropertyGroup>
    <TargetFramework>net48</TargetFramework>
  </PropertyGroup>

  <Import Project="Sdk.targets" Sdk="Microsoft.NET.SystemWeb" />
</Project>