2

Using VS Code in Mac, for C#. In the picture below, I'm missing the light bulb that recommends I'm missing System.Linq. Where is the option to enable the light bulb? I have the C# extension by Microsoft installed.

no lightbulb

I know there should be a light bulb because my VS Code for my Windows has it.

Edited: Just found out that I can see this behavior sometimes in my VS Code Windows too :\

farid JAD7
  • 108
  • 7
  • @D-johnAnshani None of those are for VS Code. And none of it are relevant. – farid JAD7 Jun 20 '18 at 08:56
  • Do you have the `.net Core Framework` installed on your Mac? – Smartis Jun 20 '18 at 09:00
  • @Smartis Yes, 2.1.4. Just in case I did the wrong thing: I run dotnet --version on Terminal. – farid JAD7 Jun 20 '18 at 09:01
  • @buffjape Most probably yes, since I use full VS for bigger solutions. Just that it's annoying not having the editor add all the missing namespace while I'm doing quick trial and error. So I'm the only one that have this or this is a known bug? – farid JAD7 Jun 20 '18 at 09:04

1 Answers1

1

USE

⌘ + .

AS suggested Here, it's quick fix

Mihir Dave
  • 3,954
  • 1
  • 11
  • 26
  • 1
    I'm getting "No code actions available". No suggestion to add missing namespace... – farid JAD7 Jun 20 '18 at 08:59
  • is "using system.linq;" already added? if not have you tried adding it manually? if not this might be this issue https://stackoverflow.com/questions/24659934/visual-studio-does-not-recognize-system-linq – Mihir Dave Jun 20 '18 at 10:37
  • 1
    It's working if I add it manually. My issue is that the light bulb doesn't appear to suggest to me that I'm missing the namespace. Tried with Collection.Generics.List, doesn't appear too. – farid JAD7 Jun 20 '18 at 16:24