InstalledProductRegistrationAttribute Class

Provides information for the Visual Studio splash screen and the Help About dialog box when applied to a Package-derived class or a class that implements IVsPackage. This class cannot be inherited.

Inheritance Hierarchy

Object
  Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.InstalledProductRegistrationAttribute

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, Inherited := False)> _
Public NotInheritable Class InstalledProductRegistrationAttribute _
    Inherits RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets.Class, Inherited = false)]
public sealed class InstalledProductRegistrationAttribute : RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets::Class, Inherited = false)]
public ref class InstalledProductRegistrationAttribute sealed : public RegistrationAttribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Class, Inherited = false)>]
type InstalledProductRegistrationAttribute =  
    class 
        inherit RegistrationAttribute 
    end
public final class InstalledProductRegistrationAttribute extends RegistrationAttribute

The InstalledProductRegistrationAttribute type exposes the following members.

Constructors

  Name Description
Public method InstalledProductRegistrationAttribute(String, String, String) Initializes a new instance of InstalledProductRegistrationAttribute with the specified product information.
Public method InstalledProductRegistrationAttribute(Boolean, String, String, String) Obsolete. Initializes a new InstalledProductRegistrationAttribute instance for the specified product.
Public method InstalledProductRegistrationAttribute(String, String, String, Boolean) Initializes a new instance of InstalledProductRegistrationAttribute the specified product details..

Top

Properties

  Name Description
Public property IconResourceID Gets or sets the resource ID of the icon associated with the product.
Public property LanguageIndependentName Gets or sets the (non-localized) name of the product.
Public property ProductDetails Gets or sets the detailed description of the product.
Public property ProductDetailsResourceID Gets or sets the product details resource ID.
Public property ProductId Gets or sets the product ID.
Public property ProductName Gets or sets the name of the product.
Public property ProductNameResourceID Gets or sets the resource ID of the product name.
Public property TypeId Gets the current instance of this attribute. (Inherited from RegistrationAttribute.)
Public property UseInterface Gets or whether the package implements the IVsInstalledProduct interface to display a bitmap in the splash screen and information in the About dialog box on the Help menu.
Public property UsePackage Gets or sets whether the product installation uses the package ID.
Public property UseVsProductId Determines whether the product ID is the same as the Visual Studio ID.

Top

Methods

  Name Description
Public method Equals Infrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
Public method GetHashCode Returns the hash code for this instance. (Inherited from Attribute.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsDefaultAttribute When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
Public method Match When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
Public method Register Registers information about a VSPackage when called by an external registration tool such as regpkg.exe. (Overrides RegistrationAttribute.Register(RegistrationAttribute.RegistrationContext).)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Unregister Removes the registration information about a VSPackage when called by an external registration tool such as regpkg.exe. (Overrides RegistrationAttribute.Unregister(RegistrationAttribute.RegistrationContext).)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from Attribute.)
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#GetTypeInfo Retrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from Attribute.)
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from Attribute.)
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#Invoke Provides access to properties and methods exposed by an object. (Inherited from Attribute.)

Top

Remarks

When to Call

Apply this attribute to your VSPackage class to provide information that is displayed on the Visual Studio splash screen and the Help About dialog box.

Basic Usage

Create an InstalledProductRegistrationAttribute object to register your VSPackage with the Help About dialog box. The different constructors provide the options to use the IVsInstalledProduct interface (as implemented by the package) to gather the information and display it on the Visual Studio splash screen. To use this attribute, place it on your VSPackage class (a class derived from Package or one that implements IVsPackage).

This attribute is used only to provide data for external registration tools like regpkg.exe. It does not have any effect on the runtime behavior of the VSPackage. For more information, see VSPackage Registration.

Note

Visual C# automatically appends the word Attribute to the name of any attribute class. In Visual C# code, refer to this attribute as InstalledProductRegistration.

Registry Entries

The following registry entries are created by InstalledProductRegistrationAttribute:

  • <VSROOT>\CLSID\{PackageGuid}

  • <VSROOT>\CLSID\{PackageGuid}\@=ObjectType.FullName

  • <VSROOT>\CLSID\{PackageGuid}\InprocServer32=mscoree.dll

  • <VSROOT>\CLSID\{PackageGuid}\Class=ObjectType.FullName

  • <VSROOT>\CLSID\{PackageGuid}\Assembly=ObjectType.Assembly.FullName

  • <VSROOT>\CLSID\{PackageGuid}\ThreadingModel=Both

  • <VSROOT>\CLSID\{PackageGuid}\CodeBase=context.CodeBase

  • <VSROOT>\CLSID\{PackageGuid}\SatelliteDll

  • <VSROOT>\CLSID\{PackageGuid}\SatelliteDll\Path=SatelliteDllPath

  • <VSROOT>\CLSID\{PackageGuid}\SatelliteDll\DllName=SatelliteDllName

Samples

The standard location for this and all other attributes used for automatic registration is adjacent to the implementation of the Package in VsPkg.cs, VsPkg.vb, or VsPkg.cpp, depending on the language used in the sample.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace

Other Resources

VSPackage Registration

Localized Resources in MFC Applications: Satellite DLLs