How can I quickly add a missing namespace in VS Code?

Viewed 2222

I'm trying my best to start really using VS Code (I come from Visual Studio environment). In VS I can just right click a red squiggle and add the namespace. In VS Code it can be done quickly but I can't remember how. I think it had something to do with the single quote key maybe? I do have OmniSharp enabled and running if that matters.

Is there somewhere that would tell me these shortcuts? Like a cheat sheet for VS Code? I don't see it on the one shown below... enter image description here

3 Answers

Just use CTRL+. on the word with the red underline. No need to install other extensions.

CTRL + SHIFT + D
Aradığın cevap bu olabilir.

You need to install "C# extensions" extension, the project is not anymore under development but it will do its job.

Related