You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.NET Command Line Tools (2.0.0)
Runtime Environment:
OS Name: Windows
OS Version: 6.3.9600
OS Platform: Windows
RID: win81-x64
VS Code version: 1.23.1
C# Extension version: 1.15.2
Steps to reproduce
OmniSharp started and then throws exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at OmniSharp.MSBuild.Discovery.Providers.DevConsoleInstanceProvider.GetInstances()
at OmniSharp.MSBuild.Discovery.MSBuildLocator.GetInstances()
at OmniSharp.CompositionHostBuilder.RegisterMSBuildInstance(IMSBuildLocator msbuildLocator, ILogger logger)
at OmniSharp.CompositionHostBuilder.Build()
at OmniSharp.Stdio.Host..ctor(TextReader input, ISharedTextWriter writer, IOmniSharpEnvironment environment, IConfiguration configuration, IServiceProvider serviceProvider, CompositionHostBuilder compositionHostBuilder, ILoggerFactory loggerFactory, CancellationTokenSource cancellationTokenSource)
at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.<Main>b__1()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at OmniSharp.HostHelpers.Start(Func`1 action)
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).
Thanks for reporting this failure! It looks to me like this can happen if the "VSINSTALLDIR" environment variable is set but "VSCMD_VER" is not. This could happen with older instances of Visual Studio when launching from a Developer Command Prompt or if you've set "VSINSTALLDIR" yourself.
I have fix for null-ref in PR. Once this PR is merged and CI is complete, you can use it in C# for VS Code by setting the following option in VS Code:
{
"omnisharp.path": "latest"
}
Alternatively, you should be able workaround the issue by setting the "VSCMD_VER" environment variable to "".
From @sidecus on May 16, 2018 4:42
Environment data
dotnet --info
output:VS Code version: 1.23.1
C# Extension version: 1.15.2
Steps to reproduce
OmniSharp started and then throws exception:
Copied from original issue: dotnet/vscode-csharp#2310
The text was updated successfully, but these errors were encountered: