2006-11-14 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / ilasm / Driver.cs
index 1b5ea904abe1bd4c32d069780e55d8eecf8215db..eb5ee04410a28defe6249da57ae4c7317dc83b28 100644 (file)
@@ -68,8 +68,10 @@ namespace Mono.ILASM {
                                         output_file = CreateOutputFilename ();
                                 try {
                                         codegen = new CodeGen (output_file, target == Target.Dll, debugging_info);
-                                        foreach (string file_path in il_file_list)
+                                        foreach (string file_path in il_file_list) {
+                                                Report.FilePath = file_path;
                                                 ProcessFile (file_path);
+                                        }
                                         if (scan_only)
                                                 return true;
 
@@ -83,7 +85,7 @@ namespace Mono.ILASM {
                                        if ((keyname != null) && !codegen.IsThisAssembly (null)) {
                                                LoadKey ();
                                                // this overrides any attribute or .publickey directive in the source
-                                               codegen.SetAssemblyPublicKey (sn.PublicKey);
+                                               codegen.ThisAssembly.SetPublicKey (sn.PublicKey);
                                        }
 
                                         try {
@@ -180,9 +182,9 @@ namespace Mono.ILASM {
                                         else
                                                 parser.yyparse (new ScannerAdapter (scanner),  null);
                                 } catch (ILTokenizingException ilte) {
-                                        Report.Error (file_path, ilte.Location, "syntax error at token '" + ilte.Token + "'");
+                                        Report.Error (ilte.Location, "syntax error at token '" + ilte.Token + "'");
                                 } catch (Mono.ILASM.yyParser.yyException ye) {
-                                        Report.Error (file_path, scanner.Reader.Location, ye.Message);
+                                        Report.Error (scanner.Reader.Location, ye.Message);
                                 } catch (ILAsmException ie) {
                                         ie.FilePath = file_path;
                                         ie.Location = scanner.Reader.Location;
@@ -360,7 +362,7 @@ namespace Mono.ILASM {
 
                         private void Version ()
                         {
-                                string version = Assembly.GetExecutingAssembly ().GetName ().Version.ToString ();
+                                string version = System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version.ToString ();
                                 Console.WriteLine ("Mono ILasm compiler version {0}", version);
                                 Environment.Exit (0);
                         }