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