Share via


ProvideMSBuildTargetsAttribute 類別

定義

這個屬性會將自定義 .targets 檔案註冊到 MSBuild 已知且信任的目標清單。

建立的登錄專案包括:[%RegistryRoot%\MSBuild\SafeImports] “TargetsLabel”=“PathToTheTargetsFile”

public ref class ProvideMSBuildTargetsAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class ProvideMSBuildTargetsAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideMSBuildTargetsAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideMSBuildTargetsAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class ProvideMSBuildTargetsAttribute
Inherits RegistrationAttribute
繼承
ProvideMSBuildTargetsAttribute
屬性

建構函式

ProvideMSBuildTargetsAttribute(String, String)

建立新的 ProvideMSBuildTargets 屬性,以向 MSBuild 安全匯入清單註冊目標檔案。

屬性

TypeId

覆寫 TypeID 屬性,讓 RegistrationAttribute 衍生類別使用 System.ComponentModel.TypeDescriptor.GetAttributes (...) 。衍生自這個屬性的屬性必須覆寫此屬性,只有在實例上需要更好的控件,才能套用至類別。

(繼承來源 RegistrationAttribute)

方法

GetPackageRegKeyPath(Guid)

取得相對於 VSPackage 應用程式) 之登錄根目錄的登錄路徑 (。

(繼承來源 RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

呼叫以註冊這個具有指定內容的屬性。 內容,其中包含用來放置註冊資訊的位置。 它也包含其他資訊,例如所註冊的類型和路徑資訊。

Unregister(RegistrationAttribute+RegistrationContext)

取消註冊此擴展名。

適用於