OmniSharp / omnisharp-roslyn

OmniSharp server (HTTP, STDIO) based on Roslyn workspaces
MIT License
1.76k stars 422 forks source link

Ubuntu: "The SDK 'Microsoft.Net.Sdk' specified could not be found." #1394

Open akshita31 opened 5 years ago

akshita31 commented 5 years ago

From @https://github.com/Vannevelj I've installed the net core 2.1 SDK and the projects load correctly. I then installed the 3.0-preview and changed the solution to use this instead and now they can no longer load in VSCode. It loads perfectly fine on my Windows machine.

I've tried setting the SDK path environment variable explicitly but no difference: MsBuildSDKsPath=/usr/share/dotnet/sdk/3.0.100-preview-010184/Sdks/ as well as changing omnisharp.path to latest, setting the path inside omnisharp.json directly and using the insiders build of VSCode.

Is there anything off in my environment? I've created a VM with Linux specifically to test .net core 3 on it so there shouldn't be anything unusual interfering with things. Happy to try out whatever you can suggest.

Example csproj file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <LangVersion>8.0</LangVersion>
    <IsPackable>false</IsPackable>
  </PropertyGroup>
  <ItemGroup>
      <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
      <PackageReference Include="Mongo2Go" Version="2.2.8" />
      <PackageReference Include="Moq" Version="4.7.145" />
      <PackageReference Include="xunit" Version="2.2.0" />
      <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\..\src\MyApp.Client\MyApp.Client.csproj" />
    <ProjectReference Include="..\..\..\src\MyApps\MyApp.csproj" />
  </ItemGroup>
</Project>

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview-010184
 Commit:    c57bde4593

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/3.0.100-preview-010184/

Host (useful for support):
  Version: 3.0.0-preview-27324-5
  Commit:  63a01b08e5

.NET Core SDKs installed:
  2.2.103 [/usr/share/dotnet/sdk]
  3.0.100-preview-010184 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-19075-0444 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview-27324-5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

VS Code version:

Version: 1.30.2
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:49:48.319Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Linux x64 4.15.0-32-generic

C# Extension version: 1.17.1

Steps to reproduce

  1. Install 2.2.1 SDK
  2. Install 3.0-preview SDK
  3. dotnet new console
  4. Open via code .

Expected behavior

The project loads correctly and code lens options show.

Actual behavior

Errors in the output and no code lens available. However, using dotnet run runs the project as intended.

Starting OmniSharp server at 27/01/2019, 20:04:35
Target: /home/jeroen/Documents/github/my-app/MyApp.Webapp.sln

OmniSharp server started.
Path: /home/jeroen/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/run
PID: 20475

