This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Incubator.
Summary
Returns the SDK identifier from the project's root element, supporting both
the <Project Sdk="..."> attribute form and the <Project><Sdk Name="..." /></Project>
child-element form (per #267 — common in monorepos that hide reusable SDK
configuration in Directory.Build.props).
- Assembly
- Cake
.Incubator .dll - Namespace
- Cake
.Incubator .XDocumentExtensions - Containing Type
- XDocumentExtensions
Syntax
public static string GetSdk(this XDocument document)
Parameters
| Name | Type | Description |
|---|---|---|
| document | XDocument | the document |
Return Value
| Type | Description |
|---|---|
| string | the SDK identifier or null if no Sdk attribute or element is set |
