119 references to ErrorStrings
aspire (82)
Agents\McpConfigFileHelper.cs (1)
96string.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)
80return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationKeyRequired); 103InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 140return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationKeyRequired); 145return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationValueRequired); 168InteractionService.DisplayError(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand); 174InteractionService.DisplayError(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand); 191var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorSettingConfiguration, ex.Message); 376return CommandResult.Failure(CliExitCodes.InvalidCommand, ErrorStrings.ConfigurationKeyRequired); 389InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 423InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key)); 429var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorDeletingConfiguration, ex.Message);
Commands\Sdk\SdkExportCommand.cs (2)
117ErrorStrings.SdkExportLanguageDoesNotSupportCodeGeneration, 137ErrorStrings.SdkExportGeneratorPackageNotExportable,
Configuration\AspireConfigFile.cs (1)
184string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, filePath, ex.Message),
Configuration\ConfigurationService.cs (1)
479string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, filePath, ex.Message),
DotNet\DotNetCliRunner.cs (2)
915var ex = new InvalidOperationException(ErrorStrings.CantUseBothWatchAndNoBuild); 1145throw new InvalidOperationException(ErrorStrings.FailedToParseTemplateVersionFromStdout);
NuGet\BundleNuGetPackageCache.cs (1)
169string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, 1),
NuGet\NuGetPackageCache.cs (3)
84}) ?? throw new NuGetPackageCacheException(ErrorStrings.FailedToRetrieveCachedTemplatePackages); 144throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, result.ExitCode)); 210throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, result.ExitCode));
Program.cs (3)
217ErrorStrings.GlobalAppHostPathIgnored, 868errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.UnsupportedLocaleProvided, localeOverride, string.Join(", ", LocaleHelpers.SupportedLocales)); 871errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidLocaleProvided, localeOverride);
Projects\GuestAppHostProject.cs (6)
218throw new InvalidOperationException(ErrorStrings.HostingIntegrationsFeatureNotEnabled); 1991$"[yellow]{Markup.Escape(ErrorStrings.LegacyTypeScriptAppHostWarning)}[/]", 2120ErrorStrings.CodegenVersionSkewWarning, 2162ErrorStrings.CodegenIncompatibleSdkSummary, 2187_interactionService.DisplayMessage(KnownEmojis.Information, $"[grey]{Markup.Escape(ErrorStrings.CodegenDebugHint)}[/]", allowMarkup: true); 2191_interactionService.DisplayMessage(KnownEmojis.Microscope, $"[grey]{Markup.Escape(ErrorStrings.CodegenDebugHeader)}[/]", allowMarkup: true);
Projects\PrebuiltAppHostServer.cs (2)
739ErrorStrings.IntegrationBuildPackageDowngradeFailed, 741: ErrorStrings.IntegrationBuildFailed;
Projects\ProjectLocator.cs (22)
371interactionService.DisplayRawText(ErrorStrings.DotNetSdkUnavailableAppHostDiscoveryWarning, ConsoleOutput.Error); 414interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, relativePath)); 428interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileMayBeUnbuildableAppHost, relativePath)); 509interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, relativePath)); 534interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileMayBeUnbuildableAppHost, settingsAppHostRelativePath)); 545interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.ProjectFileUnsupportedInCurrentEnvironment, settingsAppHostRelativePath)); 728interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, configFilePath, qualifiedPath)); 788interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath)); 797var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, settingsFile.FullName, ex.Message); 816var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, configFilePath); 829var message = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfiguredAppHostPathMustBeString, configFilePath, fieldName); 864interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfiguredAppHostPathHasInvalidCharacters, configFilePath, fieldName)); 945throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable); 950throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects); 954throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 982throw new ProjectLocatorException(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound); 1012throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 1062throw new ProjectLocatorException(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist); 1106throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects); 1110throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1121throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable); 1159MultipleAppHostProjectsFoundBehavior.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)
291string.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 (37)
Agents\CopilotAgentEnvironmentScannerTests.cs (1)
339string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, mcpConfigPath),
Backchannel\AppHostConnectionResolverTests.cs (1)
151throw new ProjectLocatorException(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable)
Certificates\CertificateServiceTests.cs (1)
618var expectedMessage = string.Format(System.Globalization.CultureInfo.CurrentCulture, ErrorStrings.CertificateGenerationFailed, EnsureCertificateResult.ErrorCreatingTheCertificate);
Commands\ConfigCommandTests.cs (7)
1050[InlineData("appHost.path", nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand))] 1051[InlineData("appHost:path", nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand))] 1052[InlineData("appHostPath", nameof(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand))] 1115nameof(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand) => ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand, 1116nameof(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand) => ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand,
Commands\RunCommandTests.cs (1)
1474Assert.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); 1331throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1421throw new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
DotNetSdkInstallerTests.cs (1)
226ErrorStrings.ResourceManager.GetString("MinimumSdkVersionNotMet", CultureInfo.GetCultureInfo("en-US"))!,
NuGet\BundleNuGetPackageCacheTests.cs (1)
379string.Format(CultureInfo.CurrentCulture, ErrorStrings.FailedToSearchForPackages, 1),
Projects\GuestAppHostProjectTests.cs (5)
82Assert.Equal(ErrorStrings.HostingIntegrationsFeatureNotEnabled, exception.Message); 2018Assert.Equal(ErrorStrings.LegacyTypeScriptAppHostWarning, Markup.Remove(m.Message)); 2029/// <see cref="ErrorStrings.CodegenVersionSkewWarning"/> for an SDK update target 2093ErrorStrings.CodegenVersionSkewWarning, 2118Assert.Equal(ErrorStrings.LegacyTypeScriptAppHostWarning, Markup.Remove(m.Message));
Projects\PrebuiltAppHostServerTests.cs (1)
349Assert.Equal(ErrorStrings.IntegrationBuildFailed, PrebuiltAppHostServer.GetIntegrationBuildFailureMessage(output));
Projects\ProjectLocatorTests.cs (13)
523Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 674Assert.Equal(ErrorStrings.AppHostsMayNotBeBuildable, ex.Message); 705Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 737Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 976var exception = new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound); 1402Assert.Equal(ErrorStrings.NoProjectFileFound, ex.Message); 2046Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2117Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2362Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2426Assert.Equal(ErrorStrings.AppHostsMayNotBeBuildable, ex.Message); 2473Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2601Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2967Assert.Equal(ErrorStrings.DotNetSdkUnavailableAppHostDiscoveryWarning, warning.Text);