Installing Rider on Linux with .NET 7
For years I was using Ubuntu 18.04, but I recently installed Ubuntu 22.04. It was a clean install, not an in-place upgrade.
Then I installed .NET 7, and Visual Studio Code. They both worked without any problem. With Docker I had a few problems, you can read about them here.
Then I installed Rider. Again, a few problems. During configuration, Rider told me I didn’t have .NET installed!!
![.NET 7 was installed, and I didn't want Mono](/2023/01/installing-rider-on-linux-with-net-7/media/net_not_installed_hu6eddf03167b55f18f340895aca65e4a1_52094_136e958793edfadae5f3b230b89ae978.webp)
When I tried to open a project, Rider gave a few errors -
- load failed
- MSBuild is required to load project ‘HelloLinux’ but it was not found
- MSBuild (Microsoft Build Engine) is required to load and build project ‘HelloLinux’
![Failed to load project](/2023/01/installing-rider-on-linux-with-net-7/media/load_failed_hue4ae98ed723981edb25d82c491182a5e_80512_28284c427bc6d1c66983ca6f13154d4d.webp)
The fix was easy. I opened Settings, then Toolset and Build. You can see in the image below that .NET CLI executable path, and the MSBuild version were not set.
![Open Settings, then Toolset and Build](/2023/01/installing-rider-on-linux-with-net-7/media/toolset_and_build1_hu39e426f216604a79245d16c0b6a58a39_126834_c2c4b27b63f178f0169a9a79fde68cbb.webp)
The fix was to point .NET CLI executable path to my dotnet
command, then Rider worked out the MSBuild version and set it.
![Added correct paths](/2023/01/installing-rider-on-linux-with-net-7/media/toolset_and_build2_hu39e426f216604a79245d16c0b6a58a39_134223_0ec50f4a6b86f70ceea3c820cf43b6a6.webp)