41 instantiations of ProjectLocatorException
aspire (10)
Projects\ProjectLocator.cs (10)
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),
Aspire.Cli.Tests (31)
Backchannel\AppHostConnectionResolverTests.cs (4)
33
throw new
ProjectLocatorException
("should not be invoked", ProjectLocatorFailureReason.ProjectFileDoesntExist);
114
throw new
ProjectLocatorException
("multiple", ProjectLocatorFailureReason.MultipleProjectFilesFound)
151
throw new
ProjectLocatorException
(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable)
185
throw new
ProjectLocatorException
("missing", ProjectLocatorFailureReason.ProjectFileDoesntExist)
Commands\ExtensionInternalCommandTests.cs (4)
362
throw new
ProjectLocatorException
("No AppHost project found.", ProjectLocatorFailureReason.NoProjectFileFound);
367
throw new
ProjectLocatorException
("No AppHost project found.", ProjectLocatorFailureReason.NoProjectFileFound);
376
throw new
ProjectLocatorException
("No AppHost project found.", ProjectLocatorFailureReason.NoProjectFileFound);
384
throw new
ProjectLocatorException
("No AppHost project found.", ProjectLocatorFailureReason.NoProjectFileFound);
Commands\ResourceCommandTests.cs (1)
171
throw new
ProjectLocatorException
("multiple", ProjectLocatorFailureReason.MultipleProjectFilesFound);
Commands\RunCommandTests.cs (12)
1664
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1669
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1674
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1679
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
2480
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2485
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2490
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2495
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2505
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
2510
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
2515
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
2520
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
Commands\StopCommandTests.cs (2)
67
throw new
ProjectLocatorException
("Project file does not exist.", ProjectLocatorFailureReason.ProjectFileDoesntExist)
1138
throw new
ProjectLocatorException
("Multiple project files found.", ProjectLocatorFailureReason.MultipleProjectFilesFound)
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);
Projects\ProjectLocatorTests.cs (1)
976
var exception = new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
TestServices\NoProjectFileProjectLocator.cs (4)
12
throw new
ProjectLocatorException
("No project file found.", ProjectLocatorFailureReason.NoProjectFileFound);
17
throw new
ProjectLocatorException
("No project file found.", ProjectLocatorFailureReason.NoProjectFileFound);
22
throw new
ProjectLocatorException
("No project file found.", ProjectLocatorFailureReason.NoProjectFileFound);
27
throw new
ProjectLocatorException
("No project file found.", ProjectLocatorFailureReason.NoProjectFileFound);
46 references to ProjectLocatorException
aspire (14)
Backchannel\AppHostConnectionResolver.cs (1)
118
catch (
ProjectLocatorException
ex)
Commands\AddCommand.cs (1)
414
catch (
ProjectLocatorException
ex)
Commands\AppHostLauncher.cs (1)
164
catch (
ProjectLocatorException
ex)
Commands\BaseCommand.cs (1)
308
internal static CommandResult HandleProjectLocatorException(
ProjectLocatorException
ex, IInteractionService InteractionService, AspireCliTelemetry telemetry)
Commands\IntegrationSearchCommand.cs (1)
133
catch (
ProjectLocatorException
ex)
Commands\PipelineCommandBase.cs (1)
423
catch (
ProjectLocatorException
ex)
Commands\RestoreCommand.cs (2)
82
catch (
ProjectLocatorException
ex) when (ex.FailureReason is ProjectLocatorFailureReason.NoProjectFileFound or ProjectLocatorFailureReason.ProjectFileDoesntExist)
176
catch (
ProjectLocatorException
ex)
Commands\RunCommand.cs (1)
700
catch (
ProjectLocatorException
ex)
Commands\StopCommand.cs (1)
169
catch (
ProjectLocatorException
ex)
Commands\UpdateCommand.cs (1)
422
catch (
ProjectLocatorException
ex)
Projects\ProjectLocator.cs (1)
1424
public static (int ExitCode, string ErrorMessage) GetExitCodeAndMessage(
ProjectLocatorException
ex, bool projectOptionSpecifiedAsDirectory = false)
Utils\EnvironmentChecker\AspireVersionCheck.cs (2)
226
catch (
ProjectLocatorException
ex) when (ex.FailureReason is ProjectLocatorFailureReason.NoProjectFileFound or ProjectLocatorFailureReason.ProjectFileDoesntExist)
236
catch (
ProjectLocatorException
ex)
Aspire.Cli.Tests (32)
Projects\ProjectLocatorTests.cs (32)
519
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () => {
665
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
696
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
728
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
976
var
exception = new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1299
var
exception = await Assert.ThrowsAsync<
ProjectLocatorException
>(() =>
1398
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>{
2041
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2112
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2357
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2417
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2464
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2592
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3186
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3233
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3289
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3823
await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>