[System] Fix a few type members on WatchOS
[mono.git] / mcs / class / Microsoft.Build.Tasks / Microsoft.Build.Tasks / FindUnderPath.cs
index 2d1de22c2532f1fb6cfeb645b363dff45ba4f6f6..52221e05c7ceab394703da8a828c36d8aaee40cc 100644 (file)
@@ -25,7 +25,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-#if NET_2_0
 
 using System;
 using System.Collections.Generic;
@@ -46,17 +45,12 @@ namespace Microsoft.Build.Tasks {
 
                public override bool Execute ()
                {
+                       if (files == null || files.Length == 0)
+                               return true;
+
                        List <ITaskItem> temporaryInPath = new List <ITaskItem> ();
                        List <ITaskItem> temporaryOutOfPath = new List <ITaskItem> ();
                        
-                       if (path == null) {
-                               Log.LogError (null, null, null, BuildEngine.ProjectFileOfTaskNode,
-                                       BuildEngine.LineNumberOfTaskNode, BuildEngine.ColumnNumberOfTaskNode,
-                                       BuildEngine.LineNumberOfTaskNode, BuildEngine.ColumnNumberOfTaskNode,
-                                       "Path attribute must be specified", null);
-                               return false;
-                       }
-                       
                        foreach (ITaskItem file in files) {
                                try {
                                        string fullPath = path.GetMetadata ("FullPath");;
@@ -129,4 +123,3 @@ namespace Microsoft.Build.Tasks {
        }
 }
 
-#endif
\ No newline at end of file