diff --git a/Source/Boxed.DotnetNewTest/TempDirectoryExtensions.cs b/Source/Boxed.DotnetNewTest/TempDirectoryExtensions.cs index ad6753aa..161c0150 100644 --- a/Source/Boxed.DotnetNewTest/TempDirectoryExtensions.cs +++ b/Source/Boxed.DotnetNewTest/TempDirectoryExtensions.cs @@ -25,7 +25,7 @@ public static class TempDirectoryExtensions public static async Task DotnetNewAsync( this TempDirectory tempDirectory, string templateName, - string name, + string name = null, IDictionary arguments = null, TimeSpan? timeout = null, bool showShellWindow = false) @@ -35,7 +35,13 @@ public static async Task DotnetNewAsync( throw new ArgumentNullException(nameof(tempDirectory)); } - var stringBuilder = new StringBuilder($"new {templateName} --name \"{name}\""); + var stringBuilder = new StringBuilder($"new {templateName}"); + + if (name != null) + { + stringBuilder.Append($" --name \"{name}\""); + } + if (arguments is object) { foreach (var argument in arguments)