162 references to UpdateCommandStrings
aspire (120)
Commands\UpdateCommand.cs (33)
47
private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project",
UpdateCommandStrings
.ProjectArgumentDescription);
50
Description =
UpdateCommandStrings
.SelfOptionDescription
58
Description =
UpdateCommandStrings
.YesOptionDescription,
63
Description =
UpdateCommandStrings
.MigrateOptionDescription
67
Description =
UpdateCommandStrings
.NuGetConfigDirOptionDescription
85
: base("update",
UpdateCommandStrings
.Description, services)
116
?
UpdateCommandStrings
.ChannelOptionDescriptionWithStaging
117
:
UpdateCommandStrings
.ChannelOptionDescription
125
?
UpdateCommandStrings
.QualityOptionDescriptionWithStaging
126
:
UpdateCommandStrings
.QualityOptionDescription,
227
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
238
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
322
UpdateCommandStrings
.CheckingForUpdates,
349
UpdateCommandStrings
.NoChannelFoundMatching,
410
UpdateCommandStrings
.SelectChannelPrompt,
476
UpdateCommandStrings
.UpdateCliAfterProjectUpdatePrompt,
485
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
493
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
528
UpdateCommandStrings
.NoAppHostFoundUpdateCliPrompt,
594
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.PendingMigrationsHeader);
600
InteractionService.DisplaySubtleMessage(
UpdateCommandStrings
.PendingMigrationsHint);
644
InteractionService.DisplayMessage(KnownEmojis.Warning,
UpdateCommandStrings
.MigrationApplyFailedWarning);
688
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
693
UpdateCommandStrings
.UpdateCliBeforeGuestProjectUpdatePrompt,
705
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.DotNetToolSelfUpdateMessage);
707
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
714
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NpmSelfUpdateMessage);
716
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
723
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage);
767
InteractionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.NixSelfUpdateMessage);
884
UpdateCommandStrings
.ExtractingNewCli,
892
InteractionService.DisplayMessage(KnownEmojis.Package,
UpdateCommandStrings
.ExtractedNewCli);
982
string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.NoWritePermissionToInstallDirectory, installDir));
DotNet\DotNetAppHostNuGetConfigMerger.cs (2)
139
UpdateCommandStrings
.ChannelFeedAlreadyConfiguredFormat,
290
string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.UpdateCandidateFileChangedFormat, candidate.TargetFile.FullName));
DotNet\DotNetAppHostRestorePreview.cs (1)
41
CultureInfo.CurrentCulture,
UpdateCommandStrings
.NuGetConfigOutsideHierarchyFormat,
DotNet\DotNetAppHostUpdateTransaction.cs (3)
90
CultureInfo.CurrentCulture,
UpdateCommandStrings
.UpdateCandidateFileChangedFormat, path));
119
string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.UpdateCandidateRollbackFileChangedFormat, path));
139
throw new AggregateException(
UpdateCommandStrings
.UpdateCandidateRollbackFailed, failures);
DotNet\DotNetRestoreConfiguration.cs (1)
33
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedFetchItemsAndPropertiesFormat, projectFile.FullName));
Projects\GuestAppHostProject.cs (7)
1872
UpdateCommandStrings
.AnalyzingProjectStatus,
1949
_interactionService.DisplayMessage(KnownEmojis.CheckMarkButton,
UpdateCommandStrings
.ProjectUpToDateMessage);
1972
if (!await _interactionService.PromptConfirmAsync(
UpdateCommandStrings
.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken))
2000
UpdateCommandStrings
.RegeneratingSdkCode,
2018
UpdateCommandStrings
.FailedToRegenerateSdkAfterUpdateFormat,
2035
_interactionService.DisplayMessage(KnownEmojis.Package,
UpdateCommandStrings
.RegeneratedSdkCode);
2039
_interactionService.DisplaySuccess(
UpdateCommandStrings
.UpdateSuccessfulMessage);
Projects\ProjectUpdater.cs (59)
105
UpdateCommandStrings
.AnalyzingProjectStatus,
126
interactionService.DisplayMessage(KnownEmojis.CheckMarkButton,
UpdateCommandStrings
.ProjectUpToDateMessage);
165
interactionService.DisplayMessage(KnownEmojis.Warning, $"[yellow]{
UpdateCommandStrings
.FallbackParsingWarning}[/]", allowMarkup: true);
169
if (!await interactionService.PromptConfirmAsync(
UpdateCommandStrings
.PerformUpdatesPrompt, context.ConfirmBinding, cancellationToken: cancellationToken))
181
throw new ProjectUpdaterException(
UpdateCommandStrings
.FailedDiscoverNuGetConfig);
216
promptText:
UpdateCommandStrings
.WhichDirectoryNuGetConfigPrompt,
268
UpdateCommandStrings
.PreparingSdkForUpdateStatus,
284
UpdateCommandStrings
.ApplyingUpdates,
288
CultureInfo.InvariantCulture,
UpdateCommandStrings
.ExecutingUpdateStepFormat, sdkRepairStep.Description));
305
UpdateCommandStrings
.ApplyingUpdates,
314
interactionService.DisplaySubtleMessage(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.ExecutingUpdateStepFormat, updateStep.Description));
325
UpdateCommandStrings
.RestoringPackagesAfterUpdate,
335
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedToRestoreAfterUpdateFormat, projectFile.FullName));
348
CultureInfo.CurrentCulture,
UpdateCommandStrings
.UpdateCandidatePolicyChangedFormat, directory));
358
interactionService.DisplaySubtleMessage(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.ExecutingUpdateStepFormat, updateStep.Description));
373
UpdateCommandStrings
.UpdateCandidateRollbackFailed, updateFailure, rollbackFailure);
380
interactionService.DisplaySuccess(
UpdateCommandStrings
.UpdateSuccessfulMessage);
409
UpdateCommandStrings
.ChannelUpdateRequiresAmbientNuGetConfigurationFormat,
473
var appHostAnalyzeStep = new AnalyzeStep(
UpdateCommandStrings
.AnalyzeAppHost, () => AnalyzeAppHostAsync(context, cancellationToken));
511
UpdateCommandStrings
.UpdateChannelStepDescriptionFormat,
512
existingChannel ??
UpdateCommandStrings
.ChannelNonePlaceholder,
513
targetChannel ??
UpdateCommandStrings
.ChannelNonePlaceholder));
519
UpdateCommandStrings
.UpdatePackageFormat,
602
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedFetchItemsAndPropertiesFormat, projectFile.FullName));
645
var appHostSdkAnalyzeStep = new AnalyzeStep(
UpdateCommandStrings
.AnalyzeAppHostSdk, () => AnalyzeAppHostSdkAsync(context, cancellationToken));
648
var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken));
674
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.NoPackageFoundFormat, packageId, context.Channel.Name));
677
logger.LogWarning(
UpdateCommandStrings
.PackageNotFoundInChannelWarningFormat, packageId, context.Channel.Name);
710
UpdateCommandStrings
.ConditionalSdkEvaluationRequiredFormat, context.AppHostProjectFile.FullName));
769
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, "Aspire.AppHost.Sdk", sdkVersion ?? "unknown", latestSdkPackage?.Version),
820
UpdateCommandStrings
.ConditionalSdkExplicitEditRequiredFormat, projectFile.FullName));
873
UpdateCommandStrings
.RemovedObsoleteAppHostPackage,
903
UpdateCommandStrings
.RemovedObsoleteAppHostPackage,
1086
UpdateCommandStrings
.MigratedToNewSdkFormat, package.Version));
1091
interactionService.DisplaySubtleMessage(
UpdateCommandStrings
.RemovedObsoleteAppHostPackage);
1115
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindRootProjectElementFormat, projectFile.FullName));
1139
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindSdkElementFormat, projectFile.FullName));
1442
var referencedProjectPath = projectReference.GetProperty("FullPath").GetString() ?? throw new ProjectUpdaterException(
UpdateCommandStrings
.ProjectReferenceNoFullPath);
1444
context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken)));
1453
var packageId = packageReference.GetProperty("Identity").GetString() ?? throw new ProjectUpdaterException(
UpdateCommandStrings
.PackageReferenceNoIdentity);
1543
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, packageId, packageVersion, latestPackage.Version),
1584
string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.UpdatePackageFormat, packageId, currentVersion, latestPackage.Version),
1704
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName));
1730
throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName));
1767
interactionService.DisplayPlainText(
UpdateCommandStrings
.NoChangesDetectedInNuGetConfig);
1774
UpdateCommandStrings
.ApplyChangesToNuGetConfig,
1910
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.AddedFeedFormat, feed.Value));
1917
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, pattern));
1926
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.RemovedFeedFormat, feed.Value));
1933
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.RetainedFeedFormat, feed.Value));
1941
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, pattern));
1947
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingRemovedFormat, pattern));
1961
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingRetainedFormat, pattern));
1975
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.RetainedFeedFormat, mappingChange.SourceKey));
1978
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, pattern));
1982
interactionService.DisplayPlainText(string.Format(CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingRemovedFormat, pattern));
2073
? $"[grey]{
UpdateCommandStrings
.ChannelNonePlaceholder.EscapeMarkup()}[/]"
2076
? $"[grey]{
UpdateCommandStrings
.ChannelNonePlaceholder.EscapeMarkup()}[/]"
2084
? $"[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,
168
interactionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.RestoreRepositoryDotNetTool);
172
interactionService.DisplayMessage(KnownEmojis.Information,
UpdateCommandStrings
.RestoreRepositoryNpmTool);
193
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.ToolManifestChangedFormat, original.File.FullName));
233
interactionService.DisplaySuccess(
UpdateCommandStrings
.RepositoryToolsUpdated);
254
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.NoPackageFoundFormat, DotNetPackageId, channel.Name));
265
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.FailedResolveNpmToolFormat, version ?? "latest"));
272
UpdateCommandStrings
.NoPackageFoundFormat, DotNetPackageId, channel.Name));
313
throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture,
UpdateCommandStrings
.FailedReadToolManifestFormat, path, ex.Message));
318
: 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 (42)
Commands\InitCommandTests.cs (1)
69
UpdateCommandStrings
.ChannelFeedAlreadyConfiguredFormat, configPath, "company")], interaction.DisplayedErrors);
Commands\NewCommandTests.cs (1)
72
UpdateCommandStrings
.ChannelFeedAlreadyConfiguredFormat,
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);
462
if (prompt !=
UpdateCommandStrings
.PerformUpdatesPrompt)
464
Assert.Equal(
UpdateCommandStrings
.ApplyChangesToNuGetConfig, prompt);
541
Assert.Single(interaction.BooleanPromptCalls, call => call.PromptText ==
UpdateCommandStrings
.PerformUpdatesPrompt);
555
Assert.Contains(
UpdateCommandStrings
.RepositoryToolsUpdated, interaction.DisplayedSuccess);
Commands\UpdateCommandTests.cs (7)
59
Assert.Equal(
UpdateCommandStrings
.ChannelOptionDescriptionWithStaging, channelOption.Description);
386
var message = string.Format(
UpdateCommandStrings
.FailedToRegenerateSdkAfterUpdateFormat, appHost.FullName);
1063
Assert.Contains(interactionService.DisplayedMessages, m => m.Message ==
UpdateCommandStrings
.PendingMigrationsHeader);
1065
Assert.Contains(
UpdateCommandStrings
.PendingMigrationsHint, subtleMessages);
3568
UpdateCommandStrings
.NixSelfUpdateMessage,
3569
UpdateCommandStrings
.ProjectUpdateSkippedAfterCliUpdateMessage
3571
: [
UpdateCommandStrings
.NixSelfUpdateMessage];
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (2)
110
UpdateCommandStrings
.ChannelFeedAlreadyConfiguredFormat,
192
UpdateCommandStrings
.ChannelFeedAlreadyConfiguredFormat, target.FullName, "aspire-test"), error.Message);
Projects\GuestAppHostProjectTests.cs (4)
1295
[
UpdateCommandStrings
.RepositoryToolsUpdated,
UpdateCommandStrings
.UpdateSuccessfulMessage],
2437
Assert.Equal(
UpdateCommandStrings
.RegeneratedSdkCode, m.Message);
2538
Assert.Equal(
UpdateCommandStrings
.RegeneratedSdkCode, m.Message);
Projects\ProjectUpdaterNuGetConfigurationTests.cs (9)
227
Assert.Equal([
UpdateCommandStrings
.PerformUpdatesPrompt],
989
interaction.ConfirmCallback = (prompt, _) => prompt ==
UpdateCommandStrings
.PerformUpdatesPrompt;
1103
interaction.ConfirmCallback = (prompt, _) => prompt ==
UpdateCommandStrings
.PerformUpdatesPrompt || outcome != "decline";
1137
Assert.Equal([
UpdateCommandStrings
.PerformUpdatesPrompt,
UpdateCommandStrings
.ApplyChangesToNuGetConfig],
1141
CultureInfo.InvariantCulture,
UpdateCommandStrings
.MappingAddedFormat, "*")));
1558
UpdateCommandStrings
.ChannelFeedAlreadyConfiguredFormat, configPath, sourceKey), error.Message);
1562
Assert.Equal([
UpdateCommandStrings
.PerformUpdatesPrompt],
1629
Assert.Equal([
UpdateCommandStrings
.PerformUpdatesPrompt],
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);