[xbuild] Fix assembly name comparison when resolving references.
authorAnkit Jain <radical@corewars.org>
Tue, 1 Mar 2011 11:25:14 +0000 (16:55 +0530)
committerAnkit Jain <radical@corewars.org>
Tue, 1 Mar 2011 11:40:52 +0000 (17:10 +0530)
AssemblyResolver.cs (AssemblyNamesCompatible): If either of the
references don't have a public key token, then ignore that.

mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs

index b5d8672c580b062d17cea6dfafab545605ea6a5d..143b005366fa1ea1bbdf9a8e6dd810b3188c1626 100644 (file)
@@ -369,11 +369,8 @@ namespace Microsoft.Build.Tasks {
                        bool a_is_empty = (a_bytes == null || a_bytes.Length == 0);
                        bool b_is_empty = (b_bytes == null || b_bytes.Length == 0);
 
-                       if (a_is_empty && b_is_empty)
-                               return true;
-
                        if (a_is_empty || b_is_empty)
-                               return false;
+                               return true;
 
                        for (int i = 0; i < a_bytes.Length; i++)
                                if (a_bytes [i] != b_bytes [i])