How do I install mono's System.Windows.Forms on Ubuntu?

So you're looking for a package containing a file called System.Windows.Forms.dll. You can search:

  • on your machine: apt-file search System.Windows.Forms.dll (the apt-file package must be installed)
  • online: at packages.ubuntu.com.

Both methods lead you to (as of Ubuntu 14.04):

  • libmono-system-windows-forms4.0-cil and
  • libmono-winforms2.0-cil.

Install it with:

sudo apt-get install libmono-system-windows-forms4.0-cil

Open Synaptic and search for System.Windows.Forms and select libmono-winforms2.0-cil or libmono-winforms1.0-cil and then apply.

(optional) You might need to install System.Runtime package as well. just search for that and install libmono-system-runtime2.0-cil or libmono-system-runtime1.0-cil