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

The SDK 'Microsoft.NET.Sdk' specified could not be found #3160

Closed
wheelerlaw opened this issue Jul 9, 2019 · 22 comments
Closed

The SDK 'Microsoft.NET.Sdk' specified could not be found #3160

wheelerlaw opened this issue Jul 9, 2019 · 22 comments

Comments

@wheelerlaw
Copy link

wheelerlaw commented Jul 9, 2019

Issue Description

Fresh installation of .NET Core 3, VSCode, and the C# extension fails to open apps created by dotnet new console -o test-app on Fedora 29. Some of the related issues have workarounds, but they only work on Windows.

Steps to Reproduce

  1. Install .NET Core 3 snap:
    sudo snap install dotnet-sdk --beta --classic
    sudo snap alias dotnet-sdk.dotnet dotnet
  2. Install VSCode:
    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
    dnf check-update
    sudo dnf install code
  3. Install the C# extension in VSCode
  4. Create a new project:
    dotnet new console -o test-app
  5. Open the test-app folder in VSCode. It will show an error.

Expected Behavior

The project opens successfully, I am able to debug the program.

Actual Behavior

Small window pops up with an error. I have to manually configure the debug configurations.

Logs

OmniSharp log

Starting OmniSharp server at 7/9/2019, 11:30:03 AM
    Target: /home/wlaw/test-app

OmniSharp server started.
    Path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/run
    PID: 7052

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on fedora 29.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin"
            MSBuildExtensionsPath = /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/home/wlaw/test-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
        No solution files found in '/home/wlaw/test-app'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/wlaw/test-app/test-app.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/home/wlaw/test-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.MSBuild.ProjectManager
        Loading project: /home/wlaw/test-app/test-app.csproj
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/home/wlaw/test-app' on host 6952.
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/home/wlaw/test-app/test-app.csproj'.
/home/wlaw/test-app/test-app.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /home/wlaw/test-app/test-app.csproj
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult, System.Boolean throwOnFileNotExistsError) [0x0024e] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImports (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult) [0x00027] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0002d] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0005e] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00035] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00007] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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) [0x00093] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003f] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectIdInfo projectIdInfo, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass30_0.<LoadProject>b__0 () [0x00000] in <598756bbad7c4a61bb212e3681e5d1da>: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 <598756bbad7c4a61bb212e3681e5d1da>:0 

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /home/wlaw/test-app/test-app.csproj

Debug log:

Starting OmniSharp server at 7/31/2019, 2:46:48 PM
    Target: /home/wlaw/csci-351-project2

OmniSharp server started with Mono 5.20.1.
    Path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/OmniSharp.exe
    PID: 8824

