-
Notifications
You must be signed in to change notification settings - Fork 682
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
Run OmniSharp on an embedded Mono runtime and add support for MSBuild-based .NET Core projects #886
Conversation
0429cea
to
5d848ba
Compare
Note: I'm not intending to merge this until after 1.5. There is other work that needs to happen for MSBuild-based .NET Core projects (like updating launch.json generation). |
@DustinCampbell May I ask why we need a Mono-based OmniSharp? I would prefer to use the Core-based one, if only then because I know I’m using the same code to build my project as VSCode uses to parse it. |
@wjk: There a number of reasons why we're moving over to an embedded Mono.
So, there are several benefits to moving to Mono. However, that also comes with the headache of needing to have Mono installed as a system component. So, an embedded Mono is the way to go. Does that make sense? |
5d848ba
to
f183afe
Compare
@DustinCampbell on this point We can't determine which OmniSharp to launch in an "all .csproj" world, a possible workaround will be to check the This approach doesn't handle other scenarios but I guess it's something to think about |
@tsolarin: Yes, that was discussed. The problem is that it wouldn't ever be guaranteed to be accurate since the TargetFramework can be pushed to a different targets file. If that happens, which do we launch? Also, for the case of a mixed solution, we would need to parse the solution (in TypeScript code within the extension), and check every project to figure out which to launch. And, if it turns out to be mixed, which do we launch? All of these problems fall away by unifying on running OmniSharp as a net46 application. On Windows, we'll use the desktop's .NET runtime. On OSX/Linux, we'll use the Mono runtime. For the Mono case, we can avoid pre-req'ing a system-wide Mono install by embedding it with OmniSharp. |
Note: I'm produced a new preview release of the C# extension that includes this change. Please feel free to grab it and kick the tires! |
@DustinCampbell alright then your approach does make a lot of sense. I'll take the preview release for a spin. I'll report whatever issues I find on this PR since it's not an "official" release. |
This change does not really do justice to the update since most of the churn is in the packages that are downloaded. Essentially, this switches the C# extension over to using an embedded Mono runtime and framework to run OmniSharp on. It also moves OmniSharp over to the latest MSBuild 15.0 bits which enable MSBuild-based .NET Core projects.
Fixes #881