SdkReference 类

定义

表示在 <Project /> 或 <Import /> 元素中引用的软件开发工具包 (SDK)。Represents a software development kit (SDK) that is referenced in a <Project /> or <Import /> element.

public ref class SdkReference sealed : IEquatable<Microsoft::Build::Framework::SdkReference ^>
public sealed class SdkReference : IEquatable<Microsoft.Build.Framework.SdkReference>
type SdkReference = class
    interface IEquatable<SdkReference>
Public NotInheritable Class SdkReference
Implements IEquatable(Of SdkReference)
继承
SdkReference
实现

构造函数

SdkReference(String, String, String)

初始化 SdkReference 类的新实例。Initializes a new instance of the SdkReference class.

属性

MinimumVersion

获取所需的最低版本。Gets the minimum version required. 此值由项目指定,指示生成所需 SDK 的最低版本。This value is specified by the project to indicate the minimum version of the SDK that is required in order to build. 如果找到名称匹配项,但无法解析可接受的版本,则此方法可用于生成错误消息。This is useful in order to produce an error message if a name match can be found but no acceptable version could be resolved.

Name

获取 SDK 的名称。Gets the name of the SDK.

Version

获取 SDK 的版本。Gets the version of the SDK.

方法

Equals(Object)
Equals(SdkReference)
GetHashCode()
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()
TryParse(String, SdkReference)

尝试将指定字符串分析为 SdkReferenceAttempts to parse the specified string as a SdkReference. 预期格式为:SDK、SDK/版本,或 SDK/min=MinimumVersion 值不需要指定版本或 MinimumVersion。The expected format is: SDK, SDK/Version, or SDK/min=MinimumVersion Values are not required to specify a version or MinimumVersion.

适用于