dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 668 forks source link

C# IntelliSense version 1.4.1 not creating any references in the code #741

Closed andreasbaggesgaard closed 8 years ago

andreasbaggesgaard commented 8 years ago

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-preview2-003121) Product Information: Version: 1.0.0-preview2-003121 Commit SHA-1 hash: 1e9d529bc5

Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64

I've created a new ASP.NET core project via yeoman

VS Code version: 1.4.0 C# Extension version: 1.4.1

Expected behavior

There should be references in the code, and "go to definition" should work.

Actual behavior

Now nothing happens at all. I can see in my OmniSharp log that it sort of works, but I also get some errors as well. The only "IntelliSense" I am getting, is the cmd space option after the dot.

OmniSharp log: `Starting OmniSharp server at 9/2/2016, 11:12:07 AM Target: /Users/andreasbaggesgaard/WebApplication

OmniSharp server started Path: /Users/andreasbaggesgaard/.vscode/extensions/ms-vscode.csharp-1.4.1/out/.omnisharp-coreclr/OmniSharp PID: 2008

OmniSharp: -s /Users/andreasbaggesgaard/WebApplication --hostPID 1987 DotNet:enablePackageRestore=false --encoding utf-8 --stdio [INFORMATION:OmniSharp.Startup] Omnisharp server running using Stdio at location '/Users/andreasbaggesgaard/WebApplication' on host 1987. [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in /Users/andreasbaggesgaard/WebApplication [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: False [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update project /Users/andreasbaggesgaard/WebApplication [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Add project /Users/andreasbaggesgaard/WebApplication/project.json => be10f879-b802-42b8-ae82-0a76bfd5aa4b [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Processing [ProjectState] WebApplication/.NETCoreApp,Version=v1.0 [INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Added 213 and removed 0 file references [ERROR:OmniSharp.Startup] The project system 'DotNetProjectSystem' threw exception during initialization. The type initializer for 'Crypto' threw an exception. at Interop.Crypto.EvpSha1() at Internal.Cryptography.HashProviderDispenser.CreateHashProvider(String hashAlgorithmId) at System.Security.Cryptography.SHA1.Implementation..ctor() at System.Security.Cryptography.SHA1.Create() at Roslyn.Utilities.SHA1CryptoServiceProvider..ctor() at Microsoft.CodeAnalysis.CryptographicHashProvider.TryGetAlgorithm(SourceHashAlgorithm algorithmId) at Microsoft.CodeAnalysis.Text.SourceText.CalculateChecksum(Stream stream, SourceHashAlgorithm algorithmId) at Microsoft.CodeAnalysis.Text.SourceText.From(Stream stream, Encoding encoding, SourceHashAlgorithm checksumAlgorithm, Boolean throwIfBinaryDetected) at OmniSharp.DotNet.DotNetProjectSystem.UpdateSourceFiles(ProjectState state, IEnumerable1 sourceFiles) in /Users/travis/build/OmniSharp/omnisharp-roslyn/src/OmniSharp.DotNet/DotNetProjectSystem.cs:line 375 at OmniSharp.DotNet.DotNetProjectSystem.Update(Boolean allowRestore) in /Users/travis/build/OmniSharp/omnisharp-roslyn/src/OmniSharp.DotNet/DotNetProjectSystem.cs:line 131 at OmniSharp.Startup.Configure(IApplicationBuilder app, IServiceProvider serviceProvider, IOmnisharpEnvironment env, ILoggerFactory loggerFactory, ISharedTextWriter writer, IOmnisharpAssemblyLoader loader, IOptions1 optionsAccessor) in /Users/travis/build/OmniSharp/omnisharp-roslyn/src/OmniSharp.Host/Startup.cs:line 183 [INFORMATION:OmniSharp#MSBuild] No solution files found in '/Users/andreasbaggesgaard/WebApplication' [INFORMATION:OmniSharp.Startup] Configuration finished. [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /currentfilemembersastree: 200 46ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /projects: 200 352ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /projects: 200 304ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /projects: 200 309ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /projects: 200 312ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /codecheck: 200 17ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /codecheck: 200 0ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /typelookup: 200 22ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /codecheck: 200 0ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /typelookup: 200 0ms [INFORMATION:OmniSharp.Middleware.LoggingMiddleware] /gotoDefinition: 200 20ms

`

I'm sorry if this has been asked too many times before, but after a few days of trying to fix the problem, and not finding the right answer yet, I could really appreciate a kick in the right direction.

DustinCampbell commented 8 years ago

Hi! This is a duplicate of issue #676. The solution is to run the following from the command line:

ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/

These are the prerequisites for running .NET Core on macOS here: https://www.microsoft.com/net/core#macos

andreasbaggesgaard commented 8 years ago

Thank you!


Fra: Dustin Campbell notifications@github.com Sendt: 2. september 2016 14:38 Til: OmniSharp/omnisharp-vscode Cc: andreasbaggesgaard; Author Emne: Re: [OmniSharp/omnisharp-vscode] C# IntelliSense version 1.4.1 not creating any references in the code (#741)

Hi! This is a duplicate of issue #676https://github.com/OmniSharp/omnisharp-vscode/issues/676. The solution is to run the following from the command line:

ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/

These are the prerequisites for running .NET Core on macOS here: https://www.microsoft.com/net/core#macos

You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/OmniSharp/omnisharp-vscode/issues/741#issuecomment-244363382, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AREnPSKBwFQLDfs_DwTWNGkDNdtVqLibks5qmBjFgaJpZM4Jzkkl.