This commit is contained in:
Kudzu 2017-07-03 18:04:16 -04:00
parent 85ac1de9b1
commit 443286fc65

View file

@ -82,6 +82,22 @@ namespace ProjectRenamer {
Log();
}
void FixCs() {
Log("Fix namespaces in .cs files");
var xProjs = IO.Directory.GetFiles(mSourceDir, "*.cs", IO.SearchOption.AllDirectories);
foreach (var xProj in xProjs) {
string x = IO.File.ReadAllText(xProj);
string y = x.Replace(mOld, mNew);
if (x != y) {
Log(" " + IO.Path.GetFileName(xProj));
IO.File.WriteAllText(xProj, y);
}
}
Log();
}
void RenameProj() {
Log("Renaming project");
@ -144,10 +160,8 @@ namespace ProjectRenamer {
}
RenameProj();
FixCsprojs();
// TODO Fix namespaces in cs files
// Default NS in csproj files too
FixCsprojs(); // After RenameProj()
FixCs();
ModifySLNs();