Merge pull request #3040 from xmcclure/debugger-step-recursive
[mono.git] / mcs / class / Microsoft.Build.Tasks / Microsoft.Build.Tasks / ResolveAssemblyReference.cs
index 17c66567be020a81f592a2945dad63ce4c0ece13..3bdf7111df8b3295f5f37cd50d92238d846128e5 100644 (file)
@@ -128,6 +128,10 @@ namespace Microsoft.Build.Tasks {
                        relatedFiles = tempRelatedFiles.Values.ToArray ();
                        resolvedDependencyFiles = tempResolvedDepFiles.Values.ToArray ();
 
+#if XBUILD_14
+                       DependsOnSystemRuntime = resolvedDependencyFiles.Any (x => Path.GetFileName (x.ItemSpec) == "System.Runtime.dll").ToString ();
+#endif
+
                        tempResolvedFiles.Clear ();
                        tempCopyLocalFiles.Clear ();
                        tempSatelliteFiles.Clear ();
@@ -210,14 +214,18 @@ namespace Microsoft.Build.Tasks {
 
                        var spath_index  = 0;
                        foreach (string spath in search_paths) {
+                               if (string.IsNullOrEmpty (spath))
+                                       continue;
                                assembly_resolver.LogSearchMessage ("For searchpath {0}", spath);
-                               
+
                                // The first value of search_paths can be the parent assembly directory.
                                // In that case the value would be treated as a directory.
                                // This code checks if we should treat the value as a TargetFramework assembly.
                                // Doing so avoids CopyLocal beeing set to true.
                                if (spath_index++ == 0 && targetFrameworkDirectories != null) {
                                        foreach (string fpath in targetFrameworkDirectories) {
+                                               if (string.IsNullOrEmpty (fpath))
+                                                       continue;
                                                if (String.Compare (
                                                                Path.GetFullPath (spath).TrimEnd (Path.DirectorySeparatorChar),
                                                                Path.GetFullPath (fpath).TrimEnd (Path.DirectorySeparatorChar),
@@ -622,6 +630,13 @@ namespace Microsoft.Build.Tasks {
                public ITaskItem[] CopyLocalFiles {
                        get { return copyLocalFiles; }
                }
+
+#if XBUILD_14
+               [Output]
+               public string DependsOnSystemRuntime {
+                       get; private set;
+               }
+#endif
                
                [Output]
                public ITaskItem[] FilesWritten {