145 references to ExitCodeConstants
aspire (99)
Backchannel\ExtensionRpcTarget.cs (1)
45Environment.Exit(ExitCodeConstants.Success);
Commands\AddCommand.cs (10)
75return ExitCodeConstants.SdkNotInstalled; 91return ExitCodeConstants.FailedToFindProject; 133return ExitCodeConstants.FailedToAddPackage; 177return addPackageResult == 0 ? ExitCodeConstants.Success : ExitCodeConstants.FailedToAddPackage; 185return ExitCodeConstants.FailedToAddPackage; 190return ExitCodeConstants.Success; 200return ExitCodeConstants.FailedToAddPackage; 205return ExitCodeConstants.FailedToAddPackage; 211return ExitCodeConstants.FailedToAddPackage;
Commands\BaseCommand.cs (6)
64return ExitCodeConstants.FailedToFindProject; 69return ExitCodeConstants.FailedToFindProject; 74return ExitCodeConstants.FailedToFindProject; 79return ExitCodeConstants.FailedToFindProject; 84return ExitCodeConstants.FailedToFindProject; 88return ExitCodeConstants.FailedToFindProject;
Commands\CacheCommand.cs (3)
31return Task.FromResult(ExitCodeConstants.InvalidCommand); 121return Task.FromResult(ExitCodeConstants.Success); 126return Task.FromResult(ExitCodeConstants.InvalidCommand);
Commands\ConfigCommand.cs (16)
52return ExitCodeConstants.InvalidCommand; 89return Task.FromResult(ExitCodeConstants.InvalidCommand); 108return ExitCodeConstants.Success; 113return ExitCodeConstants.ConfigNotFound; 153return Task.FromResult(ExitCodeConstants.InvalidCommand); 159return Task.FromResult(ExitCodeConstants.InvalidCommand); 189return ExitCodeConstants.Success; 194return ExitCodeConstants.InvalidCommand; 217return ExitCodeConstants.Success; 226return ExitCodeConstants.Success; 231return ExitCodeConstants.Success; 263return Task.FromResult(ExitCodeConstants.InvalidCommand); 277return ExitCodeConstants.ConfigNotFound; 306return ExitCodeConstants.Success; 311return ExitCodeConstants.InvalidCommand; 317return ExitCodeConstants.InvalidCommand;
Commands\ExecCommand.cs (14)
92return ExitCodeConstants.SdkNotInstalled; 107return ExitCodeConstants.InvalidCommand; 115return ExitCodeConstants.InvalidCommand; 123return ExitCodeConstants.InvalidCommand; 143return ExitCodeConstants.FailedToFindProject; 149return ExitCodeConstants.SingleFileAppHostNotSupported; 163return ExitCodeConstants.FailedToDotnetRunAppHost; 244return ExitCodeConstants.Success; 266return ExitCodeConstants.Success; 273return ExitCodeConstants.FailedToDotnetRunAppHost; 279return ExitCodeConstants.Success; 295return ExitCodeConstants.FailedToTrustCertificates; 301return ExitCodeConstants.FailedToDotnetRunAppHost; 307return ExitCodeConstants.FailedToDotnetRunAppHost;
Commands\ExtensionInternalCommand.cs (3)
28return Task.FromResult(ExitCodeConstants.Success); 57return ExitCodeConstants.Success; 61return ExitCodeConstants.FailedToFindProject;
Commands\InitCommand.cs (6)
102return ExitCodeConstants.SdkNotInstalled; 168return ExitCodeConstants.Success; 299return ExitCodeConstants.FailedToInstallTemplates; 337return ExitCodeConstants.FailedToCreateNewProject; 479return ExitCodeConstants.Success; 498return ExitCodeConstants.FailedToCreateNewProject;
Commands\NewCommand.cs (1)
129return ExitCodeConstants.SdkNotInstalled;
Commands\PipelineCommandBase.cs (10)
116return ExitCodeConstants.SdkNotInstalled; 135return ExitCodeConstants.FailedToFindProject; 168return ExitCodeConstants.AppHostIncompatible; 187return ExitCodeConstants.FailedToBuildArtifacts; 266return ExitCodeConstants.FailedToBuildArtifacts; 270return ExitCodeConstants.Success; 277return ExitCodeConstants.FailedToBuildArtifacts; 300return ExitCodeConstants.FailedToBuildArtifacts; 308return pendingRun is { } && debugMode ? await pendingRun : ExitCodeConstants.FailedToBuildArtifacts; 315return ExitCodeConstants.FailedToBuildArtifacts;
Commands\RunCommand.cs (10)
102return ExitCodeConstants.Success; 108return ExitCodeConstants.SdkNotInstalled; 123return ExitCodeConstants.FailedToFindProject; 159return ExitCodeConstants.FailedToBuildArtifacts; 176return ExitCodeConstants.FailedToDotnetRunAppHost; 233return ExitCodeConstants.DashboardFailure; 342return ExitCodeConstants.Success; 358return ExitCodeConstants.FailedToTrustCertificates; 364return ExitCodeConstants.FailedToDotnetRunAppHost; 370return ExitCodeConstants.FailedToDotnetRunAppHost;
Commands\UpdateCommand.cs (6)
118return ExitCodeConstants.InvalidCommand; 131return ExitCodeConstants.FailedToFindProject; 177return ExitCodeConstants.FailedToUpgradeProject; 183return ExitCodeConstants.FailedToUpgradeProject; 233return ExitCodeConstants.InvalidCommand; 251return ExitCodeConstants.InvalidCommand;
DotNet\DotNetCliRunner.cs (5)
430return (ExitCodeConstants.FailedToInstallTemplates, null); 586return ExitCodeConstants.Success; 624return ExitCodeConstants.FailedToDotnetRunAppHost; 1039return (ExitCodeConstants.FailedToAddPackage, null); 1057return (ExitCodeConstants.FailedToAddPackage, null);
Interaction\ConsoleInteractionService.cs (1)
157return ExitCodeConstants.AppHostIncompatible;
Templating\DotNetTemplateFactory.cs (7)
404return new TemplateResult(ExitCodeConstants.FailedToInstallTemplates); 438return new TemplateResult(ExitCodeConstants.FailedToCreateNewProject); 443return new TemplateResult(ExitCodeConstants.FailedToCreateNewProject); 454return new TemplateResult(ExitCodeConstants.Success, outputPath); 459return new TemplateResult(ExitCodeConstants.FailedToCreateNewProject); 464return new TemplateResult(ExitCodeConstants.FailedToTrustCertificates); 469return new TemplateResult(ExitCodeConstants.FailedToCreateNewProject);
Aspire.Cli.Tests (46)
CliSmokeTests.cs (1)
14Assert.Equal(ExitCodeConstants.InvalidCommand, exitCode);
Commands\AddCommandTests.cs (1)
444Assert.Equal(ExitCodeConstants.FailedToAddPackage, exitCode);
Commands\ConfigCommandTests.cs (1)
53Assert.Equal(ExitCodeConstants.InvalidCommand, exitCode);
Commands\DeployCommandTests.cs (4)
62Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); // Ensure the command fails 96Assert.Equal(ExitCodeConstants.AppHostIncompatible, exitCode); // Ensure the command fails 130Assert.Equal(ExitCodeConstants.FailedToBuildArtifacts, exitCode); // Ensure the command fails 396Assert.Equal(ExitCodeConstants.FailedToBuildArtifacts, exitCode); // Ensure the command returns a non-zero exit code
Commands\DoCommandTests.cs (1)
280Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode);
Commands\ExecCommandTests.cs (7)
36Assert.Equal(ExitCodeConstants.Success, exitCode); 54Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 72Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 90Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 113Assert.Equal(ExitCodeConstants.Success, exitCode); 134Assert.Equal(ExitCodeConstants.InvalidCommand, exitCode); 165Assert.Equal(ExitCodeConstants.Success, exitCode);
Commands\ExtensionInternalCommandTests.cs (5)
54Assert.Equal(ExitCodeConstants.Success, exitCode); 80Assert.Equal(ExitCodeConstants.Success, exitCode); 126Assert.Equal(ExitCodeConstants.Success, exitCode); 164Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 182Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode);
Commands\NewCommandTests.cs (3)
392Assert.Equal(ExitCodeConstants.FailedToCreateNewProject, exitCode); 446Assert.Equal(ExitCodeConstants.FailedToTrustCertificates, exitCode); 499Assert.Equal(ExitCodeConstants.FailedToCreateNewProject, exitCode);
Commands\PublishCommandTests.cs (4)
56Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); // Ensure the command fails 87Assert.Equal(ExitCodeConstants.AppHostIncompatible, exitCode); // Ensure the command fails 118Assert.Equal(ExitCodeConstants.FailedToBuildArtifacts, exitCode); // Ensure the command fails 161Assert.Equal(ExitCodeConstants.FailedToBuildArtifacts, exitCode); // Ensure the command fails
Commands\RunCommandTests.cs (9)
54Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 71Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 89Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 139Assert.Equal(ExitCodeConstants.FailedToTrustCertificates, exitCode); 269Assert.Equal(ExitCodeConstants.Success, exitCode); 325Assert.Equal(ExitCodeConstants.Success, exitCode); 401Assert.Equal(ExitCodeConstants.DashboardFailure, exitCode); 490Assert.Equal(ExitCodeConstants.Success, exitCode); 553Assert.Equal(ExitCodeConstants.Success, exitCode);
Commands\SdkInstallerTests.cs (7)
32Assert.Equal(ExitCodeConstants.SdkNotInstalled, exitCode); 54Assert.Equal(ExitCodeConstants.SdkNotInstalled, exitCode); 76Assert.Equal(ExitCodeConstants.SdkNotInstalled, exitCode); 98Assert.Equal(ExitCodeConstants.SdkNotInstalled, exitCode); 120Assert.Equal(ExitCodeConstants.SdkNotInstalled, exitCode); 143Assert.Equal(ExitCodeConstants.SdkNotInstalled, exitCode); 166Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode);
Commands\UpdateCommandTests.cs (2)
202Assert.Equal(ExitCodeConstants.FailedToFindProject, exitCode); 549Assert.Equal(ExitCodeConstants.FailedToUpgradeProject, exitCode);
DotNet\DotNetCliRunnerTests.cs (1)
563Assert.Equal(ExitCodeConstants.Success, exitCode);