在没有 CLI 命令的情况下通过 vsix 文件安装 vscode 扩展
Install vscode extension through vsix file without CLI command
我正在尝试通过双击安装 vscode 扩展 vsix 文件,而不是使用提到的 CLI 命令 here - code --install-extension my-extension-0.0.1.vsix
扩展尚未发布,处于开发模式,我们希望共享以供预览。
但我收到以下错误:-
03-03-2021 13:06:46 - Microsoft VSIX Installer
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:46 - vsixinstaller.exe version:
03-03-2021 13:06:46 - 16.8.3036
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:46 - Command line parameters:
03-03-2021 13:06:46 - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\jmadhu\Desktop\dev\CloudNativeTest\vscode-azureloadtest\vscode-azureloadtest-0.1.0.vsix
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:46 - Microsoft VSIX Installer
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:47 - Initializing Install...
03-03-2021 13:06:47 - Extension Details...
03-03-2021 13:06:47 - Identifier : vscode-azureloadtest
03-03-2021 13:06:47 - Name : Azure Load Test
03-03-2021 13:06:47 - Author : ms-azureloadtest
03-03-2021 13:06:47 - Version : 0.1.0
03-03-2021 13:06:47 - Description : Manage your Azure Cloud Native Load Tests and Resources
03-03-2021 13:06:47 - Locale : en-US
03-03-2021 13:06:47 - MoreInfoURL :
03-03-2021 13:06:47 - InstalledByMSI : False
03-03-2021 13:06:47 - SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
03-03-2021 13:06:47 -
03-03-2021 13:06:47 - SignatureState : Unsigned
03-03-2021 13:06:47 - Supported Products :
03-03-2021 13:06:47 - Microsoft.VisualStudio.Code
03-03-2021 13:06:47 - Version :
03-03-2021 13:06:47 -
03-03-2021 13:06:47 - References :
03-03-2021 13:06:47 - Signature Details...
03-03-2021 13:06:47 - Extension is not signed.
03-03-2021 13:06:47 -
03-03-2021 13:06:47 - Searching for applicable products...
03-03-2021 13:06:47 - Found installed product - Global Location
03-03-2021 13:06:47 - Found installed product - Visual Studio Professional 2019
03-03-2021 13:06:47 - VSIXInstaller.NoApplicableSKUsException: One or more extensions are for Visual Studio Code. Try installing them in Visual Studio Code.
at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
问题:我们可以不使用 CLI 命令安装 vsix 文件(未发布的扩展名)吗?如果是,有哪些可能的方法?
您只能通过菜单项安装,
"You can manually install a VS Code extension packaged in a .vsix
file. Using the Install from VSIX command in the Extensions view
command drop-down, or the Extensions: Install from VSIX command in the
Command Palette, point to the .vsix file."
来自 https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix
您不能双击此类文件以在 Windows 资源管理器中安装,因为 Visual Studio 在那里注册了另一个工具(又名 Microsoft VSIX 安装程序),它不适用于 VSCode。
我正在尝试通过双击安装 vscode 扩展 vsix 文件,而不是使用提到的 CLI 命令 here - code --install-extension my-extension-0.0.1.vsix
扩展尚未发布,处于开发模式,我们希望共享以供预览。
但我收到以下错误:-
03-03-2021 13:06:46 - Microsoft VSIX Installer
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:46 - vsixinstaller.exe version:
03-03-2021 13:06:46 - 16.8.3036
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:46 - Command line parameters:
03-03-2021 13:06:46 - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\jmadhu\Desktop\dev\CloudNativeTest\vscode-azureloadtest\vscode-azureloadtest-0.1.0.vsix
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:46 - Microsoft VSIX Installer
03-03-2021 13:06:46 - -------------------------------------------
03-03-2021 13:06:47 - Initializing Install...
03-03-2021 13:06:47 - Extension Details...
03-03-2021 13:06:47 - Identifier : vscode-azureloadtest
03-03-2021 13:06:47 - Name : Azure Load Test
03-03-2021 13:06:47 - Author : ms-azureloadtest
03-03-2021 13:06:47 - Version : 0.1.0
03-03-2021 13:06:47 - Description : Manage your Azure Cloud Native Load Tests and Resources
03-03-2021 13:06:47 - Locale : en-US
03-03-2021 13:06:47 - MoreInfoURL :
03-03-2021 13:06:47 - InstalledByMSI : False
03-03-2021 13:06:47 - SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
03-03-2021 13:06:47 -
03-03-2021 13:06:47 - SignatureState : Unsigned
03-03-2021 13:06:47 - Supported Products :
03-03-2021 13:06:47 - Microsoft.VisualStudio.Code
03-03-2021 13:06:47 - Version :
03-03-2021 13:06:47 -
03-03-2021 13:06:47 - References :
03-03-2021 13:06:47 - Signature Details...
03-03-2021 13:06:47 - Extension is not signed.
03-03-2021 13:06:47 -
03-03-2021 13:06:47 - Searching for applicable products...
03-03-2021 13:06:47 - Found installed product - Global Location
03-03-2021 13:06:47 - Found installed product - Visual Studio Professional 2019
03-03-2021 13:06:47 - VSIXInstaller.NoApplicableSKUsException: One or more extensions are for Visual Studio Code. Try installing them in Visual Studio Code.
at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
问题:我们可以不使用 CLI 命令安装 vsix 文件(未发布的扩展名)吗?如果是,有哪些可能的方法?
您只能通过菜单项安装,
"You can manually install a VS Code extension packaged in a .vsix file. Using the Install from VSIX command in the Extensions view command drop-down, or the Extensions: Install from VSIX command in the Command Palette, point to the .vsix file."
来自 https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix
您不能双击此类文件以在 Windows 资源管理器中安装,因为 Visual Studio 在那里注册了另一个工具(又名 Microsoft VSIX 安装程序),它不适用于 VSCode。