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 Using Visual Studio 2019's MSBuild, not it's own. #3234

Closed
jtsom opened this issue Aug 16, 2019 · 4 comments
Closed

OmniSharp Using Visual Studio 2019's MSBuild, not it's own. #3234

jtsom opened this issue Aug 16, 2019 · 4 comments

Comments

@jtsom
Copy link

jtsom commented Aug 16, 2019

Issue Description

OmniSharp seems to look on the system for versions of MSBuild. It finds the version installed with Visual Studio 2019 and it's own internal version. But it then chooses to use the VS2019 version, not it's own. How can I specify for it to use it's own version?

Steps to Reproduce

Launch VSCode, watch the Output window as OmniSharp loads

Expected Behavior

Choose Extension's version of MSBuild, or allow a choice to be made.

Actual Behavior

OmniSharp picks VS2019's MSBuild (perhaps the first in the list?)

OmniSharp log

[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Visual Studio Enterprise 2019 16.3.29209.152 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin"
            2: StandAlone 16.0 - "c:\Users\John Tsombakos\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.1\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Visual Studio Enterprise 2019 16.3.29209.152 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin"

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.38.0-insider
C# Extension: 1.21.1

Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.0.100-preview8-013656 Commit: 8bf06ffc8d

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview8-013656\

Host (useful for support):
Version: 3.0.0-preview8-28405-07
Commit: d01b2fb7bc

.NET Core SDKs installed:
2.1.700 [C:\Program Files\dotnet\sdk]
2.1.800 [C:\Program Files\dotnet\sdk]
2.2.300 [C:\Program Files\dotnet\sdk]
2.2.301 [C:\Program Files\dotnet\sdk]
2.2.400 [C:\Program Files\dotnet\sdk]
3.0.100-preview8-013656 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview8.19405.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview8-28405-07 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview8-28405-07 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
Angular2 johnpapa 8.1.1
auto-close-tag formulahendry 0.5.6
auto-rename-tag formulahendry 0.1.0
azure-account ms-vscode 0.8.4
csharp ms-vscode 1.21.1
debugger-for-chrome msjsdiag 4.11.7
fabulous raathigeshan 0.12.0
material-icon-theme PKief 3.8.1
ng-template Angular 0.802.2
night-owl sdras 1.1.3
night-wolf MaoSantaella 1.7.3
output-colorizer IBM 0.1.2
quicktype quicktype 12.0.46
vetur octref 0.22.2
vscode-azurefunctions ms-azuretools 0.17.1
vscode-cosmosdb ms-azuretools 0.10.2
vscode-eslint dbaeumer 1.9.0
vscode-peacock johnpapa 3.1.0
vscode-typescript-tslint-plugin ms-vscode 1.2.2
vscodeintellicode VisualStudioExptTeam 1.1.9
winteriscoming johnpapa 1.3.0
@filipw
Copy link
Contributor

filipw commented Aug 16, 2019

this is by design - the VS instance of MsBuild offers a lot more features than what is bundled with OmniSharp (for various reasons), same happens with Mono. The bundled version is alway just used as a fallback (unless we only find VS2017, not 2019) when the machine doesn't have VS or Mono.

@jtsom
Copy link
Author

jtsom commented Aug 16, 2019

Ah, ok. That sounds reasonable.

@Dzivo
Copy link

Dzivo commented Aug 29, 2021

Let us choose ffs we dont care about those extra features ! or you could make it work with VS version than we wouldn't complain

@JoeRobich
Copy link
Member

JoeRobich commented Aug 30, 2021

There is an OmniSharp option for this OmniSharp/omnisharp-roslyn#2038

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

No branches or pull requests

4 participants