Skip to content

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.

License

Notifications You must be signed in to change notification settings

CZEMacLeod/MSBuild.SDK.SystemWeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2b83a72 · Mar 12, 2025
Aug 3, 2022
Aug 11, 2024
Mar 7, 2023
Sep 8, 2022
Mar 12, 2025
Nov 18, 2021
Feb 26, 2021
Aug 11, 2024
Mar 7, 2023
Feb 26, 2021
Aug 11, 2024
Mar 7, 2023
Feb 26, 2021
Mar 12, 2025
Mar 12, 2025
Apr 15, 2021

Repository files navigation

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>