[Mono-list] Fwd: monodoc.dll looking for missing method in mscorlib.dll
amamh3 at gmail.com
Mon Jan 4 22:55:28 EST 2010
> > I couldn't modify mcs/tools/monodoc/Assembly/AssemblyInfo.cs to change
> its AssemblyVersion attribute to Consts.FxVersion the compiler always
> complained about unidentified variable "Consts", so I changed it to
This is because Consts.cs isn't in the build script. You can
add ../../build/common/Consts.cs to
mcs/tools/monodoc/monodoc.dll.sources and the Consts type will be
Thanks for this tip !
> * In the AssemblyInfo.cs it says it needs runtime version
> 22.214.171.124 so when it was run with mono, it loaded the right
> mscorlib.dll for the required runtime which is
> mono/2.0/mscorlib.dll, so the problem arises.
No. The AssemblyVersionAttribute doesn't say what runtime version it
targets. It specifies the version of the assembly itself (monodoc.dll
in this case).
well, that's what I figured out at the end.
Since we were compiling the assembly twice with the same version number
each time, gacutil was installing both of them into the same directory.
If the separate builds had different version numbers, they'd be
installed into different GAC directories. Hence using Consts.FxVersion
would be *a* fix for this.
Thanks again, so the whole idea is to separate the two monodoc.dlls so the
2.0 one doesn't get overwritten with the 4.0 one.
But this is, in fact, the wrong compiler. It's the wrong compiler
because monodoc (the app) was built against gmcs (see mono-tools). Thus
when it runs, it'll be started as a 2.0 app, which won't be able to add
4.0-specific members, which is *exactly* the scenario you're in.
> So a temporary fix is simple:
> 1. Undo all your changes to monodoc.dll
2. cd mcs/tools/monodoc
3. make PROFILE=net_2_0
4. make PROFILE=net_2_0 install
Thanks for this tip too.
A longer term fix is to make the AssemblyVersionAttribute conditional on
the framework version (e.g. use Consts.FxVersion).
here is what I did:
1. changed AssemblyVersionAttribute to Consts.FxVersion.
2. in mcs/tools/monodoc
1. make PROFILE=net_2_0 && sudo make install PROFILE=net_2_0
2. make PROFILE=net_4_0 && sudo make install PROFILE=net_4_0
now there is two folders in mono/gac/monodoc, a 2.0.0* one and a 4.0.0* one,
I think the latter has no importance and actually is not used, but it won't
now monodoc runs fine but there is something weird:
I can't see gtk sharp libraries documentation, maybe I have to recompile gtk
sharp (and hence its documentation) again. I will try and report back, I'm
doing an Electronics project now, which I hate :), so I may reply late.
Big Thanks !
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list