8 implementations of DisplayError
aspire (2)
Interaction\ConsoleInteractionService.cs (1)
234public void DisplayError(string errorMessage)
Interaction\ExtensionInteractionService.cs (1)
291public void DisplayError(string errorMessage)
Aspire.Cli.Tests (6)
Commands\NewCommandTests.cs (1)
1402public void DisplayError(string errorMessage) { }
Commands\PublishCommandPromptingIntegrationTests.cs (1)
946public void DisplayError(string errorMessage) => DisplayedErrors.Add(errorMessage);
Commands\UpdateCommandTests.cs (1)
1060public void DisplayError(string errorMessage) => _innerService.DisplayError(errorMessage);
Templating\DotNetTemplateFactoryTests.cs (1)
482public void DisplayError(string message) { }
TestServices\TestConsoleInteractionService.cs (1)
84public void DisplayError(string errorMessage)
TestServices\TestExtensionInteractionService.cs (1)
72public void DisplayError(string errorMessage)
160 references to DisplayError
aspire (159)
Commands\AddCommand.cs (5)
162InteractionService.DisplayError(AddCommandStrings.NoPackagesFound); 226InteractionService.DisplayError(AddCommandStrings.UnableToStopRunningInstances); 242InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, ExitCodeConstants.FailedToAddPackage, ExecutionContext.LogFilePath)); 261InteractionService.DisplayError(ex.Message); 272InteractionService.DisplayError(errorMessage);
Commands\AgentInitCommand.cs (1)
153_interactionService.DisplayError(ex.Message);
Commands\AppHostLauncher.cs (3)
280interactionService.DisplayError(RunCommandStrings.FailedToStartAppHost); 286interactionService.DisplayError(GetDetachedFailureMessage(result.ChildExitCode)); 290interactionService.DisplayError(RunCommandStrings.TimeoutWaitingForAppHost);
Commands\BaseCommand.cs (1)
111interactionService.DisplayError(errorMessage);
Commands\CacheCommand.cs (1)
166InteractionService.DisplayError(errorMessage);
Commands\ConfigCommand.cs (9)
89InteractionService.DisplayError(ErrorStrings.ConfigurationKeyRequired); 113InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 152InteractionService.DisplayError(ErrorStrings.ConfigurationKeyRequired); 158InteractionService.DisplayError(ErrorStrings.ConfigurationValueRequired); 195InteractionService.DisplayError(errorMessage); 347InteractionService.DisplayError(ErrorStrings.ConfigurationKeyRequired); 361InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 395InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 403InteractionService.DisplayError(errorMessage);
Commands\DescribeCommand.cs (1)
173_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, DescribeCommandStrings.ResourceNotFound, resourceName));
Commands\DocsGetCommand.cs (1)
77InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, DocsCommandStrings.DocumentNotFound, slug));
Commands\DocsListCommand.cs (1)
64InteractionService.DisplayError(DocsCommandStrings.NoDocumentationAvailable);
Commands\DocsSearchCommand.cs (1)
78InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, DocsCommandStrings.NoResultsFound, query));
Commands\ExecCommand.cs (9)
90InteractionService.DisplayError(ExecCommandStrings.TargetResourceNotSpecified); 98InteractionService.DisplayError(ExecCommandStrings.NoCommandSpecified); 106InteractionService.DisplayError(ExecCommandStrings.FailedToParseCommand); 132InteractionService.DisplayError(ErrorStrings.CommandNotSupportedWithSingleFileAppHost); 246InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, RunCommandStrings.ProjectCouldNotBeRun, ExecutionContext.LogFilePath)); 257InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, RunCommandStrings.ProjectCouldNotBeRun, ExecutionContext.LogFilePath)); 282InteractionService.DisplayError(errorMessage); 289InteractionService.DisplayError(errorMessage); 297InteractionService.DisplayError(errorMessage);
Commands\InitCommand.cs (10)
136InteractionService.DisplayError($"Unknown language: {selectedProject.LanguageId}"); 196InteractionService.DisplayError("Failed to get projects from solution."); 343InteractionService.DisplayError("Failed to install Aspire templates."); 370InteractionService.DisplayError($"Failed to create Aspire projects. Exit code: {createResult}"); 381InteractionService.DisplayError("Failed to find created AppHost or ServiceDefaults projects in template output."); 423InteractionService.DisplayError($"Failed to add AppHost project to solution. Exit code: {addAppHostResult}"); 449InteractionService.DisplayError($"Failed to add ServiceDefaults project to solution. Exit code: {addServiceDefaultsResult}"); 481InteractionService.DisplayError($"Failed to add reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}."); 515InteractionService.DisplayError($"Failed to add ServiceDefaults reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}."); 569InteractionService.DisplayError("Single-file AppHost template not found.");
Commands\LogsCommand.cs (2)
144_interactionService.DisplayError(LogsCommandStrings.TailMustBePositive); 177_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, LogsCommandStrings.ResourceNotFound, resourceName));
Commands\NewCommand.cs (4)
167InteractionService.DisplayError($"Template '{template.Name}' does not support language '{explicitLanguageId}'."); 179InteractionService.DisplayError($"Template '{template.Name}' does not support language '{explicitLanguageId}'."); 232InteractionService.DisplayError("No templates are available for the current environment."); 323InteractionService.DisplayError(resolveResult.ErrorMessage);
Commands\PipelineCommandBase.cs (6)
243InteractionService.DisplayError(canceledMessage); 263InteractionService.DisplayError(ex.Message); 272InteractionService.DisplayError(errorMessage); 285InteractionService.DisplayError(errorMessage); 298InteractionService.DisplayError(errorMessage); 754InteractionService.DisplayError(error);
Commands\RenderCommand.cs (1)
191InteractionService.DisplayError("Cancelled.");
Commands\ResourceCommand.cs (1)
70_interactionService.DisplayError(result.ErrorMessage);
Commands\ResourceCommandBase.cs (1)
91InteractionService.DisplayError(result.ErrorMessage);
Commands\ResourceCommandHelper.cs (2)
79interactionService.DisplayError($"Failed to execute command '{commandName}' on resource '{resourceName}': {errorMessage}"); 105interactionService.DisplayError($"Failed to {baseVerb} resource '{resourceName}': {errorMessage}");
Commands\RunCommand.cs (8)
150InteractionService.DisplayError(RunCommandStrings.FormatRequiresDetach); 159InteractionService.DisplayError(RunCommandStrings.NoBuildNotSupportedWithWatchMode); 197InteractionService.DisplayError("Unrecognized app host type."); 249InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ProjectCouldNotBeBuilt, ExecutionContext.LogFilePath)); 268InteractionService.DisplayError(RunCommandStrings.DashboardFailedToStart); 384InteractionService.DisplayError(errorMessage); 391InteractionService.DisplayError(errorMessage); 400InteractionService.DisplayError(errorMessage);
Commands\Sdk\SdkDumpCommand.cs (5)
82InteractionService.DisplayError($"Integration project not found: {integrationProject.FullName}"); 88InteractionService.DisplayError($"Expected a .csproj file, got: {integrationProject.Extension}"); 95InteractionService.DisplayError("Cannot specify both --json and --ci. Choose one format."); 131InteractionService.DisplayError("SDK dump is only available with .NET SDK installed."); 154InteractionService.DisplayError("Failed to build capability scanner.");
Commands\Sdk\SdkGenerateCommand.cs (5)
71InteractionService.DisplayError($"Integration project not found: {integrationProject.FullName}"); 77InteractionService.DisplayError($"Expected a .csproj file, got: {integrationProject.Extension}"); 85InteractionService.DisplayError($"Unsupported language: {language}"); 129InteractionService.DisplayError("SDK generation is only available with .NET SDK installed."); 155InteractionService.DisplayError("Failed to build SDK generation server.");
Commands\SecretDeleteCommand.cs (2)
52InteractionService.DisplayError(SecretCommandStrings.CouldNotFindAppHost); 58InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, SecretCommandStrings.SecretNotFound, key.EscapeMarkup()));
Commands\SecretGetCommand.cs (2)
52InteractionService.DisplayError(SecretCommandStrings.CouldNotFindAppHost); 59InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, SecretCommandStrings.SecretNotFound, key.EscapeMarkup()));
Commands\SecretListCommand.cs (1)
52InteractionService.DisplayError(SecretCommandStrings.CouldNotFindAppHost);
Commands\SecretSetCommand.cs (1)
60InteractionService.DisplayError(SecretCommandStrings.CouldNotFindAppHost);
Commands\SetupCommand.cs (3)
55InteractionService.DisplayError("Could not determine the CLI executable path."); 67InteractionService.DisplayError("Could not determine the installation path."); 96InteractionService.DisplayError($"Bundle was extracted to {installPath} but layout validation failed.");
Commands\StartCommand.cs (3)
73_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ResourceCommandStrings.OptionNotValidWithResource, "--format")); 79_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ResourceCommandStrings.OptionNotValidWithResource, "--isolated")); 118_interactionService.DisplayError(result.ErrorMessage);
Commands\StopCommand.cs (9)
74_interactionService.DisplayError(string.Format(CultureInfo.InvariantCulture, StopCommandStrings.AllAndProjectMutuallyExclusive, s_allOption.Name, s_appHostOption.Name)); 81_interactionService.DisplayError(string.Format(CultureInfo.InvariantCulture, StopCommandStrings.AllAndResourceMutuallyExclusive, s_allOption.Name)); 119_interactionService.DisplayError(SharedCommandStrings.AppHostNotRunning); 139_interactionService.DisplayError(string.Format(CultureInfo.InvariantCulture, StopCommandStrings.MultipleAppHostsNonInteractive, s_appHostOption.Name, s_allOption.Name)); 182_interactionService.DisplayError(SharedCommandStrings.AppHostNotRunning); 237_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost); 266_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost); 272_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost); 310_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost);
Commands\TelemetryCommandHelpers.cs (1)
127interactionService.DisplayError(TelemetryCommandStrings.DashboardApiNotAvailable);
Commands\TelemetryLogsCommand.cs (5)
91_interactionService.DisplayError(TelemetryCommandStrings.LimitMustBePositive); 129_interactionService.DisplayError($"Resource '{resource}' not found."); 164_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.FailedToFetchTelemetry, ex.Message)); 176_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType); 202_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType);
Commands\TelemetrySpansCommand.cs (5)
87_interactionService.DisplayError(TelemetryCommandStrings.LimitMustBePositive); 125_interactionService.DisplayError($"Resource '{resource}' not found."); 165_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.FailedToFetchTelemetry, ex.Message)); 177_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType); 203_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType);
Commands\TelemetryTracesCommand.cs (7)
83_interactionService.DisplayError(TelemetryCommandStrings.LimitMustBePositive); 131_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.TraceNotFound, traceId)); 139_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType); 160_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.FailedToFetchTelemetry, ex.Message)); 182_interactionService.DisplayError($"Resource '{resource}' not found."); 213_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType); 234_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.FailedToFetchTelemetry, ex.Message));
Commands\UpdateCommand.cs (5)
123InteractionService.DisplayError("CLI self-update is not available in this environment."); 223InteractionService.DisplayError(message); 230InteractionService.DisplayError(message); 290InteractionService.DisplayError("Unable to determine the current executable path."); 328InteractionService.DisplayError(errorMessage);
Commands\WaitCommand.cs (6)
78_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.InvalidStatusValue, status)); 85_interactionService.DisplayError(WaitCommandStrings.TimeoutMustBePositive); 99_interactionService.DisplayError(result.ErrorMessage); 134_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceNotFound, resourceName)); 140_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.WaitTimedOut, resourceName, statusLabel, timeoutSeconds)); 145_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceEnteredFailedState, resourceName, response.State ?? response.ErrorMessage));
Program.cs (1)
657interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
Projects\GuestAppHostProject.cs (9)
200_interactionService.DisplayError("Failed to prepare AppHost server."); 374_interactionService.DisplayError("App host exited unexpectedly."); 486_interactionService.DisplayError($"Failed to run {DisplayName} AppHost: {ex.Message}"); 647_interactionService.DisplayError("App host exited unexpectedly."); 752_interactionService.DisplayError($"Failed to publish {DisplayName} AppHost: {ex.Message}"); 1121_interactionService.DisplayError("GuestRuntime not initialized. This is a bug."); 1128_interactionService.DisplayError($"Failed to install {_resolvedLanguage?.DisplayName ?? "guest"} dependencies."); 1149_interactionService.DisplayError("GuestRuntime not initialized. This is a bug."); 1171_interactionService.DisplayError("GuestRuntime not initialized. This is a bug.");
Projects\LanguageService.cs (1)
114_interactionService.DisplayError($"Unknown language: '{explicitLanguageId}'");
Scaffolding\ScaffoldingService.cs (2)
84_interactionService.DisplayError("Failed to build AppHost server."); 172_interactionService.DisplayError($"Failed to install {language.DisplayName} dependencies.");
Templating\CliTemplateFactory.cs (1)
215_interactionService.DisplayError(message);
Templating\CliTemplateFactory.EmptyTemplate.cs (3)
20_interactionService.DisplayError("Language selection is required."); 27_interactionService.DisplayError($"Unknown language: '{languageId}'"); 96_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (3)
24_interactionService.DisplayError("Unable to determine Aspire version for the TypeScript starter template."); 65_interactionService.DisplayError("npm is not installed or not found in PATH. Please install Node.js and try again."); 88_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\DotNetTemplateFactory.cs (6)
488interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.TemplateInstallationFailed, templateInstallResult.ExitCode, executionContext.LogFilePath)); 522interactionService.DisplayError(TemplatingStrings.ProjectAlreadyExists); 527interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.ProjectCreationFailed, newProjectExitCode, executionContext.LogFilePath)); 549interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message)); 554interactionService.DisplayError(ex.Message); 559interactionService.DisplayError(ex.Message);
Utils\AppHostHelper.cs (4)
23interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectCouldNotBeAnalyzed, logFilePath)); 29interactionService.DisplayError(ErrorStrings.ProjectIsNotAppHost); 35interactionService.DisplayError(ErrorStrings.CouldNotParseAspireSDKVersion); 42interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.AspireSDKVersionNotSupported, appHostInformation.AspireHostingVersion));
Utils\SdkInstallHelper.cs (1)
53interactionService.DisplayError(sdkErrorMessage);
Aspire.Cli.Tests (1)
Commands\UpdateCommandTests.cs (1)
1060public void DisplayError(string errorMessage) => _innerService.DisplayError(errorMessage);