Skip to content

Commit 59efd05

Browse files
committed
check csproj assembly filedate first (fixes #42)
1 parent e8b7894 commit 59efd05

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

UnityLauncherPro/GetProjects.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,18 @@ public static List<Project> Scan(bool getGitBranch = false, bool getArguments =
8080

8181
string csprojFile = Path.Combine(projectPath, projectName + ".csproj");
8282

83-
// solution only
83+
// maybe 4.x or 2019 or later project
8484
if (folderExists == true && File.Exists(csprojFile) == false)
8585
{
86-
csprojFile = Path.Combine(projectPath, projectName + ".sln");
86+
csprojFile = Path.Combine(projectPath, "Assembly-CSharp.csproj");
8787
}
88-
89-
// editor only project
90-
if (folderExists == true && File.Exists(csprojFile) == false)
88+
else if (folderExists == true && File.Exists(csprojFile) == false) // editor only project
9189
{
9290
csprojFile = Path.Combine(projectPath, projectName + ".Editor.csproj");
9391
}
94-
95-
// maybe 4.x project, NOTE recent versions also have this as default
96-
if (folderExists == true && File.Exists(csprojFile) == false)
92+
else if (folderExists == true && File.Exists(csprojFile) == false) // solution only
9793
{
98-
csprojFile = Path.Combine(projectPath, "Assembly-CSharp.csproj");
94+
csprojFile = Path.Combine(projectPath, projectName + ".sln");
9995
}
10096

10197
// get last modified date

0 commit comments

Comments
 (0)