OmniSharp / omnisharp-roslyn

OmniSharp server (HTTP, STDIO) based on Roslyn workspaces
MIT License
1.72k stars 417 forks source link

msbuild -tl option not supported on ubuntu, msbuild 17.0.1+b177f8fa7, dotnet 6.0.123 #2576

Closed stone-w4tch3r closed 8 months ago

stone-w4tch3r commented 8 months ago

Trying to build on ubuntu 23.04, kernel 6.2.0-34-generic (64-bit)

$ dotnet --list-sdks 
6.0.123 [/usr/lib/dotnet/sdk]
7.0.112 [/usr/lib/dotnet/sdk]

$dotnet msbuild -v 
Microsoft (R) Build Engine version 17.0.1+b177f8fa7 for .NET

$cat global.json 
{
    "sdk": {
        "version": "6.0.123",
        "rollForward": "latestMinor"
    }
}

Got error: MSBUILD : error MSB1001: Unknown switch. Switch: -tl when trying to build

Error is caused by .Append("/tl") in build.cake, line 246

When commenting out this line, build proceeds fine

P.S. why I even need to build this from scratch? And why there is no packaged omnisharp in apt/brew or other package manager?

JoeRobich commented 8 months ago

The /tl switch was added in a more recent SDK than 6.0.123. Which is why we pin our SDK to 8rc1.

P.S. why I even need to build this from scratch?

We have prebuilt binaries available attached to our releases.

stone-w4tch3r commented 8 months ago

The /tl switch was added in a more recent SDK than 6.0.123. Which is why we pin our SDK to 8rc1. Ok, thanks. It was not obvious, that this version is mandatory(

We have prebuilt binaries available attached to our releases.

Yep, but installing from binaries is not very convenient too(

Anyway, thank you for answers!