diff --git a/MN.L10n.BuildTasks/MN.L10n.BuildTasks.csproj b/MN.L10n.BuildTasks/MN.L10n.BuildTasks.csproj index a0a58ce..c542006 100644 --- a/MN.L10n.BuildTasks/MN.L10n.BuildTasks.csproj +++ b/MN.L10n.BuildTasks/MN.L10n.BuildTasks.csproj @@ -6,7 +6,7 @@ Exe MN.L10n.BuildTasks.Program true - 4.0.5 + 4.0.6 Chris GÄrdenberg MultiNet Interactive AB diff --git a/MN.L10n.BuildTasks/Program.cs b/MN.L10n.BuildTasks/Program.cs index 059c34d..8e18981 100644 --- a/MN.L10n.BuildTasks/Program.cs +++ b/MN.L10n.BuildTasks/Program.cs @@ -44,8 +44,14 @@ public async static Task Main(string[] args) stw.Start(); - while (!baseDir.EnumerateFiles().Any(x => x.Extension == ".sln" || x.Extension == L10nRoot)) + var startDir = baseDir; + while (!baseDir.EnumerateFiles().Any(x => x.Extension is ".sln" or ".slnx" || x.Extension == L10nRoot)) { + if(baseDir.Parent == null) + { + Console.WriteLine($"Unable to find solution root, stopping L10n build task. Checked {startDir} and all parent directories up to {baseDir}"); + return -1; + } baseDir = baseDir.Parent; } diff --git a/README.md b/README.md index 902c837..a3402eb 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ First of all, you need to install the NuGet-package `MN.L10n.BuildTask` in at le Currently, it will only run while the solution is being compiled in `Release`-config, so that we don't slow down local build times too much. -When the solution is run in `Release`-mode, L10n will look for either a `.l10nconfig` or the `.sln`-file, as the root for where it should look for phrases. +When the solution is run in `Release`-mode, L10n will look for either a `.l10nconfig` or the `.sln/.slnx`-file, as the root for where it should look for phrases. ---