Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After i add some nuget package, I can not the code intelicense immediately unless i restart the Visual Stuido Code #1583

Closed
chenxizhang opened this issue Jun 22, 2017 · 9 comments · Fixed by OmniSharp/omnisharp-roslyn#1003

Comments

@chenxizhang
Copy link

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.4)

Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd

Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4

VS Code version:
image

C# Extension version: 1.10.0

Steps to reproduce

  1. dotnet new web
  2. dotnet add package Microsoft.Graph
  3. dotnet restore

Expected behavior

My expected behavior is when I restored the package, I can get the code intellisense in the Code Editor。
I switch to one cs file, on the top , type "using Microsoft. " I want get "Graph“ in the Intellisense list。

Actual behavior

I CAN not get this behavior, unless I restart the vs code and everything is fine.

@bernardbr
Copy link

The same behavior occurs with me. And it occurs frequently when I do the Restore using the popup menu from IDE.

@DustinCampbell
Copy link
Member

I just tried this and was not able to repro with the instructions. I tried executing the dotnet commands at both the command prompt and in VS Code's integrated terminal. I also tried using the restore popup. Are there more specific steps that can reliably repro this issue?

@THuffam
Copy link

THuffam commented Jul 10, 2017

Same issue here. Add a nuget package and intellisense does not recognise it. Have to restart VS Code to resolve.
I have a similar, maybe related issue, when I rename a class file name, intellisense highlights the class and ctor as errors (eg The name space mynamespace already contains a definition for myoriginalclassname) - so have to restart VS Code to fix. Found this has already been logged - issue 785

@jsheely
Copy link

jsheely commented Jul 24, 2017

This is labelled as needs more info. Here is more info

#1661

@trevor-hackett
Copy link

I'm being affected as well. Very annoying to have to restart vscode to get intellisense on the newly added nuget packages

@DustinCampbell DustinCampbell added this to the 1.13 milestone Aug 9, 2017
@trevor-hackett
Copy link

As a temporary workaround, you can run the reload command in vscode.

Press Ctrl+Shift+P then type reload

Faster than restarting vscode

@develorem
Copy link

I'm getting this as well. In my case I added package from dotnet cli.
Happened with both EF package, and Autofac. Restart VS code fixes it.

@DustinCampbell
Copy link
Member

I'm not going to close this until we have a build of C# for VS Code that includes the fix.

@DustinCampbell
Copy link
Member

This issue has been fixed in the 1.14 milestone. We just released our first beta of 1.14 if you're interested in giving it a spin. Follow these instructions to a beta release of C# for VS Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants