Adding XML Schemas in MonoDevelop on OS X

Let’s say you’re crazy enough to have installed MonoDevelop on OS X. Let’s also postulate that you plan on using NHibernate on OS X to write an ASP.NET MVC app because you are, frankly, far too lazy to boot a virtual machine. Let us further supposed that you want to have sweet sweet XML syntax completion for your NHibernate configuration files.

How do you do such a thing?

Well, first things first you get a hold of the NHibernate source code. Then, you follow Benjamin Day’s excellent instructions on how to get intellisense working for NHibernate XML files in Visual Studio. The important part here is to copy the schema files to /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.XmlEditor/schemas instead of the path he specifies. Mainly because your mac doesn’t have a C: drive… unless you’re weird.

Update I lied, this makes MonoDevelop hang on start. I’m going to see what I can figure out and update later.

Extra Update I went through this process again, and MonoDevelop started up properly and everything worked correctly in my .hbm.xml file. There you have it. It works and I clearly did something silly the first time around.

Menu