Difference between revisions of "Install and use Monodevelop"

From LSDevLinux
Jump to: navigation, search
(Add to .Net/Mono category)
(Ubuntu 12.04 Precise: Update for mono 3, Ubuntu 14.04, other handling of wrapper script)
 
(37 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
__TOC__
 
__TOC__
 
==Install==
 
==Install==
===Ubuntu 10.10 Maverick===
+
===Ubuntu 12.04 Precise and Ubuntu 14.04 Trusty===
Install the following packages: <code>monodevelop monodevelop-debugger-gdb monodevelop-debugger-mdb monodevelop-nunit monodevelop-python</code>
+
<ol>
 +
<li>Install Monodevelop:</li>
 +
<nowiki>sudo add-apt-repository ppa:ermshiperete/monodevelop</nowiki>
  
Monodevelop will use mono in <code>/usr/local</code> by default and not work. Work around this by doing the following:
+
<nowiki>sudo apt-get update
# Right-click the Gnome panel and choose '''Add to Panel...'''
+
sudo apt-get install monodevelop-current</nowiki>
# Click '''Custom Application Launcher'''. Click '''Add'''.
+
<li>Create Monodevelop launcher:</li>
# In the '''Name''' box, type <code>monodevelop</code>
+
<nowiki>MONODEVELOP_LAUNCHER="$HOME/Desktop/monodevelop.desktop"
# In the '''Command''' box, modify as appropriate for your system and paste in all as one line:
+
[ -e "$MONODEVELOP_LAUNCHER" ] && MONODEVELOP_LAUNCHER="$(mktemp $HOME/Desktop/monodevelop-XXXX.desktop)"
#:<code>bash -c 'PATH=/usr/bin:$PATH; export FIELDWORKS_ENVIRON="/home/'''''REPLACE/WITH/YOUR/PATH/TO'''''/Calgary/WW/environ"; monodevelop'</code>
+
cat > "$MONODEVELOP_LAUNCHER" <<ENDOFLAUNCHER
# Click the icon on the left in the '''Create Launcher''' dialog.
+
#!/usr/bin/env xdg-open
# Navigate to and select /usr/share/icons/hicolor/scalable/apps/monodevelop.svg. Click '''Open'''.
 
# Click '''OK'''.
 
  
Install wrapper-script to use FieldWorks environ file:
+
[Desktop Entry]
~$ git clone git://git.lsdev.sil.org/fieldworks-build.git
+
Version=1.0
~$ cd fieldworks-build
+
Type=Application
fieldworks-build$ sudo cp /usr/local/bin/mono{,-real}
+
Terminal=false
fieldworks-build$ sudo cp mono-fw /usr/local/bin/mono
+
Exec=bash -c 'export MONO_ENVIRON="\$HOME/fwrepo/fw/environ"; /opt/monodevelop/bin/monodevelop-launcher.sh'
 +
Name=Monodevelop FW
 +
Icon=/opt/monodevelop/share/icons/hicolor/scalable/apps/monodevelop.svg
 +
ENDOFLAUNCHER
 +
chmod +x "$MONODEVELOP_LAUNCHER"</nowiki>
 +
</ol>
  
Configure monodevelop:
+
==Troubleshooting==
# Launch monodevelop using the custom Gnome panel icon.
+
===Specified Default Runtime not being used===
# Choose '''Edit > Preferences'''.
+
If running Ubuntu 10.10 Maverick and MonoDevelop 2.8, and running FieldWorks from terminal works but running from MonoDevelop shows a FieldWorks yellow crash dialog box with a message "Msg: Method not found: 'System.Windows.Forms.Control.IgnoreUpdates'", it may be that MonoDevelop (running using a mono in /opt/mono) is using the Mono GAC in /opt/mono rather than the Mono GAC and libraries in /usr/local/mono, even if /usr/local/mono is selected as the Default Runtime.  
# Under '''Preferences''', click '''.NET Runtimes'''.
 
# Click '''Mono 2.8.1 (/usr/local)''' and click '''Set as Default'''. Click '''OK'''.
 
  
There is a problem when using the arrow keys in MonoDevelop on Maverick. They switch to the next control instead of moving the cursor in the current document (see https://bugzilla.novell.com/show_bug.cgi?id=636009). This seems to be related to ibus. A workaround is to right-click in the text window and select Input Method: None. This needs to be done in each new text window though.
+
Seen in the Application Autput window in monodevelop: <code>Loaded assembly: /opt/mono-2.10/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll</code>
  
===Ubuntu 9.10 Karmic and 10.04 Lucid===
+
Set MONO_GAC_PREFIX to /usr/local/lib/mono in the Project/Options/Run/General Environment Variables. This appears to fix the problem.
====Upgrade====
 
To upgrade an existing monodevelop-new to a newer version:
 
* Remove old monodevelop-new:
 
$ sudo rm /opt/monodevelop-new -rf
 
* Update and run build-monodevelop script:
 
$ cd ~/fieldworks-build
 
fieldworks-build$ git pull
 
fieldworks-build$ export <nowiki>http_proxy=http://proxy.example.com:1234</nowiki> # Optionally set proxy to help wget
 
fieldworks-build$ sudo aptitude update
 
fieldworks-build$ ./build-monodevelop
 
 
 
====Install====
 
Build and install monodevelop and its dependencies into /opt/monodevelop-new:
 
~$ git clone git://git.lsdev.sil.org/fieldworks-build.git
 
~$ cd fieldworks-build
 
fieldworks-build$ export <nowiki>http_proxy=http://proxy.example.com:1234</nowiki> # Optionally set proxy to help wget
 
fieldworks-build$ sudo aptitude update
 
fieldworks-build$ ./build-monodevelop
 
 
 
To uninstall monodevelop-new in the future:
 
$ sudo rm /opt/monodevelop-new -rf
 
$ sudo rm /usr/bin/monodevelop-new
 
 
 
====Configure====
 
Configure monodevelop to use the FieldWorks mono for building, running, and debugging FieldWorks:
 
# Install wrapper script:
 
#: fieldworks-build$ sudo cp /usr/local/bin/mono{,-real}
 
#: fieldworks-build$ sudo cp mono-fw /usr/local/bin/mono
 
# Run monodevelop-new:
 
#: $ monodevelop-new
 
# Choose '''Edit''' ▸ '''Preferences'''.
 
# Under '''Preferences''', click '''.NET Runtimes'''. Click '''Add'''.
 
# Browse to /usr/local and click '''Select Folder''' (or '''Open'''). Select the new Mono that you added to the list, which names the folder you selected such as "'''Mono 2.7 (/usr/local)'''", and click '''Set as Default'''. Click '''OK'''.
 
# Choose '''File''' ▸ '''Quit'''.
 
# Run monodevelop-new this way:
 
#: $ export FIELDWORKS_ENVIRON="/home/path/to/Calgary/WW/environ"
 
#: $ monodevelop-new
 
 
 
To uninstall wrapper script in the future:
 
$ sudo mv /usr/local/bin/mono{-real,}
 
 
 
====Enable use from GUI====
 
To run monodevelop-new without using the command-line, do the following:
 
# Right-click the Gnome panel and choose '''Add to Panel...'''
 
# Click '''Custom Application Launcher'''. Click '''Add'''.
 
# In the '''Name''' box, type <code>monodevelop-new</code>
 
# In the '''Command''' box, modify as appropriate for your system and paste in all as one line:
 
#:<code>bash -c 'export FIELDWORKS_ENVIRON="/home/'''''REPLACE/WITH/YOUR/PATH/TO'''''/Calgary/WW/environ"; monodevelop-new'</code>
 
# Click the icon on the left in the '''Create Launcher''' dialog.
 
# Do one of the following:
 
#* In Ubuntu 10.04 Lucid, in the '''Choose an icon''' dialog, navigate to and select /opt/monodevelop-new/monodevelop/share/icons/hicolor/scalable/apps/monodevelop.svg. Click '''Open'''.
 
#* In Ubuntu 9.10 Karmic, in the '''Browse icons''' dialog, paste this into the text box at the top and then click '''OK''':
 
#:<code>/opt/monodevelop-new/monodevelop/share/icons/hicolor/scalable/apps/monodevelop.svg</code>
 
# Click '''OK'''.
 
  
 
==Use Monodevelop with FieldWorks==
 
==Use Monodevelop with FieldWorks==
Line 89: Line 38:
  
 
===Editing code===
 
===Editing code===
There is not a global solution file. To edit code in a project:
+
There is not a global solution file. To edit code in a project, open the csproj project file in monodevelop.
* Check Out the project's directory from p4v.
 
* Open the csproj project file in monodevelop.
 
If you only have anonymous access to the Perforce repository and cannot Check Out files, you could manually chmod u+w the files you want to edit, or use [[Using git-p4|git-p4]].
 
  
 
===Integrating with VCS===
 
===Integrating with VCS===
Monodevelop does not currently automatically check out files from Perforce before attempting to edit them. And it is unable to edit checked out files since they are read-only.
 
Use p4v to check out a project and its files before attempting to edit them.
 
 
 
While Monodevelop 2.2.1 successfully uses and edits .csproj files, it seems to delete a few things as well that Visual Studio may find useful. When committing .csproj files with meaningful changes, consider not committing unnecessary <code><Reference></code> reordering or the deletions of sections such as:
 
While Monodevelop 2.2.1 successfully uses and edits .csproj files, it seems to delete a few things as well that Visual Studio may find useful. When committing .csproj files with meaningful changes, consider not committing unnecessary <code><Reference></code> reordering or the deletions of sections such as:
 
  -    <ApplicationIcon>
 
  -    <ApplicationIcon>
Line 118: Line 61:
 
  -    <DebugSymbols>false</DebugSymbols>
 
  -    <DebugSymbols>false</DebugSymbols>
  
If you use git-p4 (and so your csproj files are writable) and monodevelop makes undesired modifications to all of your open csproj files, you can revert all .csproj file changes by running a command such as
+
If monodevelop makes undesired modifications to all of your open csproj files, you can revert all .csproj file changes by running a command such as
  Calgary/WW/Src$ find -name \*csproj -print0 | xargs -0 git checkout
+
  fwrepo/fw/Src$ find -name \*csproj -print0 | xargs -0 git checkout
  
 
===Building===
 
===Building===
Line 127: Line 70:
  
 
If building in monodevelop says something like
 
If building in monodevelop says something like
  Build failed. Access to the path ".../Calgary/WW/'''Lib/debug'''/ECInterfaces.dll" or ".../Calgary/WW/'''Output/Debug'''/ECInterfaces.dll" is denied.
+
  Build failed. Access to the path ".../fwrepo/fw/'''Lib/debug'''/ECInterfaces.dll" or ".../fwrepo/fw/'''Output/Debug'''/ECInterfaces.dll" is denied.
 
then do
 
then do
 
  Output/Debug$ chmod u+w *
 
  Output/Debug$ chmod u+w *
Line 189: Line 132:
 
If running unit tests that derive from BaseTest produce a error such as
 
If running unit tests that derive from BaseTest produce a error such as
 
: TestFixutreSetUp failed in FwFontDialogTests
 
: TestFixutreSetUp failed in FwFontDialogTests
then you may not have your default .NET runtime environment set properly. Refer to [[Install_and_use_Monodevelop#Configure]] for instructions. You may have recently rebuilt and reinstalled mono from mono-calgary.git; if so then you will need to setup the mono + mono-real wrapper script again.
+
then you may not have your default .NET runtime environment set properly. You can change this under '''Edit > Preferences > Projects > .NET Runtimes'''. You may have recently rebuilt and reinstalled mono from mono-calgary.git; if so then you will need to setup the mono + mono-real wrapper script again.
  
 
===Running and debugging FieldWorks in Monodevelop===
 
===Running and debugging FieldWorks in Monodevelop===
Line 206: Line 149:
 
Note that you might have to specify the full path to the executable - at least on my machine a relative path didn't work when I tried to run NUnit as executable.
 
Note that you might have to specify the full path to the executable - at least on my machine a relative path didn't work when I tried to run NUnit as executable.
  
==Old installation method==
+
===Debugging into Mono code===
This is the old installation method, which used the same mono to run monodevelop and FieldWorks.
+
If you want to debug into mono code, you have to disable the debugging of project code only: in Monodevelop, go to Edit/Preferences, Debugger/General section and unselect "Debug project code only".
===Ubuntu 10.04 Lucid===
 
''Lucid instructions are still in progress.''
 
 
 
$ sudo aptitude install monodevelop monodevelop-debugger-gdb monodevelop-debugger-mdb \
 
  monodevelop-nunit monodevelop-python
 
Since you will be using a mono installed in /usr/local, follow the Ubuntu 9.10 instructions to register assemblies in the /usr/local GAC, and also do:
 
$ for assembly in \
 
  /usr/lib/cli/glade-sharp-2.0/glade-sharp.dll \
 
  /usr/lib/cli/Mono.Addins.Gui-0.2/Mono.Addins.Gui.dll
 
  do sudo gacutil2 -gacdir /usr/local -i $assembly; done
 
Build and install gtk-sharp:
 
$ mkdir ~/monodevelop-2.2 && cd ~/monodevelop-2.2 &&
 
  wget <nowiki>http://ftp.novell.com/pub/mono/sources/gtk-sharp212/gtk-sharp-2.12.10.tar.bz2</nowiki> &&
 
  tar xf gtk-sharp-2.12.10.tar.bz2 &&
 
  (cd gtk-sharp-2.12.10 && ./configure --prefix=/usr/local && make && sudo make install && sudo ldconfig)
 
  
===Ubuntu 9.10 Karmic===
+
==Debug broken dependencies==
Ubuntu 9.10 Karmic only has monodevelop 2.0, while Ubuntu 10.04 Lucid has monodevelop 2.2.1.
+
Mono is picky about chaining dependencies, even to DLLs you don't really need. The runtime is more picky than MonoDevelop, so occasionally something that runs fine under MD fails when run stand-alone.
To install Monodevelop 2.2 into Ubuntu 9.10 from source, follow these steps.
 
  
Reference:
+
One way to debug this is to use a command line like
* http://monodevelop.com/Download
 
* http://monodevelop.com/Developers/Building_MonoDevelop#Building_from_Tarballs
 
Dependencies:
 
$ sudo aptitude install libncurses5-dev
 
Register some /usr/lib/mono assemblies into the /usr/local/lib/mono GAC:
 
$ for assembly in \
 
  /usr/lib/mono/gac/Mono.Addins.Setup/0.4.0.0__0738eb9f132ed756/Mono.Addins.Setup.dll \
 
  /usr/lib/mono/gac/Mono.Addins/0.4.0.0__0738eb9f132ed756/Mono.Addins.dll \
 
  /usr/lib/cli/gnome-sharp-2.24/gnome-sharp.dll \
 
  /usr/lib/mono/gtk-sharp-2.0/glade-sharp.dll \
 
  /usr/lib/cli/gnome-vfs-sharp-2.0/gnome-vfs-sharp.dll \
 
  /usr/lib/cli/gconf-sharp-2.0/gconf-sharp.dll
 
  do sudo gacutil2 -i $assembly; done
 
  
Download a bunch of monodevelop tar files:
+
MONO_LOG_LEVEL=debug mono Example.exe
$ mkdir monodevelop-2.2
 
$ cd monodevelop-2.2
 
monodevelop-2.2$ wget <nowiki>http://ftp.novell.com/pub/mono/sources/monodevelop/monodevelop-2.2.1.tar.bz2 \
 
    http://ftp.novell.com/pub/mono/sources/monodevelop-debugger-mdb/monodevelop-debugger-mdb-2.2.1.tar.bz2 \
 
    http://ftp.novell.com/pub/mono/sources/monodevelop-debugger-gdb/monodevelop-debugger-gdb-2.2.1.tar.bz2 \
 
    http://ftp.novell.com/pub/mono/sources/monodevelop-python/monodevelop-python-2.2.tar.bz2 \
 
    http://ftp.novell.com/pub/mono/sources/gtk-sharp212/gtk-sharp-2.12.10.tar.bz2</nowiki>
 
Extract them all:
 
monodevelop-2.2$ for f in *.bz2; do tar xf $f; done
 
Build and install them all:
 
monodevelop-2.2$ for dir in \
 
  gtk-sharp-2.12.10 \
 
  monodevelop-2.2.1 \
 
  monodevelop-debugger-gdb-2.2.1 \
 
  monodevelop-debugger-mdb-2.2.1 \
 
  monodevelop-python-2.2
 
  do (cd $dir && ./configure --prefix=/usr/local && make && sudo make install); done
 
Rebuild the shared library cache:
 
  sudo ldconfig
 
  
 +
This outputs a lot of debugging information including all the DLLs it loaded and all the places it tried to load ones it could not find.
 
[[Category:Linux tools]]
 
[[Category:Linux tools]]
 
[[Category:.NET]]
 
[[Category:.NET]]

Latest revision as of 09:33, 20 August 2015

Instructions to install and use Monodevelop (http://monodevelop.com/) to edit FieldWorks code.

Install

Ubuntu 12.04 Precise and Ubuntu 14.04 Trusty

  1. Install Monodevelop:
  2. sudo add-apt-repository ppa:ermshiperete/monodevelop
    
    sudo apt-get update
    sudo apt-get install monodevelop-current
    
  3. Create Monodevelop launcher:
  4. MONODEVELOP_LAUNCHER="$HOME/Desktop/monodevelop.desktop"
    [ -e "$MONODEVELOP_LAUNCHER" ] && MONODEVELOP_LAUNCHER="$(mktemp $HOME/Desktop/monodevelop-XXXX.desktop)"
    cat > "$MONODEVELOP_LAUNCHER" <<ENDOFLAUNCHER
    #!/usr/bin/env xdg-open
    
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Exec=bash -c 'export MONO_ENVIRON="\$HOME/fwrepo/fw/environ"; /opt/monodevelop/bin/monodevelop-launcher.sh'
    Name=Monodevelop FW
    Icon=/opt/monodevelop/share/icons/hicolor/scalable/apps/monodevelop.svg
    ENDOFLAUNCHER
    chmod +x "$MONODEVELOP_LAUNCHER"
    

Troubleshooting

Specified Default Runtime not being used

If running Ubuntu 10.10 Maverick and MonoDevelop 2.8, and running FieldWorks from terminal works but running from MonoDevelop shows a FieldWorks yellow crash dialog box with a message "Msg: Method not found: 'System.Windows.Forms.Control.IgnoreUpdates'", it may be that MonoDevelop (running using a mono in /opt/mono) is using the Mono GAC in /opt/mono rather than the Mono GAC and libraries in /usr/local/mono, even if /usr/local/mono is selected as the Default Runtime.

Seen in the Application Autput window in monodevelop: Loaded assembly: /opt/mono-2.10/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

Set MONO_GAC_PREFIX to /usr/local/lib/mono in the Project/Options/Run/General Environment Variables. This appears to fix the problem.

Use Monodevelop with FieldWorks

Editing code

There is not a global solution file. To edit code in a project, open the csproj project file in monodevelop.

Integrating with VCS

While Monodevelop 2.2.1 successfully uses and edits .csproj files, it seems to delete a few things as well that Visual Studio may find useful. When committing .csproj files with meaningful changes, consider not committing unnecessary <Reference> reordering or the deletions of sections such as:

-    <ApplicationIcon>
-    </ApplicationIcon>
-    <AssemblyOriginatorKeyFile>
-    </AssemblyOriginatorKeyFile>

-    <StartupObject>
-    </StartupObject>

-    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
-    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>

-    <NoStdLib>false</NoStdLib>
-    <NoWarn>
-    </NoWarn>

-    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>

-    <DebugSymbols>false</DebugSymbols>

If monodevelop makes undesired modifications to all of your open csproj files, you can revert all .csproj file changes by running a command such as

fwrepo/fw/Src$ find -name \*csproj -print0 | xargs -0 git checkout

Building

Building projects works from within monodevelop.

You can also build from terminal using nant (see Build_FieldWorks#Subsequent_builds_should_be_built_by_doing:).

If building in monodevelop says something like

Build failed. Access to the path ".../fwrepo/fw/Lib/debug/ECInterfaces.dll" or ".../fwrepo/fw/Output/Debug/ECInterfaces.dll" is denied.

then do

Output/Debug$ chmod u+w *

and build again.

Debugging

Debugging C# and C++ code works in monodevelop. Sometimes when you debug a GUI program and reach a breakpoint, monodevelop might freeze. To avoid this, you can have the program run inside a Xephyr window. To do this, start Xephyr:

$ Xephyr :2 -screen 1024x768 &
$ DISPLAY=:2 metacity &

And in monodevelop, right-click the startup project, and click Options. Under Run, click General. In the Environment Variables section, add a Variable "DISPLAY" and a Value ":2". Now when you Run or Debug this project, it will display the program in your Xephyr window. Remember not to check in this setting of DISPLAY in the csproj.


Currently (20100412), the debugger in MonoDevelop 2.2.1 does not work with the latest mono in mono-calgary.git (commit 0fc6db6), and gives an error:

Unhandled error launching soft debugger
Mono.Debugger.Soft.VMDisconnectedException: Exception of type 'Mono.Debugger.Soft.VMDisconnectedException' was thrown.

To reset your mono-calgary.git back to a mono version that is compatible with the debugger in MonoDevelop 2.2.1, do (note that this will delete any changes you have made in mono-calgary) (Note that this is probably not necessary with the current 20101008 mono-calgary):

mono-calgary$ git reset --hard d7222b2b8e58b6488e21ca2bd65fd6e1e4b8f126
mono-calgary$ ./checkout-and-build-mono

When debugging, if Monodevelop freezes, you may be able to get it back. Go to the terminal from which you started Monodevelop. It may say something like

[6]+  Stopped                 monodevelop
$

If so, try running:

$ fg

Unit tests

Unit tests ran be run and debugged using monodevelop. To show the unit tests of your open projects, choose View > Unit Tests.

You can also run unit tests from terminal using nant and nunit (see Build_FieldWorks#Unit_tests).


When running unit tests in monodevelop, if you get the internal error:

FileNotFoundException: Could not load file or assembly 'nunit.core.interfaces ...' or one of its dependencies.

or

TypeLoadException: Could not load type 'NUnit.Core.NTrace' from assembly 'nunit.util'.

then for now do

Output/Debug$ rm nunit.core.dll

and try again.


If you get the error:

System.TypeLoadException: Could not load type 'NUnit.Core.TestCaseResult' from assembly 'nunit.core.interfaces, ...

do

Output/Debug$ rm nunit.core.interfaces.dll

If you get the error:

ConfigurationErrorsException: Type 'System.Configuration.NameValueSectionHandler' not found.

in, say, FwCoreDlgsTests, then edit the corresponding foo.dll.config in Output/Debug, such as Output/Debug/FwCoreDlgsTests.dll.config and change:

<section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/>

to

<section name="TestRunner" type="System.Configuration.NameValueSectionHandler, System"/>

This can be done to all of the unit test dll.config files at once by doing:

Output/Debug$ for config in *Tests.dll.config; do sed -i $config -e \
  's@"System.Configuration.NameValueSectionHandler"@"System.Configuration.NameValueSectionHandler, System"@'
  done

If running unit tests that derive from BaseTest produce a error such as

TestFixutreSetUp failed in FwFontDialogTests

then you may not have your default .NET runtime environment set properly. You can change this under Edit > Preferences > Projects > .NET Runtimes. You may have recently rebuilt and reinstalled mono from mono-calgary.git; if so then you will need to setup the mono + mono-real wrapper script again.

Running and debugging FieldWorks in Monodevelop

To run or debug TE or Flex from Monodevelop:

  • In the Solution pane, right-click the solution and choose Add ▸ Add Existing Project. Navigate to and open Src/Common/FieldWorks/FieldWorks.csproj
  • Right-click the FieldWorks project and choose Options. Under Run click General. In the Parameters box, type "-proj .../Sena\ 2.xml -app Flex", where ".../Sena\ 2.xml" is a path to Sena 2.xml. Optionally substitute Flex with TE.
  • In the Environment Variables area, add a Variable "DISPLAY" with Value ":2". Click OK.
  • Right-click the FieldWorks project and choose Set As Startup Project.

Now if you Run or Debug, monodevelop will run or debug FieldWorks inside your :2 Xephyr window.

Debug a library

Unlike Visual Studio the project properties in Monodevelop don't have a Debug tab that would allow to specify an external program to start.

However, this can be done in the project properties, General/Custom Commands section. Add a project operation for "Execute" and select the executable there.

Note that you might have to specify the full path to the executable - at least on my machine a relative path didn't work when I tried to run NUnit as executable.

Debugging into Mono code

If you want to debug into mono code, you have to disable the debugging of project code only: in Monodevelop, go to Edit/Preferences, Debugger/General section and unselect "Debug project code only".

Debug broken dependencies

Mono is picky about chaining dependencies, even to DLLs you don't really need. The runtime is more picky than MonoDevelop, so occasionally something that runs fine under MD fails when run stand-alone.

One way to debug this is to use a command line like

MONO_LOG_LEVEL=debug mono Example.exe

This outputs a lot of debugging information including all the DLLs it loaded and all the places it tried to load ones it could not find.