Omnisharp-vscode: .Net Core InvalidProjectFileException without mono on macOS and linux

Created on 12 Sep 2018  路  37Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.402
 Commit:    3599f217f4

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.402/

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

.NET Core SDKs installed:
  2.0.2 [/usr/local/share/dotnet/sdk]
  2.0.3 [/usr/local/share/dotnet/sdk]
  2.1.2 [/usr/local/share/dotnet/sdk]
  2.1.4 [/usr/local/share/dotnet/sdk]
  2.1.101 [/usr/local/share/dotnet/sdk]
  2.1.105 [/usr/local/share/dotnet/sdk]
  2.1.300 [/usr/local/share/dotnet/sdk]
  2.1.302 [/usr/local/share/dotnet/sdk]
  2.1.401 [/usr/local/share/dotnet/sdk]
  2.1.402 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

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

VS Code version: 1.27.1
C# Extension version: 1.16.0

Steps to reproduce

1) Load a netstandard2.0 project with the the Project Sdk set to 'Microsoft.NET.Sdk'.

Expected behavior

Loads Correctly.

Actual behavior

Errors with following log output:

Starting OmniSharp server at 9/11/2018, 4:10:25 PM
    Target: /Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All/Advisory.All.sln

OmniSharp server started.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/run
    PID: 76164

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin"
            MSBuildExtensionsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin
            TargetFrameworkRootPath = /usr/local/Cellar/mono/5.4.1.6/lib/mono/xbuild-frameworks
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.Stdio.Host
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.

...


[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/test/integration/Identity.ServiceHost.IntegrationTests/Identity.ServiceHost.IntegrationTests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.Stdio.Host
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Stdio.Host
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All' on host 75954.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.csproj'.
/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.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) [0x0003e] in <f82355ba302744f8beee9aa7171bc1a7>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <f82355ba302744f8beee9aa7171bc1a7>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00014] in <f82355ba302744f8beee9aa7171bc1a7>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass24_0.<LoadProject>b__0 () [0x00000] in <f82355ba302744f8beee9aa7171bc1a7>:0 
  at (wrapper delegate-invoke) System.Func`1[System.ValueTuple`2[OmniSharp.MSBuild.ProjectFile.ProjectFileInfo,System.Collections.Immutable.ImmutableArray`1[OmniSharp.MSBuild.Logging.MSBuildDiagnostic]]].invoke_TResult()
  at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject (System.String projectFilePath, System.Func`1[TResult] loadFunc) [0x0001b] in <f82355ba302744f8beee9aa7171bc1a7>:0 
...

Additional Info

Something appears off in the extension documentation, not sure if its related, but the _Details_ and _Changelog_ seem out of date:

capture 2018-09-11 at 4 30 40 pm
capture 2018-09-11 at 4 30 27 pm

Workaround

I manually installed the previous version (v1.15.2) from these instructions which got it working again:
https://tpodolak.com/blog/2017/04/09/downgrading-visual-studio-code-extension/

[Update: Workaround for macOS and Linux appears to be installing the latest stable mono runtimes. If that isn't an option, the downgrade still works.]

Resolved-Configuration Issue

Most helpful comment

The Razor SDK gets pulled in via the Web SDK.

All 37 comments

Same problem here with v1.16.0

[fail]: OmniSharp.MSBuild.ProjectLoader
        The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 
1.) The name of the task in the project file is the same as the name of the task class. 
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 
3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in 
the "C:\Users\Vahid\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin" directory.

similar here:

 OmniSharp.MSBuild.ProjectLoader
        The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following:
1.) The name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface.
3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located
 in the "C:\Users\X\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin" directory.

We believe we have identified the cause of the "GetReferenceNearestTargetFrameworkTask" issue and we've created a beta of the C# extension that includes the fix. Please install the beta VSIX (https://github.com/OmniSharp/omnisharp-vscode/releases/download/v1.16.1-beta1/csharp-1.16.1-beta1.vsix) and let us know if that resolves the problem

