161 references to ErrorStrings
aspire (97)
Agents\McpConfigFileHelper.cs (1)
70string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, configFilePath));
Backchannel\AppHostCliBackchannel.cs (3)
316throw new InvalidOperationException(ErrorStrings.AlreadyConnectedToBackchannel); 361string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostIncompatibleWithCli, BaselineCapability), 389string.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.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.CertificateGenerationFailed, generateResult)); 110interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, ErrorStrings.CertificatesPartiallyTrustedNonInteractive); 114interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, ErrorStrings.CertificatesNotTrustedNonInteractive); 143interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, 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,
Commands\UpdateCommand.cs (3)
706throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 7210 => throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound), 722_ => throw new ProjectLocatorException(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound)
Configuration\AspireConfigFile.cs (1)
215string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, filePath, ex.Message),
Configuration\ConfigSourceService.cs (2)
436throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, path, ex.Message)); 537?? throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, path));
Configuration\ConfigurationService.cs (1)
505string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, filePath, ex.Message),
Configuration\SourceNameValidator.cs (1)
37CultureInfo.CurrentCulture, ErrorStrings.InvalidSourceName, settingPath));
DotNet\DotNetCliRunner.cs (2)
909var ex = new InvalidOperationException(ErrorStrings.CantUseBothWatchAndNoBuild); 1139throw new InvalidOperationException(ErrorStrings.FailedToParseTemplateVersionFromStdout);
Git\GitCommandException.cs (6)
9GitFailure.Unavailable => Resources.ErrorStrings.GitUnavailable, 10GitFailure.AuthenticationFailed => Resources.ErrorStrings.GitAuthenticationFailed, 11GitFailure.RepositoryUnavailable => Resources.ErrorStrings.GitRepositoryUnavailable, 12GitFailure.TimedOut => Resources.ErrorStrings.GitTimedOut, 13GitFailure.UnattendedSshUnsupported => Resources.ErrorStrings.GitUnattendedSshUnsupported, 14_ => Resources.ErrorStrings.GitCommandFailed
NuGet\BundleNuGetPackageCache.cs (1)
188string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, 1),
NuGet\NuGetClient.cs (1)
788throw new NuGetOperationException(ErrorStrings.FailedToParsePackageSearchResults);
NuGet\NuGetConfigurationBuilder.cs (1)
224CultureInfo.CurrentCulture, ErrorStrings.NuGetSourceKeyAlreadyInUse, key));
NuGet\NuGetPackageCache.cs (3)
139}) ?? throw new NuGetPackageCacheException(ErrorStrings.FailedToRetrieveCachedTemplatePackages); 208throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, result.ExitCode)); 288throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, result.ExitCode));
Packaging\IntegrationSourceConfiguration.cs (1)
166=> new(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidIntegrationSource, key));
Program.cs (3)
227ErrorStrings.GlobalAppHostPathIgnored, 895errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.UnsupportedLocaleProvided, localeOverride, string.Join(", ", LocaleHelpers.SupportedLocales)); 898errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidLocaleProvided, localeOverride);
Projects\GuestAppHostProject.cs (6)
242throw new InvalidOperationException(ErrorStrings.HostingIntegrationsFeatureNotEnabled); 2128$"[yellow]{Markup.Escape(ErrorStrings.LegacyTypeScriptAppHostWarning)}[/]", 2257ErrorStrings.CodegenVersionSkewWarning, 2299ErrorStrings.CodegenIncompatibleSdkSummary, 2324_interactionService.DisplayMessage(KnownEmojis.Information, $"[grey]{Markup.Escape(ErrorStrings.CodegenDebugHint)}[/]", allowMarkup: true); 2328_interactionService.DisplayMessage(KnownEmojis.Microscope, $"[grey]{Markup.Escape(ErrorStrings.CodegenDebugHeader)}[/]", allowMarkup: true);
Projects\PrebuiltAppHostServer.cs (2)
410ErrorStrings.IntegrationBuildPackageDowngradeFailed, 412: ErrorStrings.IntegrationBuildFailed;
Projects\ProjectLocator.cs (22)
408interactionService.DisplayRawText(ErrorStrings.DotNetSdkUnavailableAppHostDiscoveryWarning, ConsoleOutput.Error); 452interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, relativePath)); 466interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileMayBeUnbuildableAppHost, relativePath)); 547interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, relativePath)); 574interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileMayBeUnbuildableAppHost, settingsAppHostRelativePath)); 585interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, settingsAppHostRelativePath)); 768interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, configFilePath, qualifiedPath)); 828interactionService.DisplayMessage(KnownEmojis.PoliceCarLight, string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath)); 837var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, settingsFile.FullName, ex.Message); 856var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, configFilePath); 869var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfiguredAppHostPathMustBeString, configFilePath, fieldName); 904interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfiguredAppHostPathHasInvalidCharacters, configFilePath, fieldName)); 998throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable); 1003throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects); 1007throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 1035throw new ProjectLocatorException(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound); 1065throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 1115throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 1162throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects); 1166throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1177throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable); 1215MultipleAppHostProjectsFoundBehavior.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)
139throw 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 (64)
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)
1066[InlineData("appHost.path", nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand))] 1067[InlineData("appHost:path", nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand))] 1068[InlineData("appHostPath", nameof(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand))] 1131nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand) => ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand, 1132nameof(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand) => ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand,
Commands\NewCommandLocalTemplateTests.ConfiguredGitSources.cs (5)
3440 => string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), 3451 => ErrorStrings.GitUnavailable, 3462 => string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed), 3473 => ErrorStrings.GitTimedOut, 658string.Format(CultureInfo.CurrentCulture, NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed)),
Commands\NewCommandLocalTemplateTests.cs (4)
15110 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), 15121 => ErrorStrings.GitUnavailable, 15132 => string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitAuthenticationFailed), 1514_ => ErrorStrings.GitTimedOut
Commands\RunCommandTests.cs (1)
1531Assert.Contains(ErrorStrings.ProjectIsNotAppHost, interactionService.DisplayedErrors);
Commands\UpdateCommandRepositoryToolsTests.cs (2)
90: throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound) 249throw 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.Authentication.cs (1)
161Assert.Equal(ErrorStrings.GitUnattendedSshUnsupported, exception.Message);
Git\GitCommandRunnerTests.cs (6)
153GitFailure.AuthenticationFailed => ErrorStrings.GitAuthenticationFailed, 154GitFailure.RepositoryUnavailable => ErrorStrings.GitRepositoryUnavailable, 155_ => ErrorStrings.GitCommandFailed 188Assert.Equal(ErrorStrings.GitUnavailable, exception.Message); 237Assert.Equal(ErrorStrings.GitCommandFailed, exception.Message); 389Assert.Equal(ErrorStrings.GitCommandFailed, exception.Message);
NuGet\BundleNuGetPackageCacheTests.cs (1)
443string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, 1),
NuGet\NuGetClientTests.cs (1)
507Assert.Equal(Resources.ErrorStrings.FailedToParsePackageSearchResults, exception.Output);
Packaging\IntegrationSourceTests.cs (1)
50string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidIntegrationSource, "integrationSources.default.patterns"),
Packaging\PackageSourceIdentityTests.cs (1)
81Assert.Equal(string.Format(CultureInfo.CurrentCulture, ErrorStrings.NuGetSourceKeyAlreadyInUse, reservedKey), exception.Message);
Projects\GuestAppHostProjectTests.cs (6)
116Assert.Equal(ErrorStrings.HostingIntegrationsFeatureNotEnabled, exception.Message); 1101message => Markup.Remove(message.Message) == ErrorStrings.LegacyTypeScriptAppHostWarning); 2435Assert.Equal(ErrorStrings.LegacyTypeScriptAppHostWarning, Markup.Remove(m.Message)); 2446/// <see cref="ErrorStrings.CodegenVersionSkewWarning"/> for an SDK update target 2511ErrorStrings.CodegenVersionSkewWarning, 2536Assert.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)); 4085[(OutputLineStream.StdErr, ErrorStrings.IntegrationBuildFailed)], 4131[(OutputLineStream.StdErr, ErrorStrings.IntegrationBuildFailed)], 4174ErrorStrings.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)
108Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitRepositoryUnavailable), exception.Message);
Templating\TemplateEngineFactoryGitTests.cs (3)
123Assert.Equal(string.Format(NewCommandStrings.TemplateRepositoryGitExited, 128, ErrorStrings.GitCommandFailed), exception.Message); 186Assert.Equal(ErrorStrings.GitTimedOut, exception.Message); 215Assert.Equal(ErrorStrings.GitTimedOut, exception.Message);