Omnisharp-vscode: codeLens, go to definition and find references are not working

Created on 2 Apr 2017  路  17Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.1)

Product Information:
 Version:            1.0.1
 Commit SHA-1 hash:  005db40cd1

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.11
 OS Platform: Darwin
 RID:         osx.10.11-x64
 Base Path:   /usr/local/share/dotnet/sdk/1.0.1

VS Code version: 1.10.2
C# Extension version: 1.8.1

Steps to reproduce

install vs code
install c# extension
install dotnet core sdk
-> codeLens, go to definition and find references are working
suddenly, codeLens, go to definition and find references are working

Expected behavior

codeLens, go to definition and find references should be working

Actual behavior

codeLens, go to definition and find references are not working
(I can't find related menus in context menu when I right click)

please help me : (

Needs More Info Unity

Most helpful comment

Found out that this was caused by the .sln and .csproj files missing. Had to reimport the VSCode asset into unity and that fixed everything.

All 17 comments

one more thing. i use vs code for unity project. i installed vs code plugin in unity of course.

I resolved this issue by re-install vscode. but if I exclude following file, issue occurred.
"Assembly-CSharp-Editor-firstpass.csproj"

guess you should not exclude "Assembly-CSharp-Editor-firstpass.csproj", see the example settings.json from https://code.visualstudio.com/docs/other/unity, that works for me

Hi! Sorry for not getting back to you sooner. Any chance you could provide your complete OmniSharp Log after opening this project? To display the log, select View->Output to display the Output pane and select "OmniSharp Log" from the drop-down in the top-right corner of the pane.

Hi @bakira00000: Were you ever able to get this working? If not, could you provide the information I requested above?

Having the same issue.,

@ThomasMoonKang: Any chance you could provide the information I asked for above?

Hi! Sorry for not getting back to you sooner. Any chance you could provide your complete OmniSharp Log after opening this project? To display the log, select View->Output to display the Output pane and select "OmniSharp Log" from the drop-down in the top-right corner of the pane.

Found out that this was caused by the .sln and .csproj files missing. Had to reimport the VSCode asset into unity and that fixed everything.

Glad to hear it!

I just had the same issue, but instead of the files missing, it was caused by the .csproj and .sln files being excluded by files.exclude in the workspace settings.

Glad to hear it!

鐪嬩笉鎳俥nglish

if you are a phper, you can install the extension of PHP IntelliSense

Make sure the folder name of your solution matches the the name of solution file .sln.

Found out that this was caused by the .sln and .csproj files missing. Had to reimport the VSCode asset into unity and that fixed everything.

how to do " reimport the VSCode asset into unity" ??

濡備綍瑙e喅鍛紵

Was this page helpful?
0 / 5 - 0 ratings