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

Integrate embedded Mono runtime and MSBuild into OmniSharp #666

Closed
DustinCampbell opened this issue Nov 11, 2016 · 8 comments
Closed

Integrate embedded Mono runtime and MSBuild into OmniSharp #666

DustinCampbell opened this issue Nov 11, 2016 · 8 comments
Assignees

Comments

@DustinCampbell
Copy link
Contributor

For the latest release of omnisharp-vscode, we have made significant changes to how OmniSharp runs that need to be integrated back into omnisharp-roslyn. The following are the key components the need to be integrated.

  • MSBuild: In order to properly target .NET Core, .NET Framework and Mono .csproj projects, OmniSharp must include MSBuild itself along with relevant targets and task. On Windows, this can be achieved with the Microsoft.Build.Runtime package. On macOS/Linux, we need a similar but different set of content. In omnisharp-vscode, this achieved by using a custom build from Xamarin's fork of MSBuild. Because both of these MSBuild variants target net46 but are completely different, we'll need custom build logic to pull them into OmniSharp.

  • Embedded Mono Runtime: omnisharp-vscode no longer uses .NET Core builds of OmniSharp. Instead, it runs OmniSharp as a net46 app. On Windows, it just runs on the installed .NET Framework. On macOS/Linux, it runs on an embedded Mono runtime with a set of Mono framework assemblies. There are three variants of the Mono runtime: one for macOS, one for Linux/x86, and one for Linux/x64.

Once the integration is complete, there should only be 5 different builds of OmniSharp:

  • Windows (x86 and x64)
  • OSX
  • Linux (x86 and x64)

In addition, OmniSharp will be able to support the following project types:

  • project.json (legacy)
  • .csproj targeting .NET Core (new)
  • .csproj targeting .NET Framework
  • .csproj targeting Mono
@david-driscoll
Copy link
Member

👍 I need to setup a meeting or time to discuss the changes again... summit was good, but we need to make a plan to consolidate things.

I think one part of that is to update the cake build script, something I was already thinking we should do.

@DustinCampbell
Copy link
Contributor Author

Awesome! I've been working on some bash scripts to construct the Embedded Mono framework that I'd cobbled together by hand.

@DustinCampbell
Copy link
Contributor Author

#705 gets much closer to this being integrated into OmniSharp.

@david-driscoll
Copy link
Member

The only other thing I can think of related to using the embedded mono, is how are the file watchers?

Ideally syncing projects detecting added / removed files and such could be done by the server, so that the client doesn't have to be updated to negotiate those pieces with the server.

@david-driscoll
Copy link
Member

And I kind of had half a thought in that last comment.

The historical complaint was the file watchers in mono were fairly buggy, if we were to switch to them now would the behavior be better (now that a lot of the code is shared from .NET Desktop).

@borgdylan
Copy link

It will be nice to see what the MsBuild that gets bundled will look like. My current hacked up MSBuild distro is based on the xamarin fork as has no nuget pack support.

@DustinCampbell
Copy link
Contributor Author

@borgdylan: You have to pull in the NuGet pack SDK and add some magic ImportAfter and ImportBefore files to get that to work.

My fork is also based on the Xamarin fork. However, we don't care about things like pack support. For OmniSharp, we just need files and references.

@borgdylan
Copy link

borgdylan commented Mar 7, 2017

The pack sdk crashes so I did the package download for nothing

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

3 participants