[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Cake
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Cake, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.DotNet
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.DotNet, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.DotNetTest
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.DotNetTest, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Host
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Host, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.MSBuild
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.MSBuild, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Roslyn
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Roslyn, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Roslyn.CSharp
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Roslyn.CSharp, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Script
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Script, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Shared
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Shared, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.razor/OmniSharpPlugin/Microsoft.AspNetCore.Razor.OmniSharpPlugin.dll
[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on fedora 29.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[dbug]: OmniSharp.MSBuild.Discovery.Providers.MonoInstanceProvider
        Mono MSBuild could not be used because '/usr/lib/mono/msbuild/Current/bin/Microsoft.Build.dll' does not exist.
[warn]: OmniSharp.MSBuild.Discovery.Providers.MonoInstanceProvider
        It looks like you have Mono 5.2.0 or greater installed but MSBuild could not be found.
Try installing MSBuild into Mono (e.g. 'sudo apt-get install msbuild') to enable better MSBuild support.
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin"
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.dll' (name-only).
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Utilities.Core.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Utilities.Core.dll' (name-only).
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Framework.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Framework.dll' (name-only).
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.dll' (name-only).
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            TargetFrameworkRootPath = /usr/lib/mono/xbuild-frameworks
            MSBuildToolsPath = /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
            CscToolPath = /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = /usr/lib/mono/xbuild
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: Microsoft.CodeAnalysis.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: Microsoft.CodeAnalysis.CSharp.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.VisualBasic.Features.dll'.
[trce]: OmniSharp.HostServicesAggregator
        Successfully added Microsoft.CodeAnalysis.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
        Successfully added Microsoft.CodeAnalysis.CSharp.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
        Successfully added Microsoft.AspNetCore.Razor.OmniSharpPlugin.StrongNamed, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to host service assemblies.
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/home/wlaw/csci-351-project2'.
[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.ProjectSystem
        MSBuild environment: 
Mode: Standalone
RunningTests: False
RunningInVisualStudio: False
MSBuildToolsDirectory32: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
MSBuildToolsDirectory64: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
MSBuildSDKsPath: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Sdks
CurrentMSBuildConfigurationFile: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/MSBuild.dll.config
CurrentMSBuildExePath: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/MSBuild.dll
CurrentMSBuildToolsDirectory: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
VisualStudioInstallRootDirectory: 
MSBuildExtensionsPath: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin

[dbug]: OmniSharp.MSBuild.ProjectLoader
        'MSBuildExtensionsPath' set to '/usr/lib/mono/xbuild'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'TargetFrameworkRootPath' set to '/usr/lib/mono/xbuild-frameworks'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'CscToolPath' set to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Roslyn'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'CscToolExe' set to 'csc.exe'
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/home/wlaw/csci-351-project2'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/wlaw/csci-351-project2/csci-351-project2.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/home/wlaw/csci-351-project2'.
[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: /home/wlaw/csci-351-project2/csci-351-project2.csproj
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/home/wlaw/csci-351-project2' on host 8546.
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 2,
  "Command": "/projects"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 1,
  "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 '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.DotNet.MSBuildSdkResolver.resources, Version=2.2.202.0, Culture=en-US, PublicKeyToken=adb9793829ddae60'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.DotNet.MSBuildSdkResolver.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.DotNet.MSBuildSdkResolver.resources, Version=2.2.202.0, Culture=en, PublicKeyToken=adb9793829ddae60'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.DotNet.MSBuildSdkResolver.resources.dll'.
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/home/wlaw/csci-351-project2/csci-351-project2.csproj'.
/home/wlaw/csci-351-project2/csci-351-project2.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /home/wlaw/csci-351-project2/csci-351-project2.csproj
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult, System.Boolean throwOnFileNotExistsError) [0x0024e] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImports (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult) [0x00027] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0002d] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0005e] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00035] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00007] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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) [0x00093] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003f] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectIdInfo projectIdInfo, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass30_0.<LoadProject>b__0 () [0x00000] in <598756bbad7c4a61bb212e3681e5d1da>: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 <598756bbad7c4a61bb212e3681e5d1da>:0 

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /home/wlaw/csci-351-project2/csci-351-project2.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": "/home/wlaw/csci-351-project2",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 64,
  "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": "/home/wlaw/csci-351-project2",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 63,
  "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": "/home/wlaw/csci-351-project2",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 77,
  "Type": "response"
}

C# log

n/a

Environment information

VSCode version: 1.36.0
C# Extension: 1.20.0

Mono Information OmniSharp using built-in mono
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.0.100-preview6-012264 Commit: be3f0c1a03

Runtime Environment:
OS Name: fedora
OS Version: 29
OS Platform: Linux
RID: fedora.29-x64
Base Path: /var/lib/snapd/snap/dotnet-sdk/41/sdk/3.0.100-preview6-012264/

Host (useful for support):
Version: 3.0.0-preview6-27804-01
Commit: fdf81c6faf

