43 instantiations of ProjectLocatorException
aspire (10)
Projects\ProjectLocator.cs (10)
953
throw new
ProjectLocatorException
(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable);
958
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects);
962
throw new
ProjectLocatorException
(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
990
throw new
ProjectLocatorException
(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound);
1020
throw new
ProjectLocatorException
(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
1070
throw new
ProjectLocatorException
(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
1114
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects);
1118
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1129
throw new
ProjectLocatorException
(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable);
1167
MultipleAppHostProjectsFoundBehavior.Throw => throw new
ProjectLocatorException
(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound),
Aspire.Cli.Tests (33)
Backchannel\AppHostConnectionResolverTests.cs (4)
77
throw new
ProjectLocatorException
("should not be invoked", ProjectLocatorFailureReason.ProjectFileDoesntExist);
196
throw new
ProjectLocatorException
("multiple", ProjectLocatorFailureReason.MultipleProjectFilesFound)
234
throw new
ProjectLocatorException
(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable)
269
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)
1721
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1726
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1731
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1736
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
2537
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2542
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2547
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2552
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
2562
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
2567
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
2572
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
2577
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
Commands\StopCommandTests.cs (2)
332
throw new
ProjectLocatorException
("Project file does not exist.", ProjectLocatorFailureReason.ProjectFileDoesntExist)
1412
throw new
ProjectLocatorException
("Multiple project files found.", ProjectLocatorFailureReason.MultipleProjectFilesFound)
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);
1384
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1474
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
Projects\ProjectLocatorTests.cs (1)
977
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);
49 references to ProjectLocatorException
aspire (17)
Backchannel\AppHostConnectionResolver.cs (1)
130
catch (
ProjectLocatorException
ex)
Commands\AddCommand.cs (1)
443
catch (
ProjectLocatorException
ex)
Commands\AgentMcpCommand.cs (1)
153
catch (
ProjectLocatorException
ex)
Commands\AppHostLauncher.cs (1)
164
catch (
ProjectLocatorException
ex)
Commands\BaseCommand.cs (1)
333
internal static CommandResult HandleProjectLocatorException(
ProjectLocatorException
ex, IInteractionService InteractionService, AspireCliTelemetry telemetry)
Commands\IntegrationSearchCommand.cs (1)
135
catch (
ProjectLocatorException
ex)
Commands\PipelineCommandBase.cs (1)
448
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)
708
catch (
ProjectLocatorException
ex)
Commands\StopCommand.cs (1)
263
catch (
ProjectLocatorException
ex)
Commands\UpdateCommand.cs (3)
195
catch (
ProjectLocatorException
ex) when (ex.FailureReason is ProjectLocatorFailureReason.NoProjectFileFound or ProjectLocatorFailureReason.ProjectFileDoesntExist)
278
catch (
ProjectLocatorException
ex) when (passedAppHostProjectFile is null && ex.FailureReason == ProjectLocatorFailureReason.NoProjectFileFound)
515
catch (
ProjectLocatorException
ex)
Projects\ProjectLocator.cs (1)
1408
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 () =>
666
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
697
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
729
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
977
var
exception = new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1300
var
exception = await Assert.ThrowsAsync<
ProjectLocatorException
>(() =>
1399
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2043
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2114
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2359
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2419
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2466
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2594
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3188
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3235
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3291
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3825
await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>