Package.RegisterProjectFactory(IVsProjectFactory) Method
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.
Registers a project factory with Visual Studio.
protected:
void RegisterProjectFactory(Microsoft::VisualStudio::Shell::Interop::IVsProjectFactory ^ factory);
protected:
void RegisterProjectFactory(Microsoft::VisualStudio::Shell::Interop::IVsProjectFactory ^ factory);
void RegisterProjectFactory(Microsoft::VisualStudio::Shell::Interop::IVsProjectFactory const & factory);
protected void RegisterProjectFactory(Microsoft.VisualStudio.Shell.Interop.IVsProjectFactory factory);
member this.RegisterProjectFactory : Microsoft.VisualStudio.Shell.Interop.IVsProjectFactory -> unit
Protected Sub RegisterProjectFactory (factory As IVsProjectFactory)
Parameters
- factory
- IVsProjectFactory
The project factory to register.
Exceptions
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
RegisterProjectFactoryin 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.