dotnetsdk
Selects a .NET SDK
dotnetsdk ("SDK")
For more information see the MSDN documentation here
Parameters
SDK is one of:
| SDK | Description | Notes |
|---|---|---|
| Default | Uses the default .NET SDK | Default |
| Web | Uses the Web SDK | Web |
| Razor | Uses the Razor SDK | Razor |
| Worker | Uses the Worker SDK | Worker |
| Blazor | Uses the Blazor SDK | Blazor |
| WindowsDesktop | Uses the Windows Desktop SDK | WindowsDesktop |
| MSTest | Uses the Microsoft Test SDK | MSTest, 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