diff --git a/src/Cake.Common/Tools/DotNet/DotNetAliases.Sln.cs b/src/Cake.Common/Tools/DotNet/DotNetAliases.Sln.cs index a1fc92179f..d20378c317 100644 --- a/src/Cake.Common/Tools/DotNet/DotNetAliases.Sln.cs +++ b/src/Cake.Common/Tools/DotNet/DotNetAliases.Sln.cs @@ -99,10 +99,7 @@ public static IEnumerable DotNetSlnList(this ICakeContext context, FileP { ArgumentNullException.ThrowIfNull(context); - if (settings is null) - { - settings = new DotNetSlnListSettings(); - } + settings ??= new DotNetSlnListSettings(); var lister = new DotNetSlnLister(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); return lister.List(solution, settings); diff --git a/src/Cake.Common/Tools/DotNet/Sln/List/DotNetSlnLister.cs b/src/Cake.Common/Tools/DotNet/Sln/List/DotNetSlnLister.cs index dc2aa13a39..57972992e2 100644 --- a/src/Cake.Common/Tools/DotNet/Sln/List/DotNetSlnLister.cs +++ b/src/Cake.Common/Tools/DotNet/Sln/List/DotNetSlnLister.cs @@ -46,7 +46,11 @@ public IEnumerable List(FilePath solution, DotNetSlnListSettings setting var processSettings = new ProcessSettings { - RedirectStandardOutput = true + RedirectStandardOutput = true, + EnvironmentVariables = new Dictionary(settings.EnvironmentVariables) + { + { "DOTNET_CLI_UI_LANGUAGE", "en" } + } }; IEnumerable result = null;