Announcement: Planned removal of the included Mono & MSBuild tools
See original GitHub issueBackground:
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).
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:
- Created 2 years ago
- Reactions:15
- Comments:32 (11 by maintainers)
Top GitHub Comments
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).
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, butOmniSharp
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. RunningOmniSharp: Analyze Current Project
would throw aOmniSharp server is not running
error, but top google results send you in a wrong direction. Finally, I found this page, and going toSettings
and settingUseModernNet
tofalse
fixed my error.Thank you for all the work your team does!