189 references to UpdateCommandStrings
aspire (136)
Commands\UpdateCommand.cs (39)
48private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", UpdateCommandStrings.ProjectArgumentDescription); 51Description = UpdateCommandStrings.SelfOptionDescription 59Description = UpdateCommandStrings.YesOptionDescription, 64Description = UpdateCommandStrings.MigrateOptionDescription 68Description = UpdateCommandStrings.DryRunOptionDescription 72Description = UpdateCommandStrings.NuGetConfigDirOptionDescription 90: base("update", UpdateCommandStrings.Description, services) 130? UpdateCommandStrings.ChannelOptionDescriptionWithStaging 131: UpdateCommandStrings.ChannelOptionDescription 139? UpdateCommandStrings.QualityOptionDescriptionWithStaging 140: UpdateCommandStrings.QualityOptionDescription, 159result.AddError(UpdateCommandStrings.DryRunRequiresChannel); 248InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage); 259InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage); 333return CommandResult.Failure(CliExitCodes.InvalidCommand, UpdateCommandStrings.DryRunRequiresDotNet); 356UpdateCommandStrings.CheckingForUpdates, 377UpdateCommandStrings.NoChannelFoundMatching, 381? string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.ConfiguredChannelNotFoundFormat, channelName, message) 394UpdateCommandStrings.UsingConfiguredChannelFormat, 448UpdateCommandStrings.SelectChannelPrompt, 465return CommandResult.Failure(CliExitCodes.InvalidCommand, UpdateCommandStrings.DryRunRequiresChannel); 525UpdateCommandStrings.UpdateCliAfterProjectUpdatePrompt, 534InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage); 542InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage); 577UpdateCommandStrings.NoAppHostFoundUpdateCliPrompt, 643InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.PendingMigrationsHeader); 649InteractionService.DisplaySubtleMessage(UpdateCommandStrings.PendingMigrationsHint); 693InteractionService.DisplayMessage(KnownEmojis.PoliceCarLight, UpdateCommandStrings.MigrationApplyFailedWarning); 765InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 770UpdateCommandStrings.UpdateCliBeforeGuestProjectUpdatePrompt, 782InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage); 784InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 791InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage); 793InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 800InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 844InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NixSelfUpdateMessage); 961UpdateCommandStrings.ExtractingNewCli, 969InteractionService.DisplayMessage(KnownEmojis.Package, UpdateCommandStrings.ExtractedNewCli); 1059string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.NoWritePermissionToInstallDirectory, installDir));
DotNet\DotNetAppHostNuGetConfigMerger.cs (3)
149UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, 262UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, 341string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.UpdateCandidateFileChangedFormat, candidate.TargetFile.FullName));
DotNet\DotNetAppHostRestorePreview.cs (1)
66CultureInfo.CurrentCulture, UpdateCommandStrings.NuGetConfigOutsideHierarchyFormat,
DotNet\DotNetAppHostUpdateTransaction.cs (7)
39CultureInfo.CurrentCulture, UpdateCommandStrings.DryRunExistingBackupsFormat, 43UpdateCommandStrings.DryRunReplaceBackupsPrompt, PromptBinding.CreateDefault(false), cancellationToken)) 45throw new ProjectUpdaterException(UpdateCommandStrings.DryRunBackupsNotReplaced); 156CultureInfo.CurrentCulture, UpdateCommandStrings.UpdateCandidateFileChangedFormat, path)); 185string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.UpdateCandidateRollbackFileChangedFormat, path)); 211CultureInfo.CurrentCulture, UpdateCommandStrings.DryRunBackupRecoveryFormat, path, state.BackupPath), exception)); 217throw new AggregateException(UpdateCommandStrings.UpdateCandidateRollbackFailed, failures);
DotNet\DotNetRestoreConfiguration.cs (1)
34string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedFetchItemsAndPropertiesFormat, projectFile.FullName));
NuGet\NuGetConfigurationBuilder.cs (1)
61CultureInfo.CurrentCulture, UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat,
Projects\GuestAppHostProject.cs (7)
1876UpdateCommandStrings.AnalyzingProjectStatus, 1953_interactionService.DisplayMessage(KnownEmojis.CheckMarkButton, UpdateCommandStrings.ProjectUpToDateMessage); 1976if (!await _interactionService.PromptConfirmAsync(UpdateCommandStrings.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken)) 2004UpdateCommandStrings.RegeneratingSdkCode, 2022UpdateCommandStrings.FailedToRegenerateSdkAfterUpdateFormat, 2039_interactionService.DisplayMessage(KnownEmojis.Package, UpdateCommandStrings.RegeneratedSdkCode); 2043_interactionService.DisplaySuccess(UpdateCommandStrings.UpdateSuccessfulMessage);
Projects\ProjectUpdater.cs (63)
40throw new ProjectUpdaterException(UpdateCommandStrings.DryRunRequiresChannel); 114UpdateCommandStrings.AnalyzingProjectStatus, 135interactionService.DisplayMessage(KnownEmojis.CheckMarkButton, UpdateCommandStrings.ProjectUpToDateMessage); 175interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, $"[yellow]{UpdateCommandStrings.FallbackParsingWarning}[/]", allowMarkup: true); 179if (!context.DryRun && !await interactionService.PromptConfirmAsync(UpdateCommandStrings.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken)) 191throw new ProjectUpdaterException(UpdateCommandStrings.FailedDiscoverNuGetConfig); 229promptText: UpdateCommandStrings.WhichDirectoryNuGetConfigPrompt, 286UpdateCommandStrings.PreparingSdkForUpdateStatus, 303context.DryRun ? UpdateCommandStrings.DryRunValidating : UpdateCommandStrings.ApplyingUpdates, 307CultureInfo.InvariantCulture, UpdateCommandStrings.ExecutingUpdateStepFormat, sdkRepairStep.Description)); 325context.DryRun ? UpdateCommandStrings.DryRunValidating : UpdateCommandStrings.ApplyingUpdates, 334interactionService.DisplaySubtleMessage(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.ExecutingUpdateStepFormat, updateStep.Description)); 358UpdateCommandStrings.RestoringPackagesAfterUpdate, 385throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedToRestoreAfterUpdateFormat, channel.Name, projectFile.FullName)); 393interactionService.DisplaySuccess(UpdateCommandStrings.DryRunSuccessful); 402CultureInfo.CurrentCulture, UpdateCommandStrings.UpdateCandidatePolicyChangedFormat, directory)); 412interactionService.DisplaySubtleMessage(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.ExecutingUpdateStepFormat, updateStep.Description)); 427UpdateCommandStrings.UpdateCandidateRollbackFailed, updateFailure, rollbackFailure); 434interactionService.DisplaySuccess(UpdateCommandStrings.UpdateSuccessfulMessage); 464UpdateCommandStrings.ChannelUpdateRequiresAmbientNuGetConfigurationFormat, 517var appHostAnalyzeStep = new AnalyzeStep(UpdateCommandStrings.AnalyzeAppHost, () => AnalyzeAppHostAsync(context, cancellationToken)); 555UpdateCommandStrings.UpdateChannelStepDescriptionFormat, 556existingChannel ?? UpdateCommandStrings.ChannelNonePlaceholder, 557targetChannel ?? UpdateCommandStrings.ChannelNonePlaceholder)); 563UpdateCommandStrings.UpdatePackageFormat, 648throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedFetchItemsAndPropertiesFormat, projectFile.FullName)); 691var appHostSdkAnalyzeStep = new AnalyzeStep(UpdateCommandStrings.AnalyzeAppHostSdk, () => AnalyzeAppHostSdkAsync(context, cancellationToken)); 694var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken)); 720throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.NoPackageFoundFormat, packageId, context.Channel.Name)); 723logger.LogWarning(UpdateCommandStrings.PackageNotFoundInChannelWarningFormat, packageId, context.Channel.Name); 756UpdateCommandStrings.ConditionalSdkEvaluationRequiredFormat, context.AppHostProjectFile.FullName)); 815string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.UpdatePackageFormat, "Aspire.AppHost.Sdk", sdkVersion ?? "unknown", latestSdkPackage?.Version), 866UpdateCommandStrings.ConditionalSdkExplicitEditRequiredFormat, projectFile.FullName)); 919UpdateCommandStrings.RemovedObsoleteAppHostPackage, 949UpdateCommandStrings.RemovedObsoleteAppHostPackage, 1132UpdateCommandStrings.MigratedToNewSdkFormat, package.Version)); 1137interactionService.DisplaySubtleMessage(UpdateCommandStrings.RemovedObsoleteAppHostPackage); 1161throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindRootProjectElementFormat, projectFile.FullName)); 1185throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindSdkElementFormat, projectFile.FullName)); 1502var referencedProjectPath = projectReference.GetProperty("FullPath").GetString() ?? throw new ProjectUpdaterException(UpdateCommandStrings.ProjectReferenceNoFullPath); 1504context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken))); 1513var packageId = packageReference.GetProperty("Identity").GetString() ?? throw new ProjectUpdaterException(UpdateCommandStrings.PackageReferenceNoIdentity); 1603string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.UpdatePackageFormat, packageId, packageVersion, latestPackage.Version), 1644string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.UpdatePackageFormat, packageId, currentVersion, latestPackage.Version), 1766throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName)); 1793throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName)); 1830interactionService.DisplayPlainText(UpdateCommandStrings.NoChangesDetectedInNuGetConfig); 1837UpdateCommandStrings.ApplyChangesToNuGetConfig, 1973interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AddedFeedFormat, feed.Value)); 1980interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingAddedFormat, pattern)); 1989interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.RemovedFeedFormat, feed.Value)); 1996interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.RetainedFeedFormat, feed.Value)); 2004interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingAddedFormat, pattern)); 2010interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingRemovedFormat, pattern)); 2024interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingRetainedFormat, pattern)); 2038interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.RetainedFeedFormat, mappingChange.SourceKey)); 2041interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingAddedFormat, pattern)); 2045interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.MappingRemovedFormat, pattern)); 2181? $"[grey]{UpdateCommandStrings.ChannelNonePlaceholder.EscapeMarkup()}[/]" 2184? $"[grey]{UpdateCommandStrings.ChannelNonePlaceholder.EscapeMarkup()}[/]" 2192? $"[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, 168interactionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.RestoreRepositoryDotNetTool); 172interactionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.RestoreRepositoryNpmTool); 193throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.ToolManifestChangedFormat, original.File.FullName)); 233interactionService.DisplaySuccess(UpdateCommandStrings.RepositoryToolsUpdated); 254throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.NoPackageFoundFormat, DotNetPackageId, channel.Name)); 265throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.FailedResolveNpmToolFormat, version ?? "latest")); 272UpdateCommandStrings.NoPackageFoundFormat, DotNetPackageId, channel.Name)); 313throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.FailedReadToolManifestFormat, path, ex.Message)); 318: 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 (53)
Commands\InitCommandTests.cs (1)
71UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, configPath, "company")], interaction.DisplayedErrors);
Commands\NewCommandTests.cs (1)
73UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat,
Commands\UpdateCommandRepositoryToolsTests.cs (13)
113Assert.Contains(UpdateCommandStrings.RepositoryToolsUpdated, interaction.DisplayedSuccess); 141expectedGuidance.Add(UpdateCommandStrings.RestoreRepositoryDotNetTool); 149expectedGuidance.Add(UpdateCommandStrings.RestoreRepositoryNpmTool); 220Assert.Equal(UpdateCommandStrings.RepositoryToolsUpdated, Assert.Single(interaction.DisplayedSuccess)); 223.Where(message => message.Message == UpdateCommandStrings.RestoreRepositoryDotNetTool || message.Message == UpdateCommandStrings.RestoreRepositoryNpmTool) 225Assert.Contains(interaction.DisplayedMessages, message => message.Message == UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage); 281Assert.Equal(UpdateCommandStrings.PerformUpdatesPrompt, prompt); 303UpdateCommandStrings.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken); 509if (prompt != UpdateCommandStrings.PerformUpdatesPrompt) 511Assert.Equal(UpdateCommandStrings.ApplyChangesToNuGetConfig, prompt); 602Assert.Contains(UpdateCommandStrings.RepositoryToolsUpdated, interaction.DisplayedSuccess); 607Assert.Equal(dryRun && restoreExitCode == 0 ? [UpdateCommandStrings.DryRunSuccessful] : Array.Empty<string>(),
Commands\UpdateCommandTests.cs (12)
59Assert.Equal(UpdateCommandStrings.ChannelOptionDescriptionWithStaging, channelOption.Description); 386var message = string.Format(UpdateCommandStrings.FailedToRegenerateSdkAfterUpdateFormat, appHost.FullName); 1063Assert.Contains(interactionService.DisplayedMessages, m => m.Message == UpdateCommandStrings.PendingMigrationsHeader); 1065Assert.Contains(UpdateCommandStrings.PendingMigrationsHint, subtleMessages); 2308? string.Format(UpdateCommandStrings.ConfiguredChannelNotFoundFormat, "staging", unavailableReason) 2939Assert.Equal(UpdateCommandStrings.DryRunRequiresChannel, Assert.Single(result.Errors).Message); 3075? [string.Format(UpdateCommandStrings.UsingConfiguredChannelFormat, context.Channel.Name)] 3096var reason = string.Format(UpdateCommandStrings.NoChannelFoundMatching, "unknown-channel", "default, stable, staging, daily"); 3098string.Format(UpdateCommandStrings.ConfiguredChannelNotFoundFormat, "unknown-channel", reason), 3726UpdateCommandStrings.NixSelfUpdateMessage, 3727UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage 3729: [UpdateCommandStrings.NixSelfUpdateMessage];
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (2)
383UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, 465UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, target.FullName, "aspire-test"), error.Message);
DotNet\DotNetAppHostUpdateTransactionTests.cs (3)
35Assert.Equal(UpdateCommandStrings.DryRunBackupsNotReplaced, error.Message); 103Assert.Equal(UpdateCommandStrings.DryRunBackupsNotReplaced, error.Message); 108Assert.Equal([UpdateCommandStrings.DryRunReplaceBackupsPrompt], interaction.BooleanPromptCalls.Select(static call => call.PromptText));
NuGet\NuGetConfigurationTests.cs (2)
69UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, "nuget.config", "aspire-daily"), exception.Message); 100UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, "nuget.config", "aspire-daily"), exception.Message);
Projects\GuestAppHostProjectTests.cs (4)
1295[UpdateCommandStrings.RepositoryToolsUpdated, UpdateCommandStrings.UpdateSuccessfulMessage], 2440Assert.Equal(UpdateCommandStrings.RegeneratedSdkCode, m.Message); 2541Assert.Equal(UpdateCommandStrings.RegeneratedSdkCode, m.Message);
Projects\ProjectUpdaterNuGetConfigurationTests.cs (10)
272Assert.Equal(dryRun ? [] : new[] { UpdateCommandStrings.PerformUpdatesPrompt }, 1156interaction.ConfirmCallback = (prompt, _) => prompt == UpdateCommandStrings.PerformUpdatesPrompt; 1270interaction.ConfirmCallback = (prompt, _) => prompt == UpdateCommandStrings.PerformUpdatesPrompt || outcome != "decline"; 1305Assert.Equal(outcome == "restore" ? [] : new[] { UpdateCommandStrings.PerformUpdatesPrompt, UpdateCommandStrings.ApplyChangesToNuGetConfig }, 1309CultureInfo.InvariantCulture, UpdateCommandStrings.MappingAddedFormat, "*"))); 1752UpdateCommandStrings.FailedToRestoreAfterUpdateFormat, context.Channel.Name, projectFile.FullName), exception.Message); 1855UpdateCommandStrings.ChannelFeedAlreadyConfiguredFormat, configPath, sourceKey), error.Message); 1859Assert.Equal(dryRun ? [] : new[] { UpdateCommandStrings.PerformUpdatesPrompt }, 1926Assert.Equal([UpdateCommandStrings.PerformUpdatesPrompt],
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);