dotnet --info output:
.NET Command Line Tools (1.0.3)
Product Information:
Version: 1.0.3
Commit SHA-1 hash: 37224c9917
Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk1.0.3
VS Code version: 1.11.2
C# Extension version: 1.9.0
"go to definition" work well
"go to definition" does not work
omnisharp log:
Starting OmniSharp server at 2017/5/3 上午11:37:28
Target: e:\Visual Studio Code\DotNetCore\todoApi
OmniSharp server started
Path: C:\Users\user.vscode\extensions\ms-vscode.csharp-1.9.0bin\omnisharp\OmniSharp.exe
PID: 8820
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).
Visual Studio 2010 Installed
Is that your full OmniSharp log?
@DustinCampbell Yes, I followed the following steps, selecting View->Output in VS Code. Then, click the combobox at the top-right of the Output pane and choose "OmniSharp Log".
Sorry for the delay. Are you able to run the following at a command prompt?
C:\Users\user.vscode\extensions\ms-vscode.csharp-1.9.0\bin\omnisharp\OmniSharp.exe -s "e:\Visual Studio Code\DotNetCore\todoApi" --stdio
If so, could you share the output here?
Note: This looks a lot like #1448
Thanks @DustinCampbell . when I run the command at a command prompt,a windows exception exists.
OmniSharp.exe - .NET Framework Initialization Error
To run this application, you first must install one of the following versions of the .NET Framework:
.NETFramework,Version=v4.6
Does it mean OmniSharp depend on .NETFramework 4.6? Whether the .NETFramework 4.6 package must be installed ? Now .NETFramework 4.0 is installed on my computer.
Yes. OmniSharp requires at least .NET Framework 4.6 to run.
Thanks
Did installing 4.6 work for you?
@DustinCampbell .Thank you for your concern. My Development Environment does not allow me to install .NET Framework 4.6. So there is no answer now.
Just in case it helps anyone...
There may be multiple "projects" in the folder and VSCode has selected the "wrong" one.
Use ctrl-shift-P and select "OmniSharp: Select Project" to select the correct project (a .sln file).
If you have the Output window open with "OmniSharp Logs" selected, you will see it reading your csproj's. Once finished your goto definition will start to work
@AndyPook I get this:
command 'o.restart' not found
command 'o.pickProjectAndStart' not found
@sgentile Can you file a new issue and include in it:
the output of dotnet --version
your VS Code version
your C# extension version
Sorry @sgentile, looks like you did that already. Thanks.
Most helpful comment
Just in case it helps anyone...
There may be multiple "projects" in the folder and VSCode has selected the "wrong" one.
Use ctrl-shift-P and select "OmniSharp: Select Project" to select the correct project (a .sln file).
If you have the Output window open with "OmniSharp Logs" selected, you will see it reading your csproj's. Once finished your goto definition will start to work