No change with v.1.16.1-beta1 for me. Partial output below. If there is additional data that would be helpful to you, please let me know:

Output from v.1.16.1-beta

Starting OmniSharp server at 9/12/2018, 10:40:58 AM
    Target: /Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All/Advisory.All.sln

OmniSharp server started.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1-beta1/.omnisharp/1.32.5/run
    PID: 82089

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1-beta1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1-beta1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1-beta1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
            MSBuildExtensionsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1-beta1/.omnisharp/1.32.5/omnisharp/msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1-beta1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1-beta1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin
            TargetFrameworkRootPath = /usr/local/Cellar/mono/5.4.1.6/lib/mono/xbuild-frameworks
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All'.
[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 '/Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All/Advisory.All.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Domain/Common.Domain.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Infrastructure/Common.Infrastructure.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.ServiceHost/Common.ServiceHost.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.ApiClient/Common.ApiClient.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/src/Advisory.Domain/Advisory.Domain.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/src/Advisory.Infrastructure/Advisory.Infrastructure.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/src/Advisory.ApiClient/Advisory.ApiClient.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/test/unit/Domain.UnitTests/Advisory.Domain.UnitTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/test/unit/Infrastructure.UnitTests/Advisory.Infrastructure.UnitTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/test/unit/ApiClient.UnitTests/Advisory.ApiClient.UnitTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/test/unit/ServiceHost.UnitTests/Advisory.ServiceHost.UnitTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/test/integration/ServiceHost.IntegrationTests/Advisory.ServiceHost.IntegrationTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-website/src/Advisory.Website/Advisory.Website.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-website/test/unit/Website.UnitTests/Advisory.Website.UnitTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-website/test/integration/Website.IntegrationTests/Advisory.Website.IntegrationTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-apis/src/RealCrowd.Apis/RealCrowd.Apis.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-advisory-domain/src/Advisory.ServiceHost/Advisory.ServiceHost.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Identity.Domain/Identity.Domain.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Identity.Infrastructure/Identity.Infrastructure.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Identity.ServiceHost/Identity.ServiceHost.csproj'
[warn]: OmniSharp.MSBuild.ProjectSystem
        Found project that doesn't exist on disk: /Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/test/integration/ServiceHost.IntegrationTests/ServiceHost.IntegrationTests.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/test/integration/Identity.ServiceHost.IntegrationTests/Identity.ServiceHost.IntegrationTests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All'.
[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: /Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.csproj
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/anorborg/Projects/realcrowd-advisory-all/Advisory.All' on host 82024.
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.csproj'.
/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Core/Common.Core.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) [0x0003e] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass25_0.<LoadProject>b__0 () [0x00000] in <3011301efbeb4853b85d8e89f9f2bd85>: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 <3011301efbeb4853b85d8e89f9f2bd85>:0 

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Domain/Common.Domain.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Domain/Common.Domain.csproj'.
/Users/anorborg/Projects/realcrowd-advisory-all/realcrowd-common-dotnet/src/Common.Domain/Common.Domain.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.
...

@rchande
v1.16.1-beta1 fixed "GetReferenceNearestTargetFrameworkTask" issue. Thank you.

I've created an minimal repo that does reproduce this issue:

https://github.com/anorborg/minimal-dotnet-repo

I used a solution as I have had issue with using solutions with OmniSharp with past updates.

OmniSharp Log From above Repo:

Starting OmniSharp server at 9/13/2018, 5:15:43 AM
    Target: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln

OmniSharp server started.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/run
    PID: 90257

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
            MSBuildExtensionsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin
            TargetFrameworkRootPath = /usr/local/Cellar/mono/5.4.1.6/lib/mono/xbuild-frameworks
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo' on host 89993.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'.
/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.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) [0x0003e] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass25_0.<LoadProject>b__0 () [0x00000] in <3011301efbeb4853b85d8e89f9f2bd85>: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 <3011301efbeb4853b85d8e89f9f2bd85>:0 

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'.
/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.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) [0x0003e] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass25_0.<LoadProject>b__0 () [0x00000] in <3011301efbeb4853b85d8e89f9f2bd85>: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 <3011301efbeb4853b85d8e89f9f2bd85>:0 

