1 write to InteractionService
aspire (1)
Commands\BaseCommand.cs (1)
36
InteractionService
= interactionService;
340 references to InteractionService
aspire (340)
Commands\AddCommand.cs (16)
88
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, Telemetry, cancellationToken))
115
InteractionService
.DisplayError(ex.Message);
121
var packagesWithChannels = await
InteractionService
.ShowStatusAsync(
171
InteractionService
.DisplayError(AddCommandStrings.NoPackagesFound);
229
InteractionService
.DisplayMessage(KnownEmojis.Information, AddCommandStrings.StoppedRunningInstance);
233
InteractionService
.DisplayError(AddCommandStrings.UnableToStopRunningInstances);
237
var success = await
InteractionService
.ShowStatusAsync(
246
InteractionService
.DisplayLines(outputCollector.GetLines());
248
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, ExitCodeConstants.FailedToAddPackage, ExecutionContext.LogFilePath));
252
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageAddedSuccessfully, selectedNuGetPackage.Package.Id, selectedNuGetPackage.Package.Version));
257
return HandleProjectLocatorException(ex,
InteractionService
, Telemetry);
261
InteractionService
.DisplayCancellationMessage();
267
InteractionService
.DisplayError(ex.Message);
274
InteractionService
.DisplayLines(outputCollector.GetLines());
278
InteractionService
.DisplayError(errorMessage);
328
InteractionService
.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoPackagesMatchedSearchTerm, searchTerm));
Commands\BaseCommand.cs (1)
66
InteractionService
.DisplayEmptyLine();
Commands\CacheCommand.cs (4)
22
var clearCommand = new ClearCommand(
InteractionService
, features, updateNotifier, executionContext, telemetry);
153
InteractionService
.DisplayMessage(KnownEmojis.Information, CacheCommandStrings.CacheAlreadyEmpty);
157
InteractionService
.DisplaySuccess(CacheCommandStrings.CacheCleared);
166
InteractionService
.DisplayError(errorMessage);
Commands\CertificatesCleanCommand.cs (5)
32
InteractionService
.DisplayMessage(KnownEmojis.Information, CertificatesCommandStrings.CleanProgress);
38
InteractionService
.DisplaySuccess(CertificatesCommandStrings.CleanSuccess);
44
InteractionService
.DisplayMessage(KnownEmojis.Warning, CertificatesCommandStrings.CleanCancelled);
49
InteractionService
.DisplayError(details);
50
InteractionService
.DisplayError(CertificatesCommandStrings.CleanFailure);
Commands\CertificatesTrustCommand.cs (5)
33
InteractionService
.DisplayMessage(KnownEmojis.Information, CertificatesCommandStrings.TrustProgress);
39
InteractionService
.DisplaySuccess(CertificatesCommandStrings.TrustSuccess);
45
InteractionService
.DisplayMessage(KnownEmojis.Warning, CertificatesCommandStrings.TrustCancelled);
50
InteractionService
.DisplayError(details);
51
InteractionService
.DisplayError(CertificatesCommandStrings.TrustFailure);
Commands\ConfigCommand.cs (48)
32
var getCommand = new GetCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext, telemetry);
33
var setCommand = new SetCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext, telemetry);
34
var listCommand = new ListCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext, telemetry);
35
var deleteCommand = new DeleteCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext, telemetry);
36
var infoCommand = new InfoCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext, telemetry);
89
InteractionService
.DisplayError(ErrorStrings.ConfigurationKeyRequired);
98
var key = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.GetCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
108
InteractionService
.DisplayPlainText(value);
113
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
152
InteractionService
.DisplayError(ErrorStrings.ConfigurationKeyRequired);
158
InteractionService
.DisplayError(ErrorStrings.ConfigurationValueRequired);
167
var key = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.SetCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
168
var value = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.SetCommand_PromptForValue, required: true, cancellationToken: cancellationToken);
169
var isGlobal = await
InteractionService
.PromptForSelectionAsync(
183
InteractionService
.DisplaySuccess(isGlobal
195
InteractionService
.DisplayError(errorMessage);
229
if (
InteractionService
is ExtensionInteractionService extensionInteractionService)
245
InteractionService
.DisplayMessage(KnownEmojis.Information, ConfigCommandStrings.NoConfigurationValuesFound);
263
InteractionService
.DisplayEmptyLine();
285
InteractionService
.DisplayEmptyLine();
286
InteractionService
.DisplayMarkdown($"**{ConfigCommandStrings.AvailableFeaturesHeader}:**");
293
InteractionService
.DisplayMarkupLine($" [cyan]{feature.Name.EscapeMarkup()}[/] [dim](default: {defaultText})[/]");
294
InteractionService
.DisplayMarkupLine($" [dim]{feature.Description.EscapeMarkup()}[/]");
296
InteractionService
.DisplayEmptyLine();
297
InteractionService
.DisplayMarkupLine($" [dim]{ConfigCommandStrings.SetFeatureHint.EscapeMarkup()}[/]");
301
InteractionService
.DisplayMarkupLine($" [dim]{ConfigCommandStrings.ListCommand_AllFeaturesHint.EscapeMarkup()}[/]");
340
InteractionService
.DisplayRenderable(table);
371
InteractionService
.DisplayError(ErrorStrings.ConfigurationKeyRequired);
380
var key = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.DeleteCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
385
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
389
var isGlobal = await
InteractionService
.PromptForSelectionAsync(
408
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedGlobally, key));
412
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedLocally, key));
419
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
427
InteractionService
.DisplayError(errorMessage);
477
if (
InteractionService
is ConsoleInteractionService consoleService)
484
InteractionService
.DisplayPlainText(json);
489
InteractionService
.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_LocalSettingsPath}:**");
490
InteractionService
.DisplayPlainText($" {localPath}");
491
InteractionService
.DisplayEmptyLine();
492
InteractionService
.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_GlobalSettingsPath}:**");
493
InteractionService
.DisplayPlainText($" {globalPath}");
494
InteractionService
.DisplayEmptyLine();
495
InteractionService
.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_AvailableFeatures}:**");
498
InteractionService
.DisplayMarkupLine($" [cyan]{feature.Name.EscapeMarkup()}[/] - {feature.Description.EscapeMarkup()} [dim](default: {feature.DefaultValue})[/]");
500
InteractionService
.DisplayEmptyLine();
501
InteractionService
.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_SettingsProperties}:**");
505
InteractionService
.DisplayMarkupLine($" {requiredText}[cyan]{property.Name.EscapeMarkup()}[/] ([yellow]{property.Type.EscapeMarkup()}[/]) - {property.Description.EscapeMarkup()}");
Commands\DoCommand.cs (2)
51
if (string.IsNullOrEmpty(step) && ExtensionHelper.IsExtensionHost(
InteractionService
, out _, out _))
53
step = await
InteractionService
.PromptForStringAsync(
Commands\DocsGetCommand.cs (4)
71
var doc = await
InteractionService
.ShowStatusAsync(
77
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, DocsCommandStrings.DocumentNotFound, slug));
85
InteractionService
.DisplayRawText(json, ConsoleOutput.Standard);
92
InteractionService
.DisplayRawText(formatted, ConsoleOutput.Standard);
Commands\DocsListCommand.cs (5)
58
var docs = await
InteractionService
.ShowStatusAsync(
64
InteractionService
.DisplayError(DocsCommandStrings.NoDocumentationAvailable);
72
InteractionService
.DisplayRawText(json, ConsoleOutput.Standard);
76
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, DocsCommandStrings.FoundDocumentationPages, docs.Count));
91
InteractionService
.DisplayRenderable(table);
Commands\DocsSearchCommand.cs (5)
72
var response = await
InteractionService
.ShowStatusAsync(
78
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, DocsCommandStrings.NoResultsFound, query));
86
InteractionService
.DisplayRawText(json, ConsoleOutput.Standard);
90
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, DocsCommandStrings.FoundSearchResults, response.Results.Count, query));
108
InteractionService
.DisplayRenderable(table);
Commands\DoctorCommand.cs (2)
48
var results = await
InteractionService
.ShowStatusAsync(
86
InteractionService
.DisplayRawText(json, ConsoleOutput.Standard);
Commands\ExecCommand.cs (23)
74
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, Telemetry, cancellationToken))
90
InteractionService
.DisplayError(ExecCommandStrings.TargetResourceNotSpecified);
98
InteractionService
.DisplayError(ExecCommandStrings.NoCommandSpecified);
106
InteractionService
.DisplayError(ExecCommandStrings.FailedToParseCommand);
132
InteractionService
.DisplayError(ErrorStrings.CommandNotSupportedWithSingleFileAppHost);
144
appHostCompatibilityCheck = await AppHostHelper.CheckAppHostCompatibilityAsync(_runner,
InteractionService
, effectiveAppHostProjectFile, Telemetry, ExecutionContext.WorkingDirectory, ExecutionContext.LogFilePath, cancellationToken);
183
backchannel = await
InteractionService
.ShowStatusAsync(
191
InteractionService
.DisplayMessage(KnownEmojis.Bug, InteractionServiceStrings.WaitingForDebuggerToAttachToAppHost);
201
commandExitCode = await
InteractionService
.ShowStatusAsync<int?>(
210
InteractionService
.WriteConsoleLog(output.Text, output.LineNumber, output.Type, output.IsErrorMessage);
224
_ = await
InteractionService
.ShowStatusAsync<int>(
245
InteractionService
.DisplayLines(runOutputCollector.GetLines());
246
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, RunCommandStrings.ProjectCouldNotBeRun, ExecutionContext.LogFilePath));
256
InteractionService
.DisplayLines(runOutputCollector.GetLines());
257
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, RunCommandStrings.ProjectCouldNotBeRun, ExecutionContext.LogFilePath));
263
InteractionService
.DisplayCancellationMessage();
268
return HandleProjectLocatorException(ex,
InteractionService
, Telemetry);
273
return
InteractionService
.DisplayIncompatibleVersionError(
282
InteractionService
.DisplayError(errorMessage);
289
InteractionService
.DisplayError(errorMessage);
290
InteractionService
.DisplayLines(runOutputCollector.GetLines());
297
InteractionService
.DisplayError(errorMessage);
298
InteractionService
.DisplayLines(runOutputCollector.GetLines());
Commands\ExtensionInternalCommand.cs (1)
52
InteractionService
.DisplayRawText(json, ConsoleOutput.Standard);
Commands\InitCommand.cs (63)
142
InteractionService
.DisplayError($"Unknown language: {selectedProject.LanguageId}");
146
InteractionService
.DisplayEmptyLine();
147
InteractionService
.DisplayMessage(KnownEmojis.Information, $"Creating {languageInfo.DisplayName} AppHost...");
148
InteractionService
.DisplayEmptyLine();
150
return await _agentInitCommand.PromptAndChainAsync(_hostEnvironment,
InteractionService
, polyglotResult, _executionContext.WorkingDirectory, cancellationToken);
154
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, Telemetry, cancellationToken))
169
InteractionService
.DisplayEmptyLine();
170
InteractionService
.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.SolutionDetected, initContext.SelectedSolutionFile.Name));
171
InteractionService
.DisplayEmptyLine();
177
InteractionService
.DisplayEmptyLine();
178
InteractionService
.DisplayMessage(KnownEmojis.Information, InitCommandStrings.NoSolutionFoundCreatingSingleFileAppHost);
179
InteractionService
.DisplayEmptyLine();
184
return await _agentInitCommand.PromptAndChainAsync(_hostEnvironment,
InteractionService
, initResult, workspaceRoot, cancellationToken);
201
InteractionService
.DisplayError(
211
var (getSolutionExitCode, solutionProjects) = await
InteractionService
.ShowStatusAsync("Reading solution...", async () =>
227
InteractionService
.DisplayLines(initContext.GetSolutionProjectsOutputCollector.GetLines());
228
InteractionService
.DisplayError("Failed to get projects from solution.");
234
_ = await
InteractionService
.ShowStatusAsync("Evaluating existing projects...", async () =>
244
InteractionService
.DisplayMessage(KnownEmojis.CheckMark, InitCommandStrings.SolutionAlreadyInitialized);
260
InteractionService
.DisplayEmptyLine();
261
InteractionService
.DisplayMarkdown(addExecutableProjectsMessage);
262
InteractionService
.DisplayEmptyLine();
264
var selectedProjects = await
InteractionService
.PromptForSelectionsAsync(
275
InteractionService
.DisplayEmptyLine();
276
InteractionService
.DisplayMessage(KnownEmojis.Information, "The following projects will be added to the AppHost:");
277
InteractionService
.DisplayEmptyLine();
281
InteractionService
.DisplayMessage(KnownEmojis.CheckBoxWithCheck, project.ProjectFile.Name);
293
InteractionService
.DisplayEmptyLine();
294
InteractionService
.DisplayMarkdown(addServiceDefaultsMessage);
295
InteractionService
.DisplayEmptyLine();
304
var selection = await
InteractionService
.PromptForSelectionAsync(
317
initContext.ProjectsToAddServiceDefaultsTo = await
InteractionService
.PromptForSelectionsAsync(
336
var nugetConfigPrompter = new NuGetConfigPrompter(
InteractionService
);
353
var templateInstallResult = await
InteractionService
.ShowStatusAsync(
375
InteractionService
.DisplayLines(initContext.InstallTemplateOutputCollector.GetLines());
376
InteractionService
.DisplayError("Failed to install Aspire templates.");
381
var createResult = await
InteractionService
.ShowStatusAsync(
402
InteractionService
.DisplayLines(initContext.NewProjectOutputCollector.GetLines());
403
InteractionService
.DisplayError($"Failed to create Aspire projects. Exit code: {createResult}");
414
InteractionService
.DisplayError("Failed to find created AppHost or ServiceDefaults projects in template output.");
436
var addAppHostResult = await
InteractionService
.ShowStatusAsync(
455
InteractionService
.DisplayLines(initContext.AddAppHostToSolutionOutputCollector.GetLines());
456
InteractionService
.DisplayError($"Failed to add AppHost project to solution. Exit code: {addAppHostResult}");
462
var addServiceDefaultsResult = await
InteractionService
.ShowStatusAsync(
481
InteractionService
.DisplayLines(initContext.AddServiceDefaultsToSolutionOutputCollector.GetLines());
482
InteractionService
.DisplayError($"Failed to add ServiceDefaults project to solution. Exit code: {addServiceDefaultsResult}");
495
var addRefResult = await
InteractionService
.ShowStatusAsync(
513
InteractionService
.DisplayLines(outputCollector.GetLines());
514
InteractionService
.DisplayError($"Failed to add reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}.");
529
var addRefResult = await
InteractionService
.ShowStatusAsync(
547
InteractionService
.DisplayLines(outputCollector.GetLines());
548
InteractionService
.DisplayError($"Failed to add ServiceDefaults reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}.");
557
InteractionService
.DisplaySuccess(InitCommandStrings.AspireInitializationComplete);
581
InteractionService
.DisplayMessage(KnownEmojis.CheckMark, $"{appHostFileName} already exists in this directory.");
594
InteractionService
.DisplaySuccess($"Created {appHostFileName}");
595
InteractionService
.DisplayMessage(KnownEmojis.Information, $"Run 'aspire run' to start your AppHost.");
606
InteractionService
.DisplayError("Single-file AppHost template not found.");
625
InteractionService
.DisplaySuccess(InitCommandStrings.AspireInitializationComplete);
718
var allChannels = await
InteractionService
.ShowStatusAsync(
751
var packagesFromChannels = await
InteractionService
.ShowStatusAsync("Searching for available template versions...", async () =>
801
InteractionService
.DisplayEmptyLine();
802
InteractionService
.DisplayMarkdown(templateSelectionMessage);
803
InteractionService
.DisplayEmptyLine();
Commands\McpInitCommand.cs (2)
60
InteractionService
.DisplayMarkupLine($"[yellow]⚠ {McpCommandStrings.DeprecatedCommandWarning}[/]");
61
InteractionService
.DisplayEmptyLine();
Commands\McpStartCommand.cs (1)
39
InteractionService
.DisplayMarkupLine($"[yellow]⚠ {McpCommandStrings.DeprecatedCommandWarning}[/]");
Commands\NewCommand.cs (8)
112
var templateCommand = new TemplateCommand(template, ExecuteAsync, features, updateNotifier, executionContext,
InteractionService
, Telemetry);
151
InteractionService
.DisplayError($"Template '{parseResult.CommandResult.Command.Name}' is not available. Ensure the required runtime is installed.");
158
InteractionService
.DisplayError("No templates are available for the current environment.");
168
InteractionService
.DisplayPlainText($"{NewCommandStrings.SelectAProjectTemplate} {result.Description}");
188
return await
InteractionService
.ShowStatusAsync(
255
InteractionService
.DisplayError(resolveResult.ErrorMessage);
273
if (templateResult.OutputPath is not null && ExtensionHelper.IsExtensionHost(
InteractionService
, out var extensionInteractionService, out _))
279
return await _agentInitCommand.PromptAndChainAsync(_hostEnvironment,
InteractionService
, templateResult.ExitCode, workspaceRoot, cancellationToken);
Commands\PipelineCommandBase.cs (30)
130
if (ExtensionHelper.IsExtensionHost(
InteractionService
, out var extensionInteractionService, out _)
220
InteractionService
.DisplayMessage(KnownEmojis.Bug, InteractionServiceStrings.WaitingForDebuggerToAttachToAppHost);
223
var backchannel = await
InteractionService
.ShowStatusAsync(GetProgressMessage(parseResult), async () =>
242
&& ExtensionHelper.IsExtensionHost(
InteractionService
, out _, out _))
278
InteractionService
.DisplayLines(outputCollector.GetLines());
300
InteractionService
.DisplayError(canceledMessage);
307
return HandleProjectLocatorException(ex,
InteractionService
, Telemetry);
320
InteractionService
.DisplayError(ex.Message);
329
InteractionService
.DisplayError(errorMessage);
332
InteractionService
.DisplayLines(outputCollector.GetLines());
342
InteractionService
.DisplayError(errorMessage);
345
InteractionService
.DisplayLines(outputCollector.GetLines());
355
InteractionService
.DisplayError(errorMessage);
358
InteractionService
.DisplayLines(outputCollector.GetLines());
395
InteractionService
.DisplaySubtleMessage($"[[DEBUG]] Step {stepCounter++}: {statusText}", allowMarkup: true);
404
InteractionService
.DisplaySubtleMessage($"[[DEBUG]] Step {activity.Data.Id}: {status} - {statusText}", allowMarkup: true);
439
InteractionService
.DisplaySubtleMessage(formattedMessage, allowMarkup: true);
450
InteractionService
.DisplaySubtleMessage($"[[DEBUG]] Task {activity.Data.Id} ({stepId}): {status} - {statusText}", allowMarkup: true);
454
InteractionService
.DisplaySubtleMessage($"[[DEBUG]] {completionMessage}", allowMarkup: true);
460
InteractionService
.DisplaySubtleMessage($"[[DEBUG]] Task {activity.Data.Id} ({stepId}): {statusText}", allowMarkup: true);
472
InteractionService
.DisplaySubtleMessage($"[[DEBUG]] {OperationCompletedPrefix}: {status} - {statusText}", allowMarkup: true);
811
InteractionService
.DisplayError(error);
817
InputType.Text => await
InteractionService
.PromptForStringAsync(
823
InputType.SecretText => await
InteractionService
.PromptForStringAsync(
832
InputType.Boolean => (await
InteractionService
.ConfirmAsync(promptText, defaultValue: ParseBooleanValue(input.Value), cancellationToken: cancellationToken)).ToString().ToLowerInvariant(),
836
_ => await
InteractionService
.PromptForStringAsync(promptText, defaultValue: input.Value?.EscapeMarkup(), required: input.Required, cancellationToken: cancellationToken)
844
return await
InteractionService
.PromptForStringAsync(promptText, defaultValue: input.Value?.EscapeMarkup(), required: input.Required, cancellationToken: cancellationToken);
858
var (value, displayText) = await
InteractionService
.PromptForSelectionAsync(
866
return await
InteractionService
.PromptForStringAsync(promptText, defaultValue: input.Value?.EscapeMarkup(), required: input.Required, cancellationToken: cancellationToken);
886
return await
InteractionService
.PromptForStringAsync(
Commands\RenderCommand.cs (24)
56
var choice = await
InteractionService
.PromptForSelectionAsync(
91
InteractionService
.DisplayMessage(emoji, $"DisplayMessage with {emoji.Name}");
101
await
InteractionService
.ShowStatusAsync(
116
await
InteractionService
.ShowStatusAsync(
131
await
InteractionService
.ShowStatusAsync(
145
InteractionService
.DisplayMessage(KnownEmojis.Rocket, "Starting mixed methods test...");
146
InteractionService
.DisplayEmptyLine();
148
InteractionService
.DisplaySuccess("Step 1 complete!");
149
InteractionService
.DisplaySubtleMessage("This is a subtle hint.");
150
InteractionService
.DisplayMessage(KnownEmojis.MagnifyingGlassTiltedLeft, "Searching for [packages]...");
151
InteractionService
.DisplayEmptyLine();
153
InteractionService
.DisplayMarkupLine("[bold green]Bold green markup[/] and [dim]dim text[/]");
154
InteractionService
.DisplayPlainText("Plain text with [brackets] that should appear literally.");
155
InteractionService
.DisplayEmptyLine();
157
await
InteractionService
.ShowStatusAsync(
166
InteractionService
.ShowStatus(
171
InteractionService
.DisplayEmptyLine();
173
var name = await
InteractionService
.PromptForStringAsync(
178
InteractionService
.DisplayMessage(KnownEmojis.CheckMark, $"You entered: {name}");
180
var confirmed = await
InteractionService
.ConfirmAsync(
187
InteractionService
.DisplaySuccess("Confirmed!");
191
InteractionService
.DisplayError("Cancelled.");
194
InteractionService
.DisplayEmptyLine();
195
InteractionService
.DisplayMessage(KnownEmojis.StopSign, "Mixed methods test complete.");
Commands\RestoreCommand.cs (6)
83
InteractionService
.DisplayError(RestoreCommandStrings.UnrecognizedAppHostType);
89
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, Telemetry, cancellationToken))
132
InteractionService
.DisplayError(RestoreCommandStrings.UnrecognizedAppHostType);
137
InteractionService
.DisplayCancellationMessage();
142
return HandleProjectLocatorException(ex,
InteractionService
, Telemetry);
148
InteractionService
.DisplayError(errorMessage);
Commands\RunCommand.cs (25)
117
if (ExtensionHelper.IsExtensionHost(
InteractionService
, out _, out _))
137
var isExtensionHost = ExtensionHelper.IsExtensionHost(
InteractionService
, out _, out _);
148
InteractionService
.DisplayError(RunCommandStrings.FormatRequiresDetach);
157
InteractionService
.DisplayError(RunCommandStrings.NoBuildNotSupportedWithWatchMode);
169
if (ExtensionHelper.IsExtensionHost(
InteractionService
, out var extensionInteractionService, out _)
195
InteractionService
.DisplayError("Unrecognized app host type.");
207
InteractionService
.DisplayMessage(KnownEmojis.Warning, RunCommandStrings.IsolatedModeRunningInstanceWarning);
242
InteractionService
.DisplayLines(outputCollector.GetLines());
244
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ProjectCouldNotBeBuilt, ExecutionContext.LogFilePath));
251
InteractionService
.DisplayMessage(KnownEmojis.Bug, InteractionServiceStrings.WaitingForDebuggerToAttachToAppHost);
255
var backchannel = await
InteractionService
.ShowStatusAsync(
263
var dashboardUrls = await
InteractionService
.ShowStatusAsync(
269
InteractionService
.DisplayError(RunCommandStrings.DashboardFailedToStart);
276
InteractionService
,
339
await
InteractionService
.DisplayLiveAsync(BuildLiveRenderable(), async updateTarget =>
358
if (ExtensionHelper.IsExtensionHost(
InteractionService
, out var extInteractionService, out _))
369
InteractionService
.DisplayCancellationMessage();
374
return HandleProjectLocatorException(ex,
InteractionService
, Telemetry);
379
return
InteractionService
.DisplayIncompatibleVersionError(ex, ex.AspireHostingVersion ?? ex.RequiredCapability);
385
InteractionService
.DisplayError(errorMessage);
392
InteractionService
.DisplayError(errorMessage);
394
InteractionService
.DisplayMessage(KnownEmojis.PageFacingUp, string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.SeeLogsAt, ExecutionContext.LogFilePath));
407
InteractionService
.DisplayError(errorMessage);
409
InteractionService
.DisplayMessage(KnownEmojis.PageFacingUp, string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.SeeLogsAt, ExecutionContext.LogFilePath));
433
InteractionService
.DisplayRenderable(BuildCtrlCRenderable(longestLocalizedLengthWithColon));
Commands\Sdk\SdkDumpCommand.cs (8)
85
InteractionService
.DisplayError($"Integration project not found: {projectFile.FullName}");
101
InteractionService
.DisplayError($"Invalid package format '{arg}'. Expected PackageName@Version (e.g. Aspire.Hosting.Redis@9.2.0).");
107
InteractionService
.DisplayError($"Invalid version '{packageVersion}' in '{arg}'. Expected a valid NuGet version (e.g. 9.2.0).");
116
InteractionService
.DisplayError($"Invalid integration argument '{arg}'. Expected a .csproj path or PackageName@Version format.");
127
return await
InteractionService
.ShowStatusAsync(
156
InteractionService
.DisplayError("Failed to build capability scanner.");
161
InteractionService
.DisplayMessage(KnownEmojis.Wrench, line);
217
InteractionService
.DisplaySuccess($"Capabilities written to {outputFile.FullName}");
Commands\Sdk\SdkGenerateCommand.cs (7)
71
InteractionService
.DisplayError($"Integration project not found: {integrationProject.FullName}");
77
InteractionService
.DisplayError($"Expected a .csproj file, got: {integrationProject.Extension}");
85
InteractionService
.DisplayError($"Unsupported language: {language}");
95
return await
InteractionService
.ShowStatusAsync(
150
InteractionService
.DisplayError("Failed to build SDK generation server.");
155
InteractionService
.DisplayMessage(KnownEmojis.Wrench, line);
195
InteractionService
.DisplaySuccess($"Generated {generatedFiles.Count} files in {outputDir.FullName}");
Commands\SecretDeleteCommand.cs (3)
52
InteractionService
.DisplayError(SecretCommandStrings.CouldNotFindAppHost);
58
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, SecretCommandStrings.SecretNotFound, key.EscapeMarkup()));
63
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, SecretCommandStrings.SecretDeleteSuccess, key));
Commands\SecretGetCommand.cs (3)
52
InteractionService
.DisplayError(SecretCommandStrings.CouldNotFindAppHost);
59
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, SecretCommandStrings.SecretNotFound, key.EscapeMarkup()));
64
InteractionService
.DisplayPlainText(value);
Commands\SecretListCommand.cs (4)
52
InteractionService
.DisplayError(SecretCommandStrings.CouldNotFindAppHost);
67
InteractionService
.DisplayRawText(json, ConsoleOutput.Standard);
73
InteractionService
.DisplayMessage(KnownEmojis.Information, SecretCommandStrings.NoSecretsConfigured);
88
InteractionService
.DisplayRenderable(table);
Commands\SecretPathCommand.cs (2)
42
InteractionService
.DisplayError(SecretCommandStrings.CouldNotFindAppHost);
46
InteractionService
.DisplayPlainText(result.Store.FilePath);
Commands\SecretSetCommand.cs (2)
60
InteractionService
.DisplayError(SecretCommandStrings.CouldNotFindAppHost);
67
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, SecretCommandStrings.SecretSetSuccess, key));
Commands\SetupCommand.cs (7)
55
InteractionService
.DisplayError("Could not determine the CLI executable path.");
67
InteractionService
.DisplayError("Could not determine the installation path.");
73
var exitCode = await
InteractionService
.ShowStatusAsync(
84
InteractionService
.DisplayMessage(KnownEmojis.Information, "This CLI binary does not contain an embedded bundle. No extraction needed.");
88
InteractionService
.DisplayMessage(KnownEmojis.CheckMark, "Bundle is already extracted and up to date. Use --force to re-extract.");
92
InteractionService
.DisplayMessage(KnownEmojis.CheckMark, $"Bundle extracted to {installPath}");
96
InteractionService
.DisplayError($"Bundle was extracted to {installPath} but layout validation failed.");
Commands\UpdateCommand.cs (24)
116
InteractionService
.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage);
117
InteractionService
.DisplayPlainText(" dotnet tool update -g Aspire.Cli");
123
InteractionService
.DisplayError("CLI self-update is not available in this environment.");
133
InteractionService
.DisplayCancellationMessage();
155
var allChannels = await
InteractionService
.ShowStatusAsync(
179
channel = await
InteractionService
.PromptForSelectionAsync(
207
var shouldUpdateCli = await
InteractionService
.ConfirmAsync(
223
InteractionService
.DisplayError(message);
230
InteractionService
.DisplayError(message);
241
var shouldUpdateCli = await
InteractionService
.ConfirmAsync(
253
return HandleProjectLocatorException(ex,
InteractionService
, Telemetry);
257
InteractionService
.DisplayCancellationMessage();
277
channel = await
InteractionService
.PromptForSelectionAsync(
290
InteractionService
.DisplayError("Unable to determine the current executable path.");
294
InteractionService
.DisplayMessage(KnownEmojis.Package, $"Current CLI location: {currentExePath}");
295
InteractionService
.DisplayMessage(KnownEmojis.UpButton, $"Updating to channel: {channel}");
321
InteractionService
.DisplayCancellationMessage();
328
InteractionService
.DisplayError(errorMessage);
355
await
InteractionService
.ShowStatusAsync(
364
InteractionService
.DisplayMessage(KnownEmojis.Package, UpdateCommandStrings.ExtractedNewCli);
378
InteractionService
.DisplayMessage(KnownEmojis.FloppyDisk, "Backing up current CLI...");
391
InteractionService
.DisplayMessage(KnownEmojis.Wrench, $"Installing new CLI to {installDir}...");
418
InteractionService
.DisplayMessage(KnownEmojis.Information, $"Note: {installDir} is not in your PATH. Add it to use the updated CLI globally.");
509
InteractionService
.DisplaySuccess($"Updated to version: {version}");