.NET Core SDKs installed:
3.0.100-preview6-012264 [/var/lib/snapd/snap/dotnet-sdk/41/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview6.19307.2 [/var/lib/snapd/snap/dotnet-sdk/41/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0-preview6-27804-01 [/var/lib/snapd/snap/dotnet-sdk/41/shared/Microsoft.NETCore.App]

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

Visual Studio Code Extensions
Extension Author Version
csharp ms-vscode 1.20.0
@wheelerlaw
Copy link
Author

wheelerlaw commented Jul 10, 2019

Okay, so the issue is caused by this line inside of DefaultSdkResolver:

var sdkPath = Path.Combine(BuildEnvironmentHelper.Instance.MSBuildSDKsPath, sdk.Name, "Sdk");

Unless that the environment variable MSBuildSDKsPath is set, the value will default to (MSBuild Root)\Sdks\. MSBuild in this case is the currently running instance which is discovered by the MSBuildLocator through the StandAloneInstanceProvider, which searches for instances located in the .msbuild directory that is at the same level as OmniSharp.exe:

 var msbuildDirectory = Path.Combine(AppContext.BaseDirectory, ".msbuild");

A possible solution would be to create a provider that searches for MSBuild instances in system-wide installations.

Alternatively, one could just write another SdkResolver that extends from the BaseSdkResolver that looks for Sdks elsewhere in the system than just Sdks folder in the current MSBuild instance. Then the SdkResolverLoader would pick it up, as long as it is placed in the right directory, similar to the way the packaging scripts copy the legacy resolver (here):

    var sdkResolverSourceFolder = CombinePaths(env.Folders.Tools, "Microsoft.DotNet.MSBuildSdkResolver", "lib", sdkResolverTFM);
    var sdkResolverTargetFolder = CombinePaths(msbuildCurrentBinTargetFolder, "SdkResolvers", "Microsoft.DotNet.MSBuildSdkResolver");
    DirectoryHelper.ForceCreate(sdkResolverTargetFolder);
    FileHelper.Copy(
        source: CombinePaths(sdkResolverSourceFolder, "Microsoft.DotNet.MSBuildSdkResolver.dll"),
        destination: CombinePaths(sdkResolverTargetFolder, "Microsoft.DotNet.MSBuildSdkResolver.dll")
    );

@nguerrera
Copy link

Okay, so the issue is caused by this line inside of DefaultSdkResolver:

Finding SDKs using that default resolver is not the happy path. There's a a resolver that runs first that is supposed to find things that come from the .NET Core SDK.

https://github.com/dotnet/cli/tree/master/src/Microsoft.DotNet.MSBuildSdkResolver

When that fails, the default resolver, gets a try. This is largely a legacy thing that the default resolver can find a fixed copy of the sdk next to msbuild. Many msbuild distributions (VS 2019 included) don't have anything there, and those that still do should remove them.

Currently, the more appropriate resolver requires a dotnet on PATH, and the realpath of that dotnet must be next to the sdk/, folders, etc. If you can manage that before starting VS Code, it should work around the issue.

I am not yet familiar with snap, and the snap distribution isn't yet part of the official process of developing and testing the .NET Core SDK. There may be other issues lurking behind this. We will be discussing adding it to our process.

@nguerrera
Copy link

nguerrera commented Jul 17, 2019

Oh, what you referenced as the "legacy" resolver, is actually not legacy at all. The default resolver is the legacy one with respect to getting tasks and targets that ship with .NET Core SDK. The code I pointed to is for this Microsoft.DotNet.MSBuildSdkResolver.dll, that's the one that should find the things in .NET Core SDK, and I am assuming the PATH is setup differently, which is causing it not to work. Fixing this should focus on that resolver.

@wheelerlaw
Copy link
Author

wheelerlaw commented Jul 31, 2019

dotnet is already on the PATH, as I noted in my first comment. And despite that, it appears that the resolver you mentioned is still not finding it. Should a bug be raised in that repo in that case?

@wheelerlaw
Copy link
Author

wheelerlaw commented Jul 31, 2019

So with the debugging output enabled, it looks like the OmniSharp MSBuildLocator is having a hard time finding that resolver you mentioned:

...
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.DotNet.MSBuildSdkResolver.resources, Version=2.2.202.0, Culture=en-US, PublicKeyToken=adb9793829ddae60'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.DotNet.MSBuildSdkResolver.resources.dll'.
...

Full log:

Starting OmniSharp server at 7/31/2019, 2:46:48 PM
    Target: /home/wlaw/csci-351-project2

OmniSharp server started with Mono 5.20.1.
    Path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/OmniSharp.exe
    PID: 8824

[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Cake
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Cake, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.DotNet
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.DotNet, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.DotNetTest
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.DotNetTest, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Host
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Host, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.MSBuild
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.MSBuild, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Roslyn
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Roslyn, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Roslyn.CSharp
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Roslyn.CSharp, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Script
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Script, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: OmniSharp.Shared
[dbug]: OmniSharp.CompositionHostBuilder
        Loaded OmniSharp.Shared, Version=1.32.0.0, Culture=neutral, PublicKeyToken=null
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.razor/OmniSharpPlugin/Microsoft.AspNetCore.Razor.OmniSharpPlugin.dll
[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on fedora 29.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[dbug]: OmniSharp.MSBuild.Discovery.Providers.MonoInstanceProvider
        Mono MSBuild could not be used because '/usr/lib/mono/msbuild/Current/bin/Microsoft.Build.dll' does not exist.
[warn]: OmniSharp.MSBuild.Discovery.Providers.MonoInstanceProvider
        It looks like you have Mono 5.2.0 or greater installed but MSBuild could not be found.
Try installing MSBuild into Mono (e.g. 'sudo apt-get install msbuild') to enable better MSBuild support.
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin"
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.dll' (name-only).
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Utilities.Core.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Utilities.Core.dll' (name-only).
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Framework.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Framework.dll' (name-only).
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded from path: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.dll
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        SUCCESS: Resolved to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.dll' (name-only).
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            TargetFrameworkRootPath = /usr/lib/mono/xbuild-frameworks
            MSBuildToolsPath = /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
            CscToolPath = /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = /usr/lib/mono/xbuild
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: Microsoft.CodeAnalysis.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[trce]: OmniSharp.Services.AssemblyLoader
        Assembly loaded: Microsoft.CodeAnalysis.CSharp.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.CodeAnalysis.VisualBasic.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.CodeAnalysis.VisualBasic.Features.dll'.
[trce]: OmniSharp.HostServicesAggregator
        Successfully added Microsoft.CodeAnalysis.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
        Successfully added Microsoft.CodeAnalysis.CSharp.Features, Version=3.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
        Successfully added Microsoft.AspNetCore.Razor.OmniSharpPlugin.StrongNamed, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to host service assemblies.
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/home/wlaw/csci-351-project2'.
[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.ProjectSystem
        MSBuild environment: 
Mode: Standalone
RunningTests: False
RunningInVisualStudio: False
MSBuildToolsDirectory32: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
MSBuildToolsDirectory64: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
MSBuildSDKsPath: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Sdks
CurrentMSBuildConfigurationFile: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/MSBuild.dll.config
CurrentMSBuildExePath: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/MSBuild.dll
CurrentMSBuildToolsDirectory: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin
VisualStudioInstallRootDirectory: 
MSBuildExtensionsPath: /home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin

[dbug]: OmniSharp.MSBuild.ProjectLoader
        'MSBuildExtensionsPath' set to '/usr/lib/mono/xbuild'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'TargetFrameworkRootPath' set to '/usr/lib/mono/xbuild-frameworks'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'CscToolPath' set to '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Roslyn'
[dbug]: OmniSharp.MSBuild.ProjectLoader
        'CscToolExe' set to 'csc.exe'
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/home/wlaw/csci-351-project2'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/wlaw/csci-351-project2/csci-351-project2.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/home/wlaw/csci-351-project2'.
[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: /home/wlaw/csci-351-project2/csci-351-project2.csproj
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/home/wlaw/csci-351-project2' on host 8546.
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 2,
  "Command": "/projects"
}
[dbug]: OmniSharp.Stdio.Host
        ************ Request ************
{
  "Type": "request",
  "Seq": 1,
  "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 '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.Build.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.DotNet.MSBuildSdkResolver.resources, Version=2.2.202.0, Culture=en-US, PublicKeyToken=adb9793829ddae60'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.DotNet.MSBuildSdkResolver.resources.dll'.
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Attempting to resolve 'Microsoft.DotNet.MSBuildSdkResolver.resources, Version=2.2.202.0, Culture=en, PublicKeyToken=adb9793829ddae60'
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/home/wlaw/.vscode/extensions/ms-vscode.csharp-1.20.0/.omnisharp/1.32.20/omnisharp/.msbuild/Current/Bin/Microsoft.DotNet.MSBuildSdkResolver.resources.dll'.
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/home/wlaw/csci-351-project2/csci-351-project2.csproj'.
/home/wlaw/csci-351-project2/csci-351-project2.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /home/wlaw/csci-351-project2/csci-351-project2.csproj
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult, System.Boolean throwOnFileNotExistsError) [0x0024e] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImports (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult) [0x00027] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0002d] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0005e] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00035] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00007] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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) [0x00093] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>: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 <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <4e0a1f1d78cf4c1ebd6f9a3dbcebf3bb>:0 
  at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003f] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectIdInfo projectIdInfo, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <598756bbad7c4a61bb212e3681e5d1da>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass30_0.<LoadProject>b__0 () [0x00000] in <598756bbad7c4a61bb212e3681e5d1da>: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 <598756bbad7c4a61bb212e3681e5d1da>:0 

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /home/wlaw/csci-351-project2/csci-351-project2.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": "/home/wlaw/csci-351-project2",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 64,
  "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": "/home/wlaw/csci-351-project2",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 63,
  "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": "/home/wlaw/csci-351-project2",
      "Projects": []
    },
    "Script": {
      "Projects": []
    }
  },
  "Seq": 77,
  "Type": "response"
}

