MonoDevelop is a Mono/C# Integrated Development Environment for Windows, Linux and macOS. It parses your C# and VB programs as you type them and is able to provide contextual completion of methods. MonoDevelop enables developers to quickly write desktop and web applications on Linux, Windows and macOS. It also makes it easy for developers to port.NET applications created with Visual Studio to Linux and macOS maintaining a single code base for all platforms.
MonoDevelop is an IDE primarily designed for C# and other .NET languages. It is also cross compatible, as in; it will run under windows as well as Mac OSX and Linux.
Prerequisites
- Microsoft Windows XP or above, Mac OS X, or any Linux distribution which supports Mono.
- .NET Framework 4.0
- GTK# for .NET 2.12.10
- Kerbal Space Program 0.14 X1 or above.
PCL assemblies for Linux systems
Linux systems may be missing the PCL assembly libraries, which will cause compilation to fail. (No longer an issue on newer Mono)
Download MonoDevelop - MonoDevelop enables developers to quickly write desktop and web applications on Linux, Windows and macOS. MonoDevelop is a cross platform IDE mostly aimed at Mono/.NET developers.
- .deb and .rpm based systems can follow the instructions on the Mono Project site to add the appropriate repository, and the package name is 'referenceassemblies-pcl'.
- Arch Linux users will need to get the package from the Arch User Repository (AUR), and are looking for the 'mono-pcl' package.
Setting Up
- Start a new solution either by selection 'Start new solution' on the welcome screen or File > New > Solution...
- Select 'Library' in the C# tree (Visible by default). Name it whatever you like. (We're using MyKSPProject for this tutorial. Click forward. Then Ok.) Creating a new solution
- Click Project > Edit References and follow the steps below:
- Click the .NET Assembly tab and use the navigation menu on the left to browse to your KSP installation folder.
- On Windows navigate to (<KSP_win>KSP_DataManaged) or on mac click 'Browse...' and navigate to (/Users/<user>/Applications/Steam/steamapps/common/Kerbal Space Program/KSP.app/Contents/Resources/Data/Managed). Note that the KSP.app folder will show as just 'KSP' (without the .app) and you can't navigate into it. Instead, navigate into there in the Finder, then right click/ctrl-click on KSP, choose 'Show Package Contents', continue to the Managed directory, then drag&drop Assembly-CSharp.dll and UnityEngine.dll into the 'Browse' dialog.
- Select Assembly-CSharp.dll and UnityEngine.dll. More assemblies may be required depending on exactly which things your mod needs access to. Adding References
- Press Add then Ok, they should now be visible under the 'References' directory of your solution.
Great, you're all set! Now continue to creating your first module!
MonoDevelop is a full-featured integrated development environment (IDE) for mono using Gtk#.
The MonoDevelop core is also the foundation for Visual Studio for Mac.Feel free to file bugs against Visual Studio for Mac here as well.
See http://www.monodevelop.com for more info.
Directory organization
There are two main directories:
main
: The core MonoDevelop assemblies and add-ins (all in a singletarball/package).extras
: Additional add-ins (each add-in has its owntarball/package).
Compiling
If you are building from Git, make sure that you initialize the submodulesthat are part of this repository by executing:git submodule update --init --recursive
If you are running a parallel mono installation, make sure to run all the following stepswhile having sourced your mono installation script. (source path/to/my-environment-script)See: http://www.mono-project.com/Parallel_Mono_Environments
To compile execute:./configure ; make
There are two variables you can set when running configure
:
The install prefix:
--prefix=/path/to/prefix
- To install with the rest of the assemblies, use:
--prefix='pkg-config --variable=prefix mono'
- To install with the rest of the assemblies, use:
The build profile:
--profile=profile-name
stable
: builds the MonoDevelop core and some stable extra add-ins.core
: builds the MonoDevelop core only.all
: builds everythingmac
: builds for Mac OS X
PS: You can also create your own profile by adding a file to the profiles directory containing a list of the directories to build.
Disclaimer: Please be aware that the 'extras/JavaBinding' and 'extras/ValaBinding' packages do not currently work. When prompted or by manually selecting them during the './configure --select' step, make sure they stay deselected. (deselected by default)
Running
You can run MonoDevelop from the build directory by executing:make run
Debugging
You can debug MonoDevelop using Visual Studio (on Windows or macOS) with themain/Main.sln
solution. Use the DebugWin32
configuration on Windows and theDebugMac
configuration on macOS.
Installing (Optional)
You can install MonoDevelop by running:make install
Monodevelop
Bear in mind that if you are installing under a custom prefix, you may need to modify your /etc/ld.so.conf
or LD_LIBRARY_PATH
to ensure that any required native libraries are found correctly.
(It's possible that you need to install for your locale to becorrectly set.)
Packaging for OS X
To package MonoDevelop for OS X in a convenient MonoDevelop.appfile, just do this after MonoDevelop has finished building (withmake
): cd main/build/MacOSX ; make app
.You can run MonoDevelop: open MonoDevelop.app
or build dmg package: ./make-dmg-bundle.sh
Dependencies
Special Environment Variables
BUILD_REVISION
Known Problems
This happens when you accidentally installed gtk-sharp3 instead of the 2.12.x branch version.Make sure to 'make uninstall' or otherwise remove the gtk-sharp3 version and install the older one.
xbuild may still cache a reference to assemblies that you may have accidentally installed into your mono installation,like the gtk-sharp3 as described before. You can delete the cache in $HOME/.config/xbuild/pkgconfig-cache-2.xml
References
Discussion, Bugs, Patches
monodevelop-list@lists.ximian.com(questions and discussion)
monodevelop-patches-list@lists.ximian.com(track commits to MonoDevelop)
Monodevelop Pc
monodevelop-bugs@lists.ximian.com(track MonoDevelop bugzilla component)
https://github.com/mono/monodevelop/issues/new(submit bugs and patches here)