question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Announcement: Planned removal of the included Mono & MSBuild tools

See original GitHub issue

Background:

The included Mono and MSBuild tools were added to support easy development of C# using .NET Core. We have frequently updated these build tools to match the current shipping SDK tooling.

On Windows we did not need to ship a copy of Mono because we could rely on the .NET Framework being installed. For MacOS and Linux we shipped a minimal Mono that would support running MSBuild and OmniSharp. With these tools, the .NET SDK installed, and the dotnet CLI discoverable from the environment PATH, developers would have good support when developing against the newer SDK-style projects.

There was some support for Full Framework projects with this configuration, but that was considered a bonus. Our most common Full Framework projects (Unity) were unsupported with this configuration because the .NET 4.7.1 targeting pack was not included.

In the future .NET Framework OmniSharp builds will not ship with Mono or the MSBuild tooling (See announcement omnisharp-roslyn#2339, See PR omnisharp-roslyn#2360).

Proposal:

To ensure that the C# extension remains usable out of the box for .NET SDK projects, we will be changing the default value of omnisharp.useModernNet to true. This means by default OmniSharp will run on the .NET SDK and .NET Framework projects will likely not load properly. It will require the .NET 6 SDK be installed and the dotnet CLI to be discoverable from the environment PATH.

Users who need .NET Framework support will have to set omnisharp.useModernNet to false to download the .NET Framework build of OmniSharp. Linux and MacOS users will need to have a complete system install of Mono including MSBuild (Download). Windows users will need to have the Visual Studio MSBuild Tools or a full Visual Studio installed (Download).

Screenshot of the Visual Studio download page.

The omnisharp.useGlobalMono setting will be removed as there is no longer an included Mono and we will always use the system installation of Mono.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:15
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

17reactions
esklarskicommented, May 25, 2022

This seems to have completely broken Unity projects.

If I set useModernNet to false as suggested I just get a different error: [info]: OmniSharp.Services.DotNetCliService DotNetPath set to /usr/lib64/dotnet/dotnet [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator Located 0 MSBuild instance(s) Could not locate MSBuild instance to register with OmniSharp.

Or with useModernNet set true I get: /usr/lib64/dotnet/sdk/6.0.105/Microsoft.Common.CurrentVersion.targets(1217,5): Error: This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).

I’m on Fedora 36 and everything seems installed when I go through setup set again (and again).

11reactions
DavidJVitalecommented, May 27, 2022

I understand the need for breaking software changes like this, but please consider communicating this change in a more clear way to end-users. I have the latest mono installed, but OmniSharp server would completely silently fail and give no indication of what was wrong. Not every user of VS code would think to check this github page when that happens. Maybe a popup in vs-code linking to this announcement would be helpful?

For more details – I am on Ubuntu, latest version of mono installed, using vs-code with mono. My OmniSharp server would fail to even start, show no output at all in VS code. No icon in the bottom tray. Ctrl + Shift + P -> Restart OmniSharp Server is the top google result, and that would silently fail. Running OmniSharp: Analyze Current Project would throw a OmniSharp server is not running error, but top google results send you in a wrong direction. Finally, I found this page, and going to Settings and setting UseModernNet to false fixed my error.

Thank you for all the work your team does!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not locate MSBuild instance to register with OmniSharp
Maybe the cause is (from omnisharp github): "Planned removal of the included Mono & MSBuild Tools. In the future .
Read more >
Intelisense problem - #21 by tarasis - Ask - GameDev.tv
I'm thinking of trying a complete uninstall / reinstall of VS Code to see if that ... Announcement: Planned removal of the included...
Read more >
Visual Studio 2022 Release Notes | Microsoft Learn
Get the latest features, bug fixes, and support for Visual Studio 2022. Download today.
Read more >
C# - Visual Studio Marketplace
Announcements. The C# extension no longer ships with an included Mono & MSBuild Tools .NET Framework builds of OmniSharp no longer ship with ......
Read more >
Incompatible versions of Mono MSBuild and .NET Core SDK ...
Problem description Some combinations of the Mono MSBuild and . ... resolve type with token 01000020 from typeref (expected class 'NuGet.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found