@nguerrera
Copy link

For now, you should be able to workaround things by forcing omnisharp to use the legacy resolver that just shells out to dontet --info. You can do this by creating ~/.omnisharp/omnisharp.json with this content:

{
   "MSBuild": {
       "UseLegacySdkResolver": true
   }
}

I don't think that failure to load a satellite assembly is the actual issue. Notice it couldn't find Microsoft.Build.resources.dll either. I believe the problem is that dotnet on PATH from snap alias is not a symlink to the real dotnet executable that is next to the sdk. The non-legacy resolver expects that to be the case.

@wheelerlaw
Copy link
Author

wheelerlaw commented Aug 1, 2019

The non-legacy resolver expects that to be the case.

Then either that definitely needs to change, or OmniSharp should be using the legacy resolver by default, since that's the way Snap appears to be providing the packages and Snap is the an official way to install the .NET Core 3 SDK

$ ll $(which dotnet)
lrwxrwxrwx. 1 root root 17 Jul 29 11:59 /var/lib/snapd/snap/bin/dotnet -> dotnet-sdk.dotnet*
$ ll $(which dotnet-sdk.dotnet)
lrwxrwxrwx. 1 root root 13 Jul 29 11:59 /var/lib/snapd/snap/bin/dotnet-sdk.dotnet -> /usr/bin/snap*

