[Mono-devel-list] Do somebody have an example of using modules in Mono
Mads Lindstrøm
mads_lindstroem at yahoo.dk
Sat Feb 5 15:12:48 EST 2005
Hi
I have been trying to use modules in mono. I have made the following two
files:
public class Test1 {
Test3 test3;
}
------------------------------------ and:
[module:System.CLSCompliant(true)]
internal class Test3 {
}
------------------------------------
I compile with:
mcs /target:module File2.cs && mcs /target:library File1.cs
/addmodule:File2.netmodule
and get:
> Namespace2.cs(2) warning CS3012: You must specify the CLSCompliant
> attribute on the assembly, not the module, to enable CLS compliance
> checking
> Compilation succeeded - 1 warning(s)
> Namespace2.netmodule error CS3013: Added modules must be marked with
> the CLSCompliant attribute to match the assembly
> Compilation failed: 1 error(s), 0 warnings
If I replace file2's [module:System.CLSCompli... with
[assembly:System.CLSCompli... I get:
> Compilation succeeded
> Namespace2.netmodule error CS3013: Added modules must be marked with
> the CLSCompliant attribute to match the assembly
> Compilation failed: 1 error(s), 0 warnings
Other people also seems to have trouble, see
http://lists.ximian.com/archives/public/mono-bugs/2004-November/022358.html
Anybody have a working example?
I am running Debian (testing + some packages from unstable) with mono
version 1.0.5.0.
Greetings,
Mads Lindstrøm
ps. I have tried adding the System.CLSCompliant attribute to both files
and with "assembly:", "class:", and "modules:" and nothing helps.
More information about the Mono-devel-list
mailing list