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

Errors showing, Intellisense, using resolving doesn't work. #1696

Closed
oleksiivasylenko opened this issue Aug 10, 2017 · 5 comments
Closed

Errors showing, Intellisense, using resolving doesn't work. #1696

oleksiivasylenko opened this issue Aug 10, 2017 · 5 comments

Comments

@oleksiivasylenko
Copy link

Environment data

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

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

VS Code version: June 2017 (version 1.14)
C# Extension version: 1.11.0

Steps to reproduce

  1. clone repository https://github.com/oleksiivasylenko/cardsharing
  2. navigate to cloned folder
  3. run "code ."
  4. open file at DAL/Models/Card.cs

Expected behavior

Erorrs showed, intellisence helped resolve usings.

Actual behavior

No erros is showed, intellisence doesn't help me to implement interface.

@DustinCampbell
Copy link
Member

Hi @oleksiivasylenko: Could you provide your OmniSharp log to see if there were any errors loading your project? Follow these steps to get your log:

  1. Launch VS Code and open your folder
  2. Select View->Output from the menu to display the Output pane.
  3. In the Output pane, select "OmniSharp Log" from the dropdown in the top-right corner.

@oleksiivasylenko
Copy link
Author

oleksiivasylenko commented Aug 11, 2017

Hi @DustinCampbell . Here is log


Starting OmniSharp server at 8/11/2017, 8:55:26 AM
    Target: /Users/ovasylenko/Core_Solutions/cardsharing/cardsharing.sln

OmniSharp server started wth Mono
    Path: /Users/ovasylenko/.vscode/extensions/ms-vscode.csharp-1.12.0/.omnisharp/run
    PID: 27939

OmniSharp: -s /Users/ovasylenko/Core_Solutions/cardsharing/cardsharing.sln --hostPID 27895 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/ovasylenko/Core_Solutions/cardsharing' on host 27895."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Initializing in /Users/ovasylenko/Core_Solutions/cardsharing
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Omnisharp will use local MSBuild.
    MSBUILD_EXE_PATH: /Users/ovasylenko/.vscode/extensions/ms-vscode.csharp-1.12.0/.omnisharp/omnisharp/msbuild/MSBuild.dll
    MSBuildExtensionsPath: /Users/ovasylenko/.vscode/extensions/ms-vscode.csharp-1.12.0/.omnisharp/omnisharp/msbuild
    TargetFrameworkRootPath: /usr/local/Cellar/mono/5.0.1.1/lib/mono/xbuild-frameworks
    RoslynTargetsPath: /Users/ovasylenko/.vscode/extensions/ms-vscode.csharp-1.12.0/.omnisharp/omnisharp/msbuild/Roslyn
    CscToolPath: /Users/ovasylenko/.vscode/extensions/ms-vscode.csharp-1.12.0/.omnisharp/omnisharp/msbuild/Roslyn

[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Detecting projects in '/Users/ovasylenko/Core_Solutions/cardsharing/cardsharing.sln'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/ovasylenko/Core_Solutions/cardsharing'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.Services.WorkspaceHelper
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Startup
        Configuration finished.

@DustinCampbell
Copy link
Member

From the log above, it looks like everything loaded properly, but it didn't find any projects in your solution file, cardsharing.sln. Looking at that file it appears that they are indeed missing. If you have a solution file present, C# for VS Code will attempt to use it. And in this case, because there aren't any projects included in the solution, it doesn't load anything.

@DustinCampbell
Copy link
Member

Note that you can add projects to a solution using the .NET CLI using the dotnet sln command: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-sln.

Let me know if it doesn't work after adding your projects to the solution file.

@oleksiivasylenko
Copy link
Author

oleksiivasylenko commented Aug 11, 2017

Hi @DustinCampbell, thank you. Thant was an issue. I've used dotnet-sln and it helped me. Didn't know that it will be such behaviour if you do not add projects. Thanks!

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

No branches or pull requests

2 participants