diff --git a/src/dotnet/commands/dotnet-new/LocalizableStrings.cs b/src/dotnet/commands/dotnet-new/LocalizableStrings.cs index 2ca298cea..8e20ab449 100644 --- a/src/dotnet/commands/dotnet-new/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-new/LocalizableStrings.cs @@ -2,12 +2,10 @@ namespace Microsoft.DotNet.Tools.New { internal class LocalizableStrings { - public const string CreatingNewError = "Creating new "; + public const string CreatingNewError = "Creating new {0} project failed, project already exists."; public const string CreatedNew = "Created new "; - public const string CreatingNewError2 = " project failed, project already exists."; - public const string DirectoryContainsError = " project failed, directory already contains "; public const string ProjectFailedError = " project failed."; diff --git a/src/dotnet/commands/dotnet-new/Program.cs b/src/dotnet/commands/dotnet-new/Program.cs index 4446c63ab..73315043c 100644 --- a/src/dotnet/commands/dotnet-new/Program.cs +++ b/src/dotnet/commands/dotnet-new/Program.cs @@ -33,7 +33,8 @@ namespace Microsoft.DotNet.Tools.New // Check if project.json exists in the folder if (File.Exists(Path.Combine(Directory.GetCurrentDirectory(), "project.json")) && !isMsBuild) { - Reporter.Error.WriteLine($"{LocalizableStrings.CreatingNewError}{languageName}{LocalizableStrings.CreatingNewError2}"); + Reporter.Error.WriteLine(String.Format(LocalizableStrings.CreatingNewError,languageName)); + return 1; }