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