198 instantiations of FileNotFoundException
aspire (1)
Commands\UpdateCommand.cs (1)
241throw new FileNotFoundException($"Extracted CLI executable not found: {newExePath}");
Aspire.Dashboard.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
22throw new FileNotFoundException($"Browser path {BrowserPathEnvironmentVariableName}='{browserPath}' does not exist");
Aspire.EndToEnd.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
22throw new FileNotFoundException($"Browser path {BrowserPathEnvironmentVariableName}='{browserPath}' does not exist");
Aspire.Hosting (4)
ApplicationModel\AspireStoreExtensions.cs (1)
27throw new FileNotFoundException("The source file does not exist.", sourceFilename);
Dcp\DcpDependencyCheck.cs (1)
47throw new FileNotFoundException($"The Aspire orchestration component is not installed at \"{dcpPath}\". The application cannot be run without it.", dcpPath);
Dcp\DcpHost.cs (1)
178throw new FileNotFoundException($"The Developer Control Plane is not installed at \"{dcpExePath}\". The application cannot be run without it.", dcpExePath);
DistributedApplicationOptions.cs (1)
153throw new FileNotFoundException($"No assembly with name '{AssemblyName}' exists in the current AppDomain.");
Aspire.RuntimeIdentifier.Tool (1)
Program.cs (1)
51throw new FileNotFoundException("File {0} does not exist. Please ensure the runtime graph path exists.", rgp);
Aspire.Templates.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
22throw new FileNotFoundException($"Browser path {BrowserPathEnvironmentVariableName}='{browserPath}' does not exist");
dotnet (4)
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (1)
220throw new FileNotFoundException(message: null, projectToLoad);
Commands\Workload\Install\NetSdkMsiInstallerClient.cs (2)
773throw new FileNotFoundException(string.Format(CliCommandStrings.ManifestMsiNotFoundInNuGetPackage, extractionPath)); 950throw new FileNotFoundException(string.Format(CliCommandStrings.CacheMissingPackage, packageId, packageVersion, offlineCache));
Installer\Windows\MsiPackageCache.cs (1)
46throw new FileNotFoundException($"CachePayload: Manifest file not found: {manifestPath}");
dotnet.Tests (2)
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs (1)
57string? versionsPropsPath = PathUtility.FindFileInParentDirectories(TestContext.Current.TestExecutionDirectory, $"eng{Path.DirectorySeparatorChar}Version.Details.props") ?? throw new FileNotFoundException("Version.Details.props file not found.");
crossgen.Tests.cs (1)
77throw new FileNotFoundException($"Unable to find '{dotnetExecutable}' in the $PATH");
dotnet-format (5)
Workspaces\MSBuildWorkspaceFinder.cs (5)
39throw new FileNotFoundException(string.Format(Resources.Both_a_MSBuild_project_file_and_solution_file_found_in_0_Specify_which_to_use_with_the_workspace_argument, searchDirectory)); 52throw new FileNotFoundException(string.Format(Resources.Could_not_find_a_MSBuild_project_or_solution_file_in_0_Specify_which_to_use_with_the_workspace_argument, searchDirectory)); 67throw new FileNotFoundException(string.Format(Resources.The_file_0_does_not_appear_to_be_a_valid_project_or_solution_file, Path.GetFileName(workspacePath))); 75throw new FileNotFoundException(string.Format(message, workspacePath)); 100throw new FileNotFoundException(string.Format(multipleFilesFoundError, searchBase));
dotnet-MsiInstallation.Tests (2)
Framework\VirtualMachine.cs (1)
548throw new FileNotFoundException("File not found: " + Path);
WorkloadSetTestsBase.cs (1)
32throw new FileNotFoundException($"Could not find file {remoteFilePath} on VM");
dotnet-svcutil-lib (1)
Metadata\MetadataFileNameManager.cs (1)
261throw new FileNotFoundException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrNoFilesFoundFormat, path));
dotnet-user-jwts (3)
src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (3)
36throw new FileNotFoundException(SecretsHelpersResources.FormatError_MultipleProjectsFound(projectPath)); 41throw new FileNotFoundException(SecretsHelpersResources.FormatError_NoProjectsFound(projectPath)); 49throw new FileNotFoundException(SecretsHelpersResources.FormatError_File_NotFound(projectPath));
dotnet-user-secrets (3)
src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (3)
36throw new FileNotFoundException(SecretsHelpersResources.FormatError_MultipleProjectsFound(projectPath)); 41throw new FileNotFoundException(SecretsHelpersResources.FormatError_NoProjectsFound(projectPath)); 49throw new FileNotFoundException(SecretsHelpersResources.FormatError_File_NotFound(projectPath));
dotnet-watch (1)
Watch\MsBuildFileSetFactory.cs (1)
192return targetPath ?? throw new FileNotFoundException("Fatal error: could not find DotNetWatch.targets");
IdeCoreBenchmarks (1)
SyntacticChangeRangeBenchmark.cs (1)
36throw new FileNotFoundException(csFilePath);
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
84throw new FileNotFoundException(name);
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
84throw new FileNotFoundException(name);
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
AnalyzerTestBase.cs (1)
24throw new FileNotFoundException($"TestFile {source} could not be found at {filePath}.", filePath);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
AnalyzerTestBase.cs (1)
24throw new FileNotFoundException($"TestFile {source} could not be found at {filePath}.", filePath);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
DebugProxyLauncher.cs (1)
132throw new FileNotFoundException(
Microsoft.AspNetCore.Hosting.Tests (1)
Fakes\StartupThrowTypeLoadException.cs (1)
15exceptions: new Exception[] { new FileNotFoundException("Message from the LoaderException") },
Microsoft.AspNetCore.Http.Results (2)
PhysicalFileHttpResult.cs (1)
115throw new FileNotFoundException($"Could not find file: {FileName}", FileName);
VirtualFileHttpResult.cs (1)
111throw new FileNotFoundException($"Could not find file: {FileName}.", FileName);
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\PhysicalFileResultExecutor.cs (1)
34throw new FileNotFoundException(
Infrastructure\VirtualFileResultExecutor.cs (1)
42throw new FileNotFoundException(
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISDeployerBase.cs (1)
102throw new FileNotFoundException("AspNetCoreModuleV2 could not be found.", ancmFile);
Microsoft.AspNetCore.StaticAssets (1)
StaticAssetsInvoker.cs (1)
87throw new FileNotFoundException($"The file '{_resource.AssetPath}' could not be found.");
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileMiddlewareTests.cs (1)
88.ThrowsAsync(new FileNotFoundException());
Microsoft.Build (1)
TypeLoader.cs (1)
187throw new FileNotFoundException(null, assemblyLoadInfo.AssemblyLocation, e);
Microsoft.Build.Engine.UnitTests (1)
Telemetry\OpenTelemetryManager_Tests.cs (1)
107OpenTelemetryManager.Instance.LoadFailureExceptionMessage = new System.IO.FileNotFoundException().ToString();
Microsoft.Build.Tasks.Core (2)
ManifestUtil\Manifest.cs (1)
491throw new FileNotFoundException(null, f.SourcePath);
ManifestUtil\SecurityUtil.cs (1)
663throw new FileNotFoundException(String.Format(CultureInfo.InvariantCulture, resources.GetString("SecurityUtil.SignTargetNotFound"), path), path);
Microsoft.Build.Tasks.UnitTests (4)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (4)
1049throw new FileNotFoundException(path); 1102throw new FileNotFoundException(path); 1283throw new FileNotFoundException(); 2262throw new FileNotFoundException(path);
Microsoft.CodeAnalysis (1)
FileSystem\ICommonCompilerFileSystem.cs (1)
40throw new FileNotFoundException(e.Message, filePath, e);
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\DebuggingSession.cs (2)
395throw new FileNotFoundException(); 405throw new FileNotFoundException();
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
4439[$"proj: <no location>: Error ENC1001: {string.Format(FeaturesResources.ErrorReadingFile, "test-pdb", new FileNotFoundException().Message)}"],
Microsoft.CodeAnalysis.LanguageServer (1)
CustomExportAssemblyLoader.cs (1)
119throw new FileNotFoundException($"Could not find assembly {assemblyName} with code base {codeBasePath} in any extension context.");
Microsoft.CodeAnalysis.Test.Utilities (2)
Mocks\TestMetadataReference.cs (1)
43throw new FileNotFoundException();
Platform\Custom\SigningTestHelpers.cs (1)
121throw new FileNotFoundException("File not found", fullPath);
Microsoft.CodeAnalysis.Workspaces (1)
Serialization\SerializerService_Reference.cs (1)
532throw new FileNotFoundException(FilePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\PathResolver.cs (2)
39msg => new FileNotFoundException(msg)); 64msg => new FileNotFoundException(msg));
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
587throw new FileNotFoundException(Strings.FileNotFound);
Microsoft.Data.Analysis.Tests (1)
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
587throw new FileNotFoundException(Strings.FileNotFound);
Microsoft.DotNet.ApiDiff.Tests (1)
Diff.Attribute.Tests.cs (1)
743throw new FileNotFoundException($"{file.FullName} file not found.");
Microsoft.DotNet.ApiSymbolExtensions (2)
AssemblySymbolLoader.cs (2)
307throw new FileNotFoundException(string.Format(Resources.ShouldProvideValidAssemblyName, directory), nameof(searchPaths)); 374throw new FileNotFoundException(string.Format(Resources.ProvidedPathToLoadBinariesFromNotFound, path));
Microsoft.DotNet.Build.Tasks.Installers (1)
src\CreateWixBuildWixpack.cs (1)
1029throw new FileNotFoundException($"Source file not found: {source}");
Microsoft.DotNet.Build.Tasks.Workloads (2)
CreateVisualStudioWorkload.wix.cs (1)
243throw new FileNotFoundException(message: "NuGet package not found", fileName: sourcePackage);
WorkloadManifestPackage.wix.cs (1)
117throw new FileNotFoundException(string.Format(Strings.WorkloadManifestNotFound, primaryManifest, secondaryManifest));
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
145throw new FileNotFoundException($"File {sourceFile} was not found.");
Microsoft.DotNet.Helix.JobSender (1)
Payloads\ArchivePayload.cs (1)
24throw new FileNotFoundException($"The file '{pathToArchive}' was not found.");
Microsoft.DotNet.Internal.SymbolHelper (1)
SymbolUploadHelperFactory.cs (1)
80throw new FileNotFoundException("Symbol tool not found", expectedSymbolPath);
Microsoft.DotNet.MSBuildSdkResolver (5)
SdkDirectoryWorkloadManifestProvider.cs (5)
168throw new FileNotFoundException(string.Format(Strings.WorkloadVersionNotFound, _workloadSetVersionFromConstructor)); 180_exceptionToThrow = new FileNotFoundException(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, _globalJsonWorkloadSetVersion, _globalJsonPathFromConstructor)); 194throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromInstallStateNotFound, installState.WorkloadVersion, _installStateFilePath)); 366throw new FileNotFoundException(string.Format(Strings.ManifestFromWorkloadSetNotFound, manifestSpecifier.ToString(), _workloadSet.Version)); 383throw new FileNotFoundException(string.Format(Strings.ManifestFromInstallStateNotFound, manifestSpecifier.ToString(), _installStateFilePath));
Microsoft.DotNet.PackageValidation (1)
Package.cs (1)
132throw new FileNotFoundException(string.Format(Resources.NonExistentPackagePath, packagePath));
Microsoft.DotNet.SignCheckLibrary (1)
Verification\DebVerifier.cs (1)
82throw new FileNotFoundException($"The entry '{entryName}' was not found in the archive '{archivePath}'");
Microsoft.DotNet.TemplateLocator (5)
SdkDirectoryWorkloadManifestProvider.cs (5)
168throw new FileNotFoundException(string.Format(Strings.WorkloadVersionNotFound, _workloadSetVersionFromConstructor)); 180_exceptionToThrow = new FileNotFoundException(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, _globalJsonWorkloadSetVersion, _globalJsonPathFromConstructor)); 194throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromInstallStateNotFound, installState.WorkloadVersion, _installStateFilePath)); 366throw new FileNotFoundException(string.Format(Strings.ManifestFromWorkloadSetNotFound, manifestSpecifier.ToString(), _workloadSet.Version)); 383throw new FileNotFoundException(string.Format(Strings.ManifestFromInstallStateNotFound, manifestSpecifier.ToString(), _installStateFilePath));
Microsoft.DotNet.XliffTasks (1)
Tasks\XlfTask.cs (1)
84throw new FileNotFoundException($"File not found: {path}", path);
Microsoft.Extensions.AI.Evaluation.Reporting (3)
Storage\DiskBasedResponseCache.cs (3)
142throw new FileNotFoundException( 160throw new FileNotFoundException( 305throw new FileNotFoundException(
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (4)
Storage\AzureStorageResponseCache.cs (4)
95throw new FileNotFoundException( 116throw new FileNotFoundException( 248throw new FileNotFoundException( 271throw new FileNotFoundException(
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationProvider.cs (1)
72HandleException(ExceptionDispatchInfo.Capture(new FileNotFoundException(error.ToString())));
Microsoft.Extensions.DataIngestion.MarkItDown (1)
MarkItDownReader.cs (1)
41throw new FileNotFoundException("The specified file does not exist.", source.FullName);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Linux\OSFileSystem.cs (1)
56throw new FileNotFoundException();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (3)
Linux\LinuxNetworkMetricsTests.cs (2)
82.Throws(new FileNotFoundException()) 100.Throws(new FileNotFoundException())
Linux\LinuxUtilizationProviderTests.cs (1)
309throw new FileNotFoundException("Simulated failure to read file");
Microsoft.Extensions.FileProviders.Abstractions (1)
NotFoundFileInfo.cs (1)
60throw new FileNotFoundException(SR.Format(SR.FileNotExists, Name));
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
108throw new FileNotFoundException(name);
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
108throw new FileNotFoundException(name);
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
108throw new FileNotFoundException(name);
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
108throw new FileNotFoundException(name);
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
108throw new FileNotFoundException(name);
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
108throw new FileNotFoundException(name);
Microsoft.Maui (1)
Fonts\FontRegistrar.cs (1)
112 throw new FileNotFoundException($"Resource ending with {embeddedFont.Filename} not found.");
Microsoft.Maui.Resizetizer (2)
ResizeImageInfo.cs (2)
83 throw new FileNotFoundException("Unable to find background file: " + fileInfo.FullName, fileInfo.FullName); 122 throw new FileNotFoundException("Unable to find foreground file: " + fgFileInfo.FullName, fgFileInfo.FullName);
Microsoft.ML.PerformanceTests (8)
Numeric\Ranking.cs (5)
29throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _mslrWeb10kValidate)); 32throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _mslrWeb10kTrain)); 80throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _mslrWeb10kTest)); 83throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _mslrWeb10kValidate)); 86throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _mslrWeb10kTrain));
RffTransform.cs (1)
25throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _dataPathDigits));
Text\MultiClassClassification.cs (2)
26throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _dataPathWiki)); 103throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _dataPathWiki));
Microsoft.ML.TestFrameworkCommon (2)
Utility\LibraryLoader.cs (2)
51throw new FileNotFoundException("Could not find or load the native library: " + name); 83throw new FileNotFoundException($"Could not find or load the native library from any name: [ {string.Join(", ", names)} ]");
Microsoft.NET.Build.Containers.IntegrationTests (1)
ToolsetUtils.cs (1)
41throw new FileNotFoundException($"No Microsoft.NET.Build.Containers.*.nupkg found in expected package folder {packageDir}. Tried the following package versions: {string.Join(", ", expectedPackageVersions.Select(v => $"'Microsoft.NET.Build.Containers.{v}.nupkg'"))}. You may need to rerun the build.");
Microsoft.NET.Build.Tasks (5)
SdkDirectoryWorkloadManifestProvider.cs (5)
168throw new FileNotFoundException(string.Format(Strings.WorkloadVersionNotFound, _workloadSetVersionFromConstructor)); 180_exceptionToThrow = new FileNotFoundException(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, _globalJsonWorkloadSetVersion, _globalJsonPathFromConstructor)); 194throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromInstallStateNotFound, installState.WorkloadVersion, _installStateFilePath)); 366throw new FileNotFoundException(string.Format(Strings.ManifestFromWorkloadSetNotFound, manifestSpecifier.ToString(), _workloadSet.Version)); 383throw new FileNotFoundException(string.Format(Strings.ManifestFromInstallStateNotFound, manifestSpecifier.ToString(), _installStateFilePath));
Microsoft.NET.Sdk.WorkloadManifestReader (5)
SdkDirectoryWorkloadManifestProvider.cs (5)
168throw new FileNotFoundException(string.Format(Strings.WorkloadVersionNotFound, _workloadSetVersionFromConstructor)); 180_exceptionToThrow = new FileNotFoundException(string.Format(Strings.WorkloadVersionFromGlobalJsonNotFound, _globalJsonWorkloadSetVersion, _globalJsonPathFromConstructor)); 194throw new FileNotFoundException(string.Format(Strings.WorkloadVersionFromInstallStateNotFound, installState.WorkloadVersion, _installStateFilePath)); 366throw new FileNotFoundException(string.Format(Strings.ManifestFromWorkloadSetNotFound, manifestSpecifier.ToString(), _workloadSet.Version)); 383throw new FileNotFoundException(string.Format(Strings.ManifestFromInstallStateNotFound, manifestSpecifier.ToString(), _installStateFilePath));
Microsoft.NET.TestFramework (6)
Mock\FileSystemMockBuilder.cs (3)
213throw new FileNotFoundException($"Could not find file '{path}'"); 383throw new FileNotFoundException($"Could not find file '{path}'"); 448() => throw new FileNotFoundException($"Could not find file '{source}'"));
TestAsset.cs (1)
302throw new FileNotFoundException("No .csproj file found in the project directory.");
TestContext.cs (1)
341throw new FileNotFoundException($"Could not find folder '{relativePath}' in '{startPath}' or any of its ancestors");
ToolsetInfo.cs (1)
294throw new FileNotFoundException($"Host '{dotnetHost}' not found. {hostNotFoundReason}");
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (2)
254Return New IO.FileNotFoundException(Description) 277Return New IO.FileNotFoundException(Description)
MSBuild (1)
TypeLoader.cs (1)
187throw new FileNotFoundException(null, assemblyLoadInfo.AssemblyLocation, e);
MSBuildTaskHost (1)
TypeLoader.cs (1)
312throw new FileNotFoundException(null, _assemblyLoadInfo.AssemblyLocation, e);
Mvc.Api.Analyzers.Test (1)
Infrastructure\MvcTestSource.cs (1)
18throw new FileNotFoundException($"TestFile {testMethod} could not be found at {filePath}.", filePath);
PresentationCore (5)
MS\Internal\FontCache\FontCacheUtil.cs (1)
748throw new FileNotFoundException(SR.Format(SR.FileNotFoundExceptionWithFileName, fileName), fileName);
MS\Internal\Text\TextInterface\DWriteUtil.cs (1)
20throw new System.IO.FileNotFoundException();
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (2)
926return new System.IO.FileNotFoundException(SR.Format(SR.Media_DownloadFailed, null), exceptionForHR); 932return new System.IO.FileNotFoundException(SR.Media_FileNotFound, exceptionForHR);
System\Windows\Media\ColorContext.cs (1)
529throw new FileNotFoundException(SR.Format(SR.FileNotFoundExceptionWithFileName, profileUri.AbsolutePath), profileUri.AbsolutePath);
ResultsOfTGenerator (2)
Program.cs (2)
210throw new FileNotFoundException(classFilePath); 296throw new FileNotFoundException(testFilePath);
Roslyn.VisualStudio.Next.UnitTests (2)
Remote\SnapshotSerializationTests.cs (2)
713=> throw new FileNotFoundException(fullPath); 727=> throw new FileNotFoundException("can't find");
sdk-tasks (1)
ReplaceFileContents.cs (1)
70throw new FileNotFoundException($"Expected files where not found: {filesNotFoundString}");
System.Console (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System.Diagnostics.FileVersionInfo (2)
System\Diagnostics\FileVersionInfo.cs (1)
276throw new FileNotFoundException(fileName);
System\Diagnostics\FileVersionInfo.Unix.cs (1)
22throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, _fileName), _fileName);
System.Drawing.Common (3)
System\Drawing\Icon.cs (1)
160throw new FileNotFoundException(message: null, fileName: filePath);
System\Drawing\Image.cs (1)
93throw new FileNotFoundException(filename);
System\Drawing\Text\PrivateFontCollection.cs (1)
55throw new FileNotFoundException();
System.Formats.Tar (4)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System\Formats\Tar\TarFile.cs (2)
266throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, sourceFileName)); 313return Task.FromException(new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, sourceFileName)));
System.IO.Compression.ZipFile (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System.IO.FileSystem.DriveInfo (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System.IO.FileSystem.Watcher (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (2)
307throw new FileNotFoundException(SR.Format(SR.PathNotFound_Path, sourceFileName)); 335throw new FileNotFoundException(SR.Format(SR.PathNotFound_Path, sourceFileName));
System.IO.MemoryMappedFiles (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System.IO.Pipes (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System.IO.Ports (2)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
System.Private.CoreLib (11)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
126new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, path), path) : 127new FileNotFoundException(SR.IO_FileNotFound);
src\libraries\Common\src\System\IO\Win32Marshal.cs (1)
34return new FileNotFoundException(
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
1056throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, fullSourceFileName), fullSourceFileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (2)
40throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, FullPath), FullPath); 167throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, FullName), FullName);
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
292throw new FileNotFoundException(SR.Format(SR.FileNotFound_LoadFile, normalizedPath), normalizedPath);
src\System\Reflection\RuntimeAssembly.cs (3)
428throw new FileNotFoundException(SR.IO_NoFileTableInInMemoryAssemblies); 446throw new FileNotFoundException(SR.IO_NoFileTableInInMemoryAssemblies); 667throw new FileNotFoundException(SR.Format(culture, SR.IO_FileNotFound_FileName, an.Name));
src\System\Reflection\TypeNameResolver.CoreCLR.cs (1)
182throw new FileNotFoundException(SR.Format(SR.FileNotFound_ResolveAssembly, assemblyName));
System.Private.Windows.Core (1)
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (1)
51return new FileNotFoundException(SR.GdiplusFileNotFound);
System.Private.Xml (1)
System\Xml\Serialization\Compilation.cs (1)
211throw new FileNotFoundException(null, serializerName);
System.Reflection.MetadataLoadContext (3)
System\Reflection\MetadataLoadContext.CoreAssembly.cs (1)
46e = new FileNotFoundException(SR.UnableToDetermineCoreAssembly);
System\Reflection\MetadataLoadContext.Resolving.cs (1)
64return new RoExceptionAssembly(new FileNotFoundException(SR.Format(SR.FileNotFoundAssembly, refName.FullName)));
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs (1)
33throw new FileNotFoundException(SR.Format(SR.FileNotFoundModule, moduleName));
System.Windows.Forms.IntegrationTests.Common (3)
TestHelpers.cs (3)
63throw new FileNotFoundException("File does not exist", exePath); 83throw new FileNotFoundException("File does not exist", path); 187throw new FileNotFoundException("global.json does not exist");
System.Windows.Forms.Tests (1)
System\Windows\Forms\ClipboardTests.cs (1)
453Clipboard.SetData(format, new FileNotFoundException());
VBCSCompiler.UnitTests (1)
CompilerServerTests.cs (1)
1481throw new FileNotFoundException();
WinShimmer (1)
Program.cs (1)
33throw new FileNotFoundException($"The executable {exePath} was not found.");
230 references to FileNotFoundException
Aspire.Dashboard.Tests (2)
Integration\StartupTests.cs (2)
142var ex = await Assert.ThrowsAsync<FileNotFoundException>(async () =>
Aspire.Hosting (1)
ApplicationModel\AspireStoreExtensions.cs (1)
19/// <exception cref="FileNotFoundException">Thrown when the source file does not exist.</exception>
Aspire.Hosting.Tests (1)
AspireStoreTests.cs (1)
97Assert.Throws<FileNotFoundException>(() => store.GetFileNameWithContent("testfile.txt", "randomfilename.txt"));
csc (1)
src\Compilers\CSharp\csc\Program.cs (1)
20catch (FileNotFoundException e)
dotnet (2)
Commands\Workload\GlobalJsonWorkloadSetFile.cs (1)
52catch (FileNotFoundException)
NugetPackageDownloader\FirstPartyNuGetPackageSigningVerifier.cs (1)
73catch (FileNotFoundException)
dotnet-format.UnitTests (8)
MSBuild\MSBuildWorkspaceFinderTests.cs (8)
27var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path)); 40var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path)); 53var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path)); 66var exception = Assert.Throws<FileNotFoundException>(() => MSBuildWorkspaceFinder.FindWorkspace(testInstance.Path));
dotnet-svcutil-lib (1)
TypeLoader.cs (1)
104catch (FileNotFoundException)
dotnet-watch (1)
FileWatcher\PollingDirectoryWatcher.cs (1)
169catch (FileNotFoundException)
Microsoft.Analyzers.Local (1)
ApiLifecycle\ModelLoader.cs (1)
51catch (FileNotFoundException)
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
285catch (FileNotFoundException)
Microsoft.AspNetCore.Components.WebAssembly (1)
Services\LazyAssemblyLoader.cs (1)
59catch (FileNotFoundException ex)
Microsoft.AspNetCore.Http.Results.Tests (3)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
418await Assert.ThrowsAsync<FileNotFoundException>(
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (2)
478var ex = await Assert.ThrowsAsync<FileNotFoundException>(() => ExecuteAsync(httpContext, path, "text/plain"));
Microsoft.AspNetCore.Mvc.Core.Test (4)
ApplicationParts\RelatedAssemblyPartTest.cs (1)
51Assert.Throws<FileNotFoundException>(() => RelatedAssemblyAttribute.GetRelatedAssemblies(assembly, throwOnError: true));
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
418await Assert.ThrowsAsync<FileNotFoundException>(
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (2)
478var ex = await Assert.ThrowsAsync<FileNotFoundException>(() => ExecuteAsync(httpContext, path, "text/plain"));
Microsoft.AspNetCore.StaticAssets (1)
StaticAssetsInvoker.cs (1)
161catch (FileNotFoundException)
Microsoft.AspNetCore.StaticFiles (3)
HtmlDirectoryFormatter.cs (2)
155catch (FileNotFoundException) 191catch (FileNotFoundException)
StaticFileContext.cs (1)
329catch (FileNotFoundException)
Microsoft.Build (4)
AssemblyNameExtension.cs (1)
198catch (FileNotFoundException)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
342catch (Exception e) when ((e is FileNotFoundException || e is FileLoadException) && sdkResolver.GetType().GetTypeInfo().Name.Equals("NuGetSdkResolver", StringComparison.Ordinal))
ManagedFileSystem.cs (1)
78catch (FileNotFoundException ex) when (ex.FusionLog != null)
TaskEngineAssemblyResolver.cs (1)
133catch (FileNotFoundException)
Microsoft.Build.Engine.OM.UnitTests (1)
ManagedFileSystem.cs (1)
78catch (FileNotFoundException ex) when (ex.FusionLog != null)
Microsoft.Build.Engine.UnitTests (1)
BackEnd\CustomTaskHelper.cs (1)
66catch (FileNotFoundException)
Microsoft.Build.Framework (1)
Telemetry\OpenTelemetryManager.cs (1)
105catch (Exception ex) when (ex is System.IO.FileNotFoundException or System.IO.FileLoadException)
Microsoft.Build.Tasks.Core (12)
AssemblyDependency\ReferenceTable.cs (2)
685catch (FileNotFoundException e) // Why isn't this covered in NotExpectedException? 1205catch (FileNotFoundException e) // Why isn't this covered in NotExpectedException?
AssemblyDependency\ResolveAssemblyReference.cs (1)
2667catch (System.IO.FileNotFoundException)
AssemblyNameExtension.cs (1)
198catch (FileNotFoundException)
GenerateResource.cs (1)
3226catch (FileNotFoundException)
ManagedFileSystem.cs (1)
78catch (FileNotFoundException ex) when (ex.FusionLog != null)
ManifestUtil\XmlUtil.cs (2)
167catch (FileNotFoundException) 184catch (FileNotFoundException)
PiaReference.cs (1)
87catch (FileNotFoundException)
SignFile.cs (1)
67catch (FileNotFoundException ex)
XamlTaskFactory\RelationsParser.cs (1)
193catch (FileNotFoundException e)
XamlTaskFactory\XamlTaskFactory.cs (1)
184catch (FileNotFoundException)
Microsoft.Build.Tasks.UnitTests (1)
FileStateTests.cs (1)
392Assert.Throws<FileNotFoundException>(() =>
Microsoft.Build.Utilities.Core (1)
ManagedFileSystem.cs (1)
78catch (FileNotFoundException ex) when (ex.FusionLog != null)
Microsoft.CodeAnalysis (11)
CommandLine\CommonCompiler.cs (1)
497if (e is FileNotFoundException || e is DirectoryNotFoundException)
MetadataReference\ModuleMetadata.cs (1)
258/// <exception cref="FileNotFoundException">File <paramref name="path"/> not found.</exception>
MetadataReference\PortableExecutableReference.cs (5)
137/// <exception cref="FileNotFoundException">The metadata image is stored in a file that can't be found.</exception> 167/// <exception cref="FileNotFoundException">The metadata image is stored in a file that can't be found.</exception> 180/// <exception cref="FileNotFoundException">The metadata image is stored in a file that can't be found.</exception> 194var fileNotFound = e as FileNotFoundException;
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
473/// If any of the following exceptions: <see cref="BadImageFormatException"/>, <see cref="FileNotFoundException"/>, <see cref="IOException"/>,
RuleSet\RuleSet.cs (1)
322if (e is FileNotFoundException || e.GetType().Name == "DirectoryNotFoundException")
RuleSet\RuleSetInclude.cs (1)
63catch (FileNotFoundException)
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
36var fusionLog = (exception as FileNotFoundException)?.FusionLog;
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
ExpressionCompiler.cs (1)
373catch (FileNotFoundException)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorAnalyzerAssemblyResolver.cs (1)
125catch (FileNotFoundException)
Microsoft.CodeAnalysis.Features (3)
EditAndContinue\DebuggingSession.cs (1)
289catch (Exception e) when (e is FileNotFoundException or DirectoryNotFoundException)
Emit\CompilationOutputFilesWithImplicitPdbPath.cs (1)
91catch (Exception e) when (e is FileNotFoundException or DirectoryNotFoundException)
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
36var fusionLog = (exception as FileNotFoundException)?.FusionLog;
Microsoft.CodeAnalysis.LanguageServer (2)
CustomExportAssemblyLoader.cs (1)
52catch (FileNotFoundException ex)
Testing\RunTestsHandler.cs (1)
185catch (FileNotFoundException)
Microsoft.CodeAnalysis.Scripting (3)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
131catch (FileNotFoundException)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
620catch (Exception e) when (fileMayNotExist && e is FileNotFoundException or DirectoryNotFoundException)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
153if (e is FileNotFoundException || e is DirectoryNotFoundException)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
189Assert.Throws<FileNotFoundException>(() => _provider.GetMetadata(f1, MetadataImageKind.Assembly));
Microsoft.CodeAnalysis.UnitTests (3)
AnalyzerAssemblyLoaderTests.cs (1)
380Assert.IsAssignableFrom<FileNotFoundException>(exception.InnerException);
MetadataReferences\ModuleMetadataTests.cs (2)
123Assert.Throws<FileNotFoundException>(() => ModuleMetadata.CreateFromFile(systemDrive + @":\file_that_does_not_exists.dll")); 124Assert.Throws<FileNotFoundException>(() => ModuleMetadata.CreateFromFile(systemDrive + @":\directory_that_does_not_exists\file_that_does_not_exists.dll"));
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
185catch (FileNotFoundException)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
185catch (FileNotFoundException)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (7)
MSBuildWorkspaceTestBase.cs (1)
201await Assert.ThrowsAsync<FileNotFoundException>(testCode);
VisualStudioMSBuildWorkspaceTests.cs (6)
935await Assert.ThrowsAsync<FileNotFoundException>(() => workspace.OpenSolutionAsync(solutionFilePath)); 1071await Assert.ThrowsAsync<FileNotFoundException>(() => workspace.OpenSolutionAsync(solutionFilePath)); 1213await Assert.ThrowsAsync<FileNotFoundException>(async () => 1273await Assert.ThrowsAsync<FileNotFoundException>(async () => 2614await Assert.ThrowsAsync<FileNotFoundException>(async () => 2628await Assert.ThrowsAsync<FileNotFoundException>(async () =>
Microsoft.DotNet.ApiCompatibility (1)
Logging\SuppressionEngine.cs (1)
45catch (FileNotFoundException) when (BaselineAllErrors)
Microsoft.DotNet.ApiCompatibility.Tests (1)
Logging\SuppressionEngineTests.cs (1)
49Assert.Throws<FileNotFoundException>(() => suppressionEngine.LoadSuppressions("AFileThatDoesNotExist.xml"));
Microsoft.DotNet.ApiSymbolExtensions.Tests (3)
AssemblySymbolLoaderTests.cs (3)
95Assert.Throws<FileNotFoundException>(() => loader.LoadAssembly(Guid.NewGuid().ToString("N").Substring(0, 8))); 104Assert.Throws<FileNotFoundException>(() => loader.LoadAssemblyFromSourceFiles(paths, "assembly1", Array.Empty<string>())); 117Assert.Throws<FileNotFoundException>(() => loader.LoadMatchingAssemblies(new[] { assembly }, paths));
Microsoft.DotNet.Build.Tasks.Workloads (1)
WorkloadManifestPackage.wix.cs (1)
102/// <exception cref="FileNotFoundException" />
Microsoft.DotNet.Cli.Utils.Tests (4)
MockFileSystemTests.cs (4)
170a.Should().Throw<FileNotFoundException>().And.Message.Should().Contain("Could not find file"); 244a.Should().Throw<FileNotFoundException>().And.Message.Should().Contain("Could not find file"); 261a.Should().Throw<FileNotFoundException>().And.Message.Should().Contain("Could not find file"); 310a.Should().Throw<FileNotFoundException>().And.Message.Should().Contain("Could not find file");
Microsoft.DotNet.Internal.SymbolHelper (3)
SymbolUploadHelperFactory.cs (3)
39/// <exception cref="FileNotFoundException">If the symbol tool is not found after download.</exception> 68/// <exception cref="FileNotFoundException">If the symbol tool is not found after download.</exception> 90/// <exception cref="FileNotFoundException">If the symbol tool is not found after download.</exception>
Microsoft.DotNet.SignCheckLibrary (1)
Verification\DebVerifier.cs (1)
33catch (FileNotFoundException)
Microsoft.DotNet.XliffTasks (3)
Tasks\EnsureAllResourcesTranslated.cs (1)
37catch (FileNotFoundException)
Tasks\SortXlf.cs (1)
33catch (FileNotFoundException)
Tasks\UpdateXlf.cs (1)
46catch (FileNotFoundException fileNotFoundEx) when (fileNotFoundEx.FileName == xlfPath)
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationProvider.cs (1)
120/// <exception cref="FileNotFoundException">Optional is <c>false</c> on the source and a
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Linux\Disk\LinuxSystemDiskMetrics.cs (1)
174ex is FileNotFoundException ||
Linux\LinuxUtilizationProvider.cs (1)
309ex is System.IO.FileNotFoundException ||
Linux\Network\LinuxNetworkMetrics.cs (1)
102ex is FileNotFoundException ||
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
Linux\Disk\LinuxSystemDiskMetricsTests.cs (2)
237diskStatsReaderMock.Setup(r => r.ReadAll(_skipDevicePrefixes)).Throws<FileNotFoundException>(); 288diskStatsReaderMock.Setup(r => r.ReadAll(_skipDevicePrefixes)).Throws<FileNotFoundException>();
Linux\LinuxNetworkMetricsTests.cs (1)
65[InlineData(typeof(FileNotFoundException))]
Linux\OSFileSystemTests.cs (1)
179Assert.Throws<FileNotFoundException>(() => osFileSystem.ReadAllByLines(fileInfo, new BufferWriter<char>()).ToList());
Microsoft.Extensions.FileProviders.Abstractions (1)
NotFoundFileInfo.cs (1)
55/// <exception cref="FileNotFoundException">In all cases.</exception>
Microsoft.Extensions.Hosting (1)
HostingHostBuilderExtensions.cs (1)
260catch (FileNotFoundException)
Microsoft.Extensions.SecretManager.Tools.Tests (5)
MsBuildProjectFinderTest.cs (5)
36Assert.Throws<FileNotFoundException>(() => finder.FindMsBuildProject(null)); 48Assert.Throws<FileNotFoundException>(() => finder.FindMsBuildProject(null)); 61Assert.Throws<FileNotFoundException>(() => finder.FindMsBuildProject(null)); 72Assert.Throws<FileNotFoundException>(() => finder.FindMsBuildProject("test.csproj")); 82Assert.Throws<FileNotFoundException>(() => finder.FindMsBuildProject(null));
Microsoft.Maui (1)
Platform\ReflectionExtensions.cs (1)
16 catch (FileNotFoundException)
Microsoft.Maui.Controls (1)
Visuals\VisualTypeConverter.cs (1)
88 catch (FileNotFoundException)
Microsoft.NET.Sdk.Publish.Tasks (1)
MsDeploy\CommonUtility.cs (1)
404catch (FileNotFoundException ex)
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (9)
SdkDirectoryWorkloadManifestProviderTests.cs (9)
439Assert.Throws<FileNotFoundException>(() => GetManifestContents(sdkDirectoryWorkloadManifestProvider).ToList()); 585var ex = Assert.Throws<FileNotFoundException>(() => manifestProvider.GetManifests()); 679var ex = Assert.Throws<FileNotFoundException>( 713var ex = Assert.Throws<FileNotFoundException>(() => sdkDirectoryWorkloadManifestProvider.GetManifests().ToList()); 790var ex = Assert.Throws<FileNotFoundException>(() => sdkDirectoryWorkloadManifestProvider.GetManifests().ToList());
Microsoft.VisualBasic.Core (9)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
360ByVal ResourceID As String, ByVal ParamArray PlaceHolders() As String) As IO.FileNotFoundException
Microsoft\VisualBasic\CompilerServices\VB6InputFile.vb (1)
36Catch ex As FileNotFoundException
Microsoft\VisualBasic\CompilerServices\VB6OutputFile.vb (1)
50Catch ex As FileNotFoundException
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (1)
36Catch ex As FileNotFoundException
Microsoft\VisualBasic\FileIO\FileSystem.vb (4)
546''' <exception cref="IO.FileNotFoundException">if a file does not exist at FilePath</exception> 658''' <exception cref="IO.FileNotFoundException">If directory does not point to an existing directory.</exception> 701''' <exception cref="IO.FileNotFoundException">If file does not point to an existing file.</exception> 1332TypeOf ex Is IO.FileNotFoundException Or TypeOf ex Is ObjectDisposedException Or
Microsoft\VisualBasic\FileSystem.vb (1)
290Catch ex As FileNotFoundException
Microsoft.VisualBasic.IntegrationTests (1)
InteractionTests.cs (1)
109_ = Assert.Throws<FileNotFoundException>(() => Interaction.Shell(path)).ToString();
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (1)
665Assert.Throws<FileNotFoundException>(() => _fileSystem.RenameFile(Path.Join(TestDirectory, "DoesNotExistFile"), "NewFile"));
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\MetadataReferences\VisualStudioFrameworkAssemblyPathResolverFactory.cs (1)
93catch (FileNotFoundException)
MSBuild (3)
AssemblyNameExtension.cs (1)
198catch (FileNotFoundException)
ManagedFileSystem.cs (1)
78catch (FileNotFoundException ex) when (ex.FusionLog != null)
TaskEngineAssemblyResolver.cs (1)
133catch (FileNotFoundException)
MSBuildTaskHost (2)
AssemblyNameExtension.cs (1)
198catch (FileNotFoundException)
TaskEngineAssemblyResolver.cs (1)
133catch (FileNotFoundException)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
325[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileNotFoundException))]
netstandard (1)
netstandard.cs (1)
920[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileNotFoundException))]
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
2617catch (FileNotFoundException)
PresentationCore (2)
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPane.cs (1)
195|| e is FileNotFoundException
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettings.cs (1)
123catch (Exception e) when (e is TypeLoadException || e is FileNotFoundException)
PresentationFramework (2)
System\Windows\Documents\Serialization\SerializerProvider.cs (1)
156catch (FileNotFoundException)
System\Windows\SystemResources.cs (1)
795catch (FileNotFoundException)
PresentationUI (1)
MS\Internal\Documents\Application\RightsManagementErrorHandler.cs (1)
271(exception is System.IO.FileNotFoundException) ||
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
169catch (FileNotFoundException)
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (1)
209catch (FileNotFoundException)
System.ComponentModel.Composition (6)
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (5)
54/// <exception cref="FileNotFoundException"> 110/// <exception cref="FileNotFoundException"> 167/// <exception cref="FileNotFoundException"> 231/// <exception cref="FileNotFoundException"> 568catch (FileNotFoundException)
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (1)
671catch (FileNotFoundException ex)
System.Drawing.Common (2)
System\Drawing\Image.cs (1)
69or FileNotFoundException)
System\Drawing\SystemFonts.cs (1)
145or FileNotFoundException);
System.Drawing.Common.Tests (10)
System\Drawing\IconTests.cs (2)
394Assert.Throws<FileNotFoundException>(() => Icon.ExtractAssociatedIcon("http://microsoft.com")); 413Assert.Throws<FileNotFoundException>(() => Icon.ExtractAssociatedIcon("no-such-file.png"));
System\Drawing\ImageTests.cs (4)
532Assert.Throws<FileNotFoundException>(() => Image.FromFile(fileName)); 533Assert.Throws<FileNotFoundException>(() => Image.FromFile(fileName, 541Assert.Throws<FileNotFoundException>(() => Image.FromFile("NoSuchFile")); 542Assert.Throws<FileNotFoundException>(() => Image.FromFile("NoSuchFile", useEmbeddedColorManagement: true));
System\Drawing\Text\PrivateFontCollectionTests.cs (4)
100AssertExtensions.Throws<FileNotFoundException>(() => fontCollection.AddFontFile(string.Empty)); 107Assert.Throws<FileNotFoundException>(() => fontCollection.AddFontFile("fileName")); 114Assert.Throws<FileNotFoundException>( 122AssertExtensions.Throws<FileNotFoundException, ExternalException>(() => fontCollection.AddFontFile(AppContext.BaseDirectory));
System.Formats.Tar (2)
System\Formats\Tar\TarFile.cs (2)
248/// <exception cref="FileNotFoundException"> The <paramref name="sourceFileName"/> file path was not found.</exception> 291/// <exception cref="FileNotFoundException"> The <paramref name="sourceFileName"/> file path was not found.</exception>
System.IO (1)
System.IO.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileNotFoundException))]
System.IO.Compression.ZipFile (18)
System\IO\Compression\ZipFile.Create.Async.cs (3)
27/// <exception cref="FileNotFoundException">The file specified in archiveFileName was not found.</exception> 53/// <exception cref="FileNotFoundException">The file specified in <code>archiveFileName</code> was not found. </exception> 93/// <exception cref="FileNotFoundException">The file specified in <code>archiveFileName</code> was not found. </exception>
System\IO\Compression\ZipFile.Create.cs (3)
25/// <exception cref="FileNotFoundException">The file specified in archiveFileName was not found.</exception> 48/// <exception cref="FileNotFoundException">The file specified in <code>archiveFileName</code> was not found. </exception> 85/// <exception cref="FileNotFoundException">The file specified in <code>archiveFileName</code> was not found. </exception>
System\IO\Compression\ZipFile.Extract.Async.cs (4)
34/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception> 69/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception> 105/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception> 162/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception>
System\IO\Compression\ZipFile.Extract.cs (4)
32/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception> 64/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception> 97/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception> 151/// <exception cref="FileNotFoundException">sourceArchive was not found.</exception>
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (2)
35/// <exception cref="FileNotFoundException">The file specified in sourceFileName was not found. </exception> 67/// <exception cref="FileNotFoundException">The file specified in sourceFileName was not found. </exception>
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.cs (2)
35/// <exception cref="FileNotFoundException">The file specified in sourceFileName was not found. </exception> 66/// <exception cref="FileNotFoundException">The file specified in sourceFileName was not found. </exception>
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (2)
305catch (FileNotFoundException) 333catch (FileNotFoundException)
System.Net.NetworkInformation (3)
System\Net\NetworkInformation\LinuxNetworkInterface.cs (1)
61catch (Exception e) when (e is FileNotFoundException || e is UnauthorizedAccessException)
System\Net\NetworkInformation\UnixIPInterfaceProperties.cs (2)
93catch (FileNotFoundException) 106catch (FileNotFoundException)
System.Net.Sockets (5)
System\Net\Sockets\Socket.cs (2)
1292/// <exception cref="FileNotFoundException">The file <paramref name="fileName"/> was not found.</exception> 1320/// <exception cref="FileNotFoundException">The file <paramref name="fileName"/> was not found.</exception>
System\Net\Sockets\Socket.Tasks.cs (2)
705/// <exception cref="FileNotFoundException">The file <paramref name="fileName"/> was not found.</exception> 723/// <exception cref="FileNotFoundException">The file <paramref name="fileName"/> was not found.</exception>
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (1)
275if (exc is FileNotFoundException fnfe)
System.Private.CoreLib (8)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
1423/// <exception cref="FileNotFoundException">The file specified by <paramref name="pathToTarget"/> does not exist.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (1)
216/// <exception cref="FileNotFoundException">The file specified by <paramref name="pathToTarget"/> does not exist.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\FileSystemInfo.cs (1)
139/// If the path doesn't exist as of the last cached state, the return value is `(UnixFileMode)(-1)`. <see cref="FileNotFoundException"/> or <see cref="DirectoryNotFoundException"/> can only be thrown when setting the value.
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
366catch (FileNotFoundException)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
1016catch (FileNotFoundException fileNotFoundException) when (!_permitDeserialization)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
120catch (FileNotFoundException ex)
src\System\Reflection\Assembly.CoreCLR.cs (1)
39catch (FileNotFoundException)
src\System\Reflection\RuntimeAssembly.cs (1)
218catch (FileNotFoundException) when (!throwOnFileNotFound)
System.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\Deserializer\DefaultTypeResolver.cs (1)
101catch (FileNotFoundException) { }
System.Reflection.Metadata (2)
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
65/// <exception cref="FileNotFoundException">If <paramref name="assemblyFile"/> is not found.</exception>
System\Reflection\PortableExecutable\PEReader.cs (1)
816catch (FileNotFoundException)
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.TypeResolver.cs (1)
99catch (FileNotFoundException) { }
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
307[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileNotFoundException))]
System.ServiceModel.NetNamedPipe (2)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (2)
273catch (FileNotFoundException) 280catch(FileNotFoundException)
System.Windows.Forms.Design (4)
System\Drawing\BitmapSelector.cs (1)
61catch (FileNotFoundException)
System\Drawing\Design\ToolboxItem.cs (2)
497catch (FileNotFoundException) 518catch (FileNotFoundException)
System\Windows\Forms\Design\ComponentTray.cs (1)
2367catch (FileNotFoundException e)
System.Windows.Forms.Tests (1)
System\Windows\Forms\CursorTests.cs (1)
144Assert.Throws<FileNotFoundException>(() => new Cursor("NoSuchFile"));
System.Xaml (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
459catch (System.IO.FileNotFoundException)
UIAutomationClient (1)
MS\Internal\Automation\ProxyManager.cs (1)
55catch(System.IO.FileNotFoundException)
UIAutomationClientSideProviders (1)
MS\Internal\AutomationProxies\WindowsRichEdit.cs (1)
122catch (System.IO.FileNotFoundException)
vbc (1)
src\Compilers\VisualBasic\vbc\Program.cs (1)
22catch (FileNotFoundException e)