22 instantiations of ProjectUpdaterException
aspire (22)
Projects\FallbackProjectParser.cs (2)
54throw new ProjectUpdaterException($"Unsupported project file type: {projectFile.Extension}. Expected .csproj or .cs file."); 65throw new ProjectUpdaterException($"Failed to parse project file '{projectFile.FullName}' using fallback parser: {ex.Message}", ex);
Projects\ProjectUpdater.cs (15)
98throw new ProjectUpdaterException(UpdateCommandStrings.FailedDiscoverNuGetConfig); 203throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedToRestoreAfterUpdateFormat, projectFile.FullName)); 331throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedFetchItemsAndPropertiesFormat, projectFile.FullName)); 401throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.NoPackageFoundFormat, packageId, context.Channel.Name)); 693throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, 708throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindRootProjectElementFormat, projectFile.FullName)); 726throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindSdkElementFormat, projectFile.FullName)); 865throw new ProjectUpdaterException( 887throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, 981var referencedProjectPath = projectReference.GetProperty("FullPath").GetString() ?? throw new ProjectUpdaterException(UpdateCommandStrings.ProjectReferenceNoFullPath); 992var packageId = packageReference.GetProperty("Identity").GetString() ?? throw new ProjectUpdaterException(UpdateCommandStrings.PackageReferenceNoIdentity); 1144throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, 1151throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, 1225throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName)); 1253throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName));
Projects\RepositoryToolUpdater.cs (5)
190throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.ToolManifestChangedFormat, original.File.FullName)); 251throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.NoPackageFoundFormat, DotNetPackageId, channel.Name)); 262throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.FailedResolveNpmToolFormat, version ?? "latest")); 268return version ?? throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, 310throw new ProjectUpdaterException(string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.FailedReadToolManifestFormat, path, ex.Message));
20 references to ProjectUpdaterException
aspire (4)
Commands\UpdateCommand.cs (1)
445catch (ProjectUpdaterException ex)
Projects\FallbackProjectParser.cs (1)
57catch (ProjectUpdaterException)
Projects\ProjectUpdater.cs (2)
349catch (ProjectUpdaterException ex) when (IsAppHostProject(projectFile, context.AppHostProjectFile)) 1158catch (ProjectUpdaterException)
Aspire.Cli.Tests (16)
Projects\FallbackProjectParserTests.cs (3)
199Assert.Throws<ProjectUpdaterException>(() => 361var exception = Assert.Throws<ProjectUpdaterException>(() =>
Projects\ProjectUpdaterTests.cs (5)
2146var exception = await Assert.ThrowsAsync<ProjectUpdaterException>(async () => 2256var exception = await Assert.ThrowsAsync<ProjectUpdaterException>(async () => 2536await Assert.ThrowsAsync<ProjectUpdaterException>(() =>
Projects\RepositoryToolUpdaterTests.cs (8)
413var exception = await Assert.ThrowsAsync<ProjectUpdaterException>(() => 442var exception = await Assert.ThrowsAsync<ProjectUpdaterException>(() => 556var exception = await Assert.ThrowsAsync<ProjectUpdaterException>(() => 715var exception = await Assert.ThrowsAsync<ProjectUpdaterException>(updateStep.Callback);