-
Notifications
You must be signed in to change notification settings - Fork 678
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 redlines NET 6 packages and code after NET 7 installation MacOS 12.6 #5463
Comments
Have you tried |
Yes, I have. Retried just now as well for good measure but to no avail. |
I see this as well. I don't see any relevant logs in the OmniSharp window, but I do see it's finding both .NET 6 and 7. I'll include logs below. If I update I tried Logs from OmniSharp, if it helps. This is a project where
|
Same problem, any hint? |
Also seeing this same problem. Cannot use VS Code for .Net 6 projects after installing .Net 7 SDK. Uninstalling the .Net 7 SDK resolves the problem. |
And the real kicker is until OmniSharp.SdkInstanceProvider fails to parse 'omnisharp.sdkVersion' and 'omnisharp.sdkPath' is fixed, I think maybe the only solution is to keep uninstalling the SDK for .Net 6 and then reinstalling when working on a .Net 7 project. |
I am sorry for your trouble. The handling of these properties was fixed already but the patched extension has not been released yet. However, there are other ways of telling OmniSharp which SDK to use than just using the VS Code options. You can create a file
in it. The file can be placed in the root directory of your solution (then it applies only there) or in See here for more details https://github.com/OmniSharp/omnisharp-roslyn/wiki/Configuration-Options#sdk-options |
Closing as resolved. |
Issue Description
NET 7 installation makes omnisharp redline AspNetCore packages on previous .NET sdks on MacOS+VSCode
Steps to Reproduce
Have .NET 7 installed on machine
Open Project or solution in VSCode running .NET 6
project or solution will restore and build successfully but code and packages will be redlined
Expected Behavior
Omnisharp should not redline
Actual Behavior
Logs
OmniSharp log
OmniSharp server started with .NET 7.0.100
.
Path: /Users/dkTimVer/.vscode/extensions/ms-dotnettools.csharp-1.25.2-darwin-x64/.omnisharp/1.39.3-beta.11-net6.0/OmniSharp.dll
PID: 6468
Starting OmniSharp on Unknown 0.0 (Unknown)
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
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: .NET Core SDK 7.0.100 17.4.0 - "/usr/local/share/dotnet/sdk/7.0.100/"
2: .NET Core SDK 6.0.201 17.1.0 - "/usr/local/share/dotnet/sdk/6.0.201/"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: .NET Core SDK 7.0.100 17.4.0 - "/usr/local/share/dotnet/sdk/7.0.100/"
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/dkTimVer/Projects/Lego/mould-log-api'.
info: OmniSharp.Cake.CakeProjectSystem
Did not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/dkTimVer/Projects/Lego/mould-log-api/LEGO.MouldLog.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/api/LEGO.MouldLog.Api.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/api-e2e-tests/LEGO.MouldLog.Api.Tests.E2E.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/api-unit-tests/LEGO.MouldLog.Api.Tests.Unit.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/domain/LEGO.MouldLog.Domain.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/domain-unit-tests/LEGO.MouldLog.Domain.Tests.Unit.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/ErrorCauseAPI/src/LEGO.ErrorCauseAPI/LEGO.ErrorCauseAPI.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/InspectionCatalogCode/src/LEGO.SAP.InspectionCatalogCode/LEGO.SAP.InspectionCatalogCode.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/Notification/src/LEGO.SAP.Notification/LEGO.SAP.Notification.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/dkTimVer/Projects/Lego/mould-log-api'.
info: OmniSharp.Script.ScriptProjectSystem
Did not find any CSX files
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/dkTimVer/Projects/Lego/mould-log-api' on host 6158.
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/api/LEGO.MouldLog.Api.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/api/LEGO.MouldLog.Api.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/api/LEGO.MouldLog.Api.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/api-e2e-tests/LEGO.MouldLog.Api.Tests.E2E.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/api-e2e-tests/LEGO.MouldLog.Api.Tests.E2E.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/api-e2e-tests/LEGO.MouldLog.Api.Tests.E2E.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/api-unit-tests/LEGO.MouldLog.Api.Tests.Unit.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/api-unit-tests/LEGO.MouldLog.Api.Tests.Unit.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/api-unit-tests/LEGO.MouldLog.Api.Tests.Unit.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/domain/LEGO.MouldLog.Domain.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/domain/LEGO.MouldLog.Domain.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/domain/LEGO.MouldLog.Domain.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/domain-unit-tests/LEGO.MouldLog.Domain.Tests.Unit.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/domain-unit-tests/LEGO.MouldLog.Domain.Tests.Unit.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/domain-unit-tests/LEGO.MouldLog.Domain.Tests.Unit.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/ErrorCauseAPI/src/LEGO.ErrorCauseAPI/LEGO.ErrorCauseAPI.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/ErrorCauseAPI/src/LEGO.ErrorCauseAPI/LEGO.ErrorCauseAPI.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/ErrorCauseAPI/src/LEGO.ErrorCauseAPI/LEGO.ErrorCauseAPI.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/InspectionCatalogCode/src/LEGO.SAP.InspectionCatalogCode/LEGO.SAP.InspectionCatalogCode.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/InspectionCatalogCode/src/LEGO.SAP.InspectionCatalogCode/LEGO.SAP.InspectionCatalogCode.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/InspectionCatalogCode/src/LEGO.SAP.InspectionCatalogCode/LEGO.SAP.InspectionCatalogCode.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/Notification/src/LEGO.SAP.Notification/LEGO.SAP.Notification.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/Notification/src/LEGO.SAP.Notification/LEGO.SAP.Notification.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/dkTimVer/Projects/Lego/mould-log-api/generated-clients/Notification/src/LEGO.SAP.Notification/LEGO.SAP.Notification.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.MouldLog.Api
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.MouldLog.Api.Tests.E2E
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.MouldLog.Api.Tests.Unit
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.MouldLog.Domain
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.MouldLog.Domain.Tests.Unit
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.ErrorCauseAPI
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.SAP.InspectionCatalogCode
info: OmniSharp.MSBuild.ProjectManager
Update project: LEGO.SAP.Notification
info: OmniSharp.Roslyn.CSharp.Services.Diagnostics.CSharpDiagnosticWorkerWithAnalyzers
Solution initialized -> queue all documents for code analysis. Initial document count: 225.
Received response for /quickinfo but could not find request.
Received response for /v2/getcodeactions but could not find request.
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
No symbol found. File: /Users/dkTimVer/Projects/Lego/mould-log-api/api/Controllers/V1/EntriesController.cs, Line: 17, Column: 47.
Received response for /v2/getcodeactions but could not find request.
Received response for /v2/getcodeactions but could not find request.
Received response for /v2/getcodeactions but could not find request.
C# log
Environment information
VSCode version: 1.73.1
C# Extension: 1.25.2
Mono Information
OmniSharp using mono: 6.12.0Dotnet Information
.NET SDK: Version: 7.0.100 Commit: e12b7af219Runtime Environment:
OS Name: Mac OS X
OS Version: 12.6
OS Platform: Darwin
RID: osx.12-x64
Base Path: /usr/local/share/dotnet/sdk/7.0.100/
Host:
Version: 7.0.0
Architecture: x64
Commit: d099f075e4
.NET SDKs installed:
3.1.416 [/usr/local/share/dotnet/sdk]
3.1.417 [/usr/local/share/dotnet/sdk]
5.0.405 [/usr/local/share/dotnet/sdk]
5.0.406 [/usr/local/share/dotnet/sdk]
6.0.201 [/usr/local/share/dotnet/sdk]
7.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.22 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.23 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.14 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.23 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: