Omnisharp 无法在 Manjaro Linux 上运行

Omnisharp 无法在 Manjaro Linux 上运行

今天我在新设置的 Manjaro 系统上安装了 .NET Core 3.0,但每次我想用 VS Code 打开项目时都会收到错误。以下是“dotnet --info”的输出:

.NET Core SDK(反映任何 global.json):版本:3.0.100 提交:04339c3a26

运行时环境:OS 名称:manjaro OS 版本:OS 平台:Linux RID:linux-x64 基本路径:
/opt/dotnet/sdk/3.0.100/

主机(对支持有用):版本:3.0.0 提交:7d57652f33

已安装的 .NET Core SDK:3.0.100 [/opt/dotnet/sdk]

安装的 .NET Core 运行时:Microsoft.AspNetCore.App 3.0.0 [/opt/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.0.0 [/opt/dotnet/shared/Microsoft.NETCore.App]

要安装其他 .NET Core 运行时或 SDK,请执行以下操作:
https://aka.ms/dotnet-download

使用创建项目

dotnet new mvc -o MVCTest

运行没有问题。但是当我打开这样的项目时,会出现以下错误消息:

于 2019 年 11 月 8 日下午 3:29:18 启动 OmniSharp 服务器 目标:/home/lukask/Projekte/Tests/TestWebApp

OmniSharp 服务器已启动。路径:/home/lukask/.vscode/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.8-beta.2/run PID:3498

[信息]:OmniSharp.Stdio.Host 在 manjaro 0.0 (x64) 上启动 OmniSharp [信息]:OmniSharp.Services.DotNetCliService DotNetPath 设置为 dotnet [信息]:OmniSharp.MSBuild.Discovery.MSBuildLocator 位于 1 个 MSBuild 实例 1:StandAlone 16.3 - “/home/lukask/.vscode/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.8-beta.2/omnisharp/.msbuild/Current/Bin” [信息]:OmniSharp.MSBuild.Discovery.MSBuildLocator MSBUILD_EXE_PATH 环境变量设置为'/home/lukask/.vscode/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.8-beta.2/omnisharp/.msbuild/Current/Bin/MSBuild.dll' [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator 已注册的 MSBuild 实例:StandAlone 16.3 - “/home/lukask/.vscode/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.8-beta.2/omnisharp/.msbuild/Current/Bin” CscToolExe = csc.exe MSBuildToolsPath = /home/lukask/.vscode/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.8-beta.2/omnisharp/.msbuild/Current/Bin CscToolPath = /home/lukask/.vscode/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.8-beta.2/omnisharp/.msbuild/Current/Bin/Roslyn BypassFrameworkInstallChecks = true MSBuildExtensionsPath = /home/lukask/.vscode/extensions/ms-vscode.csharp-1.21.6/.omnisharp/1.34.8-beta.2/omnisharp/.msbuild [info]: OmniSharp.Cake.CakeProjectSystem 正在检测 Cake 文件'/home/lukask/Projekte/Tests/TestWebApp'。[信息]:OmniSharp.Cake.CakeProjectSystem 找不到任何 Cake 文件 [信息]:OmniSharp.MSBuild.ProjectSystem 在'/home/lukask/Projekte/Tests/TestWebApp'中未找到解决方案文件 [信息]:OmniSharp.MSBuild.ProjectManager 为'/home/lukask/Projekte/Tests/TestWebApp/TestWebApp.csproj'排队项目更新 [信息]:OmniSharp.Script.ScriptProjectSystem 在'/home/lukask/Projekte/Tests/TestWebApp'中检测 CSX 文件。 [信息]:OmniSharp.Script.ScriptProjectSystem 找不到任何 CSX 文件 [信息]:OmniSharp.WorkspaceInitializer 调用工作区选项提供程序:OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider,顺序:0 [信息]:OmniSharp.MSBuild.ProjectManager 正在加载项目:/home/lukask/Projekte/Tests/TestWebApp/TestWebApp.csproj [信息]:OmniSharp.WorkspaceInitializer 调用工作区选项提供程序:OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider,顺序:100 [信息]:OmniSharp.WorkspaceInitializer 调用工作区选项提供程序:OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider,顺序:200 [信息]: OmniSharp.WorkspaceInitializer 配置完成。[信息]:OmniSharp.Stdio.Host Omnisharp 服务器使用 Stdio 在主机 3290 上的位置“/home/lukask/Projekte/Tests/TestWebApp”运行。无法找到任何已安装的。NET Core SDK 您是否要运行 .NET Core SDK 命令?从以下位置安装 .NET Core SDK: https://aka.ms/dotnet-download[警告]:OmniSharp.MSBuild.ProjectManager 无法加载项目文件“/home/lukask/Projekte/Tests/TestWebApp/TestWebApp.csproj”。/home/lukask/Projekte/Tests/TestWebApp/TestWebApp.csproj(1,1) Microsoft.Build.Exceptions.InvalidProjectFileException:找不到指定的 SDK“Microsoft.NET.Sdk.Web”。 /home/lukask/Projekte/Tests/TestWebApp/TestWebApp.csproj 在 Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName、Microsoft.Build.Shared.IElementLocation elementLocation、System.String resourceName、System.Object[] args) [0x00040] 在 :0 在 Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1] (System.Boolean condition、System.String errorSubCategoryResourceName、Microsoft.Build.Shared.IElementLocation elementLocation、System.String resourceName、T1 arg0) [0x00003] 在 :0 在 Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation、System.String resourceName、T1 arg0) [0x00000] 在 :0 在Microsoft.Build.Evaluation.Evaluator 4[P,I,M,D].ExpandAndLoadImportsFromUnescapedImportExpressionConditioned (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, System.Collections.Generic.List1[Microsoft.Build.Construction.ProjectRootElement]& 项目、Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult、System.Boolean throwOnFileNotExistsError) [0x00254] 在 :0 处 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 <b695b16788dd418cbe8b4d98f7a92ff3>:0 at Microsoft.Build.Evaluation.Evaluator4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile、Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] 在 :0 处 Microsoft.Build.Evaluation.Evaluator 4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <b695b16788dd418cbe8b4d98f7a92ff3>:0 at Microsoft.Build.Evaluation.Evaluator4[P,I,M,D].Evaluate (Microsoft.Build.BackEnd.Logging.ILoggingService logstashion、Microsoft.Build.Framework.BuildEventContext buildEventContext) [0x0011c] 在 :0 处 Microsoft.Build.Evaluation.Evaluator 4[P,I,M,D].Evaluate (Microsoft.Build.Evaluation.IEvaluatorData4[P,I,M,D] 数据, 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.IItemFactory2[S,T] itemFactory、Microsoft.Build.Evaluation.IToolsetProvider toolsetProvider、Microsoft.Build.Evaluation.ProjectRootElementCache projectRootElementCache、Microsoft.Build.Framework.BuildEventContext buildEventContext、Microsoft.Build.BackEnd.SdkResolution.ISdkResolverService sdkResolverService、System.Int32 submissionId、Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext、System.Boolean interactive)[0x0002f] 在 :0 处 Microsoft.Build.Evaluation.Project.Reevaluate(Microsoft.Build.BackEnd.Logging.ILoggingService logstServiceForEvaluation、Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext 评估上下文)[0x0005e] 在:0
在 Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService logsingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00035] 在 :0
在 Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService logsingServiceForEvaluation, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00000] 在 :0
在 Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00007] 在 :0
在 Microsoft.Build.Evaluation.Project.Initialize (System.Collections.Generic.IDictionary 2[TKey,TValue] globalProperties、System.String toolsVersion、System.String subToolsetVersion、Microsoft.Build.Evaluation.ProjectCollection projectCollection、Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings、Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00093] 在 :0 处 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] 在 :0 处 Microsoft.Build.Evaluation.Project..ctor (System.String projectFile、System.Collections.Generic.IDictionary 2[TKey,TValue] globalProperties、System.String toolsVersion) [0x000f7] 在 :0 处 Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] 在 :0 处 OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003f] 在 <7795d04d64e84704911acc5f3dccb04a>:0 处 OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] 在 <7795d04d64e84704911acc5f3dccb04a>:0 处 OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectIdInfo projectIdInfo, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] 在 <7795d04d64e84704911acc5f3dccb04a>:0 处 OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass29_0.b__0 () [0x00000] 在 <7795d04d64e84704911acc5f3dccb04a>:0 处 (wrapper delegate-invoke) System.Func 3[OmniSharp.MSBuild.ProjectFile.ProjectFileInfo,System.Collections.Immutable.ImmutableArray 1[TResult] 加载器) [0x0001b] 在 <7795d04d64e84704911acc5f3dccb04a>:02[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00126] in <b695b16788dd418cbe8b4d98f7a92ff3>: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 <b695b16788dd418cbe8b4d98f7a92ff3>:0 at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection) [0x00000] in <b695b16788dd418cbe8b4d98f7a92ff3>:0 at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary1[System.ValueTuple1[OmniSharp.MSBuild.Logging.MSBuildDiagnostic],OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs]].invoke_TResult() at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject (System.String projectFilePath, System.Func

[失败]:OmniSharp.MSBuild.ProjectManager 尝试更新未加载的项目:/home/lukask/Projekte/Tests/TestWebApp/TestWebApp.csproj

我已经将“omnisharp.path”:“latest”添加到我的settings.json中,但这并没有改变任何东西。

非常感谢你的帮助!

相关内容