[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj

@anorborg I'm not able to reproduce that but I have far fewer old SDK versions installed. Try removing some of the older versions and see if that helps? Alternatively, you can try adding a global.json (https://docs.microsoft.com/en-us/dotnet/core/tools/global-json) and see if that helps

From my machine:

rchande$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.401
 Commit:    91b1c13032

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.401/

Host (useful for support):
  Version: 2.1.3
  Commit:  124038c13e

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

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

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

@rchande

I uninstalled all the dotnet runtimes and sdks and the reinstalled just the latest. My new output for dotnet --info is:

anorborg$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.402
 Commit:    3599f217f4

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.402/

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

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

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

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

I also did a fresh install of Visual Studio Code (which coincidentally just updated to 1.27.2).

I also added global.json (updated the repo). The plugin seems unable to find the SDK based on the new output and continues with the same error

Starting OmniSharp server at 9/13/2018, 11:29:56 AM
    Target: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln

OmniSharp server started.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/run
    PID: 6350

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
            MSBuildExtensionsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin
            TargetFrameworkRootPath = /usr/local/Cellar/mono/5.4.1.6/lib/mono/xbuild-frameworks
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo' on host 6206.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj
A compatible SDK version for global.json version: [2.1.402] from [/Users/anorborg/Projects/minimal-dotnet-repo/global.json] was not found
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'.
/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj

Having the same issue.

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.402
 Commit:    3599f217f4

Runtime Environment:
 OS Name:     debian
 OS Version:  
 OS Platform: Linux
 RID:         debian-x64
 Base Path:   /usr/share/dotnet/sdk/2.1.402/

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

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

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

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

Relevant OmniSharp error line is as previously seen:
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.

Downgrading to csharp-1.15.2.vsix resolves the problem as a temporary workaround.

I suspect that the issue here is that Mono installed in Homebrew is a bit old. I see this line in all of the logs above.

 TargetFrameworkRootPath = /usr/local/Cellar/mono/5.4.1.6/lib/mono/xbuild-frameworks

Maybe try updating to the latest Mono in Homebrew (5.14.0.177)?

Digging in a bit, that's probably not the issue.

@DustinCampbell, well actually updating brew and mono did change things...

Ran:

brew update
brew upgrade mono

Based on the output, my minimal repo now _works_:

Minimal Repo OmniSharp Log Output

Starting OmniSharp server at 9/18/2018, 12:29:49 PM
    Target: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln

OmniSharp server started with Mono 5.14.0.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/OmniSharp.exe
    PID: 74008

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 15.0 - "/usr/local/Cellar/mono/5.14.0.177/lib/mono/msbuild/15.0/bin"
            2: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 15.0 - "/usr/local/Cellar/mono/5.14.0.177/lib/mono/msbuild/15.0/bin"
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo' on host 73517.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Minimal.Standard.Library
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Minimal.Console

However, oddly, the extension indicator is in an _errored_ state. The tooltip is only "OmniSharp process errored:", and that's it, nothing after the colon. When clicking it, it just takes me to the output log above, which as you can see has no errors.

capture 2018-09-18 at 12 33 43 pm

Also, if adding a webapi project to my minimal repo (dotnet new webapi ...) the same-ish error returns:

Repo Branch with WebApi: https://github.com/anorborg/minimal-dotnet-repo/tree/minimal-dotnet-repo-with-webapi

Output From Project with WebApi

Starting OmniSharp server at 9/18/2018, 12:40:40 PM
    Target: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln

OmniSharp server started with Mono 5.14.0.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/OmniSharp.exe
    PID: 74942

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 15.0 - "/usr/local/Cellar/mono/5.14.0.177/lib/mono/msbuild/15.0/bin"
            2: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 15.0 - "/usr/local/Cellar/mono/5.14.0.177/lib/mono/msbuild/15.0/bin"
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo' on host 74364.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj'.
/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Razor' specified could not be found.  /usr/local/Cellar/mono/5.14.0.177/lib/mono/msbuild/15.0/bin/Sdks/Microsoft.NET.Sdk.Web/Sdk/Sdk.props
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x00209] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x00040] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x0004c] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00034] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation) [0x00000] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00023] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003e] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass25_0.<LoadProject>b__0 () [0x00000] in <3011301efbeb4853b85d8e89f9f2bd85>: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 <3011301efbeb4853b85d8e89f9f2bd85>:0 

