file recursion
This commit is contained in:
parent
1abdcd2cf5
commit
6bbcec53a3
2 changed files with 19 additions and 1 deletions
|
@ -11,4 +11,8 @@
|
|||
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Build" Version="17.8.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using System.Reflection.Metadata.Ecma335;
|
||||
using Microsoft.Build.Construction;
|
||||
using Microsoft.Build.Execution;
|
||||
|
||||
namespace Nyanbyte.DotnetTools.Rename;
|
||||
|
||||
|
@ -22,6 +24,18 @@ public class Program
|
|||
return;
|
||||
}
|
||||
|
||||
FileInfo? sln = projs.SingleOrDefault(f => f.Extension == "sln");
|
||||
FileInfo? slnFile = projs.SingleOrDefault(f => f.Extension == "sln");
|
||||
if (slnFile is not null)
|
||||
{
|
||||
SolutionFile sln = SolutionFile.Parse(slnFile.FullName);
|
||||
projs = sln.ProjectsInOrder.Select(p => new FileInfo(p.AbsolutePath)).ToList();
|
||||
}
|
||||
|
||||
foreach (var proj in projs)
|
||||
{
|
||||
ProjectInstance pi = ProjectInstance.FromFile(proj.FullName, new());
|
||||
string projDir = Path.GetDirectoryName(pi.FullPath)!;
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue