InstalledProductRegistrationAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This attribute registers an 'installed product' for your package.
This enables your package to present information on the VS
Splash Screen or Help About.
public ref class InstalledProductRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class InstalledProductRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, Inherited=false)]
public sealed class InstalledProductRegistrationAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, Inherited=false)>]
type InstalledProductRegistrationAttribute = class
inherit RegistrationAttribute
Public NotInheritable Class InstalledProductRegistrationAttribute
Inherits RegistrationAttribute
- Inheritance
- Attributes
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.
Constructors
InstalledProductRegistrationAttribute(String, String, String) |
Creates a new InstalledProductRegistrationAttribute to register your package with Help/About dialog. This is the simplest registration information necessary for 3rd party packages. Providing product details is not a requirement, but is recommended. |
Properties
IconResourceID |
Resource ID of the icon. |
LanguageIndependentName |
The name of your product. |
ProductDetails |
Detailed description of your product. |
ProductDetailsResourceID |
Resource ID for the details. |
ProductId |
Your product ID. |
ProductName |
The name of your product. |
ProductNameResourceID |
Resource ID corresponding to the product name. |
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) |
UseInterface |
Use IVsInstalledProduct to fill in the Help about dialog. The package must implement IVsInstalledProduct. |
UsePackage |
True is the product installation will use the package ID |
UseVsProductId |
True is the product ID is the same as VisualStudio ID This is reserved for Microsoft internal use. 3rd party packages should provide their own product ID when the class is constructed. |
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. |
Unregister(RegistrationAttribute+RegistrationContext) |
Unregister this InstalledProducts entry. |