Share via


ProvideMSBuildTargetsAttribute Class

Definition

This attribute register a custom .targets files to the list of the targets known and trusted by MSBuild.

The registry entries created are: [%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
Inheritance
ProvideMSBuildTargetsAttribute
Attributes

Constructors

ProvideMSBuildTargetsAttribute(String, String)

Creates a new ProvideMSBuildTargets attribute to register a targets file to the list of the MSBuild safe imports.

Properties

TypeId

Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class.

(Inherited from RegistrationAttribute)

Methods

GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Called to register this attribute with the given context. The context contains the location where the registration information should be placed. It also contains other information such as the type being registered and path information.

Unregister(RegistrationAttribute+RegistrationContext)

Unregister this file extension.

Applies to