[info]: OmniSharp.Stdio.Host
Starting OmniSharp on ubuntu 18.4 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 15.0 - "/home/jeroen/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/home/jeroen/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 15.0 - "/home/jeroen/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
MSBuildExtensionsPath = /home/jeroen/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild
BypassFrameworkInstallChecks = true
CscToolPath = /home/jeroen/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
MSBuildToolsPath = /home/jeroen/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/jeroen/Documents/github/my-app'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/home/jeroen/Documents/github/my-app/MyApp.Webapp.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/jeroen/Documents/github/my-app/src/MyApp.Webapp/MyApp.Webapp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/jeroen/Documents/github/my-app/src/MyApp.Client/MyApp.Client.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/jeroen/Documents/github/my-app/src/MyApp/MyApp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/jeroen/Documents/github/my-app/tests/unit/MyApp.Tests/MyApp.Tests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/jeroen/Documents/github/my-app'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/home/jeroen/Documents/github/my-app' on host 20382.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/jeroen/Documents/github/my-app/src/MyApp.Webapp/MyApp.Webapp.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/home/jeroen/Documents/github/my-app/src/MyApp.Webapp/MyApp.Webapp.csproj'.
/home/jeroen/Documents/github/my-app/src/MyApp.Webapp/MyApp.Webapp.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. /home/jeroen/Documents/github/my-app/src/MyApp.Webapp/MyApp.Webapp.csproj
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1] (System.Boolean condition, System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00003] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImportsFromUnescapedImportExpressionConditioned (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, System.Collections.Generic.List`1[Microsoft.Build.Construction.ProjectRootElement]& projects, System.Boolean throwOnFileNotExistsError) [0x00254] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImports (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x00024] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Framework.BuildEventContext buildEventContext) [0x00103] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.Evaluation.IEvaluatorData`4[P,I,M,D] data, Microsoft.Build.Construction.ProjectRootElement root, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, System.Int32 maxNodeCount, Microsoft.Build.Collections.PropertyDictionary`1[T] environmentProperties, Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Evaluation.IItemFactory`2[S,T] itemFactory, Microsoft.Build.Evaluation.IToolsetProvider toolsetProvider, Microsoft.Build.Evaluation.ProjectRootElementCache projectRootElementCache, Microsoft.Build.Framework.BuildEventContext buildEventContext, Microsoft.Build.Execution.ProjectInstance projectInstanceIfAnyForDebuggerOnly, Microsoft.Build.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0001a] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x0004c] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00034] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00023] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project.Initialize (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00126] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0009e] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f5] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003f] in <410de907c9654d6593c7a8d4ded6b20a>:0 
at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <410de907c9654d6593c7a8d4ded6b20a>:0 
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <410de907c9654d6593c7a8d4ded6b20a>:0 
at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass25_0.<LoadProject>b__0 () [0x00000] in <410de907c9654d6593c7a8d4ded6b20a>:0 
at (wrapper delegate-invoke) System.Func`1[System.ValueTuple`3[OmniSharp.MSBuild.ProjectFile.ProjectFileInfo,System.Collections.Immutable.ImmutableArray`1[OmniSharp.MSBuild.Logging.MSBuildDiagnostic],OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs]].invoke_TResult()
at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject (System.String projectFilePath, System.Func`1[TResult] loader) [0x0001b] in <410de907c9654d6593c7a8d4ded6b20a>:0 
sleemer commented 5 years ago

@akshita31 I have the same issue on macOS. And I believe that's because there is no proper MSBuildInstanceProvider implementation that will find msbuild to use on macOS and Linux. On Windows it works for you because there is VisualStudioInstanceProvider that looks if VS is installed and gets the correct path to msbuild from it. On macOS without installed mono you only have StandAloneInstanceProvider that has hardcoded path to msbuild to look for ...

here is the code from src/OmniSharp.Host/MSBuild/Discovery/MSBuildInstanceProvider.cs

protected static string FindLocalMSBuildDirectory()
{
   // If OmniSharp is running normally, MSBuild is located in an 'msbuild' folder beneath OmniSharp.exe.
   var msbuildDirectory = Path.Combine(AppContext.BaseDirectory, "msbuild");
  ...
}
sleemer commented 5 years ago

Moreover, the whole current logic of choosing msbuild to use seems more like guessing... this general approach doesn't work on Windows when you have two Visual Studio instancies installed (e.g. 2017 and 2019). I think OmniSharp.MSBuild.Discovery.MSBuildLocator should take into consideration TargetFramework or it's equvalent in old project's file format, or should be configurable. Otherwise it won't work.

CarmenAPuccio commented 5 years ago

Exact same issue on my Mac. Setting MsBuildSDKsPath in omnisharp.json and omnisharp.path to latest results in

[warn]: OmniSharp.MSBuild.ProjectManager Failed to load project file '/Users/puccio/Desktop/myApp/myApp.csproj'. /Users/puccio/Desktop/myApp/myApp.csproj(1,1) Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.

I've tried reinstalling VSCode, .Net Core 2.2, mono and the C# extension so many times now to no avail.

puccio @ ~/Desktop/myApp $: dotnet --info .NET Core SDK (reflecting any global.json): Version: 2.2.103 Commit: 8edbc2570a

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/2.2.103/

Host (useful for support): Version: 2.2.1 Commit: 878dd11e62

.NET Core SDKs installed: 2.2.103 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

KeyurRamoliya commented 5 years ago

I guess there is nothing to do with the OS here. It happens in Windows too. See the error below:

Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.

Here is my environment details:

dotnet --info

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview-010184
 Commit:    c57bde4593

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview-010184\

Host (useful for support):
  Version: 3.0.0-preview-27324-5
  Commit:  63a01b08e5
sleemer commented 5 years ago

