Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omnisharp build fails with "Found implicit package reference 'Microsoft.NETCore.App', but none of the versions in the lock file" #2924

Closed
ajaybhargavb opened this issue Mar 19, 2019 · 6 comments

Comments

@ajaybhargavb
Copy link
Contributor

Issue Description

Omnisharp build fails with Found implicit package reference 'Microsoft.NETCore.App', but none of the versions in the lock file ("3.0.0-preview3-27414-8") satisfy [3.0.0, )

This works fine when running dotnet restore or dotnet build in command line.

Steps to Reproduce

  • dotnet new console
  • code .

Expected Behavior

Omnisharp initializes with no build errors

Actual Behavior

Omnisharp initialization fails

Logs

OmniSharp log

Starting OmniSharp server at 3/19/2019, 10:37:53 AM Target: /Users/ajbaaska/Github/temp/VSCodeTest

OmniSharp server started with Mono 5.12.0.
Path: /Users/ajbaaska/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.12-beta.39/omnisharp/OmniSharp.exe
PID: 85947

Starting OmniSharp on MacOS 10.14 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin"
2: StandAlone 15.0 - "/Users/ajbaaska/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.12-beta.39/omnisharp/msbuild/15.0/Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin"
CscToolPath = /Users/ajbaaska/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.12-beta.39/omnisharp/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/ajbaaska/Github/temp/VSCodeTest'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.WorkspaceInitializer
Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
info: OmniSharp.MSBuild.ProjectSystem
No solution files found in '/Users/ajbaaska/Github/temp/VSCodeTest'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/ajbaaska/Github/temp/VSCodeTest/VSCodeTest.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/ajbaaska/Github/temp/VSCodeTest'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/ajbaaska/Github/temp/VSCodeTest' on host 85924.
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/ajbaaska/Github/temp/VSCodeTest/VSCodeTest.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/ajbaaska/Github/temp/VSCodeTest/VSCodeTest.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/ajbaaska/Github/temp/VSCodeTest/VSCodeTest.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: VSCodeTest
[warn]: OmniSharp.MSBuild.PackageDependencyChecker
VSCodeTest: Found implicit package reference 'Microsoft.NETCore.App', but none of the versions in the lock file ("3.0.0-preview3-27414-8") satisfy [3.0.0, )

C# log

Getting latest OmniSharp version information Downloading package 'Latest OmniSharp Version Information' (1 KB).................... Done! Installing OmniSharp Version = 1.32.12-beta.39... Platform: darwin, x86_64

Finished

Environment information

VSCode version: 1.32.3
C# Extension: 1.17.1

Mono Information OmniSharp using global mono :5.12.0
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.0.100-preview3-010280 Commit: 3b9018c0af

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /Users/ajbaaska/Github/aspnet/AspNetCore-Tooling/.dotnet/sdk/3.0.100-preview3-010280/

Host (useful for support):
Version: 3.0.0-preview4-27512-18
Commit: ba06d66839

.NET Core SDKs installed:
3.0.100-preview3-010280 [/Users/ajbaaska/Github/aspnet/AspNetCore-Tooling/.dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0-preview3-19113-07 [/Users/ajbaaska/Github/aspnet/AspNetCore-Tooling/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.3 [/Users/ajbaaska/Github/aspnet/AspNetCore-Tooling/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview3-27414-8 [/Users/ajbaaska/Github/aspnet/AspNetCore-Tooling/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview4-27512-18 [/Users/ajbaaska/Github/aspnet/AspNetCore-Tooling/.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
csharp ms-vscode 1.17.1
debugger-for-chrome msjsdiag 4.11.3
java redhat 0.41.0
latex-workshop James-Yu 6.2.2
markdown-pdf yzane 1.2.0
python ms-python 2019.2.5558
rainbow-csv mechatroner 1.0.0
vscode-java-debug vscjava 0.17.0
vscode-java-dependency vscjava 0.3.0
vscode-java-pack vscjava 0.6.0
vscode-java-test vscjava 0.15.1
vscode-maven vscjava 0.15.1
vscode-sqlite alexcvzz 0.6.0
vscodeintellicode VisualStudioExptTeam 1.1.4
@SheepRock
Copy link

SheepRock commented Mar 20, 2019

Not sure if the same issue, but using dotnet core 3.0.100-preview3-010431 I get the following warning:

[warn]: OmniSharp.MSBuild.PackageDependencyChecker
TestProject: Did not find 'Microsoft.NETCore.App' in lock file.

Also, Ominisharp doesn't work, it can't find any namespace, my entire code get underlined, and there is no auto-completion options.

I'm using C# 1.18.0-beta10

@alizangiabadicode
Copy link

i tried to change the target framework and suddenly it get solved!

@johankvint
Copy link

I have the same problem.

Installed dotnet core 3.0 on Mac, ran dotnet new webapi, and everything is marked red in VSCode, no intellisense, no packages found.

Builds fine on cli

@filipw
Copy link
Contributor

filipw commented Sep 25, 2019

This is a duplicate of #3290

see #3290 (comment) for workarounds

@filipw filipw closed this as completed Sep 25, 2019
@stefc
Copy link

stefc commented Sep 29, 2019

Works on MacOS 10.14 also only with insert "omnisharp.path": "1.34.4-beta.23" to the settings.json.

OmniSharp server started.
    Path: /Users/stefc/.vscode/extensions/ms-vscode.csharp-1.21.3/.omnisharp/1.34.4-beta.23/run
    PID: 6700

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.14.6 (x64)

@filipw
Copy link
Contributor

filipw commented Sep 29, 2019

thanks for confirming the beta fixed it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants