Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Registers a project factory with Visual Studio.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
'Declaration
Protected Sub RegisterProjectFactory ( _
factory As IVsProjectFactory _
)
'Usage
Dim factory As IVsProjectFactory
Me.RegisterProjectFactory(factory)
protected void RegisterProjectFactory(
IVsProjectFactory factory
)
protected:
void RegisterProjectFactory(
IVsProjectFactory^ factory
)
member RegisterProjectFactory :
factory:IVsProjectFactory -> unit
protected function RegisterProjectFactory(
factory : IVsProjectFactory
)
Parameters
- factory
Type: Microsoft.VisualStudio.Shell.Interop.IVsProjectFactory
The project factory to register.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | factory is null. |
Remarks
The RegisterProjectFactory method registers the given project factory with Visual Studio. To register a project factory for a package, perform the following steps:
Add a ProvideProjectFactoryAttribute to your package class.
Override the Initialize method. Call RegisterProjectFactory in this method and pass the instance of your project factory. Be sure to call the base class Initialize method.
Unregistration of project factories automatically happens when the package is disposed. If the project factory object implements IDisposable, its Dispose method is called after the factory has been unregistered with Visual Studio.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.