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

Intellisense fails to load in VS Code #937

Closed
vedanshumandvikar opened this issue Nov 15, 2016 · 5 comments
Closed

Intellisense fails to load in VS Code #937

vedanshumandvikar opened this issue Nov 15, 2016 · 5 comments

Comments

@vedanshumandvikar
Copy link

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003133)

Product Information:
Version: 1.0.0-preview2-003133
Commit SHA-1 hash: 74df06500c

Runtime Environment:
OS Name: Windows
OS Version: 6.2.9200
OS Platform: Windows
RID: win8-x64

VS Code version:1.7.1
C# Extension version:1.5.1

Steps to reproduce

I am trying to develop a web Api solution using .NET cor and VS code. There was an update to C# extension which I installed today. Post update, I get following error while trying to load the intellisense. I have tried increasing the projectloadtimeout, but it is of no use

OmniSharp: -s c:\aspnetwebapi --hostPID 13824 --stdio DotNet:enablePackageRestore=false --encoding utf-8

Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Diagnostics.DiagnosticSourceEventSource' threw an exception. ---> System.MissingMethodException: Method not found: 'Void System.Diagnostics.Tracing.EventSource..ctor(System.Diagnostics.Tracing.EventSourceSettings)'.
at System.Diagnostics.DiagnosticSourceEventSource..ctor()
at System.Diagnostics.DiagnosticSourceEventSource..cctor()
--- End of inner exception stack trace ---
at System.Diagnostics.DiagnosticListener..ctor(String name)
at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildHostingServices()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at OmniSharp.Program.Main(String[] args) in C:\Projects\omnisharp-roslyn\src\OmniSharp.Host\Program.cs:line 143
at Program.Main(String[] args) in C:\Projects\omnisharp-roslyn\src\OmniSharp\Program.cs:line 21
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

Can you help? I can provide more details if needed

Expected behavior

Intellisense has to load

Actual behavior

Intellisense does not work

@DustinCampbell
Copy link
Member

Thanks! I can reproduce this on Windows 8.1 x64 with no Visual Studio installed. I suspect it's a problem with the version of the .NET Framework that's installed.

@DustinCampbell
Copy link
Member

Yes, that's the case. OmniSharp requires .NET Framework 4.6 but Windows 8.1 ships with .NET Framework 4.5.1. You can install an updated .NET Framework from here: https://msdn.microsoft.com/en-us/library/5a4x27ek(v=vs.110).aspx.

@gregg-miskelly
Copy link
Contributor

@DustinCampbell do you know if we can either add a diagnostic, or add a .config file which will cause a feature-on-demand dialog to come up?

@DustinCampbell
Copy link
Member

I'm not certain, but I'll look into it. Great idea!

@DustinCampbell
Copy link
Member

OK. I've updated the downloads for Windows to include this PR on OmniSharp: OmniSharp/omnisharp-roslyn#669. This will display a dialog telling the user to install .NET Framework 4.6 along with a link to download it from.

Note: OmniSharp must require .NET Framework 4.6 because the new MSBuild 15.0 that it uses does.

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

3 participants