@KeyurRamoliya you're absolutely right, this problem has nothing to do with OS. On Windows it's easier, because you have more options: you could install Visual Studio 2019, and than OmniSharp will be able to pick up MSbuild from it, thanks to VisualStudioInstanceProvider. On Linux and macOS you don't have it. Even though there is VS for Mac, but the latest version of VS for Mac is 7.7, and it only supports .net core 2.2. The only way that I can see is to write a new implementation of MSBuildInstanceProvider, that will be able to pick up MSBuild from the path where .net core's installed.

byroniac commented 5 years ago

FYI if it helps anyone. I've got a Hyper-V VM running Ubuntu 19.04 and the snap vscode is installed, and I had this same issue, which I seem to have resolved by installing the dotnet-sdk snap and doing a "sudo ln -sv /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet" to manually create a symbolic link where Omnisharp would find it. In a perfect world, all I'd have to do is something like "sudo snap alias dotnet-sdk.dotnet dotnet" but I never could get Omnisharp to work that way as it appears to ignore /snap/bin or something (not sure). You can also just create a "~/bin" folder and make the symbolic link there (no sudo required, obviously, but I went ahead and made it system-wide for the VM).

CarmenAPuccio commented 5 years ago

@byroniac Yea I've tried that before on a Mac before where you create a symbolic link from /usr/local/bin/dotnet -> /usr/local/share/dotnet/dotnet but it still doesn't work.

byroniac commented 5 years ago

In my case I only have the snaps installed (dotnet-sdk, vscode). So I am not exactly in the same scenario (I did get the same Omnisharp error message and failed to get Intellisense to load). I was hoping this would give someone an idea, but apparently, there is an issue with the preview version of dotnet? I'm not familiar with Macs, so do they even have a /usr/local/bin in the default PATH? Have you tried /usr/bin? (like renaming any existing dotnet, and creating a symbolic link to point to the dotnet you want to use?)

akshita31 commented 5 years ago

For folks hitting this issue on windows, please try installing .Net Core Build Tools as described here

akshita31 commented 5 years ago

For ubuntu please try adding a omnisharp.json file as suggested here

KeyurRamoliya commented 5 years ago

@akshita31 I am not able to install ".NET Core build tools" workload because of some reason. So is there any chance that it will be fixed by Omnisharp devs?

savpek commented 5 years ago

I got this issue on windows too, it feels that last updated msbuild wins. I installed 3.0 SDK -> broken. Installed VS2019 preview -> works again. Updated project tools for VS2017 -> broken again. Now VS2019 version is second on list and not first.

I updated MsBuildLocatator.GetInstances() and compiled local version:

        public ImmutableArray<MSBuildInstance> GetInstances()
        {
            var result = _providers
                    .SelectMany(x => x.GetInstances())
                    .Where(x => x != null)
                    .OrderByDescending(x => x.Version)
                    .ToImmutableArray();

            LogInstances(result);

            return result;
        }

However i don't know is that good/bad/terrible idea to use latest version as default. Atleast that works on my machine 🤔

akshita31 commented 5 years ago

@KeyurRamoliya Could you set omnisharp.loggingLevel: debug and share the omnisharp log?

KeyurRamoliya commented 5 years ago

@akshita31 Here is the omnisharp log with log level debug.

Starting OmniSharp server at 6/3/2019, 4:25:06 PM
    Target: c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.sln

OmniSharp server started.
    Path: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\OmniSharp.exe
    PID: 3588

