Omnisharp-vscode: Can I change the path for the MSBuild that gets used?

Created on 21 Aug 2017  路  9Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

dotnet --info output:
Runtime Environment:
OS Name: ubuntu
OS Version: 17.04
OS Platform: Linux
RID: ubuntu.17.04-x64

Microsoft .NET Core Shared Framework Host

Version : 2.0.0-preview2-25407-01
Build : 40c565230930ead58a50719c0ec799df77bddee9

VS Code version: 1.16 (insiders)
C# Extension version: 1.12.1

Steps to reproduce

Try opening a C# project based on MSBuild and that used the new Sdks feature.

Expected behavior

I expected omnisharp to load the project since I have MSBuild installed with all the relevant SDKs. Building using the msbuild command works perfectly.

Actual behavior

Omnisharp fails to load the project (that targets net461) since it used its own internal MSBuild without the SDKs installed.

Question

Most helpful comment

Yes, OmniSharp definitely supports that syntax.

Yes, you can have a global omnisharp.json file. See this article.

Note that the MSBuild in the latest Mono will build .NET Core-style projects for full framework. This is how we build omnisharp-roslyn on OSX and Linux, which targets net46. It's as easier as running msbuild OmniSharp.sln

All 9 comments

Also, trying to change the msbuild folder installed by the extension to a symlink to teh system msbuild install will fail since the installation layout is different.

First, a couple of questions:

  • Could you include the full output of dotnet --info? It looks like the version information at the top of the output was missed when you copied and pasted it to this issue.
  • What is the "new Sdks feature"? Do you have a project that I can use to replicate this issue?
  • Could you provide the full OmniSharp Log from VS Code after loading your project fails?

Now, some details:

OmniSharp doesn't shell out to MSBuild, it uses the MSBuild engine inproc. So, it's impossible to get it to use a different one without rebuilding OmniSharp. That said, OmniSharp will attempt to locate the .NET Core SDK for your project using the "dotnet" that is on the path and set the "MSBuildSdksPath" to the appropriate folder under that. That way, it uses the relevant SDKs.

You can set various MSBuild properties by creating an "omnisharp.json" file in your project folder. By setting things like "MSBuildSdksPath", you might be able to get things working, but this should be an automatic process. Such a file would look like so:

{
    "MsBuild": {
        "MSBuildSdksPath": "<path to Sdk to use>"
    }
}

Other settable properties can be found here.

Last note: Generally, for projects targeting .NET TFMs on OSX/Linux, the recommendation is to install the latest mono-devel package on Mono. If mono is on the path and Mono's target frameworks are on the path, OmniSharp will use them.

I am not using the latest dotnet CLI, as I use the variant of MSBuild. The CLI is too restrictive (does nto allow me to target full framework.

I guess it's now mainstream, not new. I meant any project that has Sdk="Microsoft.NET.Sdk" or the like on its root node.

Is there a way to have a global omnisharp.json file, maybe a file inside the extension installation itself that I can tweak?

Yes, OmniSharp definitely supports that syntax.

Yes, you can have a global omnisharp.json file. See this article.

Note that the MSBuild in the latest Mono will build .NET Core-style projects for full framework. This is how we build omnisharp-roslyn on OSX and Linux, which targets net46. It's as easier as running msbuild OmniSharp.sln

Thanks, I will create an omnisharp.json file in my user profile as mentioned in that link.

Sounds good. However, I'd still recommend installing the latest stable Mono (5.2.0). That's the supported way to do this.

Hey @DustinCampbell, apologies to bring up an old topic here but wanted to ask a similarly related question for probably a very different reason.

I use .NET Core on a Mac and use asdf for version management of many other tools on my machine since most of those tools don't support having multiple versions installed concurrently. I understand that .NET Core _does_ support multiple versions being installed concurrently on a single machine and that you can further control which is used where with the global.json files, but I'd really like to keep asdf as my single tool for other tools' version management, and asdf _does_ support .NET Core. It works everywhere as I'd expect (dotnet on CLI resolves fine etc.) _except_ with Omnisharp in VS Code, as the OmniSharp.MSBuild.Discovery.MSBuildLocator only finds the instance of MSBuild that ships with the OmniSharp extension. I see above you mentioning that I can tell it to look at a particular install of MSBuild via an omnisharp.json file, but I want it to leverage a dynamic link rather than a single static installation, effectively. I'm curious for advice on this, but also I am a bit curious as to what Omni uses MSBuild for, because everything in my VS Code environment does appear to still work and operate fine. It would appear I can still do most things normally. Context below:


In case it's of any relevance asdf stores particular version installs under ~/.asdf/installs/dotnet-core/<version>/

Omni trace

Starting OmniSharp server at 1/19/2019, 2:04:58 PM
    Target: /Users/jonsullivan/source/repos/console-app

OmniSharp server started.
    Path: /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/run
    PID: 64456

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.14 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
            MSBuildExtensionsPath = /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/jonsullivan/source/repos/console-app'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/Users/jonsullivan/source/repos/console-app'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jonsullivan/source/repos/console-app/console-app.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/jonsullivan/source/repos/console-app'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/jonsullivan/source/repos/console-app' on host 63566.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/jonsullivan/source/repos/console-app/console-app.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/Users/jonsullivan/source/repos/console-app/console-app.csproj'.
/Users/jonsullivan/source/repos/console-app/console-app.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk' specified could not be found.  /Users/jonsullivan/source/repos/console-app/console-app.csproj
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1] (System.Boolean condition, System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00003] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImportsFromUnescapedImportExpressionConditioned (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, System.Collections.Generic.List`1[Microsoft.Build.Construction.ProjectRootElement]& projects, System.Boolean throwOnFileNotExistsError) [0x00254] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImports (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x00024] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Framework.BuildEventContext buildEventContext) [0x00103] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.Evaluation.IEvaluatorData`4[P,I,M,D] data, Microsoft.Build.Construction.ProjectRootElement root, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, System.Int32 maxNodeCount, Microsoft.Build.Collections.PropertyDictionary`1[T] environmentProperties, Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Evaluation.IItemFactory`2[S,T] itemFactory, Microsoft.Build.Evaluation.IToolsetProvider toolsetProvider, Microsoft.Build.Evaluation.ProjectRootElementCache projectRootElementCache, Microsoft.Build.Framework.BuildEventContext buildEventContext, Microsoft.Build.Execution.ProjectInstance projectInstanceIfAnyForDebuggerOnly, Microsoft.Build.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0001a] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x0004c] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00034] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00023] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project.Initialize (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00126] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0009e] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f5] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <2338fdb301034c1d9c6b95e564d514b0>:0 
  at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003f] in <46c04c65986d41159ea03c6835eb767f>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <46c04c65986d41159ea03c6835eb767f>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <46c04c65986d41159ea03c6835eb767f>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass25_0.<LoadProject>b__0 () [0x00000] in <46c04c65986d41159ea03c6835eb767f>:0 
  at (wrapper delegate-invoke) System.Func`1[System.ValueTuple`3[OmniSharp.MSBuild.ProjectFile.ProjectFileInfo,System.Collections.Immutable.ImmutableArray`1[OmniSharp.MSBuild.Logging.MSBuildDiagnostic],OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs]].invoke_TResult()
  at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject (System.String projectFilePath, System.Func`1[TResult] loader) [0x0001b] in <46c04c65986d41159ea03c6835eb767f>:0 

