diff --git a/src/dotnet/commands/dotnet-run/RunCommand.cs b/src/dotnet/commands/dotnet-run/RunCommand.cs index edd956892..e9f0c8bdd 100644 --- a/src/dotnet/commands/dotnet-run/RunCommand.cs +++ b/src/dotnet/commands/dotnet-run/RunCommand.cs @@ -124,14 +124,12 @@ namespace Microsoft.DotNet.Tools.Run var project = "--project"; throw new InvalidOperationException( - $"Couldn't find a project to run. Ensure a project exists in {directory}, or pass the path to the project using {project}") - .DisplayAsError(); + $"Couldn't find a project to run. Ensure a project exists in {directory}, or pass the path to the project using {project}"); } else if (projectFiles.Length > 1) { throw new InvalidOperationException( - $"Specify which project file to use because {directory} contains more than one project file.") - .DisplayAsError(); + $"Specify which project file to use because {directory} contains more than one project file."); } Project = projectFiles[0];