It was not possible to find any installed .NET SDKs. for MacOS
Environment data
dotnet --info output:
dotnet --info [23/10/21 3:37:57]
.NET SDK (reflecting any global.json):
Version: 6.0.100-rc.2.21505.57
Commit: ab39070116
Runtime Environment:
OS Name: Mac OS X
OS Version: 11.6
OS Platform: Darwin
RID: osx.11.0-x64
Base Path: /usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/
Host (useful for support):
Version: 6.0.0-rc.2.21480.5
Commit: 6b11d64e7e
.NET SDKs installed:
3.1.413 [/usr/local/share/dotnet/sdk]
3.1.414 [/usr/local/share/dotnet/sdk]
5.0.401 [/usr/local/share/dotnet/sdk]
5.0.402 [/usr/local/share/dotnet/sdk]
6.0.100-rc.2.21505.57 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-rc.2.21480.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version:
Version: 1.61.2
Commit: 6cba118ac49a1b88332f312a8f67186f7f3c1643
Date: 2021-10-19T15:49:28.381Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.6.0
C# Extension version:
Name: C#
Id: ms-dotnettools.csharp
Description: C# for Visual Studio Code (powered by OmniSharp).
Version: 1.23.16
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp
OmniSharp log
Starting OmniSharp server at 10/23/2021, 3:43:57 PM
Target: /Users/chuyaguo/Documents/brWork/test/myApp
OmniSharp server started.
Path: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/run
PID: 29796
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.Cake
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.Cake, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.DotNetTest
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.DotNetTest, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.Host
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.Host, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.MSBuild
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.MSBuild, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.Roslyn
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.Roslyn, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.Roslyn.CSharp
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.Roslyn.CSharp, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.Script
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.Script, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: OmniSharp.Shared
[dbug]: OmniSharp.CompositionHostBuilder
Loaded OmniSharp.Shared, Version=1.37.0.0, Culture=neutral, PublicKeyToken=7e5bf7b3b470b509
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded from path: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.razor/OmniSharpPlugin/Microsoft.AspNetCore.Razor.OmniSharpPlugin.dll
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on MacOS 11.6 (x64)
[info]: OmniSharp.Services.DotNetCliService
Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[dbug]: OmniSharp.CompositionHostBuilder
.NET SDK requires MSBuild instances version 16.7.0 or higher
[dbug]: OmniSharp.MSBuild.Discovery.Providers.MonoInstanceProvider
Can't use installed Mono because OmniSharp isn't running on it
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 17.0.0 - "/Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin"
[dbug]: OmniSharp.CompositionHostBuilder
MSBuild instance StandAlone 17.0.0 scored at 1
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 17.0.0 - "/Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin"
CscToolExe = csc.exe
MSBuildToolsPath = /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin
CscToolPath = /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin/Roslyn
BypassFrameworkInstallChecks = true
MSBuildExtensionsPath = /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: Microsoft.CodeAnalysis.Features, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: Microsoft.CodeAnalysis.CSharp.Features, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: Microsoft.CodeAnalysis.ExternalAccess.OmniSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[trce]: OmniSharp.Services.AssemblyLoader
Assembly loaded: Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
[trce]: OmniSharp.HostServicesAggregator
Successfully added Microsoft.CodeAnalysis.Features, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
Successfully added Microsoft.CodeAnalysis.CSharp.Features, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
Successfully added Microsoft.CodeAnalysis.ExternalAccess.OmniSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
Successfully added Microsoft.CodeAnalysis.ExternalAccess.OmniSharp.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 to host service assemblies.
[trce]: OmniSharp.HostServicesAggregator
Successfully added Microsoft.AspNetCore.Razor.OmniSharpPlugin.StrongNamed, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 to host service assemblies.
[dbug]: OmniSharp.WorkspaceInitializer
Starting with OmniSharp options: {"RoslynExtensionsOptions":{"EnableDecompilationSupport":false,"EnableAnalyzersSupport":true,"EnableImportCompletion":true,"EnableAsyncCompletion":false,"DocumentAnalysisTimeoutMs":10000,"LocationPaths":null},"FormattingOptions":{"OrganizeImports":false,"EnableEditorConfigSupport":true,"NewLine":"\n","UseTabs":false,"TabSize":4,"IndentationSize":4,"SpacingAfterMethodDeclarationName":false,"SpaceWithinMethodDeclarationParenthesis":false,"SpaceBetweenEmptyMethodDeclarationParentheses":false,"SpaceAfterMethodCallName":false,"SpaceWithinMethodCallParentheses":false,"SpaceBetweenEmptyMethodCallParentheses":false,"SpaceAfterControlFlowStatementKeyword":true,"SpaceWithinExpressionParentheses":false,"SpaceWithinCastParentheses":false,"SpaceWithinOtherParentheses":false,"SpaceAfterCast":false,"SpacesIgnoreAroundVariableDeclaration":false,"SpaceBeforeOpenSquareBracket":false,"SpaceBetweenEmptySquareBrackets":false,"SpaceWithinSquareBrackets":false,"SpaceAfterColonInBaseTypeDeclaration":true,"SpaceAfterComma":true,"SpaceAfterDot":false,"SpaceAfterSemicolonsInForStatement":true,"SpaceBeforeColonInBaseTypeDeclaration":true,"SpaceBeforeComma":false,"SpaceBeforeDot":false,"SpaceBeforeSemicolonsInForStatement":false,"SpacingAroundBinaryOperator":"single","IndentBraces":false,"IndentBlock":true,"IndentSwitchSection":true,"IndentSwitchCaseSection":true,"IndentSwitchCaseSectionWhenBlock":true,"LabelPositioning":"oneLess","WrappingPreserveSingleLine":true,"WrappingKeepStatementsOnSingleLine":true,"NewLinesForBracesInTypes":true,"NewLinesForBracesInMethods":true,"NewLinesForBracesInProperties":true,"NewLinesForBracesInAccessors":true,"NewLinesForBracesInAnonymousMethods":true,"NewLinesForBracesInControlBlocks":true,"NewLinesForBracesInAnonymousTypes":true,"NewLinesForBracesInObjectCollectionArrayInitializers":true,"NewLinesForBracesInLambdaExpressionBody":true,"NewLineForElse":true,"NewLineForCatch":true,"NewLineForFinally":true,"NewLineForMembersInObjectInit":true,"NewLineForMembersInAnonymousTypes":true,"NewLineForClausesInQuery":true},"FileOptions":{"SystemExcludeSearchPatterns":["**/node_modules/**/*","**/bin/**/*","**/obj/**/*","**/.git/**/*","**/.git","**/.svn","**/.hg","**/CVS","**/.DS_Store","**/Thumbs.db"],"ExcludeSearchPatterns":[]},"RenameOptions":{"RenameOverloads":false,"RenameInStrings":false,"RenameInComments":false},"ImplementTypeOptions":{"InsertionBehavior":null,"PropertyGenerationBehavior":null},"DotNetCliOptions":{"LocationPaths":null},"Plugins":{"LocationPaths":null}}
[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/chuyaguo/Documents/brWork/test/myApp'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[dbug]: OmniSharp.MSBuild.ProjectSystem
MSBuild environment:
Mode: Standalone
RunningTests: False
RunningInVisualStudio: False
MSBuildToolsDirectory32: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin
MSBuildToolsDirectory64: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin
MSBuildSDKsPath: /usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/Sdks
CurrentMSBuildConfigurationFile: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin/MSBuild.exe.config
CurrentMSBuildExePath: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin/MSBuild.exe
CurrentMSBuildToolsDirectory: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin
VisualStudioInstallRootDirectory:
MSBuildExtensionsPath: /Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin
[dbug]: OmniSharp.MSBuild.ProjectLoader
'MSBuildExtensionsPath' set to '/Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild'
[dbug]: OmniSharp.MSBuild.ProjectLoader
'CscToolPath' set to '/Users/chuyaguo/.vscode/extensions/ms-dotnettools.csharp-1.23.16/.omnisharp/1.37.16/omnisharp/.msbuild/Current/Bin/Roslyn'
[dbug]: OmniSharp.MSBuild.ProjectLoader
'CscToolExe' set to 'csc.exe'
[info]: OmniSharp.MSBuild.ProjectSystem
No solution files found in '/Users/chuyaguo/Documents/brWork/test/myApp'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/chuyaguo/Documents/brWork/test/myApp/myApp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/chuyaguo/Documents/brWork/test/myApp'.
[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/chuyaguo/Documents/brWork/test/myApp' on host 29740.
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 2,
"Command": "/projects"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 1,
"Command": "/projects"
}
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/chuyaguo/Documents/brWork/test/myApp/myApp.csproj
It was not possible to find any installed .NET SDKs.
Install a .NET SDK from:
https://aka.ms/dotnet-download
It was not possible to find any installed .NET SDKs.
Install a .NET SDK from:
https://aka.ms/dotnet-download
[fail]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '{projectFilePath}'.
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found. /usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.props
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <080b3b7730fe4c7889aaf13e0d778492>: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) [0x00348] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x0023b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x0023b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x0023b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate () [0x0013b] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00000] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00007] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <080b3b7730fe4c7889aaf13e0d778492>:0
at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] projectConfigurationsInSolution) [0x00160] in <9821fdc3db1b47fba63a2ff2c2618a1b>:0
at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] configurationsInSolution) [0x0000d] in <9821fdc3db1b47fba63a2ff2c2618a1b>: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 <9821fdc3db1b47fba63a2ff2c2618a1b>:0
at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass31_0.<LoadProject>b__0 () [0x00000] in <9821fdc3db1b47fba63a2ff2c2618a1b>: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 <9821fdc3db1b47fba63a2ff2c2618a1b>:0
/Users/chuyaguo/Documents/brWork/test/myApp/myApp.csproj(0,0)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found. /usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.props
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <080b3b7730fe4c7889aaf13e0d778492>: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) [0x00348] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x0023b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x0023b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x0023b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003b] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate () [0x0013b] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00000] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.Project+ProjectImpl.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00007] in <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>: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 <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <080b3b7730fe4c7889aaf13e0d778492>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <080b3b7730fe4c7889aaf13e0d778492>:0
at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] projectConfigurationsInSolution) [0x00160] in <9821fdc3db1b47fba63a2ff2c2618a1b>:0
at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath, System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] configurationsInSolution) [0x0000d] in <9821fdc3db1b47fba63a2ff2c2618a1b>: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 <9821fdc3db1b47fba63a2ff2c2618a1b>:0
at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass31_0.<LoadProject>b__0 () [0x00000] in <9821fdc3db1b47fba63a2ff2c2618a1b>: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 <9821fdc3db1b47fba63a2ff2c2618a1b>:0
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/chuyaguo/Documents/brWork/test/myApp/myApp.csproj
[dbug]: OmniSharp.Stdio.Host
************ Response (651.4927ms) ************
{
"Request_seq": 2,
"Command": "/projects",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"MsBuild": {
"SolutionPath": "/Users/chuyaguo/Documents/brWork/test/myApp",
"Projects": []
},
"Script": {
"Projects": []
}
},
"Seq": 58,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Response (651.4933ms) ************
{
"Request_seq": 1,
"Command": "/projects",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"MsBuild": {
"SolutionPath": "/Users/chuyaguo/Documents/brWork/test/myApp",
"Projects": []
},
"Script": {
"Projects": []
}
},
"Seq": 59,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 3,
"Command": "/projects"
}
[dbug]: OmniSharp.Stdio.Host
************ Response (0.1413ms) ************
{
"Request_seq": 3,
"Command": "/projects",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"MsBuild": {
"SolutionPath": "/Users/chuyaguo/Documents/brWork/test/myApp",
"Projects": []
},
"Script": {
"Projects": []
}
},
"Seq": 67,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 4,
"Command": "/v2/codestructure",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs"
}
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 5,
"Command": "/v2/highlight",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs",
"Line": 0,
"Column": 0,
"Range": {
"Start": {
"Line": 0,
"Column": 0
},
"End": {
"Line": 2,
"Column": 0
}
}
}
}
[dbug]: OmniSharp.Stdio.Host
************ Response (12.2721ms) ************
{
"Request_seq": 4,
"Command": "/v2/codestructure",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"Elements": []
},
"Seq": 70,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 6,
"Command": "/v2/blockstructure",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs"
}
}
[dbug]: OmniSharp.Stdio.Host
************ Response (6.2691ms) ************
{
"Request_seq": 6,
"Command": "/v2/blockstructure",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"Spans": []
},
"Seq": 75,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 7,
"Command": "/v2/codestructure",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs"
}
}
[dbug]: OmniSharp.Stdio.Host
************ Response (0.0958ms) ************
{
"Request_seq": 7,
"Command": "/v2/codestructure",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"Elements": []
},
"Seq": 78,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Response (22.2639ms) ************
{
"Request_seq": 5,
"Command": "/v2/highlight",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"Spans": []
},
"Seq": 72,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 8,
"Command": "/v2/highlight",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs",
"Line": 0,
"Column": 0,
"Range": null
}
}
[dbug]: OmniSharp.Stdio.Host
************ Response (0.1215ms) ************
{
"Request_seq": 8,
"Command": "/v2/highlight",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"Spans": []
},
"Seq": 82,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 9,
"Command": "/v2/codestructure",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs"
}
}
[dbug]: OmniSharp.Stdio.Host
************ Response (0.1714ms) ************
{
"Request_seq": 9,
"Command": "/v2/codestructure",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"Elements": []
},
"Seq": 85,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 10,
"Command": "/codecheck",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs"
}
}
[info]: OmniSharp.Roslyn.CSharp.Services.Diagnostics.CSharpDiagnosticWorkerWithAnalyzers
Solution initialized -> queue all documents for code analysis. Initial document count: 0.
[dbug]: OmniSharp.Stdio.Host
************ Response (21.7142ms) ************
{
"Request_seq": 10,
"Command": "/codecheck",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"QuickFixes": []
},
"Seq": 88,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 11,
"Command": "/v2/codestructure",
"Arguments": {
"FileName": "/Users/chuyaguo/Documents/brWork/test/myApp/Program.cs"
}
}
[dbug]: OmniSharp.Stdio.Host
************ Response (0.2274ms) ************
{
"Request_seq": 11,
"Command": "/v2/codestructure",
"Running": true,
"Success": true,
"Message": null,
"Body": {
"Elements": []
},
"Seq": 92,
"Type": "response"
}
Steps to reproduce
I am following the steps in this microsoft tutorial and when I open my project in VSCode, I get the errors in the Omnisharp log above. I have tried the following:
- opening VSCode from my
Applicationsfolder, or from the dock, or from command line by runningcode . - added
global.jsonfile to try to specify the .NET SDK version - completely removed and reinstalled all previous .NET SDKs and runtimes (via the microsoft website)
- completely removed and reinstalled mono
- completely removed and reinstalled VSCode itself
- removed and reinstalled the newest version (1.23.16) of the C# extension
- and when this step didn't work, I started downgrading the extension version one at a time and when I was on .Net SDK version
5.0.401, I was able to get the extension working when I reached version1.23.9. But when I moved to .NET SDK version6.0.100, this trick stopped working.
- and when this step didn't work, I started downgrading the extension version one at a time and when I was on .Net SDK version
- I have also added
export MSBuildSDKsPath="/usr/local/share/dotnet/sdk/$(dotnet --version)/Sdks"to my~/.zshrcfile. This used to work when I was on .NET SDK5.0.401with c# extension version1.23.9but again, this stopped working now that I've moved on to .NET SDK6.0.100
None of these steps above worked.
Additional notes:
- My tutorial project does build and run as expected when I do
dotnet runfrom the command line. - If I do
dotnet --list-sdksI get the following:
3.1.413 [/usr/local/share/dotnet/sdk]
3.1.414 [/usr/local/share/dotnet/sdk]
5.0.401 [/usr/local/share/dotnet/sdk]
5.0.402 [/usr/local/share/dotnet/sdk]
6.0.100-rc.2.21505.57 [/usr/local/share/dotnet/sdk]
- and if I do
dotnet --list-runtimesI get this:
Microsoft.AspNetCore.App 3.1.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-rc.2.21480.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
- I first noticed this issue about 6 months ago and downgrading to extension version
1.23.9from1.23.11at that time worked. But now even1.23.9doesn't work anymore for me.
Can someone please point me in the right direction to fix this? Thank you very much! 🙏🏼
I think I fixed it by following the wiki suggestion here but with a minor twist.
Original suggestion states:
If
which dotnetproduces no output, then this means the .NET SDK wasn't able to modify thePATHor add a symbolic link, or the .NET SDK for your platform doesn't do so. You can fix this by either adding a symbolic link yourself (example:sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnetwhere/usr/share/dotnet/dotnetshould be replaced with wherever the .NET SDK installer for your platform was installed to)
But since I'm on MacOS Big Sur (version 11.6), I can no longer create symlinks into the /usr/bin folder because of Mac's System Integrity Protection. But this stack overflow answer shows a workaround.
What I ended up doing is:
sudo mkdir -p /usr/local/bin
sudo ln -sf /usr/local/share/dotnet/dotnet /usr/local/bin/dotnet
(-f because I had another symlink created but it was outdated so I wanted to replace that. If you don't have an existing symlink you can probably just stick to -s)
And now I'm able to use the newest version (1.23.16) of C# extension in VSCode.
I'm going to close this issue but thought I'd make this comment just in case anyone else is facing a similar problem.
Leaving a comment here to say that @chuyaguo2014 's work around worked for me too.