MSBuild.SDK.SystemWeb.Templates

Provides templates for projects that target System.Web using the MSBuild.SDK.SystemWeb SDK.


Keywords
MSBuild, MSBuildSdk, System.Web, Templates, aspnet, aspnet4, c-sharp, dotnet, dotnetframework, msbuild-sdk, sdk, visual-basic
License
MIT
Install
Install-Package MSBuild.SDK.SystemWeb.Templates -Version 4.0.82

Documentation

MSBuild.SDK.SystemWeb

Build Status Docs

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

MSBuild.SDK.SystemWeb

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.

MSBuild.SDK.SystemWeb.Templates

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.

MSBuild.SDK.SystemWeb.RazorLibrary

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

Documentation

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.82">
  ...

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.82"
  }
}

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>