8 implementations of DisplayError
aspire (2)
Interaction\ConsoleInteractionService.cs (1)
186
public void
DisplayError
(string errorMessage)
Interaction\ExtensionInteractionService.cs (1)
229
public void
DisplayError
(string errorMessage)
Aspire.Cli.Tests (6)
Commands\NewCommandTests.cs (1)
897
public void
DisplayError
(string errorMessage) { }
Commands\PublishCommandPromptingIntegrationTests.cs (1)
982
public void
DisplayError
(string errorMessage) => DisplayedErrors.Add(errorMessage);
Commands\UpdateCommandTests.cs (1)
962
public void
DisplayError
(string errorMessage) => _innerService.DisplayError(errorMessage);
Templating\DotNetTemplateFactoryTests.cs (1)
430
public void
DisplayError
(string message) { }
TestServices\TestConsoleInteractionService.cs (1)
77
public void
DisplayError
(string errorMessage)
TestServices\TestExtensionInteractionService.cs (1)
65
public void
DisplayError
(string errorMessage)
100 references to DisplayError
aspire (99)
Commands\AddCommand.cs (4)
163
InteractionService.
DisplayError
(AddCommandStrings.NoPackagesFound);
222
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, ExitCodeConstants.FailedToAddPackage));
240
InteractionService.
DisplayError
(ex.Message);
249
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileAddingPackage, ex.Message));
Commands\BaseCommand.cs (6)
63
interactionService.
DisplayError
(InteractionServiceStrings.SpecifiedProjectFileNotAppHostProject);
68
interactionService.
DisplayError
(InteractionServiceStrings.ProjectOptionDoesntExist);
73
interactionService.
DisplayError
(InteractionServiceStrings.ProjectOptionNotSpecifiedMultipleAppHostsFound);
78
interactionService.
DisplayError
(InteractionServiceStrings.ProjectOptionNotSpecifiedNoCsprojFound);
83
interactionService.
DisplayError
(InteractionServiceStrings.UnbuildableAppHostsDetected);
87
interactionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
Commands\CacheCommand.cs (1)
125
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, CacheCommandStrings.CacheClearFailed, ex.Message));
Commands\ConfigCommand.cs (9)
89
InteractionService.
DisplayError
(ErrorStrings.ConfigurationKeyRequired);
113
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
153
InteractionService.
DisplayError
(ErrorStrings.ConfigurationKeyRequired);
159
InteractionService.
DisplayError
(ErrorStrings.ConfigurationValueRequired);
194
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorSettingConfiguration, ex.Message));
311
InteractionService.
DisplayError
(ErrorStrings.ConfigurationKeyRequired);
325
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
359
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
365
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorDeletingConfiguration, ex.Message));
Commands\ExecCommand.cs (9)
106
InteractionService.
DisplayError
(ExecCommandStrings.TargetResourceNotSpecified);
114
InteractionService.
DisplayError
(ExecCommandStrings.NoCommandSpecified);
122
InteractionService.
DisplayError
(ExecCommandStrings.FailedToParseCommand);
148
InteractionService.
DisplayError
(ErrorStrings.CommandNotSupportedWithSingleFileAppHost);
261
InteractionService.
DisplayError
(RunCommandStrings.ProjectCouldNotBeRun);
272
InteractionService.
DisplayError
(RunCommandStrings.ProjectCouldNotBeRun);
294
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message));
299
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message));
305
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
Commands\InitCommand.cs (10)
154
InteractionService.
DisplayError
($"Unknown language: {selectedProject.LanguageId}");
215
InteractionService.
DisplayError
("Failed to get projects from solution.");
362
InteractionService.
DisplayError
("Failed to install Aspire templates.");
389
InteractionService.
DisplayError
($"Failed to create Aspire projects. Exit code: {createResult}");
400
InteractionService.
DisplayError
("Failed to find created AppHost or ServiceDefaults projects in template output.");
442
InteractionService.
DisplayError
($"Failed to add AppHost project to solution. Exit code: {addAppHostResult}");
468
InteractionService.
DisplayError
($"Failed to add ServiceDefaults project to solution. Exit code: {addServiceDefaultsResult}");
500
InteractionService.
DisplayError
($"Failed to add reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}.");
534
InteractionService.
DisplayError
($"Failed to add ServiceDefaults reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}.");
587
InteractionService.
DisplayError
("Single-file AppHost template not found.");
Commands\NewCommand.cs (1)
172
InteractionService.
DisplayError
($"Unknown language: '{explicitLanguage}'");
Commands\PipelineCommandBase.cs (6)
248
InteractionService.
DisplayError
(GetCanceledMessage());
263
InteractionService.
DisplayError
(ex.Message);
271
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message));
283
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.AppHostConnectionLost, ex.Message));
295
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
749
InteractionService.
DisplayError
(error);
Commands\RunCommand.cs (9)
159
InteractionService.
DisplayError
("Unrecognized app host type.");
203
InteractionService.
DisplayError
(InteractionServiceStrings.ProjectCouldNotBeBuilt);
226
InteractionService.
DisplayError
(RunCommandStrings.DashboardFailedToStart);
314
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message.EscapeMarkup()));
319
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message.EscapeMarkup()));
328
InteractionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message.EscapeMarkup()));
758
_interactionService.
DisplayError
(RunCommandStrings.FailedToStartAppHost);
770
_interactionService.
DisplayError
(string.Format(
777
_interactionService.
DisplayError
(RunCommandStrings.TimeoutWaitingForAppHost);
Commands\Sdk\SdkDumpCommand.cs (4)
83
InteractionService.
DisplayError
($"Integration project not found: {integrationProject.FullName}");
89
InteractionService.
DisplayError
($"Expected a .csproj file, got: {integrationProject.Extension}");
96
InteractionService.
DisplayError
("Cannot specify both --json and --ci. Choose one format.");
148
InteractionService.
DisplayError
("Failed to build capability scanner.");
Commands\Sdk\SdkGenerateCommand.cs (4)
72
InteractionService.
DisplayError
($"Integration project not found: {integrationProject.FullName}");
78
InteractionService.
DisplayError
($"Expected a .csproj file, got: {integrationProject.Extension}");
86
InteractionService.
DisplayError
($"Unsupported language: {language}");
149
InteractionService.
DisplayError
("Failed to build SDK generation server.");
Commands\StopCommand.cs (7)
81
_interactionService.
DisplayError
(StopCommandStrings.NoRunningAppHostsFound);
100
_interactionService.
DisplayError
(StopCommandStrings.NoRunningAppHostsFound);
167
_interactionService.
DisplayError
(StopCommandStrings.NoRunningAppHostsFound);
199
_interactionService.
DisplayError
(StopCommandStrings.FailedToStopAppHost);
228
_interactionService.
DisplayError
(StopCommandStrings.FailedToStopAppHost);
234
_interactionService.
DisplayError
(StopCommandStrings.FailedToStopAppHost);
272
_interactionService.
DisplayError
(StopCommandStrings.FailedToStopAppHost);
Commands\UpdateCommand.cs (5)
127
InteractionService.
DisplayError
("CLI self-update is not available in this environment.");
217
InteractionService.
DisplayError
(message);
223
InteractionService.
DisplayError
(message);
280
InteractionService.
DisplayError
("Unable to determine the current executable path.");
317
InteractionService.
DisplayError
($"Failed to update CLI: {ex.Message}");
Projects\GuestAppHostProject.cs (9)
188
_interactionService.
DisplayError
("Failed to build AppHost server.");
360
_interactionService.
DisplayError
("App host exited unexpectedly.");
472
_interactionService.
DisplayError
($"Failed to run {DisplayName} AppHost: {ex.Message}");
620
_interactionService.
DisplayError
("App host exited unexpectedly.");
725
_interactionService.
DisplayError
($"Failed to publish {DisplayName} AppHost: {ex.Message}");
1126
_interactionService.
DisplayError
("GuestRuntime not initialized. This is a bug.");
1133
_interactionService.
DisplayError
($"Failed to install {_resolvedLanguage?.DisplayName ?? "guest"} dependencies.");
1154
_interactionService.
DisplayError
("GuestRuntime not initialized. This is a bug.");
1176
_interactionService.
DisplayError
("GuestRuntime not initialized. This is a bug.");
Projects\LanguageService.cs (1)
114
_interactionService.
DisplayError
($"Unknown language: '{explicitLanguageId}'");
Scaffolding\ScaffoldingService.cs (2)
82
_interactionService.
DisplayError
("Failed to build AppHost server.");
189
_interactionService.
DisplayError
($"Failed to install {language.DisplayName} dependencies.");
Templating\DotNetTemplateFactory.cs (6)
434
interactionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.TemplateInstallationFailed, templateInstallResult.ExitCode));
468
interactionService.
DisplayError
(TemplatingStrings.ProjectAlreadyExists);
473
interactionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.ProjectCreationFailed, newProjectExitCode));
495
interactionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message));
500
interactionService.
DisplayError
(ex.Message);
505
interactionService.
DisplayError
(ex.Message);
Utils\AppHostHelper.cs (4)
23
interactionService.
DisplayError
(ErrorStrings.ProjectCouldNotBeAnalyzed);
29
interactionService.
DisplayError
(ErrorStrings.ProjectIsNotAppHost);
35
interactionService.
DisplayError
(ErrorStrings.CouldNotParseAspireSDKVersion);
42
interactionService.
DisplayError
(string.Format(CultureInfo.CurrentCulture, ErrorStrings.AspireSDKVersionNotSupported, appHostInformation.AspireHostingVersion));
Utils\SdkInstallHelper.cs (2)
51
interactionService.
DisplayError
(sdkErrorMessage);
103
interactionService.
DisplayError
(
Aspire.Cli.Tests (1)
Commands\UpdateCommandTests.cs (1)
962
public void DisplayError(string errorMessage) => _innerService.
DisplayError
(errorMessage);