[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Cake, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.DotNet, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.DotNetTest, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Host, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.MSBuild, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Plugins, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Roslyn, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Roslyn.CSharp, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Script, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[dbug]: OmniSharp.MSBuild.Discovery.Providers.VisualStudioInstanceProvider
        An exception was thrown while retrieving Visual Studio instances.
System.DllNotFoundException: Unable to load DLL 'Microsoft.VisualStudio.Setup.Configuration.Native.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at OmniSharp.MSBuild.Discovery.Interop.GetSetupConfiguration(ISetupConfiguration& configuration, IntPtr reserved)
   at OmniSharp.MSBuild.Discovery.Interop.GetSetupConfiguration()
   at OmniSharp.MSBuild.Discovery.Providers.VisualStudioInstanceProvider.GetInstances()
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin"
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.Utilities.Core.dll' (name-only).
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.Tasks.Core.dll' (name-only).
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.dll' (name-only).
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.Framework.dll' (name-only).
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin"
            CscToolExe = csc.exe
            CscToolPath = C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Roslyn
            MSBuildExtensionsPath = C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild
            MSBuildToolsPath = C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.Utilities.Core.dll' (name-only).
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.Framework.dll' (name-only).
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Features, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.VisualBasic.Features.dll'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in 'c:\Projects\Github\performance\src\benchmarks\micro'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.Build'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.dll' (name-only).
[dbug]: OmniSharp.MSBuild.ProjectSystem
        MSBuild environment: 
Mode: Standalone
RunningTests: False
RunningInVisualStudio: False
MSBuildToolsDirectory32: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin
MSBuildToolsDirectory64: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin
MSBuildSDKsPath: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Sdks
CurrentMSBuildConfigurationFile: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\MSBuild.exe.config
CurrentMSBuildExePath: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\MSBuild.exe
CurrentMSBuildToolsDirectory: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin
VisualStudioInstallRootDirectory: 
MSBuildExtensionsPath: C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin

[dbug]: OmniSharp.MSBuild.ProjectLoader
        'MSBuildExtensionsPath' set to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'CscToolPath' set to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Roslyn'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'CscToolExe' set to 'csc.exe'
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in 'c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for 'c:\Projects\Github\performance\src\tests\benchmarks\micro\Tests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in 'c:\Projects\Github\performance\src\benchmarks\micro'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.csproj
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.dll' (name-only).
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'c:\Projects\Github\performance\src\benchmarks\micro' on host 24988.
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 1,
  "Command": "/projects"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 2,
  "Command": "/projects"
}
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.Build.resources, Version=15.1.0.0, Culture=en-US, PublicKeyToken=b03f5f7f11d50a3a'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.Build.resources, Version=15.1.0.0, Culture=en-US, PublicKeyToken=b03f5f7f11d50a3a'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.Build.resources.dll'.
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 'c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.csproj'.
c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.csproj
   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List`1& projects, Boolean throwOnFileNotExistsError)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext)
   at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
   at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath)
   at OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath)
   at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectLoader loader)
   at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func`1 loader)

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: c:\Projects\Github\performance\src\tests\benchmarks\micro\Tests.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file 'c:\Projects\Github\performance\src\tests\benchmarks\micro\Tests.csproj'.
c:\Projects\Github\performance\src\tests\benchmarks\micro\Tests.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  c:\Projects\Github\performance\src\tests\benchmarks\micro\Tests.csproj
   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List`1& projects, Boolean throwOnFileNotExistsError)
   at Microsoft.Build.Evaluation.Evaluator`4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
   at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
   at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext)
   at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
   at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
   at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath)
   at OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath)
   at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectLoader loader)
   at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func`1 loader)

[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: c:\Projects\Github\performance\src\benchmarks\micro\MicroBenchmarks.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: c:\Projects\Github\performance\src\tests\benchmarks\micro\Tests.csproj
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 1,
  "Command": "/projects",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "Cake": {
      "Projects": []
    },
    "DotNet": {
      "Projects": [],
      "RuntimePath": null
    },
    "MsBuild": {
      "SolutionPath": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\MicroBenchmarks.sln",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 52,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 2,
  "Command": "/projects",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "Cake": {
      "Projects": []
    },
    "DotNet": {
      "Projects": [],
      "RuntimePath": null
    },
    "MsBuild": {
      "SolutionPath": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\MicroBenchmarks.sln",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 51,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 3,
  "Command": "/projects"
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 3,
  "Command": "/projects",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "Cake": {
      "Projects": []
    },
    "DotNet": {
      "Projects": [],
      "RuntimePath": null
    },
    "MsBuild": {
      "SolutionPath": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\MicroBenchmarks.sln",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 67,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 4,
  "Command": "/codecheck",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs"
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 5,
  "Command": "/v2/blockstructure",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs"
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 4,
  "Command": "/codecheck",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "QuickFixes": []
  },
  "Seq": 70,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 6,
  "Command": "/v2/codestructure",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs"
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 6,
  "Command": "/v2/codestructure",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": null,
  "Seq": 75,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 7,
  "Command": "/v2/codestructure",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs"
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 7,
  "Command": "/v2/codestructure",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": null,
  "Seq": 78,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 8,
  "Command": "/v2/codestructure",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs"
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 8,
  "Command": "/v2/codestructure",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": null,
  "Seq": 81,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 9,
  "Command": "/v2/codestructure",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs"
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 9,
  "Command": "/v2/codestructure",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": null,
  "Seq": 84,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 10,
  "Command": "/v2/codestructure",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs"
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 10,
  "Command": "/v2/codestructure",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": null,
  "Seq": 87,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 11,
  "Command": "/v2/getcodeactions",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs",
    "Line": 30,
    "Column": 44
  }
}
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=2.9.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Workspaces.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=2.9.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Workspaces.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=2.9.0.0, Culture=en, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Workspaces.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Workspaces.resources, Version=2.9.0.0, Culture=en, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Workspaces.resources.dll'.
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 5,
  "Command": "/v2/blockstructure",
  "Running": true,
  "Success": false,
  "Message": "\"System.NullReferenceException: Object reference not set to an instance of an object.\\r\\n   at OmniSharp.Roslyn.CSharp.Services.Structure.BlockStructureService.<Handle>d__12.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at OmniSharp.Endpoint.EndpointHandler`2.<HandleSingleRequest>d__18.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at OmniSharp.Endpoint.EndpointHandler`2.<Process>d__16.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at OmniSharp.Stdio.Host.<HandleRequest>d__13.MoveNext()\"",
  "Body": null,
  "Seq": 72,
  "Type": "response"
}
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Features.resources, Version=2.9.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Features.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Features.resources, Version=2.9.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Features.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Features.resources, Version=2.9.0.0, Culture=en, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Features.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.Features.resources, Version=2.9.0.0, Culture=en, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate 'C:\Users\keyurramoliya\.vscode\extensions\ms-vscode.csharp-1.17.1\.omnisharp\1.32.8\msbuild\15.0\Bin\Microsoft.CodeAnalysis.Features.resources.dll'.
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 11,
  "Command": "/v2/getcodeactions",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "CodeActions": []
  },
  "Seq": 90,
  "Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 12,
  "Command": "/v2/getcodeactions",
  "Arguments": {
    "FileName": "c:\\Projects\\Github\\performance\\src\\benchmarks\\micro\\coreclr\\Span\\Indexer.cs",
    "Line": 30,
    "Column": 44
  }
}
[dbug]: OmniSharp.Stdio.Host
        ************  Response ************ 
{
  "Request_seq": 12,
  "Command": "/v2/getcodeactions",
  "Running": true,
  "Success": true,
  "Message": null,
  "Body": {
    "CodeActions": []
  },
  "Seq": 110,
  "Type": "response"
}

Let me know if you need anything else.

akshita31 commented 5 years ago

@KeyurRamoliya I think the problem for you is the one listed here https://github.com/OmniSharp/omnisharp-vscode/issues/2937. Basically msbuild 15 that ships with omnisharp currently is not compatible with the .net core sdk 3.0. We are working on this. Sorry that it is taking so long and thank you for the patience.

laredoza commented 5 years ago

I had a similar issue with DotnetCore 2.2. I added the following to .bashrc on Ubuntu:

export MSBuildSDKsPath="/usr/share/dotnet/sdk/$(dotnet --version)/Sdks"

mickaelistria commented 5 years ago

FWIW, on my Fedora installation where I suffered from this issues for months, I found out that the issue was that some dotnet symlink was dead in my installation. IIRC, it was the one in /opt/dotnet/dotnet that was broken, while .NET Core was installed someplace, and MSBuild was using this broken symlink anyway then failed resolution of Sdks. Removing the broken symlink fixed it.

prashit commented 5 years ago

I had a similar issue with DotnetCore 2.2. I added the following to .bashrc on Ubuntu:

export MSBuildSDKsPath="/usr/share/dotnet/sdk/$(dotnet --version)/Sdks"

This fixed for me. Thanks!

byroniac commented 5 years ago

I had a similar issue with DotnetCore 2.2. I added the following to .bashrc on Ubuntu:

export MSBuildSDKsPath="/usr/share/dotnet/sdk/$(dotnet --version)/Sdks"

Oh wow... it works in my Ubuntu 18.04 VM! THANK YOU. Kudos.

byroniac commented 5 years ago

FWIW, on my Fedora installation where I suffered from this issues for months, I found out that the issue was that some dotnet symlink was dead in my installation. IIRC, it was the one in /opt/dotnet/dotnet that was broken, while .NET Core was installed someplace, and MSBuild was using this broken symlink anyway then failed resolution of Sdks. Removing the broken symlink fixed it.

@mickaelistria I appreciate your comment. Unfortunately, this was not my issue. In another Ubuntu VM, I am running Ubuntu 18.10 so I am using the Dotnet and VSCode snaps. I haven't tried the suggestion above for it, yet. When I do, I will put in my .bash_aliases file instead of ,bashrc and use the path for the Snap Dotnet, which is something like /snap/dotnet-sdk/current.... whatever, and I hope it will work. Before Dotnet 2.2.205, all I needed was a symlink to the snap version of dotnet, which I created as "/usr/local/bin/dotnet" pointing to the snap version of dotnet, and it worked fine. Not sure why that stopped working with this release, but I'll try a modified version of the suggestion above and see. Fingers crossed. Hope you don't have issues (I don't on Windows, but I haven't used Fedora in quite a while).

kjbetz commented 5 years ago

I had a similar issue with DotnetCore 2.2. I added the following to .bashrc on Ubuntu:

export MSBuildSDKsPath="/usr/share/dotnet/sdk/$(dotnet --version)/Sdks"

This fixed my issue on Fedora 29! Thank you!

JIA-LYU commented 5 years ago

I had a similar issue with DotnetCore 2.2. I added the following to .bashrc on Ubuntu:

export MSBuildSDKsPath="/usr/share/dotnet/sdk/$(dotnet --version)/Sdks"

I had a similar issue with dotnetcore 2.2.203 sdk. I add it by tar.gz on my Gentoo, solved it as you said. Thank you.

tskardal commented 5 years ago

FWIW, on my Fedora installation where I suffered from this issues for months, I found out that the issue was that some dotnet symlink was dead in my installation. IIRC, it was the one in /opt/dotnet/dotnet that was broken, while .NET Core was installed someplace, and MSBuild was using this broken symlink anyway then failed resolution of Sdks. Removing the broken symlink fixed it.

@mickaelistria I appreciate your comment. Unfortunately, this was not my issue. In another Ubuntu VM, I am running Ubuntu 18.10 so I am using the Dotnet and VSCode snaps. I haven't tried the suggestion above for it, yet. When I do, I will put in my .bash_aliases file instead of ,bashrc and use the path for the Snap Dotnet, which is something like /snap/dotnet-sdk/current.... whatever, and I hope it will work. Before Dotnet 2.2.205, all I needed was a symlink to the snap version of dotnet, which I created as "/usr/local/bin/dotnet" pointing to the snap version of dotnet, and it worked fine. Not sure why that stopped working with this release, but I'll try a modified version of the suggestion above and see. Fingers crossed. Hope you don't have issues (I don't on Windows, but I haven't used Fedora in quite a while).

I'm on Ubuntu 19.04 with both vscode and dotnet installed from snap. I haven't manged to get it working by setting $MSBuildSDKsPath. (Or any other way, for that matter :nerd_face: )

byroniac commented 5 years ago

I'm on Ubuntu 19.04 with both vscode and dotnet installed from snap. I haven't manged to get it working by setting $MSBuildSDKsPath. (Or any other way, for that matter 🤓 )

On my Ubuntu 19.04 machine, I have 2.2.204 working (disclaimer: have not tried 3.0-preview), by making sure my snaps were all up to date with "sudo snap refresh" and then making sure I had a link to dotnet by doing something like (from memory, as I'm not on that machine at the moment): "sudo ln -sv /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet" to make a global link to "dotnet". Making a snap alias was insufficient for VSCode, though for CLI work it was fine, so I removed it and did the symbolic link approach. This might all go out the window with the 3.0-preview, though. They had a problem with the SDK resolver in VSCode in the C# Omnisharp extension which is now fixed, I believe. I haven't tried it in the last few days, though.

tskardal commented 5 years ago

Thanks! That got me to the next error: The imported project "/usr/lib/mono/xbuild/15.0/Microsoft.Common.props" was not found

But luckily that one has its own issue (OmniSharp/omnisharp-vscode#3049) :smile: