vscode-csharp: Intellisense does not show suggestions

MVC Core applpication

dotnet --info output: VS Code version: C# Extension version:

Steps to reproduce

I create a simple model class with attributes, the intellisense do not suggest add the using class and cannot detect the error

Expected behavior

capture capture1

Actual behavior

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 28 (14 by maintainers)

Most upvoted comments

Let me know if you have anymore trouble.

Yes it work like a charm , but only using Visual Studio 2017 Command Prompt

OK. So it sounds like things are working for you.

By launching VS Code from a VS 2017 Command Prompt, that provides enough context that to initialize an MSBuild build environment. This can be necessary to handle situations where there are several versions of Visual Studio installed. The VS 2017 Command Prompt sets two environment variables that can help MSBuild “find” itself:

  • VSINSTALLDIR: The path to VS, which could be something like C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\. This will depend on where VS 2017 is on your machine.
  • VisualStudioVersion: Set to 15.0.

If you like, you can set these environment variables to correct values before launching VS Code.

When I click over the red error does not work only work when I click on the yellow icon

Note that VS Code’s editor experience is not identical to Visual Studio. It’s not clear to me exactly what you’re describing, but it sounds like you may have encountered one of the differences between the products.

It’s something wrong on my machine 😦 😦 😦