Did not find 'Microsoft.NETCore.App' in lock file.
See original GitHub issueIssue Description
After installing the latest version of Omnisharp (1.34.4) I’m still experiencing issues running VSCode similar to those described in https://github.com/OmniSharp/omnisharp-vscode/issues/3290.
I don’t have much experience diagnosing Omnisharp issues but my guess is that it’s something to do with the missing reference to Microsoft.NETCore.App
. I can see from the log that I have 2 MSBuild instances installed and it appears to be using the Mono 6.4 one rather than the Standalone.
Steps to Reproduce
dotnet new console
dotnet build/run
- works as expected- Open VSCode
Expected Behavior
C# extension features to work as expected.
Actual Behavior
Lots of “errors”, due to missing references:
Logs
OmniSharp log
Starting OmniSharp server at 03/10/2019, 21:56:18
Target: /Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer
OmniSharp server started with Mono 6.4.0.
Path: /Users/ben.foster/.vscode/extensions/ms-vscode.csharp-1.21.4/.omnisharp/1.34.4/omnisharp/OmniSharp.exe
PID: 51738
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on MacOS 10.13.4 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 16.0 - "/usr/local/Cellar/mono/6.4.0.198/lib/mono/msbuild/Current/bin"
2: StandAlone 16.0 - "/Users/ben.foster/.vscode/extensions/ms-vscode.csharp-1.21.4/.omnisharp/1.34.4/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 16.0 - "/usr/local/Cellar/mono/6.4.0.198/lib/mono/msbuild/Current/bin"
CscToolExe = csc.exe
CscToolPath = /Users/ben.foster/.vscode/extensions/ms-vscode.csharp-1.21.4/.omnisharp/1.34.4/omnisharp/.msbuild/Current/Bin/Roslyn
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
No solution files found in '/Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer/SqsConsumer.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer/SqsConsumer.csproj
[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.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer' on host 51191.
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer/SqsConsumer.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/ben.foster/source/checkout-bootstrap-dotnet/SqsConsumer/SqsConsumer.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: SqsConsumer
[warn]: OmniSharp.MSBuild.PackageDependencyChecker
SqsConsumer: Did not find 'Microsoft.NETCore.App' in lock file.
C# log
Environment information
VSCode version: 1.38.1 C# Extension: 1.21.4
Mono Information
OmniSharp using global mono :6.4.0Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.0.100 Commit: 04339c3a26Runtime 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/3.0.100/
Host (useful for support): Version: 3.0.0 Commit: 7d57652f33
.NET Core SDKs installed: 2.1.302 [/usr/local/share/dotnet/sdk] 2.1.500 [/usr/local/share/dotnet/sdk] 2.2.104 [/usr/local/share/dotnet/sdk] 3.0.100 [/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.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.2 [/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.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.0.0 [/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.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.0.0 [/usr/local/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 |
---|---|---|
bower | donjayamanne | 0.0.3 |
cake-vscode | cake-build | 0.12.0 |
csharp | ms-vscode | 1.21.4 |
csharpextensions | jchannon | 1.3.0 |
css-compressor | bestvow | 0.0.2 |
docomment | k–kato | 0.1.8 |
dotnet-test-explorer | formulahendry | 0.7.1 |
EditorConfig | EditorConfig | 0.13.0 |
gitlens | eamodio | 10.0.1 |
Lua | keyring | 0.0.9 |
markdown-pdf | yzane | 1.3.1 |
mssql | ms-mssql | 1.6.0 |
openapi-lint | mermade | 1.0.4 |
plantuml | jebbs | 2.12.1 |
vscode-css-formatter | aeschli | 1.0.1 |
vscode-docker | ms-azuretools | 0.8.1 |
vscode-mocha-test-adapter | hbenl | 2.1.2 |
vscode-mysql | formulahendry | 0.4.0 |
vscode-nuget-package-manager | jmrog | 1.1.6 |
vscode-proto3 | zxh404 | 0.3.0 |
vscode-pull-request-github | GitHub | 0.11.2 |
vscode-test-explorer | hbenl | 2.14.6 |
vscode-yaml | redhat | 0.5.3 |
vsliveshare | ms-vsliveshare | 1.0.905 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:10 (5 by maintainers)
Top GitHub Comments
Mono here https://www.mono-project.com/download/stable/ comes with everything correctly configured, you may want to prefer it over the homebrew distro.
looks like you have a global mono
without msbuildwith an older msbuild (not 16.3) Either install global Mono with msbuild 16.3 or try setting"omnisharp.useGlobalMono": "never"