johnluetke
johnluetke

Reputation: 3483

How do I generate XML comments for MonoTouch projects in MonoDevelop?

I cant seem to get an XML file containing the comments in my C# code to be generated when I build a project with MonoDevelop.

I have checked the Generate xml documentation box on the "Compiler" tab of the project settings, but don't see an XML file anywhere in my projects output or source folders.

I'm using Mono 10.2.1, MonoDevelop 2.4.2 and MonoTouch 4

Upvotes: 4

Views: 838

Answers (2)

Mikayla Hutchinson
Mikayla Hutchinson

Reputation: 16153

Short answer: MonoTouch's C# compiler doesn't support generating doc comments files yet.

Long answer: MonoTouch uses the smcs (Silverlight profile) compiler, since it's based on the Silverlight framework profile. Before Mono 2.10, Mono's C# compiler used System.Reflection.Emit to generate IL, and this meant that it had to run on the framework version that it was targeting. Unfortunately, Silverlight didn't have XmlDocument and other classes that the compiler used for processing XML doc comments, so those features were disabled in the smcs build of the compiler. In Mono 2.10, the C# compiler has been ported to IKVM.Reflection, which allows a single compiler (running on the "full" framework) to target any framework profile or version. However, the migration isn't complete, and the old version of smcs still exists for now. This will be fixed in a future version of Mono.

Upvotes: 6

Jon Skeet
Jon Skeet

Reputation: 1500525

I've just tried this myself, and for a project called "MonoSandbox" I ended up with "MonoSandbox.xml" in the bin\Debug folder, alongside the exe file.

Is it definitely building successfully?

Upvotes: 1

Related Questions