[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Minimal.Standard.Library
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Minimal.Console
[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj

I will also note that upgrading mono via brew also upgraded nuget automatically (from 4.6.2 to 4.7.0)

@anorborg: Updating Mono to a newer version allowed C# for VS Code to launch OmniSharp on Mono and use the MSBuild included with Mono, which is why it started to succeed. The red flame looks like this https://github.com/OmniSharp/omnisharp-vscode/issues/2521 issue. The fact that you're hitting it now might give a hint to the cause.

I will also note that upgrading mono via brew also upgraded nuget automatically (from 4.6.2 to 4.7.0)

Is this a NuGet that's included with Mono?

no, its the standalone nuget in brew, which depends on mono. Partial output from brew upgrade mono:

...
==> Upgrading 1 dependent:
nuget 4.6.2 -> 4.7.0
==> Upgrading nuget 
==> Downloading https://dist.nuget.org/win-x86-commandline/v4.7.0/NuGet.exe
######################################################################## 100.0%
馃嵑  /usr/local/Cellar/nuget/4.7.0: 4 files, 5.2MB, built in 3 seconds
...

WRT the Microsoft.NET.Sdk.Razor, something feels a bit fishy. It's almost like dotnet is not on the path in the VS Code process.

WRT the Microsoft.NET.Sdk.Razor, something feels a bit fishy. It's almost like dotnet is not on the path in the VS Code process.

Yeah, that definitely seemed odd as the project type doesn't reference razor in that branch.

The Razor SDK gets pulled in via the Web SDK.

Continuing to experiment, I've also completely have wiped my dotnet installs via:

Wiped DotNet Packages

curl -s https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh | sudo bash

and also wiped all my brew formulae

Wiped Brew Formulae

brew list -1 | xargs brew uninstall --force

From this point, I did a fresh install of .Net Core SDK 2.1.4. With OmniSharp 1.16.1 Extension, I receive the original error on the NetStandard2.0 project (for both repos with and without webapi project):

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

If I then install mono via brew:

Install Mono via Brew

brew install mono

The OmniSharp 1.16.1 extension will now load without exception (minus other indicator issue) with minimal repo (without the webapi project).

However, the webapi project will now fail to load on the Razor SDK

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

Apologies if the above is just noise, but I'm just attempting to provide as much information since reproduction of the issue seems to be difficult.

@anorborg Can you try installing mono using the mono installer (https://www.mono-project.com/download/stable/#download-mac)? We have had issues in the past where homebrew incorrectly packaged mono.

@rchande, installed with mono installer (15.4.0), but not change in output (partial until error below):

Starting OmniSharp server at 9/19/2018, 2:41:10 PM
    Target: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln

OmniSharp server started with Mono 5.14.0.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/OmniSharp.exe
    PID: 4268

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.14.0/lib/mono/msbuild/15.0/bin"
            2: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.14.0/lib/mono/msbuild/15.0/bin"
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo' on host 4230.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj'.
/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Razor' specified could not be found.  

@anorborg I still can't reproduce this. Here's my configuration. Can you share your equivalents so we can diff? The output of which dotnet might be interesting as @DustinCampbell mentions.
Project file:

<Project Sdk="Microsoft.NET.Sdk.Razor">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>

</Project>

Dotnet info:

rchande$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.401
 Commit:    91b1c13032

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.401/

Host (useful for support):
  Version: 2.1.3
  Commit:  124038c13e

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

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

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

Output of which dotnet from the terminal in VS Code

rchande$ which dotnet
/usr/local/share/dotnet/dotnet

omni sharp log:

Starting OmniSharp server at 9/20/2018, 10:05:53 AM
    Target: /Users/rchande/testprojects/razor

OmniSharp server started with Mono 5.14.0.
    Path: /Users/rchande/.vscode-insiders/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/OmniSharp.exe
    PID: 4437

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.14.0/lib/mono/msbuild/15.0/bin"
            2: StandAlone 15.0 - "/Users/rchande/.vscode-insiders/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.14.0/lib/mono/msbuild/15.0/bin"
            CscToolPath = /Users/rchande/.vscode-insiders/extensions/ms-vscode.csharp-1.16.0/.omnisharp/1.32.4/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/rchande/testprojects/razor'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.Stdio.Host
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/Users/rchande/testprojects/razor'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/rchande/testprojects/razor/razor.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/rchande/testprojects/razor'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.Stdio.Host
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Stdio.Host
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/rchande/testprojects/razor' on host 3884.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/rchande/testprojects/razor/razor.csproj
[warn]: OmniSharp.MSBuild.ProjectLoader
        Project dependency Microsoft.AspNetCore.App does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/rchande/testprojects/razor/razor.csproj'.
/Users/rchande/testprojects/razor/razor.csproj
/Users/rchande/testprojects/razor/razor.csproj(0,0): Error: Project dependency Microsoft.AspNetCore.App does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.

[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/rchande/testprojects/razor/razor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: razor

The config and project can be found in this branch:
https://github.com/anorborg/minimal-dotnet-repo/tree/minimal-dotnet-repo-with-webapi

.csproj

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Minimal.Standard.Library\Minimal.Standard.Library.csproj" />
  </ItemGroup>
</Project>

which dotnet

$ which dotnet
/usr/local/share/dotnet/dotnet

dotnet --info

$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.402
 Commit:    3599f217f4

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.1.402/

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

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

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

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

OmniSharp Log

Starting OmniSharp server at 9/20/2018, 10:31:39 AM
    Target: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln

OmniSharp server started with Mono 5.14.0.
    Path: /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/OmniSharp.exe
    PID: 11965

锘縖info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.13.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.14.0/lib/mono/msbuild/15.0/bin"
            2: StandAlone 15.0 - "/Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.14.0/lib/mono/msbuild/15.0/bin"
            CscToolPath = /Users/anorborg/.vscode/extensions/ms-vscode.csharp-1.16.1/.omnisharp/1.32.5/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo/Minimal.DotNet.Repo.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo'.
[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 '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.Repo' on host 11925.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Standard.Library/Minimal.Standard.Library.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.Console/Minimal.Console.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj'.
/Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Razor' specified could not be found.  /Library/Frameworks/Mono.framework/Versions/5.14.0/lib/mono/msbuild/15.0/bin/Sdks/Microsoft.NET.Sdk.Web/Sdk/Sdk.props
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x00209] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x00040] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x0004c] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00034] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation) [0x00000] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00023] in <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>: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 <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <9d534585aab94a68ab40b57567b8fbbe>:0 
  at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003e] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <3011301efbeb4853b85d8e89f9f2bd85>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass25_0.<LoadProject>b__0 () [0x00000] in <3011301efbeb4853b85d8e89f9f2bd85>: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 <3011301efbeb4853b85d8e89f9f2bd85>:0 

[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Minimal.Standard.Library
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Minimal.Console
[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: /Users/anorborg/Projects/minimal-dotnet-repo/Minimal.DotNet.WebApi/Minimal.DotNet.WebApi.csproj

UPDATE: I am not exactly sure when this got fixed for me, but after doing a fresh dotnet restore on the project (something I was doing regularly while I was trying to figure this out), it worked!

@anorborg Glad you got it working! Thank you for sharing your detailed configuration; hopefully it will help others who encounter the same issue.

This may be a separate issue, I wonder if its possible for the extension to suggest a dotnet restore for such exceptions? I that I remember the extension previously prompting for restore before?

@anorborg did dotnet restore resolve the original issue with 1.16.1 for you? I tried that version again and a dotnet restore but it does not help (still get The SDK 'Microsoft.NET.Sdk' specified could not be found).

@bjornharrtell for me there was two stages to get over these related errors, the Microsoft.NET.Sdk, and Microsoft.NET.Sdk.Razor exceptions.

I was able to solve the first by upgrading mono via brew (since that is what I used previously), but then received the Microsoft.NET.Sdk.Razor error. The former was solved by uninstalling the brew mono, and installing mono version 15.4.0 directly from here and then restoring.

I'm unsure if mono should be required (I don't believe so?), but it did eventually get things working for me. In addition, if you are referencing multiple projects, make sure you are restoring all of them (or referencing them in a sln file and restoring that.

Unfortunately I was swinging randomly and different approaches (including trying to reset my bash profile on my mac) so I don't know if it was also a combination of those efforts as well.

@bjornharrtell also, if you haven't, you might consider cloning the repo branch I referenced locally, running the restore and see if you still get the error. Then you'll know if something with you project or not:

https://github.com/anorborg/minimal-dotnet-repo/tree/minimal-dotnet-repo-with-webapi

Thanks @anorborg, indeed installing Mono proper resolves the issue for me too. However that means the problem is likely with standalone/bundled MSBuild and only hidden because it will use MSBuild from Mono instead.

I had to install mono from https://www.mono-project.com/, the one currently in Debian testing/buster repo didn't help.

@rchande should/can we open a new issue? Perhaps the issue is more clearly, something like: ".Net Core InvalidProjectFileException without mono on macOS and linux"?

@anorborg Better still--I've retitled the issue.

@rchande can we reopen too? Installing mono is just a workaround I assume? It should function without, right?

I can also report that I have not been able to reproduce the issue when running 1.16.1 without Mono on Ubuntu 18.04 LTS (the installation where I have the issue is running Debian yet to be version 10), so perhaps this is due to some assumptions on the underlying OS / file system layout.

I just hit _another_ odd issue trying to reproduce this. I'll attempt to lay it out below:

  1. As of yesterday, I somehow got it working by installing Mono 15.4.0 for macOS from here
  2. This morning, attempting to reproduce @bjornharrtell 's experience I uninstalled mono to see if it still worked (I used the uninstall instructions from here. Without mono, it failed to work as before.
  3. I reinstalled Mono 15.4.0 for macOS and it still didn't work! I rebooted/restored/killed nuget caches and still the same InvalidProjectFileException.
  4. I uninstalled mono again, still not working.
  5. I installed Mono 15.10.1 (Visual Studio Channel) from the same page here, reopened code and the extension was working with no extra steps.

I'm hesitating at the moment to mess with my current working setup, but it definitely feels like there is something wonky with how a given MSBuild functions potentially based on other installs. I don''t know if its possible to get some better logging out of the project loader to get some more insights.

Attempting to go deep into the bowels of msbuild based on some of the stracktraces (which I'm admittedly not familiar with) The error seems to occur when the sdkResolver fails. I found the following code:

https://github.com/Microsoft/msbuild/blob/b4f5792a8fadab87e5199ec54d355c3ba1397a6a/src/Build/BackEnd/Components/SdkResolution/CachingSdkResolverService.cs#L36

Which optionally is using a cache if not disabled. Something caching incorrectly could explain the inconsistent behavior maybe?

I have the same issue! is there any fix without the mono installation?

Running on Ubuntu 19.04:

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

Was this page helpful?
0 / 5 - 0 ratings