127 references to UpdateCommandStrings
aspire (99)
Commands\UpdateCommand.cs (33)
45
private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project",
UpdateCommandStrings
.ProjectArgumentDescription);
48
Description =
UpdateCommandStrings
.SelfOptionDescription
52
Description =
UpdateCommandStrings
.YesOptionDescription,
57
Description =
UpdateCommandStrings
.MigrateOptionDescription
61
Description =
UpdateCommandStrings
.NuGetConfigDirOptionDescription
79
: base("update",
UpdateCommandStrings
.Description, services)
109
?
UpdateCommandStrings
.ChannelOptionDescriptionWithStaging
110
:
UpdateCommandStrings
.ChannelOptionDescription
118
?
UpdateCommandStrings
.QualityOptionDescriptionWithStaging
119
:
UpdateCommandStrings
.QualityOptionDescription,
166
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
177
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
271
UpdateCommandStrings
.CheckingForUpdates,
296
UpdateCommandStrings
.NoChannelFoundMatching,
353
UpdateCommandStrings
.SelectChannelPrompt,
418
UpdateCommandStrings
.UpdateCliAfterProjectUpdatePrompt,
427
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
435
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
470
UpdateCommandStrings
.NoAppHostFoundUpdateCliPrompt,
536
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.PendingMigrationsHeader);
542
InteractionService.DisplaySubtleMessage(
UpdateCommandStrings
.PendingMigrationsHint);
586
InteractionService.DisplayMessage(KnownEmojis.Warning,
UpdateCommandStrings
.MigrationApplyFailedWarning);
630
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
635
UpdateCommandStrings
.UpdateCliBeforeGuestProjectUpdatePrompt,
647
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
649
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
656
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
658
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
665
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
709
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NixSelfUpdateMessage);
826
UpdateCommandStrings
.ExtractingNewCli,
834
InteractionService.DisplayMessage(KnownEmojis.Package,
UpdateCommandStrings
.ExtractedNewCli);
924
string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.NoWritePermissionToInstallDirectory, installDir));
Projects\GuestAppHostProject.cs (6)
1752
UpdateCommandStrings
.AnalyzingProjectStatus,
1820
_interactionService.DisplayMessage(KnownEmojis.CheckMarkButton,
UpdateCommandStrings
.ProjectUpToDateMessage);
1841
if (!await _interactionService.PromptConfirmAsync(
UpdateCommandStrings
.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken))
1870
UpdateCommandStrings
.RegeneratingSdkCode,
1901
_interactionService.DisplayMessage(KnownEmojis.Package,
UpdateCommandStrings
.RegeneratedSdkCode);
1905
_interactionService.DisplaySuccess(
UpdateCommandStrings
.UpdateSuccessfulMessage);
Projects\ProjectUpdater.cs (46)
37
var (projectSteps, fallbackUsed) = await interactionService.ShowStatusAsync(
UpdateCommandStrings
.AnalyzingProjectStatus, () => GetUpdateStepsAsync(projectFile, channel, cancellationToken));
44
interactionService.DisplayMessage(KnownEmojis.CheckMarkButton,
UpdateCommandStrings
.ProjectUpToDateMessage);
83
interactionService.DisplayMessage(KnownEmojis.Warning, $"[yellow]{
UpdateCommandStrings
.FallbackParsingWarning}[/]", allowMarkup: true);
87
if (!await interactionService.PromptConfirmAsync(
UpdateCommandStrings
.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken))
98
throw new ProjectUpdaterException(
UpdateCommandStrings
.FailedDiscoverNuGetConfig);
118
_ => throw new InvalidOperationException(
UpdateCommandStrings
.UnexpectedCodePath)
146
promptText:
UpdateCommandStrings
.WhichDirectoryNuGetConfigPrompt,
161
UpdateCommandStrings
.ApplyingUpdates,
166
interactionService.DisplaySubtleMessage(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.ExecutingUpdateStepFormat, updateStep.Description));
196
UpdateCommandStrings
.RestoringPackagesAfterUpdate,
203
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedToRestoreAfterUpdateFormat, projectFile.FullName));
211
interactionService.DisplaySuccess(
UpdateCommandStrings
.UpdateSuccessfulMessage);
232
var appHostAnalyzeStep = new AnalyzeStep(
UpdateCommandStrings
.AnalyzeAppHost, () => AnalyzeAppHostAsync(context, cancellationToken));
265
UpdateCommandStrings
.UpdateChannelStepDescriptionFormat,
266
existingChannel ??
UpdateCommandStrings
.ChannelNonePlaceholder,
273
UpdateCommandStrings
.UpdatePackageFormat,
331
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedFetchItemsAndPropertiesFormat, projectFile.FullName));
374
var appHostSdkAnalyzeStep = new AnalyzeStep(
UpdateCommandStrings
.AnalyzeAppHostSdk, () => AnalyzeAppHostSdkAsync(context, cancellationToken));
377
var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken));
401
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.NoPackageFoundFormat, packageId, context.Channel.Name));
404
logger.LogWarning(
UpdateCommandStrings
.PackageNotFoundInChannelWarningFormat, packageId, context.Channel.Name);
447
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, "Aspire.AppHost.Sdk", sdkVersion ?? "unknown", latestSdkPackage?.Version),
469
UpdateCommandStrings
.RemovedObsoleteAppHostPackage,
496
UpdateCommandStrings
.RemovedObsoleteAppHostPackage,
679
UpdateCommandStrings
.MigratedToNewSdkFormat, package.Version));
684
interactionService.DisplaySubtleMessage(
UpdateCommandStrings
.RemovedObsoleteAppHostPackage);
708
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindRootProjectElementFormat, projectFile.FullName));
726
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindSdkElementFormat, projectFile.FullName));
981
var referencedProjectPath = projectReference.GetProperty("FullPath").GetString() ?? throw new ProjectUpdaterException(
UpdateCommandStrings
.ProjectReferenceNoFullPath);
983
context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken)));
992
var packageId = packageReference.GetProperty("Identity").GetString() ?? throw new ProjectUpdaterException(
UpdateCommandStrings
.PackageReferenceNoIdentity);
1072
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, packageId, packageVersion, latestPackage.Version),
1108
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, packageId, currentVersion, latestPackage.Version),
1225
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName));
1253
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName));
1265
interactionService.DisplayPlainText(
UpdateCommandStrings
.NoChangesDetectedInNuGetConfig);
1272
UpdateCommandStrings
.ApplyChangesToNuGetConfig,
1408
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AddedFeedFormat, feed.Value));
1415
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, pattern));
1424
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.RemovedFeedFormat, feed.Value));
1431
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.RetainedFeedFormat, feed.Value));
1439
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, pattern));
1445
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingRemovedFormat, pattern));
1459
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingRetainedFormat, pattern));
1543
? $"[grey]{
UpdateCommandStrings
.ChannelNonePlaceholder.EscapeMarkup()}[/]"
1551
? $"[grey]{
UpdateCommandStrings
.SdkVersionUnknownPlaceholder.EscapeMarkup()}[/]"
Projects\RepositoryToolUpdater.cs (13)
95
if (await interactionService.PromptConfirmAsync(
UpdateCommandStrings
.PerformUpdatesPrompt, confirmBinding, cancellationToken: cancellationToken))
124
UpdateCommandStrings
.UnsupportedToolVersionFormat, manifest.File.FullName, reference.Version));
145
interactionService.DisplayMessage(KnownEmojis.CheckMarkButton,
UpdateCommandStrings
.RepositoryToolsUpToDate);
152
string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.RepositoryToolUpdateFormat,
165
interactionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.RestoreRepositoryDotNetTool);
169
interactionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.RestoreRepositoryNpmTool);
190
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.ToolManifestChangedFormat, original.File.FullName));
230
interactionService.DisplaySuccess(
UpdateCommandStrings
.RepositoryToolsUpdated);
251
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.NoPackageFoundFormat, DotNetPackageId, channel.Name));
262
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.FailedResolveNpmToolFormat, version ?? "latest"));
269
UpdateCommandStrings
.NoPackageFoundFormat, DotNetPackageId, channel.Name));
310
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.FailedReadToolManifestFormat, path, ex.Message));
315
: UpdateStep(
UpdateCommandStrings
.UpdateRepositoryTools, Callback)
Resources\UpdateCommandStrings.Designer.cs (1)
42
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.UpdateCommandStrings", typeof(
UpdateCommandStrings
).Assembly);
Aspire.Cli.Tests (28)
Commands\UpdateCommandRepositoryToolsTests.cs (13)
69
Assert.Contains(
UpdateCommandStrings
.RepositoryToolsUpdated, interaction.DisplayedSuccess);
97
expectedGuidance.Add(
UpdateCommandStrings
.RestoreRepositoryDotNetTool);
105
expectedGuidance.Add(
UpdateCommandStrings
.RestoreRepositoryNpmTool);
176
Assert.Equal(
UpdateCommandStrings
.RepositoryToolsUpdated, Assert.Single(interaction.DisplayedSuccess));
179
.Where(message => message.Message ==
UpdateCommandStrings
.RestoreRepositoryDotNetTool || message.Message ==
UpdateCommandStrings
.RestoreRepositoryNpmTool)
181
Assert.Contains(interaction.DisplayedMessages, message => message.Message ==
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
237
Assert.Equal(
UpdateCommandStrings
.PerformUpdatesPrompt, prompt);
259
UpdateCommandStrings
.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken);
450
if (prompt !=
UpdateCommandStrings
.PerformUpdatesPrompt)
452
Assert.Equal(
UpdateCommandStrings
.ApplyChangesToNuGetConfig, prompt);
519
Assert.Single(interaction.BooleanPromptCalls, call => call.PromptText ==
UpdateCommandStrings
.PerformUpdatesPrompt);
525
Assert.Contains(
UpdateCommandStrings
.RepositoryToolsUpdated, interaction.DisplayedSuccess);
Commands\UpdateCommandTests.cs (6)
59
Assert.Equal(
UpdateCommandStrings
.ChannelOptionDescriptionWithStaging, channelOption.Description);
1011
Assert.Contains(interactionService.DisplayedMessages, m => m.Message ==
UpdateCommandStrings
.PendingMigrationsHeader);
1013
Assert.Contains(
UpdateCommandStrings
.PendingMigrationsHint, subtleMessages);
3386
UpdateCommandStrings
.NixSelfUpdateMessage,
3387
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage
3389
: [
UpdateCommandStrings
.NixSelfUpdateMessage];
Projects\GuestAppHostProjectTests.cs (4)
1218
[
UpdateCommandStrings
.RepositoryToolsUpdated,
UpdateCommandStrings
.UpdateSuccessfulMessage],
2023
Assert.Equal(
UpdateCommandStrings
.RegeneratedSdkCode, m.Message);
2123
Assert.Equal(
UpdateCommandStrings
.RegeneratedSdkCode, m.Message);
Projects\RepositoryToolUpdaterTests.cs (5)
245
Assert.Contains(interaction.DisplayedMessages, message => message.Message ==
UpdateCommandStrings
.RestoreRepositoryDotNetTool);
303
Assert.Contains(interaction.DisplayedMessages, message => message.Message ==
UpdateCommandStrings
.RestoreRepositoryNpmTool);
349
Assert.Contains(interaction.DisplayedMessages, message => message.Message ==
UpdateCommandStrings
.RepositoryToolsUpToDate);
687
Assert.Equal(
UpdateCommandStrings
.RepositoryToolsUpdated, Assert.Single(interaction.DisplayedSuccess));
717
Assert.Equal(string.Format(
UpdateCommandStrings
.ToolManifestChangedFormat, npmPath), exception.Message);