146 references to ErrorStrings
aspire (89)
Agents\McpConfigFileHelper.cs (1)
67string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, configFilePath));
Backchannel\AppHostCliBackchannel.cs (3)
306throw new InvalidOperationException(ErrorStrings.AlreadyConnectedToBackchannel); 351string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostIncompatibleWithCli, BaselineCapability), 379string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostIncompatibleWithCli, BaselineCapability),
Backchannel\ExtensionBackchannel.cs (9)
85?? throw new InvalidOperationException(ErrorStrings.ExtensionTokenMustBeSet); 261throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidSocketPath, endpoint)); 313string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli, 329string.Format(CultureInfo.CurrentCulture, ErrorStrings.ExtensionIncompatibleWithCli, 565throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText)); 598throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText)); 622throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText)); 648throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText)); 674throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NoSelectionMade, promptText));
Certificates\CertificateService.cs (4)
104interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.CertificateGenerationFailed, generateResult)); 110interactionService.DisplayMessage(KnownEmojis.Warning, ErrorStrings.CertificatesPartiallyTrustedNonInteractive); 114interactionService.DisplayMessage(KnownEmojis.Warning, ErrorStrings.CertificatesNotTrustedNonInteractive); 143interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.CertificatesMayNotBeFullyTrusted, trustResultCode));
CliExecutionContext.cs (1)
63?? throw new InvalidOperationException(ErrorStrings.UnableToRetrieveAssemblyVersion);
Commands\ConfigCommand.cs (11)
81return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationKeyRequired); 104InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 141return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationKeyRequired); 146return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationValueRequired); 176InteractionService.DisplayError(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand); 182InteractionService.DisplayError(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand); 204var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorSettingConfiguration, ex.Message); 389return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationKeyRequired); 402InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 436InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 442var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorDeletingConfiguration, ex.Message);
Commands\Sdk\SdkExportCommand.cs (2)
117ErrorStrings.SdkExportLanguageDoesNotSupportCodeGeneration, 137ErrorStrings.SdkExportGeneratorPackageNotExportable,
Configuration\AspireConfigFile.cs (1)
197string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, filePath, ex.Message),
Configuration\ConfigSourceService.cs (2)
268throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, path, ex.Message)); 383?? throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, path))
Configuration\ConfigurationService.cs (1)
505string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, filePath, ex.Message),
DotNet\DotNetCliRunner.cs (2)
898var ex = new InvalidOperationException(ErrorStrings.CantUseBothWatchAndNoBuild); 1128throw new InvalidOperationException(ErrorStrings.FailedToParseTemplateVersionFromStdout);
Git\GitCommandException.cs (5)
9GitFailure.Unavailable => Resources.ErrorStrings.GitUnavailable, 10GitFailure.AuthenticationFailed => Resources.ErrorStrings.GitAuthenticationFailed, 11GitFailure.RepositoryUnavailable => Resources.ErrorStrings.GitRepositoryUnavailable, 12GitFailure.TimedOut => Resources.ErrorStrings.GitTimedOut, 13_ => Resources.ErrorStrings.GitCommandFailed
NuGet\BundleNuGetPackageCache.cs (1)
174string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, 1),
NuGet\NuGetPackageCache.cs (3)
136}) ?? throw new NuGetPackageCacheException(ErrorStrings.FailedToRetrieveCachedTemplatePackages); 199throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, result.ExitCode)); 274throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, result.ExitCode));
Program.cs (3)
227ErrorStrings.GlobalAppHostPathIgnored, 892errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.UnsupportedLocaleProvided, localeOverride, string.Join(", ", LocaleHelpers.SupportedLocales)); 895errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidLocaleProvided, localeOverride);
Projects\GuestAppHostProject.cs (6)
242throw new InvalidOperationException(ErrorStrings.HostingIntegrationsFeatureNotEnabled); 2124$"[yellow]{Markup.Escape(ErrorStrings.LegacyTypeScriptAppHostWarning)}[/]", 2253ErrorStrings.CodegenVersionSkewWarning, 2295ErrorStrings.CodegenIncompatibleSdkSummary, 2320_interactionService.DisplayMessage(KnownEmojis.Information, $"[grey]{Markup.Escape(ErrorStrings.CodegenDebugHint)}[/]", allowMarkup: true); 2324_interactionService.DisplayMessage(KnownEmojis.Microscope, $"[grey]{Markup.Escape(ErrorStrings.CodegenDebugHeader)}[/]", allowMarkup: true);
Projects\PrebuiltAppHostServer.cs (2)
410ErrorStrings.IntegrationBuildPackageDowngradeFailed, 412: ErrorStrings.IntegrationBuildFailed;
Projects\ProjectLocator.cs (22)
369interactionService.DisplayRawText(ErrorStrings.DotNetSdkUnavailableAppHostDiscoveryWarning, ConsoleOutput.Error); 412interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, relativePath)); 426interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileMayBeUnbuildableAppHost, relativePath)); 507interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, relativePath)); 532interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileMayBeUnbuildableAppHost, settingsAppHostRelativePath)); 543interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, settingsAppHostRelativePath)); 726interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, configFilePath, qualifiedPath)); 786interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath)); 795var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, settingsFile.FullName, ex.Message); 814var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, configFilePath); 827var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfiguredAppHostPathMustBeString, configFilePath, fieldName); 862interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfiguredAppHostPathHasInvalidCharacters, configFilePath, fieldName)); 953throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable); 958throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects); 962throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 990throw new ProjectLocatorException(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound); 1020throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 1070throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 1114throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects); 1118throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1129throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable); 1167MultipleAppHostProjectsFoundBehavior.Throw => throw new ProjectLocatorException(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound),
Resources\ErrorStrings.Designer.cs (1)
42global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.ErrorStrings", typeof(ErrorStrings).Assembly);
Scaffolding\ScaffoldingService.cs (1)
137throw new InvalidOperationException(ErrorStrings.HostingIntegrationsFeatureNotEnabled);
Utils\AppHostHelper.cs (4)
43interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectCouldNotBeAnalyzed, logFilePath)); 49interactionService.DisplayError(ErrorStrings.ProjectIsNotAppHost); 55interactionService.DisplayError(ErrorStrings.CouldNotParseAspireSDKVersion); 62interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.AspireSDKVersionNotSupported, aspireHostingVersion));
Utils\ConfigurationHelper.cs (1)
656string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, filePath, ex.Message),
Utils\MissingJavaScriptToolWarning.cs (1)
38return string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFilesCreatedButNodeToolsNotFound, installCommand, installDisplayName);
Utils\SdkInstallHelper.cs (1)
55ErrorStrings.MinimumSdkVersionNotMet,
Utils\VersionHelper.cs (1)
73return PackageUpdateHelpers.GetCurrentAssemblyVersion() ?? throw new InvalidOperationException(ErrorStrings.UnableToRetrieveAssemblyVersion);
Aspire.Cli.Tests (57)
Backchannel\AppHostConnectionResolverTests.cs (1)
234throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable)
Certificates\CertificateServiceTests.cs (1)
620var expectedMessage = string.Format(System.Globalization.CultureInfo.CurrentCulture, ErrorStrings.CertificateGenerationFailed, EnsureCertificateResult.ErrorCreatingTheCertificate);
Commands\ConfigCommandTests.cs (7)
1077[InlineData("appHost.path", nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand))] 1078[InlineData("appHost:path", nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand))] 1079[InlineData("appHostPath", nameof(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand))] 1142nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand) => ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand, 1143nameof(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand) => ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand,
Commands\NewCommandLocalTemplateTests.ConfiguredGitSources.cs (4)
2080 => string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), 2091 => ErrorStrings.GitUnavailable, 2102 => string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed), 2113 => ErrorStrings.GitTimedOut,
Commands\NewCommandLocalTemplateTests.cs (4)
14620 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), 14631 => ErrorStrings.GitUnavailable, 14642 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed), 1465_ => ErrorStrings.GitTimedOut
Commands\RunCommandTests.cs (1)
1531Assert.Contains(ErrorStrings.ProjectIsNotAppHost, interactionService.DisplayedErrors);
Commands\UpdateCommandRepositoryToolsTests.cs (2)
46: throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound) 205throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects)
Commands\UpdateCommandTests.cs (3)
266throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1384throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1474throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
DotNetSdkInstallerTests.cs (1)
226ErrorStrings.ResourceManager.GetString("MinimumSdkVersionNotMet", CultureInfo.GetCultureInfo("en-US"))!,
Git\GitCommandRunnerTests.cs (4)
148GitFailure.AuthenticationFailed => ErrorStrings.GitAuthenticationFailed, 149GitFailure.RepositoryUnavailable => ErrorStrings.GitRepositoryUnavailable, 150_ => ErrorStrings.GitCommandFailed 182Assert.Equal(ErrorStrings.GitUnavailable, exception.Message);
NuGet\BundleNuGetPackageCacheTests.cs (1)
388string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, 1),
Projects\GuestAppHostProjectTests.cs (6)
116Assert.Equal(ErrorStrings.HostingIntegrationsFeatureNotEnabled, exception.Message); 1101message => Markup.Remove(message.Message) == ErrorStrings.LegacyTypeScriptAppHostWarning); 2432Assert.Equal(ErrorStrings.LegacyTypeScriptAppHostWarning, Markup.Remove(m.Message)); 2443/// <see cref="ErrorStrings.CodegenVersionSkewWarning"/> for an SDK update target 2508ErrorStrings.CodegenVersionSkewWarning, 2533Assert.Equal(ErrorStrings.LegacyTypeScriptAppHostWarning, Markup.Remove(m.Message));
Projects\PrebuiltAppHostServerTests.cs (5)
109Assert.Equal(ErrorStrings.IntegrationBuildFailed, PrebuiltAppHostServer.GetIntegrationBuildFailureMessage(output)); 118Assert.Equal(ErrorStrings.IntegrationBuildFailed, PrebuiltAppHostServer.GetIntegrationBuildFailureMessage(output)); 3965[(OutputLineStream.StdErr, ErrorStrings.IntegrationBuildFailed)], 4011[(OutputLineStream.StdErr, ErrorStrings.IntegrationBuildFailed)], 4054ErrorStrings.IntegrationBuildPackageDowngradeFailed,
Projects\ProjectLocatorTests.cs (13)
524Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 675Assert.Equal(ErrorStrings.AppHostsMayNotBeBuildable, ex.Message); 706Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 738Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 977var exception = new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1404Assert.Equal(ErrorStrings.NoProjectFileFound, ex.Message); 2048Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2119Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2364Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2428Assert.Equal(ErrorStrings.AppHostsMayNotBeBuildable, ex.Message); 2475Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2603Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2969Assert.Equal(ErrorStrings.DotNetSdkUnavailableAppHostDiscoveryWarning, warning.Text);
Templating\TemplateEngineFactoryGitCheckoutTests.cs (1)
87Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), exception.Message);
Templating\TemplateEngineFactoryGitTests.cs (3)
83Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitCommandFailed), exception.Message); 144Assert.Equal(ErrorStrings.GitTimedOut, exception.Message); 169Assert.Equal(ErrorStrings.GitTimedOut, exception.Message);