共用方式為


RegPkg 公用程式

注意

在 Visual Studio 中註冊套件的慣用方式是使用 .pkgdef 檔案。 這允許擴充功能部署,而不需要存取系統登錄,這是 VSIX 部署的需求。 Pkgdef 檔案是使用 CreatePkgDef 公用程式所建立。 如需 Visual Studio 套件部署的詳細資訊,請參閱 傳送 Visual Studio 延伸模組

RegPkg.exe 公用程式會向Visual Studio註冊 VSPackage,並準備進行部署。 VSPackage 開發期間,此公用程式會在幕後使用。 它會在建置程式中執行,讓您可以在實驗性 Hive 中建置和執行 VSPackage。

RegPkg 可以產生數種格式的系統登錄腳本。 您可以將這些文稿併入部署專案中,例如 .msi 專案或 Windows Installer XML 工具組檔案。

RegPkg.exe 通常位於 <Visual Studio SDK 安裝路徑>\VisualStudioIntegration\Tools\Bin\RegPkg.exe。 RegPkg 遵循下列語法:

RegPkg [/root:<root>] [/regfile:<regfile>] [/rgsfile:<rgsfile> [/rgm]] [/vrgfile:<vrgfile>] [/codebase | /assembly] [/unregister] AssemblyPath

/root:root 在指定的 Visual Studio 根目錄下執行註冊。

/regfile:FileName 會建立 .reg 檔案,而不是更新登錄。 無法搭配 /vrgfile 或 /rgsfile 或 /wixfile 使用。

/rgsfile:FileName 建立 .rgs 檔案,而不是更新登錄。 無法搭配 /vrgfile 或 /regfile 或 /wixfile 使用。

/vrgfile:FileName 建立 .vrg 檔案,而不是更新登錄。 無法搭配 /regfile 或 /rgsfile 或 /wixfile 使用。

/rgm 除了 rgs 檔案之外,還建立 .rgm 檔案。 必須與 /rgsfile 結合。

/wixfile:FileName 會建立與 Windows Installer XML 工具組相容的檔案,而不是更新登錄。 無法搭配 /regfile 或 /rgsfile 或 /vrgfile 使用。

/codebase 強制向 CodeBase 註冊,而不是 Assembly。

/assembly 強制向 Assembly 註冊,而不是 CodeBase。

/unregister 取消註冊此套件。 無法使用

使用 /regfile 或 /vrgfile 或 /rgsfile 或 /wixfile。

另請參閱