Skip to main content

dotnetsdk

Selects a .NET SDK

dotnetsdk ("SDK")

For more information see the MSDN documentation here

Parameters

SDK is one of:

SDKDescriptionNotes
DefaultUses the default .NET SDKDefault
WebUses the Web SDKWeb
RazorUses the Razor SDKRazor
WorkerUses the Worker SDKWorker
BlazorUses the Blazor SDKBlazor
WindowsDesktopUses the Windows Desktop SDKWindowsDesktop
MSTestUses the Microsoft Test SDKMSTest, Requires a version to be specified

Applies To

Project configurations.

Availability

Premake 5.0.0-beta5 or later for Visual Studio only.

Examples

Specify an SDK.

dotnetsdk "Web"

Specify with an SDK and a version.

dotnetsdk "Web/3.4.0"

A custom SDK can be specified using the following:

premake.api.addAllowed("dotnetsdk", "CustomSDK") -- add the custom SDK to allowed values for dotnetsdk
dotnetsdk "CustomSDK"

dotnetsdk "CustomSDK/3.4.0" -- Specifying a version with a custom SDK is also supported