Problem after update to .NET SDK 2.2.202-1
See original GitHub issueIssue Description
Running into error after updating .NET SDK to 2.2.202-1 via Update Manager in Linux Mint 19.1.
Steps to Reproduce
From command line enter “dotnet new webapi -o TodoApi3”, then “cd TodoApi3”, then “code .” to open project in VS Code.
Expected Behavior
Message in VS Code asking if I want to add required assets to project.
Actual Behavior
Message: “Some projects have trouble loading. Please review the output for more details. Source: C# (Extension)”
It appears that the .vscode directory doesn’t get created, along with files launch.json and tasks.json. Workaround is to manually copy those from a prior project and fix the content of the two files to match the project name.
Logs
OmniSharp log
OmniSharp server started. Path: /home/bob/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/run PID: 9615
Starting OmniSharp on linuxmint 19.1 (x64)
DotNetPath set to dotnet
Located 1 MSBuild instance(s)
1: StandAlone 15.0 - "/home/bob/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin"
MSBUILD_EXE_PATH environment variable set to '/home/bob/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
Registered MSBuild instance: StandAlone 15.0 - "/home/bob/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin"
MSBuildExtensionsPath = /home/bob/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild
BypassFrameworkInstallChecks = true
CscToolPath = /home/bob/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
MSBuildToolsPath = /home/bob/.vscode/extensions/ms-vscode.csharp-1.18.0/.omnisharp/1.32.11/omnisharp/msbuild/15.0/Bin
Detecting Cake files in '/home/bob/projects/TodoApi3'.
Could not find any Cake files
Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
No solution files found in '/home/bob/projects/TodoApi3'
Queue project update for '/home/bob/projects/TodoApi3/TodoApi3.csproj'
Detecting CSX files in '/home/bob/projects/TodoApi3'.
Could not find any CSX files
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
Configuration finished.
Omnisharp server running using Stdio at location '/home/bob/projects/TodoApi3' on host 9534.
Loading project: /home/bob/projects/TodoApi3/TodoApi3.csproj
Failed to load project file '/home/bob/projects/TodoApi3/TodoApi3.csproj'.
/home/bob/projects/TodoApi3/TodoApi3.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK ‘Microsoft.NET.Sdk.Web’ specified could not be found. /home/bob/projects/TodoApi3/TodoApi3.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.Evaluator4[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.Evaluator4[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.Evaluator4[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.Evaluator4[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.PropertyDictionary1[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.IDictionary2[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.IDictionary2[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.IDictionary2[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) [0x0003f] in <c28baf123c0744eeb7042fb581dc5633>:0
at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <c28baf123c0744eeb7042fb581dc5633>:0
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <c28baf123c0744eeb7042fb581dc5633>:0
at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass28_0.<LoadProject>b__0 () [0x00000] in <c28baf123c0744eeb7042fb581dc5633>:0
at (wrapper delegate-invoke) System.Func1[System.ValueTuple
3[OmniSharp.MSBuild.ProjectFile.ProjectFileInfo,System.Collections.Immutable.ImmutableArray1[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 <c28baf123c0744eeb7042fb581dc5633>:0
Attempted to update project that is not loaded: /home/bob/projects/TodoApi3/TodoApi3.csproj
C# log
Environment information
VSCode version: 1.32.3 C# Extension: 1.18.0
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 2.2.202 Commit: 8a7ff6789dRuntime Environment: OS Name: linuxmint OS Version: 19.1 OS Platform: Linux RID: linux-x64 Base Path: /usr/share/dotnet/sdk/2.2.202/
Host (useful for support): Version: 2.2.3 Commit: 6b8ad509b6
.NET Core SDKs installed: 2.1.602 [/usr/share/dotnet/sdk] 2.2.202 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions
Extension | Author | Version |
---|---|---|
Angular2 | johnpapa | 7.0.1 |
angular2-switcher | infinity1207 | 0.2.0 |
auto-rename-tag | formulahendry | 0.0.15 |
chilly-vscode-dark-theme | ZachTRice | 0.1.5 |
csharp | ms-vscode | 1.18.0 |
csharpextensions | jchannon | 1.3.0 |
debugger-for-chrome | msjsdiag | 4.11.3 |
material-icon-theme | PKief | 3.7.0 |
ng-template | Angular | 0.1.11 |
path-intellisense | christian-kohler | 1.4.2 |
Theme-Oblivion | gerane | 0.0.2 |
vscode-angular2-files | alexiv | 1.6.2 |
vscode-nuget-package-manager | jmrog | 1.1.6 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:31 (4 by maintainers)
Top GitHub Comments
For anyone trying to fix this quickly:
which is followed by the list of versions
$ sudo apt install dotnet-sdk-2.2=<your version of choice>
for me it was$ sudo apt install dotnet-sdk-2.2=2.2.105-1
and confirm the downgrade
@rchande @akshita31 Thank you for your work on this.