diff --git a/src/Moryx.Cli.Templates/Solution.cs b/src/Moryx.Cli.Templates/Solution.cs index 576fef3..3d0acea 100644 --- a/src/Moryx.Cli.Templates/Solution.cs +++ b/src/Moryx.Cli.Templates/Solution.cs @@ -14,8 +14,13 @@ public static void Assert(string dir, Action then, Action onErro public static string GetSolutionName(string dir, Action onError) { - var files = Directory.GetFiles(dir, "*.sln"); - if (files != null) + var files = Directory.GetFiles(dir, "*.slnx"); + if (files.Length == 0) + { + files = Directory.GetFiles(dir, "*.sln"); + } + + if (files.Length > 1) { if (files.Length == 1) { @@ -23,11 +28,11 @@ public static string GetSolutionName(string dir, Action onError) } if (files.Length > 1) { - onError("Too many `.sln` found. Please make sure, there is only one solution."); + onError("Too many _solutions_ found. Please make sure, there is only one solution."); return ""; } } - onError("No `.sln` found. Please make sure, there is a VisualStudio solution in this directory."); + onError("No _solutions_ found. Please make sure, there is a VisualStudio solution in this directory."); return ""; } }