Bagikan melalui


ProvideMSBuildTargetsAttribute Kelas

Definisi

Atribut ini mendaftarkan file .targets kustom ke daftar target yang diketahui dan dipercaya oleh MSBuild.

Entri registri yang dibuat adalah: [%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
Warisan
ProvideMSBuildTargetsAttribute
Atribut

Konstruktor

ProvideMSBuildTargetsAttribute(String, String)

Membuat atribut ProvideMSBuildTargets baru untuk mendaftarkan file target ke daftar impor aman MSBuild.

Properti

TypeId

Ambil alih properti TypeID untuk membiarkan RegistrationAttribute memperoleh kelas untuk bekerja dengan System.ComponentModel.TypeDescriptor.GetAttributes(...). Atribut yang berasal dari atribut ini harus mengambil alih properti ini hanya jika membutuhkan kontrol yang lebih baik pada instans yang dapat diterapkan ke kelas.

(Diperoleh dari RegistrationAttribute)

Metode

GetPackageRegKeyPath(Guid)

Mendapatkan jalur registri (relatif terhadap akar registri aplikasi) dari VSPackage.

(Diperoleh dari RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Dipanggil untuk mendaftarkan atribut ini dengan konteks yang diberikan. Konteks berisi lokasi tempat informasi pendaftaran harus ditempatkan. Ini juga berisi informasi lain seperti jenis yang terdaftar dan informasi jalur.

Unregister(RegistrationAttribute+RegistrationContext)

Batalkan pendaftaran ekstensi file ini.

Berlaku untuk