[Mono-list] mdcs2ecma SIGSEGV Problem.
Jonathan Pryor
jonpryor at vt.edu
Sat Dec 9 15:26:42 EST 2006
On Fri, 2006-12-08 at 21:22 -0900, Christopher Granade wrote:
> Does anyone know why mdcs2ecma might return a SIGSEGV in native code when
> trying to convert inline documentation to monodoc XML? Pursuant to the advice
> on the Wiki at (http://www.mono-project.com/Generating_Documentation), I ran
> the command and got the following output:
>
> cgranade at lilith ~/projects/metashell/trunk/bin/Debug $ mdcs2ecma
> Metashell.Core.xml Metashell.Core.dll Metashell.Core.monodoc.xml
> MetashellCore
>
> ** (/usr/lib64/monodoc/cs2ecma.exe:17679): WARNING **: The class
> System.Collections.Generic.Dictionary`2 could not be loaded, used in
> mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
You're getting the SIGSEGV because cs2ecma.exe (invoked by the mdcs2ecma
script) was compiled against the .NET 1.0 profile, not the .NET 2.0
profile. Since your code uses .NET 2.0 types -- in this case
System.Collections.Generic.Dictionary -- the type can't be loaded by
mdcs2ecma. This probably shouldn't cause a SIGSEGV, but even if it
didn't, you'd probably get a TypeLoadException or something else
anyway...
The solution is to avoid mdcs2ecma. Use `monodocer' instead, as it can
properly handle .NET 2.0 assemblies:
monodocer -pretty -assembly:Metashell.Core.dll \
-importslashdoc:Metashell.Core.xml
-path:Metashell.Core/en
The above command creates ECMA-style documentation within the directory
Metashell.Core/en.
You can then use mdassembler to create .zip files which can be used by
the `monodoc' browser:
mdassembler --ecma Metashell.Core/en -o MetashellCore-docs
which creates the files MetashellCore-docs.tree and
MetashellCore-docs.zip. Then create a MetashellCore-docs.source file
with the contents:
<?xml version="1.0"?>
<monodoc>
<source provider="ecma" basefile="MetashellCore-docs" path="classlib-mono"/>
</monodoc>
Copy MetashellCore-docs.source, MetashellCore-docs.tree, and
MetashellCore-docs.zip into `monodoc --get-sourcesdir`, and they should
then be usable by monodoc.
- Jon
More information about the Mono-list
mailing list