This article applies to Visual Studio 2015. If you're looking for Visual Studio 2017 documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2017. Download it here.
The preferred way to register packages in Visual Studio is by using .pkgdef files. This allows for extension deployment without having to access the system registry, which is a requirement for VSIX deployment. Pkgdef files are created by using the CreatePkgDef Utility. For more information on Visual Studio package deployment, see Shipping Visual Studio Extensions.
The RegPkg.exe utility registers a VSPackage with Visual Studio and prepares it for deployment. This utility is used behind the scenes during VSPackage development. It runs as part of the build process so that you can build and run a VSPackage in the experimental hive.
RegPkg can generate system registry scripts in several formats. You can incorporate these scripts in deployment projects such as .msi projects or Windows Installer XML Toolset files.
RegPkg.exe is typically located at <Visual Studio SDK installation path>\VisualStudioIntegration\Tools\Bin\RegPkg.exe. RegPkg follows this syntax:
RegPkg [/root:<root>] [/regfile:<regfile>] [/rgsfile:<rgsfile> [/rgm]] [/vrgfile:<vrgfile>] [/codebase | /assembly] [/unregister] AssemblyPath
Performs registration under the specified
Visual Studio root.
Creates a .reg file rather than updating the registry. Cannot be used with /vrgfile or /rgsfile or /wixfile.
Creates a .rgs file rather than updating the registry. Cannot be used with /vrgfile or /regfile or /wixfile.
Creates a .vrg file rather than updating the registry. Cannot be used with /regfile or /rgsfile or /wixfile.
Creates a .rgm file in addition to the rgs file. Must be combined with /rgsfile.
Creates a Windows Installer XML Toolset-compatible file rather than updating the registry. Cannot be used with /regfile or /rgsfile or /vrgfile.
Forces registration with CodeBase rather than Assembly.
Forces registration with Assembly rather than CodeBase.
Unregisters this package. Cannot be used
with /regfile or /vrgfile or /rgsfile or /wixfile.