[Mono-dev] Adding documentation for new namespace

Jonathan Pryor jonpryor at vt.edu
Thu Jul 1 09:04:02 EDT 2010


Make sure you're running monodoc trunk (maybe 2.6; not sure). 2.4 has lots of known+filed+fixed-in-trunk bugs. 

 - Jon

On Jul 1, 2010, at 7:11 AM, Chris Bacon <chris at dunelm.org.uk> wrote:

> Hi Jon,
> 
> Thanks for thes instructions.
> 
> When I run monodoc and select one of the new namespaces in corlib (e.g. System.Diagnostics.Contracts) monodoc throws an exception:
> chris at ubuntuPC:~/Mono/mcs/class/corlib$ monodoc --edit Documentation/en
> using WebKit
> using WebKit
> Marshaling changed signal
> Exception in Gtk# callback delegate
>   Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Argument cannot be null.
> Parameter name: path
>   at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] 
>   at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] 
>   at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
>   at System.IO.File.OpenRead (System.String path) [0x00000] 
>   at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor (System.String name) [0x00000] 
>   at Monodoc.HelpSource.GetHelpXmlWithChanges (System.String id) [0x00000] 
>   at Monodoc.EcmaHelpSource.RenderNamespaceLookup (System.String nsurl, Monodoc.Node& match_node) [0x00000] 
>   at Monodoc.RootTree.RenderUrl (System.String url, Monodoc.Node& match_node) [0x00000] 
>   at Monodoc.TreeBrowser.RowActivated (System.Object sender, System.EventArgs a) [0x00000] 
>   at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
>   at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 
>   --- End of inner exception stack trace ---
>   at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 
>   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] 
>   at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] 
>   at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] 
>   at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] 
>   at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] 
>   at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] 
>   at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] 
>    at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
>    at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
>    at Gtk.Application.gtk_main()
>    at Gtk.Application.Run()
>    at Monodoc.Driver.Main(System.String[] args)
> chris at ubuntuPC:~/Mono/mcs/class/corlib$
> 
> It doesn't crash when selecting a namespace that isn't new.
> 
> Thanks
> Chris
> 
> Jonathan Pryor wrote:
>> 
>> On Wed, 2010-06-30 at 14:58 +0100, Chris Bacon wrote:
>>   
>>> I would like to add some documentation for the 
>>> System.Diagnostics.Contracts namespace, for which there is currently no 
>>> documentation.
>>> 
>>> I cannot see a way to add a new namespace using the Mono Documentation 
>>> Library. Please could someone let me know how best to do this.
>>>     
>> 
>>         cd mcs/class/corlib
>>         	# or some other assembly directory.
>>         make PROFILE=net_4_0 doc-update
>>                 # generates doc stubs in Documentation/en
>>         monodoc --edit Documentation/en
>>         	# view the 'Mono Documentation/mscorlib' node in the
>>         	# left-hand pane. [0]
>>         
>> You can then edit e.g.
>> mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/*.xml,
>> `svn add` your XML files and `svn commit` them.
>> 
>> I've just committed the doc stubs for mscorlib.dll v4.0, so your first
>> commit won't intermix stubs with content (and be gigantic); r159740.
>> 
>> To install the docs:
>> 
>>         cd mcs/docs
>>         rm netdocs{.tree,.zip}
>>         make PROFILE=net_4_0
>>         make PROFILE=net_4_0 install
>> 
>> The intermediate `rm` is needed to ensure that nedocs.zip is rebuilt, as
>> the make(1) dependencies for rebuilding are inadequate.
>> 
>> Once you've `make install`ed, monodoc will show the new documentation.
>> 
>>  - Jon
>> 
>> [0] I can't actually recommend 'monodoc --edit' for editing
>> documentation [1], but it is handy for viewing documentation without
>> assembling and installing it.
>> 
>> [1]
>> http://www.jprl.com/Blog/archive/development/mono/mdoc/2010/Jan-10.html
>> 
>> 
>>   
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100701/38a5afc7/attachment-0001.html 


More information about the Mono-devel-list mailing list