簡體   English   中英

我無法在 Visual Studio 上安裝 Live Server 擴展,並且它不會出現在 VS 內的市場搜索中

[英]I can't install Live Server extension on Visual Studio and it doesn't come up on marketplace search inside VS

“Live Server”擴展沒有出現在 Visual Studio 內的擴展市場上,也沒有出現在“HTML Snippets”中,我嘗試從 web 瀏覽器下載擴展,當我嘗試安裝它時出現錯誤,這里是日志文件

10/21/2021 10:57:03 PM - Microsoft VSIX Installer
10/21/2021 10:57:03 PM - -------------------------------------------
10/21/2021 10:57:03 PM - vsixinstaller.exe version:
10/21/2021 10:57:03 PM - 16.11.12
10/21/2021 10:57:03 PM - -------------------------------------------
10/21/2021 10:57:03 PM - Command line parameters:
10/21/2021 10:57:03 PM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\user\Desktop\ritwickdey.LiveServer-5.6.1.vsix
10/21/2021 10:57:03 PM - -------------------------------------------
10/21/2021 10:57:03 PM - Microsoft VSIX Installer
10/21/2021 10:57:03 PM - -------------------------------------------
10/21/2021 10:57:04 PM - Initializing Install...
10/21/2021 10:57:04 PM - Extension Details...
10/21/2021 10:57:04 PM -    Identifier         : LiveServer
10/21/2021 10:57:04 PM -    Name               : Live Server
10/21/2021 10:57:04 PM -    Author             : ritwickdey
10/21/2021 10:57:04 PM -    Version            : 5.6.1
10/21/2021 10:57:04 PM -    Description        : Launch a development local Server with live reload feature for static & dynamic pages
10/21/2021 10:57:04 PM -    Locale             : en-US
10/21/2021 10:57:04 PM -    MoreInfoURL        : 
10/21/2021 10:57:04 PM -    InstalledByMSI     : False
10/21/2021 10:57:04 PM -    SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
10/21/2021 10:57:04 PM - 
10/21/2021 10:57:04 PM -    SignatureState     : Unsigned
10/21/2021 10:57:04 PM -    Supported Products : 
10/21/2021 10:57:04 PM -        Microsoft.VisualStudio.Code
10/21/2021 10:57:04 PM -            Version : 
10/21/2021 10:57:04 PM - 
10/21/2021 10:57:04 PM -    References         : 
10/21/2021 10:57:04 PM - Signature Details...
10/21/2021 10:57:04 PM -    Extension is not signed.
10/21/2021 10:57:04 PM - 
10/21/2021 10:57:04 PM - Searching for applicable products...
10/21/2021 10:57:04 PM - Found installed product - Global Location
10/21/2021 10:57:05 PM - Found installed product - Visual Studio Community 2019
10/21/2021 10:57:05 PM - 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)

知道如何解決此問題,或者是否有實時服務器的替代方案?

Live Server 最近被棄用了,事實上有一個內置的 VSCode。 至於 HTML 片段,這表明擴展程序尚未簽名,這意味着它未經驗證。 這意味着出於安全原因您不能安裝該擴展。

解決方法很簡單。您可以使用.vsix 文件安裝擴展程序(已下載)。 Firstly, go to https://open-vsx.org/ and download the extension that you want.After downloading you will get VSIX file.Final step: open visual studio and go to EXTENSIONS.Click option icon(•••) and找到並單擊(從 VSIX 安裝),然后選擇您下載的.vsix 文件。 完畢。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM