can't find SDKs on MacOSX
See original GitHub issueIssue Description
Can’t get a .net core project to work on macosx-- here’s the terminal output.
Starting OmniSharp server at 8/9/2021, 3:30:26 PM
Target: /Users/micahsmith/dev/cs
OmniSharp server started.
Path: /Users/micahsmith/.vscode/extensions/ms-dotnettools.csharp-1.23.14/.omnisharp/1.37.14/run
PID: 43679
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on MacOS 11.4 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 17.0.0 - "/Users/micahsmith/.vscode/extensions/ms-dotnettools.csharp-1.23.14/.omnisharp/1.37.14/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/Users/micahsmith/.vscode/extensions/ms-dotnettools.csharp-1.23.14/.omnisharp/1.37.14/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 17.0.0 - "/Users/micahsmith/.vscode/extensions/ms-dotnettools.csharp-1.23.14/.omnisharp/1.37.14/omnisharp/.msbuild/Current/Bin"
CscToolExe = csc.exe
MSBuildToolsPath = /Users/micahsmith/.vscode/extensions/ms-dotnettools.csharp-1.23.14/.omnisharp/1.37.14/omnisharp/.msbuild/Current/Bin
CscToolPath = /Users/micahsmith/.vscode/extensions/ms-dotnettools.csharp-1.23.14/.omnisharp/1.37.14/omnisharp/.msbuild/Current/Bin/Roslyn
BypassFrameworkInstallChecks = true
MSBuildExtensionsPath = /Users/micahsmith/.vscode/extensions/ms-dotnettools.csharp-1.23.14/.omnisharp/1.37.14/omnisharp/.msbuild
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/micahsmith/dev/cs'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
No solution files found in '/Users/micahsmith/dev/cs'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/micahsmith/dev/cs/cs.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/micahsmith/dev/cs'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/micahsmith/dev/cs' on host 34369.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/micahsmith/dev/cs/cs.csproj
It was not possible to find any installed .NET SDKs.
Install a .NET SDK from:
https://aka.ms/dotnet-download
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/micahsmith/dev/cs/cs.csproj'.
/Users/micahsmith/dev/cs/cs.csproj(0,0)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found. /Users/micahsmith/dev/cs/cs.csproj
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <e78286a6f9b047bca66ad86e9b031ef5>: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 <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <e78286a6f9b047bca66ad86e9b031ef5>: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) [0x0032a] in <e78286a6f9b047bca66ad86e9b031ef5>: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 <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate () [0x0013b] in <e78286a6f9b047bca66ad86e9b031ef5>: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.ProjectRootElementCacheBase projectRootElementCache, Microsoft.Build.Framework.BuildEventContext buildEventContext, Microsoft.Build.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext, System.Boolean interactive) [0x00047] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00063] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00035] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00000] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00007] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.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) [0x00127] in <e78286a6f9b047bca66ad86e9b031ef5>: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) [0x00073] in <e78286a6f9b047bca66ad86e9b031ef5>: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 <e78286a6f9b047bca66ad86e9b031ef5>: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 <e78286a6f9b047bca66ad86e9b031ef5>: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 <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <e78286a6f9b047bca66ad86e9b031ef5>:0
at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] projectConfigurationsInSolution) [0x00160] in <123e9399922f43fb93d71bfa60dd04d6>:0
at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] configurationsInSolution) [0x0000d] in <123e9399922f43fb93d71bfa60dd04d6>:0
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectIdInfo projectIdInfo, OmniSharp.MSBuild.ProjectLoader loader, System.Guid sessionId, OmniSharp.Services.DotNetInfo dotNetInfo) [0x00023] in <123e9399922f43fb93d71bfa60dd04d6>:0
at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass31_0.<LoadProject>b__0 () [0x00000] in <123e9399922f43fb93d71bfa60dd04d6>: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 <123e9399922f43fb93d71bfa60dd04d6>:0
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/micahsmith/dev/cs/cs.csproj
Steps to Reproduce
Expected Behavior
Actual Behavior
Logs
OmniSharp log
Post the output from Output-->OmniSharp log here
C# log
Post the output from Output-->C# here
Environment information
VSCode version: 1.59.0 C# Extension: 1.23.14
Mono Information
OmniSharp using built-in monoDotnet Information
.NET SDK (reflecting any global.json): Version: 5.0.205 Commit: 64a0cf25ebRuntime Environment: OS Name: Mac OS X OS Version: 11.4 OS Platform: Darwin RID: osx.11.0-x64 Base Path: /usr/local/Cellar/dotnet/5.0.205/libexec/sdk/5.0.205/
Host (useful for support): Version: 5.0.8 Commit: 42ac4d6d5a
.NET SDKs installed: 5.0.205 [/usr/local/Cellar/dotnet/5.0.205/libexec/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 5.0.8 [/usr/local/Cellar/dotnet/5.0.205/libexec/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.8 [/usr/local/Cellar/dotnet/5.0.205/libexec/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions
Extension | Author | Version |
---|---|---|
calva | betterthantomorrow | 2.0.208 |
copilot | GitHub | 1.3.2283 |
csharp | ms-dotnettools | 1.23.14 |
dart-code | Dart-Code | 3.25.1 |
flutter | Dart-Code | 3.25.0 |
jupyter | ms-toolsai | 2021.8.1195043623 |
paperclip-vscode | crcn | 17.14.7 |
prettier-vscode | esbenp | 8.1.0 |
python | ms-python | 2021.8.1105858891 |
remote-containers | ms-vscode-remote | 0.191.0 |
remote-kubernetes | Okteto | 0.3.3 |
remote-ssh | ms-vscode-remote | 0.65.7 |
remote-ssh-edit | ms-vscode-remote | 0.65.7 |
synthwave-vscode | RobbOwen | 0.1.8 |
vscode-docker | ms-azuretools | 1.15.0 |
vscode-mysql | formulahendry | 0.4.1 |
vscode-pull-request-github | GitHub | 0.29.0 |
vscode-pylance | ms-python | 2021.8.0 |
vscodeintellicode | VisualStudioExptTeam | 1.2.14 |
vsliveshare | ms-vsliveshare | 1.0.4673 |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top Results From Across the Web
SDK Path wrong | Apple Developer Forums
2. Go to the build settings for your target, and make sure the SDK setting is set to "Latest macOS" in the Architectures...
Read more >Visual Studio for Mac: No SDK found at specified location.
When entering /Applications/Xcode. app Visual Studio states XCode 12.4 found at default location.
Read more >Removing .NET SDKs from MacOS Manually | DevKimchi
In this post, I'm going to walk through how to manually remove a specific version of .NET SDK and runtime from MacOS.
Read more >Finding Android SDK on Mac and adding to PATH
Finding Android SDK on Mac and adding to PATH ; Open Android studio, go to Android Studio > Preferences; Search for sdk ;...
Read more >Visual Studio for Mac fails to detect .NET SDK 3.1.302 as ...
Visual Studio preferences pane properly detects both SDK versions being installed in /usr/local/share/dotnet/sdk. The csproj file has TargetFramework= ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having the exact same problem. Works in ZSH but VSCode doesn’t pick it up.
I’m also running into the same issue, and this is the second time that OmniSharp inexplicably in VSCode. I will no longer recommend anyone use VSCode to develop C#, this instability is unacceptable.