I have installed multiple versions of .NET Sdk.Now the Omnisharp suggestions is not working fine.
output shows these
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /BO-V2/Techne-Travel/travel-techne-bo-for-ota/src/Application/Application.csproj
A compatible installed .NET SDK for global.json version [6.0.101] from [/BO-V2/Techne-Travel/travel-techne-bo-for-ota/global.json] was not found.
Install the [6.0.101] .NET SDK or update [/BO-V2/Techne-Travel/travel-techne-bo-for-ota/global.json] with an installed .NET SDK:
It was not possible to find any installed .NET SDKs.
Install a .NET SDK from:
https://aka.ms/dotnet-download
A compatible installed .NET SDK for global.json version [6.0.101] from [/BO-V2/Techne-Travel/travel-techne-bo-for-ota/global.json] was not found.
Install the [6.0.101] .NET SDK or update [/BO-V2/Techne-Travel/travel-techne-bo-for-ota/global.json] with an installed .NET SDK:
It was not possible to find any installed .NET SDKs.
Install a .NET SDK from:
https://aka.ms/dotnet-download
[fail]: OmniSharp.MSBuild.ProjectLoader
Unable to locate the .NET SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed version.
[fail]: OmniSharp.MSBuild.ProjectLoader
The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found.
[fail]: OmniSharp.MSBuild.ProjectManager
But dotnet --info shows this output
.NET SDK (reflecting any global.json):
Version: 6.0.101
Commit: ef49f6213a
Runtime Environment:
OS Name: ubuntu
OS Version: 20.04
OS Platform: Linux
RID: ubuntu.20.04-x64
Base Path: /usr/share/dotnet/sdk/6.0.101/
Host (useful for support):
Version: 6.0.1
Commit: 3a25a7f1cc
.NET SDKs installed:
3.1.415 [/usr/share/dotnet/sdk]
5.0.100 [/usr/share/dotnet/sdk]
5.0.209 [/usr/share/dotnet/sdk]
5.0.403 [/usr/share/dotnet/sdk]
6.0.100 [/usr/share/dotnet/sdk]
6.0.101 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.21 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.21 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.13 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
which dotnet command
/usr/bin/dotnet
I have searched in google and find this https://www.py4u.net/discuss/1941159.
I did below as they said. But Still I face the same issue. Why this issue? How can I solve this setting.json
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": false
},
"omnisharp.path": "latest",
}
omnisharp.json
{
"MsBuild": {
"UseLegacySdkResolver": true
}
}
global.json
{
"sdk": {
"version": "6.0.101",
"rollForward": "latestMinor"
}
}
What should I do to make omnisharp works fine? I could not continue the work without Omnisharp Suggestion. It is hard to code. Please help me.