[Mono-bugs] [Bug 78750][Nor] New - Entry assembly not set under mono-service

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jul 3 06:08:00 EDT 2006


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 pawel.sakowski at mindbreeze.com.

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

--- shadow/78750	2006-07-03 06:08:00.000000000 -0400
+++ shadow/78750.tmp.31504	2006-07-03 06:08:00.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 78750
+Product: Mono: Tools
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: tools
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: pawel.sakowski at mindbreeze.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Entry assembly not set under mono-service
+
+Description of Problem:
+In mono-service services, the information on Assembly.GetEntryAssembly() is
+not available (returns null).
+
+Steps to reproduce the problem:
+1. mcs /r:System.ServiceProcess x.cs  # content follows
+
+using System;
+using System.IO;
+using System.Reflection;
+using System.ServiceProcess;
+using System.Text;
+
+class X: ServiceBase {
+  static TextWriter f = new StreamWriter(File.OpenWrite("/tmp/test-log"));
+  protected override void OnStart(string[] args) {
+    f.WriteLine("Assembly: " + Assembly.GetEntryAssembly());
+    f.Flush();
+  }
+  protected override void OnStop() {}
+  static void Main() {
+    ServiceBase.Run(new ServiceBase[] {new X()});
+  }
+}
+
+2. mono-service -l:/tmp/x.lock x.exe
+
+Actual Results:
+null logged as the assembly.
+
+Expected Results:
+x, Version=...
+
+How often does this happen? 
+100%
+
+Additional Information:
+Under Windows, the service's main assembly is available under
+Assembly.GetEntryAssembly().


More information about the mono-bugs mailing list