This was only for debugging.
[mono.git] / mcs / gmcs / codegen.cs
index e47f9b767cfa6d16de28c4f4ab8cfeee9701159c..71f4a9dafdb20f79a84c694bf9496fee576f1104 100755 (executable)
@@ -96,6 +96,22 @@ namespace Mono.CSharp {
                {
                        FileName = output;
                        AssemblyName an = Assembly.GetAssemblyName (name, output);
+
+                       if (an.KeyPair != null) {
+                               // If we are going to strong name our assembly make
+                               // sure all its refs are strong named
+                               foreach (Assembly a in TypeManager.GetAssemblies ()) {
+                                       AssemblyName ref_name = a.GetName ();
+                                       byte [] b = ref_name.GetPublicKeyToken ();
+                                       if (b == null || b.Length == 0) {
+                                               Report.Warning (1577, "Assembly generation failed " +
+                                                               "-- Referenced assembly '" +
+                                                               ref_name.Name +
+                                                               "' does not have a strong name.");
+                                               //Environment.Exit (1);
+                                       }
+                               }
+                       }
                        
                        current_domain = AppDomain.CurrentDomain;