I know Snap does some funny things on how to figure out what command is being executed.

by forcing omnisharp to use the legacy resolver that just shells out to dontet --info

Which resolver is this? MSBuildSdkResolver or DefaultSdkResolver? Sort of answered my own question, so it looks like the MSBuildSdkResolver does what you say it does: uses the path of the target of the dotnet symlink:

            if (dotnetExe != null && !Interop.RunningOnWindows)
            {
                // e.g. on Linux the 'dotnet' command from PATH is a symlink so we need to
                // resolve it to get the actual path to the binary
                dotnetExe = Interop.Unix.realpath(dotnetExe) ?? dotnetExe;
            }

So then you mean that the MSBuildSdkResolver can alternatively shell out to dotnet --info? Because the DefaultSdkResolver doesn't seem to have that functionality.

@wheelerlaw
Copy link
Author

Then either that definitely needs to change, or OmniSharp should be using the legacy resolver by default, since that's the way Snap appears to be providing the packages and Snap is the an official way to install the .NET Core 3 SDK

Or a new SDK resolver is written specifically to handle SDKs installed by Snap.

@wheelerlaw
Copy link
Author

wheelerlaw commented Aug 1, 2019

Or a new SDK resolver is written specifically to handle SDKs installed by Snap

Okay done. @nguerrera lmk what you think

@nguerrera
Copy link

That is roughly the same approach as when legacy resolution is enabled, but using --list-sdks instead of --info + grep for base path will not respect global.json.

Ideally, I think we should fix the main resolver in dotnet/cli to handle this case somehow. Putting this in omnisharp also won't solve the problem for other configurations of mono msbuild + snap sdk.

I will open an issue on dotnet/cli

@nguerrera
Copy link

nguerrera commented Aug 1, 2019

Did you try this: #3160 (comment) ?

@nguerrera
Copy link

@nguerrera
Copy link

nguerrera commented Aug 1, 2019

So then you mean that the MSBuildSdkResolver can alternatively shell out to dotnet --info? Because the DefaultSdkResolver doesn't seem to have that functionality.

The legacy code that shells out dotnet --info, which can be enabled with that json, is not a proper sdk resolver. It forces the sdk using MSBuildSdksPath. I believe this is where that happens: https://github.com/OmniSharp/omnisharp-roslyn/blob/51cf29ca5785ad4973ad0579ece445e7d1992484/src/OmniSharp.MSBuild/SdksPathResolver.cs#L32

