41 instantiations of ProjectLocatorException
aspire (10)
Projects\ProjectLocator.cs (10)
951
throw new
ProjectLocatorException
(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable);
956
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects);
960
throw new
ProjectLocatorException
(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
988
throw new
ProjectLocatorException
(ErrorStrings.MultipleProjectFilesFound, ProjectLocatorFailureReason.MultipleProjectFilesFound);
1017
throw new
ProjectLocatorException
(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
1067
throw new
ProjectLocatorException
(ErrorStrings.ProjectFileDoesntExist, ProjectLocatorFailureReason.ProjectFileDoesntExist);
1111
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.UnsupportedProjects);
1115
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1126
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);
117
throw new
ProjectLocatorException
("multiple", ProjectLocatorFailureReason.MultipleProjectFilesFound)
154
throw new
ProjectLocatorException
(ErrorStrings.AppHostsMayNotBeBuildable, ProjectLocatorFailureReason.AppHostsMayNotBeBuildable)
188
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)
1247
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1252
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1257
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1262
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Project file does not exist.", Aspire.Cli.Projects.ProjectLocatorFailureReason.ProjectFileDoesntExist);
1927
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
1932
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
1937
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
1942
throw new Aspire.Cli.Projects.
ProjectLocatorException
("No project file found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.NoProjectFileFound);
1952
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
1957
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
1962
throw new Aspire.Cli.Projects.
ProjectLocatorException
("Multiple project files found.", Aspire.Cli.Projects.ProjectLocatorFailureReason.MultipleProjectFilesFound);
1967
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)
262
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1327
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1417
throw new
ProjectLocatorException
(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
Projects\ProjectLocatorTests.cs (1)
949
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)
117
catch (
ProjectLocatorException
ex)
Commands\AddCommand.cs (1)
414
catch (
ProjectLocatorException
ex)
Commands\AppHostLauncher.cs (1)
163
catch (
ProjectLocatorException
ex)
Commands\BaseCommand.cs (1)
298
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)
623
catch (
ProjectLocatorException
ex)
Commands\StopCommand.cs (1)
168
catch (
ProjectLocatorException
ex)
Commands\UpdateCommand.cs (1)
422
catch (
ProjectLocatorException
ex)
Projects\ProjectLocator.cs (1)
1407
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)
492
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () => {
638
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
669
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
701
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
949
var
exception = new ProjectLocatorException(ErrorStrings.NoProjectFileFound, ProjectLocatorFailureReason.NoProjectFileFound);
1272
var
exception = await Assert.ThrowsAsync<
ProjectLocatorException
>(() =>
1371
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>{
1979
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2050
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2295
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2355
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2402
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
2530
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3104
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3151
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3207
var
ex = await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>
3741
await Assert.ThrowsAsync<
ProjectLocatorException
>(async () =>