Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=80487

--- shadow/80487        2007-01-09 19:42:52.000000000 -0500
+++ shadow/80487.tmp.18809      2007-01-09 19:42:52.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 80487
+Product: Mono: Runtime
+Version: 1.2
+OS: unknown
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Module constructor of libraries is not executed
+
+Compile this IL sample to get a library that contains a module constructor
+(TestDll.dll) :
+
+
+.assembly TestDll { }
+.assembly extern mscorlib { }
+
+.method assembly specialname rtspecialname static 
+        void  .cctor() cil managed
+{
+       ldstr "Module contructor executed"
+       call void [mscorlib]System.Console::WriteLine(string)
+       ret
+}
+
+.namespace NS
+{
+       .class public TestClass extends [mscorlib]System.Object
+       {
+               .method public hidebysig specialname rtspecialname 
+                               instance void  .ctor() cil managed
+               {
+                 ldarg.0
+                 call       instance void [mscorlib]System.Object::.ctor()
+                 ret
+               }
+       }
+}
+
+
+Then compile Test.cs using TestDll as reference :
+
+public class Program
+{
+    public static void Main()
+    {
+        NS.TestClass cls = new NS.TestClass();
+    }
+}
+
+
+When you execute Test.exe you'll see that the module constructor of TestDll
+is not getting executed.
+
+(Note: A module constructor in an executable is working)
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to