@nguerrera
Copy link

That predates the proper plugin model for sdk resolution. The legacy code was kept behind that flag as an escape hatch, but MSBuildSdkResolver was intended to fully replace it. If in fact we need to shell out in some cases, we should do that in MSBuildSdkResolver, potentially as a fallback. I would like to try to find a more efficient way for snap though. https://github.com/dotnet/cli/issues/12110 tracks fixing MSBuildSdkResolver so that we don't need new resolvers and we don't need to turn on the legacy code.

@nguerrera
Copy link

My recommendation would be to use #3160 (comment) as a workaround and use https://github.com/dotnet/cli/issues/12110 to track the fix. This can probably be closed against that. cc @rchande

@float34
Copy link

float34 commented Aug 9, 2019

@nguerrera
I don't think only the snap is affected.
The very same problem occurs on Manjaro/Arch Linux (issue has been reported by many) when you install dotnet with pacman.
In this case pacman pulls the package from community repo.
And the package contains dotnet.sh which is effectively added to PATH after being installed to /usr/bin. Obviously it is not a symlink, so the resolving process fails.
The SDK itself is installed to /opt/dotnet/, all SDK folders and the executable are in place.
BTW, adding .json with legacy option solves/hides the issue.

@nguerrera
Copy link

@Torquerrr Thanks. Better to discuss that here: https://github.com/dotnet/cli/issues/12110

I wrote " This would fix other hypothetical deployments like a dotnet that is a shell script that execs dotnet with custom args or whatever." Well I guess this isn't hypothetical. So we could fix it that way. Basically make the official resolver work like the legacy omnisharp resolver if resolving the faster way fails....

@float34
Copy link

float34 commented Aug 9, 2019

@nguerrera Should I duplicate my comment in #12110 then?

@nguerrera
Copy link

Please! Thanks

@rchande
Copy link

rchande commented Aug 12, 2019

@wheelerlaw @Torquerrr @nguerrera Thanks for the great discussion. Since we believe this fix belongs in the SDK, I'm going to close this in favor of https://github.com/dotnet/cli/issues/12110 .

@jweyrich
Copy link

For now, you should be able to workaround things by forcing omnisharp to use the legacy resolver that just shells out to dontet --info. You can do this by creating ~/.omnisharp/omnisharp.json with this content:

{
   "MSBuild": {
       "UseLegacySdkResolver": true
   }
}

I don't think that failure to load a satellite assembly is the actual issue. Notice it couldn't find Microsoft.Build.resources.dll either. I believe the problem is that dotnet on PATH from snap alias is not a symlink to the real dotnet executable that is next to the sdk. The non-legacy resolver expects that to be the case.

That actually fixed it for me on macOS.
Tools and versions:

  • VSCode 1.44.1
  • Omnisharp / ms-dotnettools.csharp 1.21.17
  • dotnet-sdk 3.1.201 (current) from homebrew

@Boys20122024
Copy link

Issue Description

Fresh installation of .NET Core 3, VSCode, and the C# extension fails to open apps created by dotnet new console -o test-app on Fedora 29. Some of the related issues have workarounds, but they only work on Windows.

Steps to Reproduce

1. Install .NET Core 3 snap:
   ```shell
   sudo snap install dotnet-sdk --beta --classic
   sudo snap alias dotnet-sdk.dotnet dotnet
   ```

2. Install VSCode:
   ```shell
   sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
   sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
   dnf check-update
   sudo dnf install code
   ```

3. Install the C# extension in VSCode

4. Create a new project:
   ```shell
   dotnet new console -o test-app
   ```

5. Open the `test-app` folder in VSCode. It will show an error.

Expected Behavior

The project opens successfully, I am able to debug the program.

Actual Behavior

Small window pops up with an error. I have to manually configure the debug configurations.

Logs

OmniSharp log

Debug log:

C# log

n/a

Environment information

VSCode version: 1.36.0 C# Extension: 1.20.0
Mono Information
OmniSharp using built-in mono
Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.0.100-preview6-012264 Commit: be3f0c1a03
Visual Studio Code Extensions

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

Successfully merging a pull request may close this issue.

6 participants