summaryrefslogtreecommitdiff
path: root/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-05-09 20:55:50 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-05-09 21:36:31 +0200
commitf3bcd5f8dd36c4ce384f00a03650f71dce5c4de6 (patch)
tree18a7e27065b27406b13822d590e8a780cbef3cc7 /modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs
parentaf4acb5b1163089fe727000b39cefb4fc799f1db (diff)
C#: Use Sdks in GodotTools csprojs and switch to nuget Microsoft.Build
Diffstat (limited to 'modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs')
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs
index f0e0d1b33d..704f2ec194 100644
--- a/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectExtensions.cs
@@ -2,8 +2,8 @@ using GodotTools.Core;
using System;
using System.Collections.Generic;
using System.IO;
-using DotNet.Globbing;
using Microsoft.Build.Construction;
+using Microsoft.Build.Globbing;
namespace GodotTools.ProjectEditor
{
@@ -11,8 +11,6 @@ namespace GodotTools.ProjectEditor
{
public static ProjectItemElement FindItemOrNull(this ProjectRootElement root, string itemType, string include, bool noCondition = false)
{
- GlobOptions globOptions = new GlobOptions {Evaluation = {CaseInsensitive = false}};
-
string normalizedInclude = include.NormalizePath();
foreach (var itemGroup in root.ItemGroups)
@@ -25,7 +23,8 @@ namespace GodotTools.ProjectEditor
if (item.ItemType != itemType)
continue;
- var glob = Glob.Parse(item.Include.NormalizePath(), globOptions);
+ //var glob = Glob.Parse(item.Include.NormalizePath(), globOptions);
+ var glob = MSBuildGlob.Parse(item.Include.NormalizePath());
if (glob.IsMatch(normalizedInclude))
return item;
@@ -36,8 +35,6 @@ namespace GodotTools.ProjectEditor
}
public static ProjectItemElement FindItemOrNullAbs(this ProjectRootElement root, string itemType, string include, bool noCondition = false)
{
- GlobOptions globOptions = new GlobOptions {Evaluation = {CaseInsensitive = false}};
-
string normalizedInclude = Path.GetFullPath(include).NormalizePath();
foreach (var itemGroup in root.ItemGroups)
@@ -50,7 +47,7 @@ namespace GodotTools.ProjectEditor
if (item.ItemType != itemType)
continue;
- var glob = Glob.Parse(Path.GetFullPath(item.Include).NormalizePath(), globOptions);
+ var glob = MSBuildGlob.Parse(Path.GetFullPath(item.Include).NormalizePath());
if (glob.IsMatch(normalizedInclude))
return item;