93 references to UpdateCommandStrings
aspire (85)
Commands\UpdateCommand.cs (32)
44
private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project",
UpdateCommandStrings
.ProjectArgumentDescription);
47
Description =
UpdateCommandStrings
.SelfOptionDescription
51
Description =
UpdateCommandStrings
.YesOptionDescription,
56
Description =
UpdateCommandStrings
.MigrateOptionDescription
60
Description =
UpdateCommandStrings
.NuGetConfigDirOptionDescription
77
: base("update",
UpdateCommandStrings
.Description, services)
106
?
UpdateCommandStrings
.ChannelOptionDescriptionWithStaging
107
:
UpdateCommandStrings
.ChannelOptionDescription
115
?
UpdateCommandStrings
.QualityOptionDescriptionWithStaging
116
:
UpdateCommandStrings
.QualityOptionDescription,
163
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
174
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
249
UpdateCommandStrings
.CheckingForUpdates,
274
UpdateCommandStrings
.NoChannelFoundMatching,
331
UpdateCommandStrings
.SelectChannelPrompt,
383
UpdateCommandStrings
.UpdateCliAfterProjectUpdatePrompt,
392
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
400
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
435
UpdateCommandStrings
.NoAppHostFoundUpdateCliPrompt,
501
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.PendingMigrationsHeader);
507
InteractionService.DisplaySubtleMessage(
UpdateCommandStrings
.PendingMigrationsHint);
551
InteractionService.DisplayMessage(KnownEmojis.Warning,
UpdateCommandStrings
.MigrationApplyFailedWarning);
581
UpdateCommandStrings
.UpdateCliBeforeGuestProjectUpdatePrompt,
593
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
595
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
602
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
604
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
611
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
655
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NixSelfUpdateMessage);
772
UpdateCommandStrings
.ExtractingNewCli,
780
InteractionService.DisplayMessage(KnownEmojis.Package,
UpdateCommandStrings
.ExtractedNewCli);
870
string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.NoWritePermissionToInstallDirectory, installDir));
Projects\GuestAppHostProject.cs (6)
1450
UpdateCommandStrings
.AnalyzingProjectStatus,
1509
_interactionService.DisplayMessage(KnownEmojis.CheckMarkButton,
UpdateCommandStrings
.ProjectUpToDateMessage);
1526
if (!await _interactionService.PromptConfirmAsync(
UpdateCommandStrings
.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken))
1552
UpdateCommandStrings
.RegeneratingSdkCode,
1572
_interactionService.DisplayMessage(KnownEmojis.Package,
UpdateCommandStrings
.RegeneratedSdkCode);
1575
_interactionService.DisplaySuccess(
UpdateCommandStrings
.UpdateSuccessfulMessage);
Projects\ProjectUpdater.cs (46)
36
var (updateSteps, fallbackUsed) = await interactionService.ShowStatusAsync(
UpdateCommandStrings
.AnalyzingProjectStatus, () => GetUpdateStepsAsync(projectFile, channel, cancellationToken));
41
interactionService.DisplayMessage(KnownEmojis.CheckMarkButton,
UpdateCommandStrings
.ProjectUpToDateMessage);
82
interactionService.DisplayMessage(KnownEmojis.Warning, $"[yellow]{
UpdateCommandStrings
.FallbackParsingWarning}[/]", allowMarkup: true);
86
if (!await interactionService.PromptConfirmAsync(
UpdateCommandStrings
.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken))
97
throw new ProjectUpdaterException(
UpdateCommandStrings
.FailedDiscoverNuGetConfig);
117
_ => throw new InvalidOperationException(
UpdateCommandStrings
.UnexpectedCodePath)
145
promptText:
UpdateCommandStrings
.WhichDirectoryNuGetConfigPrompt,
160
UpdateCommandStrings
.ApplyingUpdates,
165
interactionService.DisplaySubtleMessage(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.ExecutingUpdateStepFormat, updateStep.Description));
189
UpdateCommandStrings
.RestoringPackagesAfterUpdate,
196
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedToRestoreAfterUpdateFormat, projectFile.FullName));
204
interactionService.DisplaySuccess(
UpdateCommandStrings
.UpdateSuccessfulMessage);
225
var appHostAnalyzeStep = new AnalyzeStep(
UpdateCommandStrings
.AnalyzeAppHost, () => AnalyzeAppHostAsync(context, cancellationToken));
258
UpdateCommandStrings
.UpdateChannelStepDescriptionFormat,
259
existingChannel ??
UpdateCommandStrings
.ChannelNonePlaceholder,
266
UpdateCommandStrings
.UpdatePackageFormat,
324
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedFetchItemsAndPropertiesFormat, projectFile.FullName));
364
var appHostSdkAnalyzeStep = new AnalyzeStep(
UpdateCommandStrings
.AnalyzeAppHostSdk, () => AnalyzeAppHostSdkAsync(context, cancellationToken));
367
var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken));
391
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.NoPackageFoundFormat, packageId, context.Channel.Name));
394
logger.LogWarning(
UpdateCommandStrings
.PackageNotFoundInChannelWarningFormat, packageId, context.Channel.Name);
437
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, "Aspire.AppHost.Sdk", sdkVersion ?? "unknown", latestSdkPackage?.Version),
459
UpdateCommandStrings
.RemovedObsoleteAppHostPackage,
486
UpdateCommandStrings
.RemovedObsoleteAppHostPackage,
669
UpdateCommandStrings
.MigratedToNewSdkFormat, package.Version));
674
interactionService.DisplaySubtleMessage(
UpdateCommandStrings
.RemovedObsoleteAppHostPackage);
698
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindRootProjectElementFormat, projectFile.FullName));
716
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindSdkElementFormat, projectFile.FullName));
971
var referencedProjectPath = projectReference.GetProperty("FullPath").GetString() ?? throw new ProjectUpdaterException(
UpdateCommandStrings
.ProjectReferenceNoFullPath);
973
context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken)));
982
var packageId = packageReference.GetProperty("Identity").GetString() ?? throw new ProjectUpdaterException(
UpdateCommandStrings
.PackageReferenceNoIdentity);
1062
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, packageId, packageVersion, latestPackage.Version),
1098
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, packageId, currentVersion, latestPackage.Version),
1215
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName));
1243
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName));
1255
interactionService.DisplayPlainText(
UpdateCommandStrings
.NoChangesDetectedInNuGetConfig);
1262
UpdateCommandStrings
.ApplyChangesToNuGetConfig,
1398
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AddedFeedFormat, feed.Value));
1405
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, pattern));
1414
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.RemovedFeedFormat, feed.Value));
1421
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.RetainedFeedFormat, feed.Value));
1429
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, pattern));
1435
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingRemovedFormat, pattern));
1449
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingRetainedFormat, pattern));
1533
? $"[grey]{
UpdateCommandStrings
.ChannelNonePlaceholder.EscapeMarkup()}[/]"
1541
? $"[grey]{
UpdateCommandStrings
.SdkVersionUnknownPlaceholder.EscapeMarkup()}[/]"
Resources\UpdateCommandStrings.Designer.cs (1)
36
resourceMan = new ResourceManager("Aspire.Cli.Resources.UpdateCommandStrings", typeof(
UpdateCommandStrings
).Assembly);
Aspire.Cli.Tests (8)
Commands\UpdateCommandTests.cs (6)
58
Assert.Equal(
UpdateCommandStrings
.ChannelOptionDescriptionWithStaging, channelOption.Description);
1007
Assert.Contains(interactionService.DisplayedMessages, m => m.Message ==
UpdateCommandStrings
.PendingMigrationsHeader);
1009
Assert.Contains(
UpdateCommandStrings
.PendingMigrationsHint, subtleMessages);
3381
UpdateCommandStrings
.NixSelfUpdateMessage,
3382
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage
3384
: [
UpdateCommandStrings
.NixSelfUpdateMessage];
Projects\GuestAppHostProjectTests.cs (2)
1333
Assert.Equal(
UpdateCommandStrings
.RegeneratedSdkCode, m.Message);
1431
Assert.Equal(
UpdateCommandStrings
.RegeneratedSdkCode, m.Message);