Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#60903 - [dotnet-sdk][dotnet-host] OmniSharp does not work

Attached to Project: Community Packages
Opened by Mateusz Paluszkiewicz (TheAifam5) - Saturday, 24 November 2018, 16:05 GMT
Last edited by Maxime Gauduin (Alucryd) - Monday, 03 February 2020, 17:16 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No


OmniSharp could not find the 'Microsoft.NET.Sdk' thing.

Please add this two files to the package:

export DOTNET_ROOT=/opt/dotnet
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks

setenv DOTNET_ROOT="/opt/dotnet"
setenv MSBuildSDKsPath="${DOTNET_ROOT}/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks"
setenv PATH="${PATH}:${DOTNET_ROOT}"

1. Install vscode
2. Install C# extension to vscode
3. Create new project (shared library) using dotnet command
4. Open the project using vscode
5. Open "OmniSharp Log".
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Monday, 03 February 2020, 17:16 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.1.0.sdk100-2
Comment by Mateusz Paluszkiewicz (TheAifam5) - Saturday, 24 November 2018, 16:06 GMT
'MSBuildSDKsPath' I think should be only in "-sdk" package.
Comment by Alexandre Oliveira (Xinayder) - Friday, 15 March 2019, 23:44 GMT
I'd like to add that it still won't work with OmniSharp or any other IDE that supports .NET Core. I've just tried using it with Rider and it failed to compile a project that targets .NET Framework 4.0 and .NET Standard 2.0, saying it couldn't find the TargetFramework assemblies for .NET Framework 4.0. Installing msbuild-stable fixed the issue (Mono's msbuild).
Comment by Daniel Kozák (kozzi) - Tuesday, 23 July 2019, 12:50 GMT
issue is here:

When I remove /usr/bin/dotnet and make it symlink to /opt/dotnet/dotnet it seems works ok
Comment by David Velasco (davvelsan) - Thursday, 14 November 2019, 11:58 GMT
I second the solution proposed by Daniel Kozák (kozzi).

See this issue for various workarounds and an ongoing discussion on the topic:
See this comment for the particular workaround (and others) presented by Daniel Kozák: