10 instantiations of NuGetPackageNotFoundException
dotnet (6)
Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
353throw new NuGetPackageNotFoundException($"Requested workload version {packageVersion} of {id} but found version {downloadedPackageVersion} instead.");
NugetPackageDownloader\NuGetPackageDownloader.cs (5)
113throw new NuGetPackageNotFoundException( 498throw new NuGetPackageNotFoundException( 573throw new NuGetPackageNotFoundException( 584throw new NuGetPackageNotFoundException( 714throw new NuGetPackageNotFoundException(string.Format(CliStrings.IsNotFoundInNuGetFeeds,
Microsoft.DotNet.Tools.Tests.ComponentMocks (4)
MockNuGetPackageDownloader.cs (3)
69return Task.FromException<string>(new NuGetPackageNotFoundException(string.Format(CliStrings.IsNotFoundInNuGetFeeds, packageId, MOCK_FEEDS_TEXT))); 126return Task.FromException<NuGetVersion>(new NuGetPackageNotFoundException(string.Format(CliStrings.IsNotFoundInNuGetFeeds, packageId, MOCK_FEEDS_TEXT))); 142return Task.FromException<(NuGetVersion version, PackageSource source)>(new NuGetPackageNotFoundException(string.Format(CliStrings.IsNotFoundInNuGetFeeds, packageId, MOCK_FEEDS_TEXT)));
ToolPackageDownloaderMock2.cs (1)
121throw new NuGetPackageNotFoundException(string.Format(CliStrings.IsNotFoundInNuGetFeeds, $"Version {packageVersion} of {packageId}", MockNuGetPackageDownloader.MOCK_FEEDS_TEXT));
13 references to NuGetPackageNotFoundException
dotnet (7)
Commands\Workload\Install\NetSdkMsiInstallerClient.cs (3)
363catch (Exception ex) when (ex is NuGetPackageNotFoundException || ex.InnerException is NuGetPackageNotFoundException) 365throw new GracefulException(string.Format(CliCommandStrings.WorkloadVersionRequestedNotFound, workloadSetVersion), ex is NuGetPackageNotFoundException ? ex : ex.InnerException);
Commands\Workload\Install\WorkloadManifestUpdater.cs (2)
291catch (NuGetPackageNotFoundException) 331catch (NuGetPackageNotFoundException)
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (2)
91catch (NuGetPackageNotFoundException) 183catch (NuGetPackageNotFoundException)
dotnet.Tests (2)
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (2)
193var ex = Assert.Throws<NuGetPackageNotFoundException>(() => toolInstallGlobalOrToolPathCommand.Execute());
Microsoft.DotNet.PackageInstall.Tests (4)
NuGetPackageInstallerTests.cs (4)
48await Assert.ThrowsAsync<NuGetPackageNotFoundException>(() => 68await Assert.ThrowsAsync<NuGetPackageNotFoundException>(() => 85await Assert.ThrowsAsync<NuGetPackageNotFoundException>(() => 120await Assert.ThrowsAsync<NuGetPackageNotFoundException>(() =>