[fail]: OmniSharp.MSBuild.ProjectManager
        Attemped to update project that is not loaded: /Users/jonsullivan/source/repos/console-app/console-app.csproj
[info]: OmniSharp.OmniSharpWorkspace
        Miscellaneous file: /Users/jonsullivan/source/repos/console-app/Program.cs added to workspace

dotnet --info

.NET Core SDK (reflecting any global.json):
 Version:   2.2.103
 Commit:    8edbc2570a

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /Users/jonsullivan/.asdf/installs/dotnet-core/2.2.103/sdk/2.2.103/

Host (useful for support):
  Version: 2.2.1
  Commit:  878dd11e62

.NET Core SDKs installed:
  2.2.103 [/Users/jonsullivan/.asdf/installs/dotnet-core/2.2.103/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.1 [/Users/jonsullivan/.asdf/installs/dotnet-core/2.2.103/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.1 [/Users/jonsullivan/.asdf/installs/dotnet-core/2.2.103/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.1 [/Users/jonsullivan/.asdf/installs/dotnet-core/2.2.103/shared/Microsoft.NETCore.App]

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

Appreciate any help you might be able to offer!

Interestingly, I removed my asdf version of .NET Core entirely then installed the standard version via direct download from Microsoft and OmniSharp still can't seem to locate it.

That said, OmniSharp will attempt to locate the .NET Core SDK for your project using the "dotnet" that is on the path and set the "MSBuildSdksPath" to the appropriate folder under that.

I don't think this is happening on my machine, at least.
Latest Omni output / dotnet --info

Starting OmniSharp server at 1/19/2019, 7:02:21 PM
    Target: /Users/jonsullivan/source/repos/bootstrap-demo-three

OmniSharp server started.
    Path: /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/run
    PID: 70016

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.14 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
            MSBuildExtensionsPath = /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/jonsullivan/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/jonsullivan/source/repos/bootstrap-demo-three'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/Users/jonsullivan/source/repos/bootstrap-demo-three'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jonsullivan/source/repos/bootstrap-demo-three/bootstrap-demo-three.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/jonsullivan/source/repos/bootstrap-demo-three'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/jonsullivan/source/repos/bootstrap-demo-three' on host 69989.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/jonsullivan/source/repos/bootstrap-demo-three/bootstrap-demo-three.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/jonsullivan/source/repos/bootstrap-demo-three/bootstrap-demo-three.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/jonsullivan/source/repos/bootstrap-demo-three/bootstrap-demo-three.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: bootstrap-demo-three
.NET Core SDK (reflecting any global.json):
 Version:   2.2.103
 Commit:    8edbc2570a

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.2.103/

Host (useful for support):
  Version: 2.2.1
  Commit:  878dd11e62

.NET Core SDKs installed:
  2.2.103 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

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

As one final follow up before I call it a night and just allow the ProjectManager to have not loaded a project and use the VS Code extension as-is ("good enough!" 馃槢), I believe I was under the impression that OmniSharp would be running _on_ .NET Core itself, making all of the .NET Core SDK references available and ready. While OmniSharp may run directly on .NET Core on Windows (I'm on a Mac and have no interest in checking Windows 馃槈), on all other platforms it runs on Mono. This is all outlined in Omni's main REAME.

That being said, I've forked and read through a decent bit of the omnisharp-roslyn code and (the rest of this though probably belong in that repo's issues) I don't believe there is an MSBuild.Provider for resolving the .NET Core CLI's dotnet command down to its underlying libraries, but frankly I think there'd be some significant refactoring in order since .NET Core doesn't bring in MSBuild as a direct executable, rather you execute it via dotnet msbuild. Further, I'm unaware of the state of feature differences between Mono's MSBuild and .NET Core's MSBuild.. though if Omni runs on .NET Core on Windows, I don't see why it wouldn't be able to on *nix. Anyway, the only outlying question I have is back around this thought

OmniSharp will attempt to locate the .NET Core SDK for your project using the "dotnet" that is on the path and set the "MSBuildSdksPath" to the appropriate folder under that.

Was this page helpful?
0 / 5 - 0 ratings