VSCode仅在安装C#扩展时无法检测到安装

时间:2018-06-23 01:17:42

标签: visual-studio-code

我使用的是1.24.1版本。我尝试过的其他扩展的所有其他安装均有效。

当我尝试安装“ C#for Visual Studio”时,出现错误“无法安装'ms-vscode.csharp'”。

然后我尝试手动安装vsix文件,出现此错误。

This extension is not installable on any currently installed products

这是完整的日志:

6/22/2018 6:14:59 PM - Microsoft VSIX Installer 6/22/2018 6:14:59 PM -
------------------------------------------- 
6/22/2018 6:14:59 PM - vsixinstaller.exe version: 
6/22/2018 6:14:59 PM - 15.6.152+ge95e4dd1ce
6/22/2018 6:14:59 PM - -------------------------------------------
6/22/2018 6:14:59 PM - Command line parameters: 
6/22/2018 6:14:59 PM -
C:\Program Files (x86)\Microsoft Visual
Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\Matthew\Downloads\ms-vscode.csharp-1.15.2(1).vsix 
6/22/2018 6:14:59 PM -------------------------------------------- 
6/22/2018 6:14:59 PM - Microsoft VSIX Installer 
6/22/2018 6:14:59 PM -------------------------------------------- 
6/22/2018 6:14:59 PM - Initializing Install... 
6/22/2018 6:15:03 PM - Extension Details...
6/22/2018 6:15:03 PM -  Identifier         : csharp 
6/22/2018 6:15:03PM -   Name               : C# 
6/22/2018 6:15:03 PM -  Author             : ms-vscode 
6/22/2018 6:15:03 PM -  Version            : 1.15.2
6/22/2018 6:15:03 PM -  Description        : C# for Visual Studio Code (powered by OmniSharp). 
6/22/2018 6:15:03 PM -  Locale             : en-US 
6/22/2018 6:15:03 PM -  MoreInfoURL        :  
6/22/2018 6:15:03PM -   InstalledByMSI     : False
6/22/2018 6:15:03 PM -  SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
6/22/2018 6:15:03 PM -  
6/22/2018 6:15:03 PM -  SignatureState     : Unsigned 
6/22/2018 6:15:03 PM -  Supported Products :  
6/22/2018 6:15:03 PM -      Microsoft.VisualStudio.Code 
6/22/2018 6:15:03 PM  Version :  
6/22/2018 6:15:03 PM -  
6/22/2018 6:15:03 PM - References         :  
6/22/2018 6:15:03 PM - Signature Details...
6/22/2018 6:15:03 PM -  Extension is not signed. 
6/22/2018 6:15:03 PM -  
6/22/2018 6:15:03 PM - Searching for applicable products... 
6/22/2018 6:15:03 PM - Found installed product - Global Location
6/22/2018 6:15:03 PM - Found installed product - Visual Studio Community 2017
6/22/2018 6:15:03 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.    
at VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean
isRepairSupported, IEnumerable`1& skuData)    
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)    
at VSIXInstaller.App.Initialize()    
at System.Threading.Tasks.Task`1.InnerInvoke()    
at System.Threading.Tasks.Task.Execute()

我尝试重新安装扩展程序,重新安装VScode并重新启动。
我没有代理或VPN的支持。

错误似乎是,即使它确实已安装,也无法检测到Visual Studio代码。这是安装C#扩展名的唯一方法。

1 个答案:

答案 0 :(得分:0)

OmniSharp/omnisharp-vscode似乎可以检测到Visual Studio(社区版),但不能检测到.Net Core。

与“ Using .NET Core in Visual Studio Code”相同,请确保在安装该扩展程序之前先安装the .Net Core SDK