93 references to UpdateCommandStrings
aspire (85)
Commands\UpdateCommand.cs (32)
44private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", UpdateCommandStrings.ProjectArgumentDescription); 47Description = UpdateCommandStrings.SelfOptionDescription 51Description = UpdateCommandStrings.YesOptionDescription, 56Description = UpdateCommandStrings.MigrateOptionDescription 60Description = UpdateCommandStrings.NuGetConfigDirOptionDescription 77: base("update", UpdateCommandStrings.Description, services) 106? UpdateCommandStrings.ChannelOptionDescriptionWithStaging 107: UpdateCommandStrings.ChannelOptionDescription 115? UpdateCommandStrings.QualityOptionDescriptionWithStaging 116: UpdateCommandStrings.QualityOptionDescription, 163InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage); 174InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage); 249UpdateCommandStrings.CheckingForUpdates, 274UpdateCommandStrings.NoChannelFoundMatching, 331UpdateCommandStrings.SelectChannelPrompt, 383UpdateCommandStrings.UpdateCliAfterProjectUpdatePrompt, 392InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage); 400InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage); 435UpdateCommandStrings.NoAppHostFoundUpdateCliPrompt, 501InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.PendingMigrationsHeader); 507InteractionService.DisplaySubtleMessage(UpdateCommandStrings.PendingMigrationsHint); 551InteractionService.DisplayMessage(KnownEmojis.Warning, UpdateCommandStrings.MigrationApplyFailedWarning); 581UpdateCommandStrings.UpdateCliBeforeGuestProjectUpdatePrompt, 593InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage); 595InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 602InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage); 604InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 611InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 655InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NixSelfUpdateMessage); 772UpdateCommandStrings.ExtractingNewCli, 780InteractionService.DisplayMessage(KnownEmojis.Package, UpdateCommandStrings.ExtractedNewCli); 870string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.NoWritePermissionToInstallDirectory, installDir));
Projects\GuestAppHostProject.cs (6)
1476UpdateCommandStrings.AnalyzingProjectStatus, 1535_interactionService.DisplayMessage(KnownEmojis.CheckMarkButton, UpdateCommandStrings.ProjectUpToDateMessage); 1552if (!await _interactionService.PromptConfirmAsync(UpdateCommandStrings.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken)) 1578UpdateCommandStrings.RegeneratingSdkCode, 1598_interactionService.DisplayMessage(KnownEmojis.Package, UpdateCommandStrings.RegeneratedSdkCode); 1601_interactionService.DisplaySuccess(UpdateCommandStrings.UpdateSuccessfulMessage);
Projects\ProjectUpdater.cs (46)
37var (updateSteps, fallbackUsed) = await interactionService.ShowStatusAsync(UpdateCommandStrings.AnalyzingProjectStatus, () => GetUpdateStepsAsync(projectFile, channel, cancellationToken)); 42interactionService.DisplayMessage(KnownEmojis.CheckMarkButton, UpdateCommandStrings.ProjectUpToDateMessage); 83interactionService.DisplayMessage(KnownEmojis.Warning, $"[yellow]{UpdateCommandStrings.FallbackParsingWarning}[/]", allowMarkup: true); 87if (!await interactionService.PromptConfirmAsync(UpdateCommandStrings.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken)) 98throw new ProjectUpdaterException(UpdateCommandStrings.FailedDiscoverNuGetConfig); 118_ => throw new InvalidOperationException(UpdateCommandStrings.UnexpectedCodePath) 146promptText: UpdateCommandStrings.WhichDirectoryNuGetConfigPrompt, 161UpdateCommandStrings.ApplyingUpdates, 166interactionService.DisplaySubtleMessage(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.ExecutingUpdateStepFormat, updateStep.Description)); 190UpdateCommandStrings.RestoringPackagesAfterUpdate, 197throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedToRestoreAfterUpdateFormat, projectFile.FullName)); 205interactionService.DisplaySuccess(UpdateCommandStrings.UpdateSuccessfulMessage); 226var appHostAnalyzeStep = new AnalyzeStep(UpdateCommandStrings.AnalyzeAppHost, () => AnalyzeAppHostAsync(context, cancellationToken)); 259UpdateCommandStrings.UpdateChannelStepDescriptionFormat, 260existingChannel ?? UpdateCommandStrings.ChannelNonePlaceholder, 267UpdateCommandStrings.UpdatePackageFormat, 325throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedFetchItemsAndPropertiesFormat, projectFile.FullName)); 368var appHostSdkAnalyzeStep = new AnalyzeStep(UpdateCommandStrings.AnalyzeAppHostSdk, () => AnalyzeAppHostSdkAsync(context, cancellationToken)); 371var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken)); 395throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.NoPackageFoundFormat, packageId, context.Channel.Name)); 398logger.LogWarning(UpdateCommandStrings.PackageNotFoundInChannelWarningFormat, packageId, context.Channel.Name); 441string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.UpdatePackageFormat, "Aspire.AppHost.Sdk", sdkVersion ?? "unknown", latestSdkPackage?.Version), 463UpdateCommandStrings.RemovedObsoleteAppHostPackage, 490UpdateCommandStrings.RemovedObsoleteAppHostPackage, 673UpdateCommandStrings.MigratedToNewSdkFormat, package.Version)); 678interactionService.DisplaySubtleMessage(UpdateCommandStrings.RemovedObsoleteAppHostPackage); 702throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindRootProjectElementFormat, projectFile.FullName)); 720throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindSdkElementFormat, projectFile.FullName)); 975var referencedProjectPath = projectReference.GetProperty("FullPath").GetString() ?? throw new ProjectUpdaterException(UpdateCommandStrings.ProjectReferenceNoFullPath); 977context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken))); 986var packageId = packageReference.GetProperty("Identity").GetString() ?? throw new ProjectUpdaterException(UpdateCommandStrings.PackageReferenceNoIdentity); 1066string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.UpdatePackageFormat, packageId, packageVersion, latestPackage.Version), 1102string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.UpdatePackageFormat, packageId, currentVersion, latestPackage.Version), 1219throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName)); 1247throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName)); 1259interactionService.DisplayPlainText(UpdateCommandStrings.NoChangesDetectedInNuGetConfig); 1266UpdateCommandStrings.ApplyChangesToNuGetConfig, 1402interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AddedFeedFormat, feed.Value)); 1409interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingAddedFormat, pattern)); 1418interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.RemovedFeedFormat, feed.Value)); 1425interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.RetainedFeedFormat, feed.Value)); 1433interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingAddedFormat, pattern)); 1439interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingRemovedFormat, pattern)); 1453interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingRetainedFormat, pattern)); 1537? $"[grey]{UpdateCommandStrings.ChannelNonePlaceholder.EscapeMarkup()}[/]" 1545? $"[grey]{UpdateCommandStrings.SdkVersionUnknownPlaceholder.EscapeMarkup()}[/]"
Resources\UpdateCommandStrings.Designer.cs (1)
36resourceMan = new ResourceManager("Aspire.Cli.Resources.UpdateCommandStrings", typeof(UpdateCommandStrings).Assembly);
Aspire.Cli.Tests (8)
Commands\UpdateCommandTests.cs (6)
59Assert.Equal(UpdateCommandStrings.ChannelOptionDescriptionWithStaging, channelOption.Description); 1011Assert.Contains(interactionService.DisplayedMessages, m => m.Message == UpdateCommandStrings.PendingMigrationsHeader); 1013Assert.Contains(UpdateCommandStrings.PendingMigrationsHint, subtleMessages); 3386UpdateCommandStrings.NixSelfUpdateMessage, 3387UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage 3389: [UpdateCommandStrings.NixSelfUpdateMessage];
Projects\GuestAppHostProjectTests.cs (2)
1404Assert.Equal(UpdateCommandStrings.RegeneratedSdkCode, m.Message); 1502Assert.Equal(UpdateCommandStrings.RegeneratedSdkCode, m.Message);