9 implementations of DisplayError
aspire (2)
Interaction\ConsoleInteractionService.cs (1)
295public void DisplayError(string errorMessage)
Interaction\ExtensionInteractionService.cs (1)
306public void DisplayError(string errorMessage)
Aspire.Cli.Tests (7)
Commands\NewCommandTests.cs (1)
1574public void DisplayError(string errorMessage) { }
Commands\PublishCommandPromptingIntegrationTests.cs (1)
952public void DisplayError(string errorMessage) => DisplayedErrors.Add(errorMessage);
Commands\UpdateCommandTests.cs (1)
1058public void DisplayError(string errorMessage) => _innerService.DisplayError(errorMessage);
Projects\ExtensionGuestLauncherTests.cs (1)
166public void DisplayError(string errorMessage) => throw new NotImplementedException();
Templating\DotNetTemplateFactoryTests.cs (1)
482public void DisplayError(string message) { }
TestServices\TestExtensionInteractionService.cs (1)
78public void DisplayError(string errorMessage)
TestServices\TestInteractionService.cs (1)
144public void DisplayError(string errorMessage)
171 references to DisplayError
aspire (170)
Commands\AddCommand.cs (6)
115InteractionService.DisplayError(ex.Message); 171InteractionService.DisplayError(AddCommandStrings.NoPackagesFound); 233InteractionService.DisplayError(AddCommandStrings.UnableToStopRunningInstances); 248InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, ExitCodeConstants.FailedToAddPackage, ExecutionContext.LogFilePath)); 267InteractionService.DisplayError(ex.Message); 278InteractionService.DisplayError(errorMessage);
Commands\AgentInitCommand.cs (2)
166_interactionService.DisplayError(ex.Message); 261_interactionService.DisplayError(ex.Message);
Commands\AppHostLauncher.cs (3)
289interactionService.DisplayError(RunCommandStrings.FailedToStartAppHost); 295interactionService.DisplayError(GetDetachedFailureMessage(result.ChildExitCode)); 299interactionService.DisplayError(RunCommandStrings.TimeoutWaitingForAppHost);
Commands\BaseCommand.cs (1)
113interactionService.DisplayError(errorMessage);
Commands\CacheCommand.cs (1)
166InteractionService.DisplayError(errorMessage);
Commands\CertificatesCleanCommand.cs (2)
49InteractionService.DisplayError(details); 50InteractionService.DisplayError(CertificatesCommandStrings.CleanFailure);
Commands\CertificatesTrustCommand.cs (2)
50InteractionService.DisplayError(details); 51InteractionService.DisplayError(CertificatesCommandStrings.TrustFailure);
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); 371InteractionService.DisplayError(ErrorStrings.ConfigurationKeyRequired); 385InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 419InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 427InteractionService.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\ExportCommand.cs (2)
139_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ExportCommandStrings.ResourceNotFound, resourceName)); 200_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ExportCommandStrings.FailedToExport, ex.Message));
Commands\InitCommand.cs (11)
144InteractionService.DisplayError($"Unknown language: {selectedProject.LanguageId}"); 203InteractionService.DisplayError( 230InteractionService.DisplayError("Failed to get projects from solution."); 378InteractionService.DisplayError("Failed to install Aspire templates."); 405InteractionService.DisplayError($"Failed to create Aspire projects. Exit code: {createResult}"); 416InteractionService.DisplayError("Failed to find created AppHost or ServiceDefaults projects in template output."); 458InteractionService.DisplayError($"Failed to add AppHost project to solution. Exit code: {addAppHostResult}"); 484InteractionService.DisplayError($"Failed to add ServiceDefaults project to solution. Exit code: {addServiceDefaultsResult}"); 516InteractionService.DisplayError($"Failed to add reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}."); 550InteractionService.DisplayError($"Failed to add ServiceDefaults reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}."); 608InteractionService.DisplayError("Single-file AppHost template not found.");
Commands\LogsCommand.cs (2)
144_interactionService.DisplayError(LogsCommandStrings.TailMustBePositive); 176_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, LogsCommandStrings.ResourceNotFound, resourceName));
Commands\McpCallCommand.cs (4)
80_interactionService.DisplayError(result.ErrorMessage); 95_interactionService.DisplayError("Invalid JSON input: expected a JSON object."); 107_interactionService.DisplayError($"Invalid JSON input: {ex.Message}"); 152_interactionService.DisplayError($"Failed to call tool '{toolName}' on resource '{resourceName}': {ex.Message}");
Commands\NewCommand.cs (3)
153InteractionService.DisplayError($"Template '{parseResult.CommandResult.Command.Name}' is not available. Ensure the required runtime is installed."); 160InteractionService.DisplayError("No templates are available for the current environment."); 257InteractionService.DisplayError(resolveResult.ErrorMessage);
Commands\PipelineCommandBase.cs (6)
300InteractionService.DisplayError(canceledMessage); 320InteractionService.DisplayError(ex.Message); 329InteractionService.DisplayError(errorMessage); 342InteractionService.DisplayError(errorMessage); 355InteractionService.DisplayError(errorMessage); 811InteractionService.DisplayError(error);
Commands\RenderCommand.cs (1)
191InteractionService.DisplayError("Cancelled.");
Commands\ResourceCommand.cs (1)
81_interactionService.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\RestoreCommand.cs (3)
83InteractionService.DisplayError(RestoreCommandStrings.UnrecognizedAppHostType); 132InteractionService.DisplayError(RestoreCommandStrings.UnrecognizedAppHostType); 148InteractionService.DisplayError(errorMessage);
Commands\RunCommand.cs (8)
148InteractionService.DisplayError(RunCommandStrings.FormatRequiresDetach); 157InteractionService.DisplayError(RunCommandStrings.NoBuildNotSupportedWithWatchMode); 195InteractionService.DisplayError("Unrecognized app host type."); 244InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ProjectCouldNotBeBuilt, ExecutionContext.LogFilePath)); 269InteractionService.DisplayError(RunCommandStrings.DashboardFailedToStart); 385InteractionService.DisplayError(errorMessage); 392InteractionService.DisplayError(errorMessage); 407InteractionService.DisplayError(errorMessage);
Commands\Sdk\SdkDumpCommand.cs (5)
85InteractionService.DisplayError($"Integration project not found: {projectFile.FullName}"); 101InteractionService.DisplayError($"Invalid package format '{arg}'. Expected PackageName@Version (e.g. Aspire.Hosting.Redis@9.2.0)."); 107InteractionService.DisplayError($"Invalid version '{packageVersion}' in '{arg}'. Expected a valid NuGet version (e.g. 9.2.0)."); 116InteractionService.DisplayError($"Invalid integration argument '{arg}'. Expected a .csproj path or PackageName@Version format."); 156InteractionService.DisplayError("Failed to build capability scanner.");
Commands\Sdk\SdkGenerateCommand.cs (4)
71InteractionService.DisplayError($"Integration project not found: {integrationProject.FullName}"); 77InteractionService.DisplayError($"Expected a .csproj file, got: {integrationProject.Extension}"); 85InteractionService.DisplayError($"Unsupported language: {language}"); 150InteractionService.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\SecretPathCommand.cs (1)
42InteractionService.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\StopCommand.cs (8)
65_interactionService.DisplayError(string.Format(CultureInfo.InvariantCulture, StopCommandStrings.AllAndProjectMutuallyExclusive, s_allOption.Name, s_appHostOption.Name)); 103_interactionService.DisplayError(SharedCommandStrings.AppHostNotRunning); 119_interactionService.DisplayError(string.Format(CultureInfo.InvariantCulture, StopCommandStrings.MultipleAppHostsNonInteractive, s_appHostOption.Name, s_allOption.Name)); 155_interactionService.DisplayError(SharedCommandStrings.AppHostNotRunning); 210_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost); 239_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost); 245_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost); 283_interactionService.DisplayError(StopCommandStrings.FailedToStopAppHost);
Commands\TelemetryCommandHelpers.cs (1)
126interactionService.DisplayError(TelemetryCommandStrings.DashboardApiNotAvailable);
Commands\TelemetryLogsCommand.cs (5)
90_interactionService.DisplayError(TelemetryCommandStrings.LimitMustBePositive); 128_interactionService.DisplayError($"Resource '{resource}' not found."); 163_interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.FailedToFetchTelemetry, ex.Message)); 175_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType); 201_interactionService.DisplayError(TelemetryCommandStrings.UnexpectedContentType);
Commands\TelemetrySpansCommand.cs (5)
86_interactionService.DisplayError(TelemetryCommandStrings.LimitMustBePositive); 124_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\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)
127InteractionService.DisplayError("CLI self-update is not available in this environment."); 227InteractionService.DisplayError(message); 234InteractionService.DisplayError(message); 294InteractionService.DisplayError("Unable to determine the current executable path."); 332InteractionService.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));
Projects\GuestAppHostProject.cs (10)
256_interactionService.DisplayError("Failed to prepare AppHost server."); 442_interactionService.DisplayError("App host exited unexpectedly."); 498_interactionService.DisplayError("GuestRuntime not initialized."); 587_interactionService.DisplayError($"Failed to run {DisplayName} AppHost: {ex.Message}"); 806_interactionService.DisplayError("App host exited unexpectedly."); 917_interactionService.DisplayError($"Failed to publish {DisplayName} AppHost: {ex.Message}"); 1307_interactionService.DisplayError("GuestRuntime not initialized. This is a bug."); 1321_interactionService.DisplayError($"Failed to install {_resolvedLanguage?.DisplayName ?? "guest"} dependencies."); 1344_interactionService.DisplayError("GuestRuntime not initialized. This is a bug."); 1366_interactionService.DisplayError("GuestRuntime not initialized. This is a bug.");
Projects\LanguageService.cs (1)
118_interactionService.DisplayError($"Unknown language: '{explicitLanguageId}'");
Projects\ProjectLocator.cs (1)
187interactionService.DisplayError(ex.Message);
Scaffolding\ScaffoldingService.cs (2)
77_interactionService.DisplayError("Failed to build AppHost server."); 192_interactionService.DisplayError($"Failed to install {language.DisplayName} dependencies.");
Templating\CliTemplateFactory.EmptyTemplate.cs (3)
20_interactionService.DisplayError("Language selection is required."); 27_interactionService.DisplayError($"Unknown language: '{languageId}'"); 99_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (4)
26_interactionService.DisplayError("Unable to determine Aspire version for the TypeScript starter template."); 78_interactionService.DisplayError("Automatic 'aspire restore' is unavailable for the new TypeScript starter project because no TypeScript AppHost SDK generator was found."); 86_interactionService.DisplayError("Automatic 'aspire restore' failed for the new TypeScript starter project. Run 'aspire restore' in the project directory for more details."); 100_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\DotNetTemplateFactory.cs (6)
546interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.TemplateInstallationFailed, templateInstallResult.ExitCode, executionContext.LogFilePath)); 580interactionService.DisplayError(TemplatingStrings.ProjectAlreadyExists); 585interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.ProjectCreationFailed, newProjectExitCode, executionContext.LogFilePath)); 607interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message)); 612interactionService.DisplayError(ex.Message); 617interactionService.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)
1058public void DisplayError(string errorMessage) => _innerService.DisplayError(errorMessage);