I found it surprisingly cheeky to configure a Xamarin Forms project, for a desktop application, that compiles and runs on both Windows and Linux. I hope my efforts are helpful to you.
Feel free to take this code and use it how you see fit. It is unlicensed! Leaving a star tells me it was useful to you.
I am running on Ubuntu Bionic. These steps worked for me. Your mileage may vary.
- Install Mono. I recommend following the steps for your Linux distro here. You will want to install the
mono-complete
package. - Install NuGet.
sudo apt-get install nuget
. This will pull the nuget package from thestable-bionic
mono repository as set in/etc/apt/sources.list.d/mono-official-stable.list
- Navigate into the location where you cloned this repository.
- Restore the NuGet packages:
nuget restore
- Build the code:
msbuild
- Run the program:
mono src/xamarin.ui.gtk/bin/Debug/xamarin_rtsp_poc.gtk.exe
I also used Visual Studio Code
and MonoDevelop
to edit the code on Linux.
I am running on Windows 10 Pro with Visual Studio Code 2017 CE.
- Install Visual Studio 2017
- Install GTK# for .NET
- Set
xamarin.ui.gtk
as the start-up project - Build & Run the program.
This setup works with .NET v4.7 and Xamarin Forms v3.3.0.967583 on Windows 10, with Visual Studio 2017. I also used Visual Studio Code
on Windows, as it is really nice to be able to manipulate the project files directly.
I accept pull requests, just be aware of the permissive nature of the license.