119 references to ErrorStrings
aspire (82)
Agents\McpConfigFileHelper.cs (1)
96
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfigurationFileMustBeJsonObject, configFilePath));
Backchannel\AppHostCliBackchannel.cs (3)
306
throw new InvalidOperationException(
ErrorStrings
.AlreadyConnectedToBackchannel);
351
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.AppHostIncompatibleWithCli, BaselineCapability),
379
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.AppHostIncompatibleWithCli, BaselineCapability),
Backchannel\ExtensionBackchannel.cs (9)
85
?? throw new InvalidOperationException(
ErrorStrings
.ExtensionTokenMustBeSet);
261
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.InvalidSocketPath, endpoint));
313
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ExtensionIncompatibleWithCli,
329
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ExtensionIncompatibleWithCli,
565
throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.NoSelectionMade, promptText));
598
throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.NoSelectionMade, promptText));
622
throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.NoSelectionMade, promptText));
648
throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.NoSelectionMade, promptText));
674
throw new ExtensionOperationCanceledException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.NoSelectionMade, promptText));
Certificates\CertificateService.cs (4)
104
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.CertificateGenerationFailed, generateResult));
110
interactionService.DisplayMessage(KnownEmojis.Warning,
ErrorStrings
.CertificatesPartiallyTrustedNonInteractive);
114
interactionService.DisplayMessage(KnownEmojis.Warning,
ErrorStrings
.CertificatesNotTrustedNonInteractive);
143
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.CertificatesMayNotBeFullyTrusted, trustResultCode));
CliExecutionContext.cs (1)
63
?? throw new InvalidOperationException(
ErrorStrings
.UnableToRetrieveAssemblyVersion);
Commands\ConfigCommand.cs (11)
80
return CommandResult.Failure(CliExitCodes.InvalidCommand,
ErrorStrings
.ConfigurationKeyRequired);
103
InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfigurationKeyNotFound, key));
140
return CommandResult.Failure(CliExitCodes.InvalidCommand,
ErrorStrings
.ConfigurationKeyRequired);
145
return CommandResult.Failure(CliExitCodes.InvalidCommand,
ErrorStrings
.ConfigurationValueRequired);
168
InteractionService.DisplayError(
ErrorStrings
.LegacyAppHostPathCannotBeSetWithConfigCommand);
174
InteractionService.DisplayError(
ErrorStrings
.GlobalAppHostPathCannotBeSetWithConfigCommand);
191
var errorMessage = string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ErrorSettingConfiguration, ex.Message);
376
return CommandResult.Failure(CliExitCodes.InvalidCommand,
ErrorStrings
.ConfigurationKeyRequired);
389
InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfigurationKeyNotFound, key));
423
InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfigurationKeyNotFound, key));
429
var errorMessage = string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ErrorDeletingConfiguration, ex.Message);
Commands\Sdk\SdkExportCommand.cs (2)
117
ErrorStrings
.SdkExportLanguageDoesNotSupportCodeGeneration,
137
ErrorStrings
.SdkExportGeneratorPackageNotExportable,
Configuration\AspireConfigFile.cs (1)
184
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.InvalidJsonInConfigFile, filePath, ex.Message),
Configuration\ConfigurationService.cs (1)
479
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.InvalidJsonInConfigFile, filePath, ex.Message),
DotNet\DotNetCliRunner.cs (2)
915
var ex = new InvalidOperationException(
ErrorStrings
.CantUseBothWatchAndNoBuild);
1145
throw new InvalidOperationException(
ErrorStrings
.FailedToParseTemplateVersionFromStdout);
NuGet\BundleNuGetPackageCache.cs (1)
169
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.FailedToSearchForPackages, 1),
NuGet\NuGetPackageCache.cs (3)
84
}) ?? throw new NuGetPackageCacheException(
ErrorStrings
.FailedToRetrieveCachedTemplatePackages);
144
throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.FailedToSearchForPackages, result.ExitCode));
210
throw new NuGetPackageCacheException(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.FailedToSearchForPackages, result.ExitCode));
Program.cs (3)
217
ErrorStrings
.GlobalAppHostPathIgnored,
868
errorMessage = string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.UnsupportedLocaleProvided, localeOverride, string.Join(", ", LocaleHelpers.SupportedLocales));
871
errorMessage = string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.InvalidLocaleProvided, localeOverride);
Projects\GuestAppHostProject.cs (6)
218
throw new InvalidOperationException(
ErrorStrings
.HostingIntegrationsFeatureNotEnabled);
1991
$"[yellow]{Markup.Escape(
ErrorStrings
.LegacyTypeScriptAppHostWarning)}[/]",
2120
ErrorStrings
.CodegenVersionSkewWarning,
2162
ErrorStrings
.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)
739
ErrorStrings
.IntegrationBuildPackageDowngradeFailed,
741
:
ErrorStrings
.IntegrationBuildFailed;
Projects\ProjectLocator.cs (22)
371
interactionService.DisplayRawText(
ErrorStrings
.DotNetSdkUnavailableAppHostDiscoveryWarning, ConsoleOutput.Error);
414
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ProjectFileUnsupportedInCurrentEnvironment, relativePath));
428
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ProjectFileMayBeUnbuildableAppHost, relativePath));
509
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ProjectFileUnsupportedInCurrentEnvironment, relativePath));
534
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ProjectFileMayBeUnbuildableAppHost, settingsAppHostRelativePath));
545
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ProjectFileUnsupportedInCurrentEnvironment, settingsAppHostRelativePath));
728
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.AppHostWasSpecifiedButDoesntExist, configFilePath, qualifiedPath));
788
interactionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath));
797
var message = string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.InvalidJsonInConfigFile, settingsFile.FullName, ex.Message);
816
var message = string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfigurationFileMustBeJsonObject, configFilePath);
829
var message = string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfiguredAppHostPathMustBeString, configFilePath, fieldName);
864
interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfiguredAppHostPathHasInvalidCharacters, configFilePath, fieldName));
945
throw new ProjectLocatorException(
ErrorStrings
.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable);
950
throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects);
954
throw new ProjectLocatorException(
ErrorStrings
.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
982
throw new ProjectLocatorException(
ErrorStrings
.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound);
1012
throw new ProjectLocatorException(
ErrorStrings
.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
1062
throw new ProjectLocatorException(
ErrorStrings
.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
1106
throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects);
1110
throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1121
throw new ProjectLocatorException(
ErrorStrings
.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable);
1159
MultipleAppHostProjectsFoundBehavior.Throw => throw new ProjectLocatorException(
ErrorStrings
.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound),
Resources\ErrorStrings.Designer.cs (1)
42
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aspire.Cli.Resources.ErrorStrings", typeof(
ErrorStrings
).Assembly);
Scaffolding\ScaffoldingService.cs (1)
137
throw new InvalidOperationException(
ErrorStrings
.HostingIntegrationsFeatureNotEnabled);
Utils\AppHostHelper.cs (4)
43
interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ProjectCouldNotBeAnalyzed, logFilePath));
49
interactionService.DisplayError(
ErrorStrings
.ProjectIsNotAppHost);
55
interactionService.DisplayError(
ErrorStrings
.CouldNotParseAspireSDKVersion);
62
interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.AspireSDKVersionNotSupported, aspireHostingVersion));
Utils\ConfigurationHelper.cs (1)
291
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.InvalidJsonInConfigFile, filePath, ex.Message),
Utils\MissingJavaScriptToolWarning.cs (1)
38
return string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ProjectFilesCreatedButNodeToolsNotFound, installCommand, installDisplayName);
Utils\SdkInstallHelper.cs (1)
55
ErrorStrings
.MinimumSdkVersionNotMet,
Utils\VersionHelper.cs (1)
73
return PackageUpdateHelpers.GetCurrentAssemblyVersion() ?? throw new InvalidOperationException(
ErrorStrings
.UnableToRetrieveAssemblyVersion);
Aspire.Cli.Tests (37)
Agents\CopilotAgentEnvironmentScannerTests.cs (1)
339
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.ConfigurationFileMustBeJsonObject, mcpConfigPath),
Backchannel\AppHostConnectionResolverTests.cs (1)
151
throw new ProjectLocatorException(
ErrorStrings
.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable)
Certificates\CertificateServiceTests.cs (1)
618
var 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))]
1115
nameof(
ErrorStrings
.GlobalAppHostPathCannotBeSetWithConfigCommand) =>
ErrorStrings
.GlobalAppHostPathCannotBeSetWithConfigCommand,
1116
nameof(
ErrorStrings
.LegacyAppHostPathCannotBeSetWithConfigCommand) =>
ErrorStrings
.LegacyAppHostPathCannotBeSetWithConfigCommand,
Commands\RunCommandTests.cs (1)
1474
Assert.Contains(
ErrorStrings
.ProjectIsNotAppHost, interactionService.DisplayedErrors);
Commands\UpdateCommandRepositoryToolsTests.cs (2)
46
: throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound)
205
throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects)
Commands\UpdateCommandTests.cs (3)
266
throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1331
throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1421
throw new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
DotNetSdkInstallerTests.cs (1)
226
ErrorStrings
.ResourceManager.GetString("MinimumSdkVersionNotMet", CultureInfo.GetCultureInfo("en-US"))!,
NuGet\BundleNuGetPackageCacheTests.cs (1)
379
string.Format(CultureInfo.CurrentCulture,
ErrorStrings
.FailedToSearchForPackages, 1),
Projects\GuestAppHostProjectTests.cs (5)
82
Assert.Equal(
ErrorStrings
.HostingIntegrationsFeatureNotEnabled, exception.Message);
2018
Assert.Equal(
ErrorStrings
.LegacyTypeScriptAppHostWarning, Markup.Remove(m.Message));
2029
/// <see cref="
ErrorStrings
.CodegenVersionSkewWarning"/> for an SDK update target
2093
ErrorStrings
.CodegenVersionSkewWarning,
2118
Assert.Equal(
ErrorStrings
.LegacyTypeScriptAppHostWarning, Markup.Remove(m.Message));
Projects\PrebuiltAppHostServerTests.cs (1)
349
Assert.Equal(
ErrorStrings
.IntegrationBuildFailed, PrebuiltAppHostServer.GetIntegrationBuildFailureMessage(output));
Projects\ProjectLocatorTests.cs (13)
523
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
674
Assert.Equal(
ErrorStrings
.AppHostsMayNotBeBuildable, ex.Message);
705
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
737
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
976
var exception = new ProjectLocatorException(
ErrorStrings
.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1402
Assert.Equal(
ErrorStrings
.NoProjectFileFound, ex.Message);
2046
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
2117
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
2362
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
2426
Assert.Equal(
ErrorStrings
.AppHostsMayNotBeBuildable, ex.Message);
2473
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
2601
Assert.Equal(
ErrorStrings
.ProjectFileDoesntExist, ex.Message);
2967
Assert.Equal(
ErrorStrings
.DotNetSdkUnavailableAppHostDiscoveryWarning, warning.Text);