visual-studio-code - 仅在安装C#扩展时VSCode无法检测到安装

标签 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# 扩展所独有的。

最佳答案

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

如“Using .NET Core in Visual Studio Code ”所示,请确保您有 the .Net Core SDK在安装该扩展之前先安装。

关于visual-studio-code - 仅在安装C#扩展时VSCode无法检测到安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50997166/

相关文章:

javascript - Node.js 中的函数导出在 VSCode 中显示为属性

java - 如何在 Linux 上配置 VSCode 使其在不同的项目中为 Gradle 应用不同的 JAVA_HOME?

javascript - typescript 文件中的导入模块给出错误 "cannot compile modules unless the ' --module' flag is provided"

visual-studio-code - Visual Studio代码: Use tab (instead of arrow keys) to select Intellisense Suggestions?

visual-studio-code - 是否有在分割窗口 Pane 之间切换的热键?

python - VS Code Python 调试器 "timed out waiting for debuggee to spawn"

visual-studio-code - VS Code的stdout在哪里?

visual-studio-code - 删除 Visual Studio Code 当前代码块突出显示

node.js - Discord.js - guildMemberUpdate 不会被调用,除非机器人用户发生更改

sql-server - VS Code - 有没有办法将文件内容与 sql 对象定义进行比较?