green field

Working with the Source Code in MonoDevelop

Last Updated 2007-12-15 Joe Audette

Pre-requisites:
MonoDevelop 0.17 or higher
Mono release version 1.2.6 or higher
mojoPortal checked out from svn trunk
PostgreSQL or MySQL

If you are using the release version of Mono 1.2.6

you'll need to go into the properties of the Web project (right click and choose options) and remove the USESETTINGSMAP compiler directive as this is only supported if using Mono built from svn r91286 or higher

you'll also need to rename Web.config to Web.windows.config and rename Web.mono.config to Web.config

If using Mono r91286 or higher

you don't have to rename anything just use Web.coonfig as normal or optionally put connection strings and other things from the appSettings section in a user.config file


For information that may help you get setup to work with Mono and mojoPortal on linux, see my series of tutorials on Setting up a Test/Development machine for ASP.NET on Mono

Next setup your db following these instructions for PostgreSQL

Or use these instructions to setup a MySql database, then see this tutorial on changing the data layer reference in MonoDevelop

You should open the file Web/user.config.sample in a text editor and save it as user.config. Enter your db connection string in this file.

Launch MonoDevelop and open the mojoportal.mds file at the root of the mojoportal checkout folder.


Now click on the Solution node to highlight it then click the build icon in the bottom toolbar just to the right of where you see Debug in the build dropdown list. Alternatively, you can click Rebuild Solution under the Project Menu.


Next open a command shell and cd into the Web folder beneath the folder where you checked out mojoportal from svn.
To launch xsp2 you can just enter the command xsp2 or you can enable debug output in the console using
MONO_OPTIONS="--debug " xsp2 as shown below. Now xsp web server is listening for requests.


So open a browser and navigate to http://localhost:8080
Assuming your db is setup you should get a screen that provides a button to create the initial site data. After clicking the button you can navigate to the home page using the link provided and you should see something like this:


Success!

Now there are still some issues to be worked through but things are basically working.

One of the most visible issues is the styling of the menu. It doesn't look right because Mono is not hooking up the CSS Control Adapter that would make the Menu render as ul and li elements instead of as tables. I either need to find a way to make it use the Adapter or provide some alternate css that works with the tables.

mojoPortal Wins the 2007 Open Source CMS Awards Best Non-PHP Open Source CMS Donate Money to support the mojoPortal Project. Join the mojoPortal Group on Facebook Join the mojoPortal Group on LinkedIn View Joe Audette's profile on LinkedIn View Joe Audette's profile on The Guild of Accessible Web Designers site mojoPortal can run on GNU/Linux using Mono