2453 references to Exists
aspire (233)
Acquisition\InstallationCandidateSources.cs (2)
61if (File.Exists(releaseBinary)) 94if (File.Exists(binary))
Acquisition\InstallSidecarReader.cs (2)
52if (!File.Exists(sidecarPath)) 100if (!File.Exists(sidecarPath))
Acquisition\InstallSidecarWriter.cs (3)
30if (!File.Exists(sidecarPath)) 74if (File.Exists(temporaryPath)) 127if (_temporaryPath is not null && File.Exists(_temporaryPath))
Acquisition\PeerInstallProbe.cs (1)
69if (string.IsNullOrEmpty(binaryPath) || !File.Exists(binaryPath))
Acquisition\WingetFirstRunProbe.cs (1)
42if (File.Exists(sidecarPath))
Agents\AspireSkills\AspireSkillsBundleProvider.cs (5)
120if (!File.Exists(manifestPath)) 280if (!File.Exists(fullPath)) 578if (File.Exists(rootManifestPath)) 585if (File.Exists(packageManifestPath)) 592.Where(directory => File.Exists(Path.Combine(directory, ManifestFileName)))
Agents\AspireSkills\AspireSkillsInstaller.cs (9)
670!File.Exists(Path.Combine(cacheDirectory, GitHubAttestationVerifiedFileName))) 681var cachedArchiveSha512 = File.Exists(cachedArchiveSha512Path) 694var cachedGitHubArchiveSha256 = File.Exists(cachedGitHubArchiveSha256Path) 1068File.Exists(Path.Combine(versionCacheDirectory, "skill-manifest.json")) || 1069File.Exists(Path.Combine(versionCacheDirectory, ArchiveSha512FileName)) || 1070File.Exists(Path.Combine(versionCacheDirectory, GitHubArchiveSha256FileName)) || 1071File.Exists(Path.Combine(versionCacheDirectory, GitHubAttestationVerifiedFileName)) || 1072File.Exists(Path.Combine(versionCacheDirectory, LastUsedFileName)); 1120if (File.Exists(markerPath) &&
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (1)
157if (!File.Exists(configFilePath))
Agents\CopilotCli\CopilotCliAgentEnvironmentScanner.cs (1)
144if (!File.Exists(configFilePath))
Agents\DeprecatedMcpCommandScanner.cs (1)
53if (!File.Exists(configPath))
Agents\Hooks\TelemetryHookConfigurator.cs (1)
159if (File.Exists(settingsPath))
Agents\Hooks\TelemetryHookInstaller.cs (1)
75if (File.Exists(path))
Agents\McpConfigFileHelper.cs (2)
26if (!File.Exists(configFilePath)) 70if (!File.Exists(configFilePath))
Agents\OpenCode\OpenCodeAgentEnvironmentScanner.cs (1)
50var configFileExists = File.Exists(configFilePath);
Agents\Playwright\PlaywrightCliInstaller.cs (1)
446if (!File.Exists(sourceFile))
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (1)
196if (!File.Exists(mcpConfigPath))
Bundles\BundleService.cs (4)
601if (!Directory.Exists(managedDir) || !File.Exists(managedExe)) 621if (!Directory.Exists(dcpDir) || !File.Exists(dcpExe)) 847if (!File.Exists(markerPath)) 939if (File.Exists(fullPath))
Caching\AppHostInfoDiskCache.cs (1)
140if (!File.Exists(path))
Caching\DiskCache.cs (1)
110if (File.Exists(fullPath))
Certificates\CertificateCacheWriter.cs (1)
50catch (IOException) when (File.Exists(outputPath))
Certificates\CertificateGeneration\CertificateManager.cs (1)
538if (!File.Exists(certificatePath))
Certificates\CertificateGeneration\MacOSCertificateManager.cs (3)
143return File.Exists(GetCertificateFilePath(candidate)) ? 392if (!File.Exists(onDiskPfxPath)) 515if (File.Exists(certificatePath))
Certificates\CertificateGeneration\UnixCertificateManager.cs (6)
130if (File.Exists(certPath)) 271if (File.Exists(certPath)) 497if (File.Exists(certPath)) 648if (File.Exists(WslInteropPath) || File.Exists(WslInteropLatePath)) 1048if (!File.Exists(linkPath))
Certificates\NativeCertificateToolRunner.cs (1)
249if (File.Exists(outputPath))
Commands\AddCommand.cs (1)
341if (!File.Exists(nugetConfigPath))
Commands\AgentInitCommand.cs (1)
725if (File.Exists(fullPath))
Commands\AppHostLauncher.cs (2)
981if (maxLines <= 0 || !File.Exists(childLogFile)) 1047if (maxLines <= 0 || !File.Exists(childLogFile))
Commands\DashboardRunCommand.cs (1)
112if (managedPath is null || !File.Exists(managedPath))
Commands\DcpWorkloadCleanupService.cs (1)
35if (!File.Exists(dcpPath))
Commands\InitCommand.cs (5)
276if (File.Exists(appHostPath)) 488.FirstOrDefault(pattern => File.Exists(Path.Combine(workingDirectory.FullName, pattern))); 497if (File.Exists(appHostPath)) 538if (File.Exists(configPath)) 794if (File.Exists(path))
Commands\PipelineCommandBase.cs (1)
1248if (!File.Exists(fullPath))
Commands\UpdateCommand.cs (4)
784if (!File.Exists(newExePath)) 800if (File.Exists(targetExePath)) 856if (backupPath is not null && File.Exists(backupPath)) 858if (File.Exists(targetExePath))
Configuration\AspireConfigFile.cs (3)
133if (!File.Exists(filePath)) 233if (!File.Exists(apphostRunPath)) 393return File.Exists(Path.Combine(directory, FileName));
Configuration\AspireJsonConfiguration.cs (1)
100if (!File.Exists(filePath))
Configuration\ConfigurationService.cs (9)
33if (File.Exists(settingsFilePath)) 56if (!File.Exists(settingsFilePath)) 115if (File.Exists(newSettingsPath)) 125if (File.Exists(legacySettingsPath)) 150if (!File.Exists(aspireConfigPath)) 387else if (File.Exists(configFilePath) && !continueSearchWhenKeyMissing) 397else if (File.Exists(legacySettingsPath) && !continueSearchWhenKeyMissing) 411if (File.Exists(globalSettingsFile.FullName)) 428if (!File.Exists(settingsFilePath))
Diagnostics\StartupErrorWriter.cs (1)
61if (!_hasOutput || !File.Exists(_logFilePath))
Documentation\FileBackedDocumentContentCache.cs (3)
190if (!File.Exists(filePath)) 276if (!File.Exists(filePath)) 328if (File.Exists(filePath))
DotNet\DotNetCliRunner.cs (4)
653if (!File.Exists(cliAssemblyPath)) 667return File.Exists(Path.Combine(cliDirectory, ".aspire-install.json")); 1186if (File.Exists(sourcePath) && string.Equals(Path.GetExtension(sourcePath), ".nupkg", StringComparison.OrdinalIgnoreCase)) 1420if (!File.Exists(filePath))
Git\GitWorktree.cs (4)
70if (File.Exists(gitPath)) 154if (File.Exists(gitPath)) 241File.Exists(checkoutGitFile) && 374if (!File.Exists(candidate) && !Directory.Exists(candidate))
Layout\LayoutDiscovery.cs (10)
263_logger.LogDebug(" {Dir}/{Managed}/{Exe}: {Exists}", BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName, managedExeName, File.Exists(bundleManagedExe) ? "exists" : "MISSING"); 264_logger.LogDebug(" {Dir}/{Dcp}/{Exe}: {Exists}", BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName, Path.GetFileName(bundleDcpExe), File.Exists(bundleDcpExe) ? "exists" : "MISSING"); 266if (File.Exists(bundleManagedExe) && File.Exists(bundleDcpExe)) 297_logger.LogDebug(" managed/{ManagedExe}: {Exists}", managedExeName, File.Exists(managedExePath) ? "exists" : "MISSING"); 298_logger.LogDebug(" dcp/{DcpExe}: {Exists}", Path.GetFileName(dcpExePath), File.Exists(dcpExePath) ? "exists" : "MISSING"); 300if (!File.Exists(managedExePath) || !File.Exists(dcpExePath)) 337if (managedPath is null || !File.Exists(managedPath)) 347!File.Exists(BundleDiscovery.GetDcpExecutablePath(dcpPath)))
Migrations\TypeScriptAppHostMigration.cs (4)
193if (!File.Exists(configPath)) 232if (!File.Exists(tsConfigPath)) 280if (!File.Exists(packageJsonPath)) 325if (!File.Exists(configPath))
Npm\NpmRunner.cs (1)
120if (!File.Exists(tarballPath))
NuGet\BundleNuGetPackageCache.cs (1)
148if (managedPath is null || !File.Exists(managedPath))
NuGet\BundleNuGetService.cs (2)
91if (managedPath is null || !File.Exists(managedPath)) 118if (File.Exists(manifestPath) && TryValidatePackageManifest(manifestPath, _logger))
Processes\DcpExecutableResolver.cs (1)
37if (!File.Exists(dcpPath))
Profiling\ProfileCaptureService.cs (5)
76if (managedPath is null || !File.Exists(managedPath)) 173File.Exists(dashboardPath)) 182if (File.Exists(managedPath)) 188if (File.Exists(managedExecutable)) 215return File.Exists(managedPath) ? managedPath : null;
Program.cs (2)
175if (!File.Exists(newPath) && File.Exists(legacyPath))
Projects\AppHostCandidateFinder.cs (1)
207if (!File.Exists(absolutePath))
Projects\AppHostServerClosureSnapshots.cs (3)
118if (!File.Exists(normalizedSourcePath)) 384!File.Exists(manifestPath)) 496if (!File.Exists(copiedPath) ||
Projects\AppHostServerProject.cs (1)
62if (layout is not null && layout.GetManagedPath() is string serverPath && File.Exists(serverPath))
Projects\DotNetAppHostProject.cs (10)
300if (!File.Exists(filePath)) 728if (!File.Exists(filePath)) 1896if (!File.Exists(resolvedTargetPath)) 1906if (!File.Exists(runtimeConfigPath)) 1920if (!File.Exists(resolvedRunCommand)) 2065if (File.Exists(propertiesLaunchSettingsPath)) 2072if (File.Exists(runJsonPath)) 2202if (File.Exists(runJsonFilePath)) 2625File.Exists(BundleDiscovery.GetDcpExecutablePath(path)); 2628=> !string.IsNullOrWhiteSpace(path) && File.Exists(path);
Projects\DotNetBasedAppHostServerProject.cs (12)
113if (File.Exists(hashFilePath)) 195if (File.Exists(projectPath) && addedProjects.Add(integration.Name)) 214if (File.Exists(hostingPath) && addedProjects.Add("Aspire.Hosting")) 238if (File.Exists(appHostInTargets)) 242if (File.Exists(sdkInTargets)) 249if (File.Exists(dashboardProject)) 256if (File.Exists(remoteHostProject)) 464if (!File.Exists(Path.Combine(_projectModelPath, fileName))) 473if (!File.Exists(Path.Combine(_projectModelPath, "obj", "project.assets.json"))) 516if (File.Exists(staleNugetConfig)) 756if (File.Exists(configPath)) 803if (!File.Exists(versionsPropsPath))
Projects\GeneratedFileWriter.cs (1)
31if (File.Exists(path))
Projects\GuestAppHostProject.cs (4)
927var configPath = File.Exists(apphostRunPath) ? apphostRunPath : launchSettingsPath; 929if (!File.Exists(configPath)) 1933if (File.Exists(manifestPath)) 2262if (!File.Exists(bundlePath))
Projects\GuestRuntime.cs (2)
327if (File.Exists(path)) 589if (!File.Exists(filePath))
Projects\ILanguageDiscovery.cs (1)
97/// <see cref="File.Exists"/> call.
Projects\JavaAppHostToolchainResolver.cs (7)
131if (File.Exists(Path.Combine(candidate.FullName, MavenPomFileName))) 138if (File.Exists(Path.Combine(candidate.FullName, gradleBuildFileName))) 194if (File.Exists(candidate) 205if (Directory.Exists(gitPath) || File.Exists(gitPath)) 221JavaAppHostToolchain.Gradle => File.Exists(Path.Combine(directory, GradleSettingsFileName)) 222|| File.Exists(Path.Combine(directory, GradleKotlinSettingsFileName)), 225JavaAppHostToolchain.Maven => File.Exists(Path.Combine(directory, MavenPomFileName)),
Projects\LegacyTypeScriptAppHost.cs (2)
41return File.Exists(Path.Combine(appPath, LegacyAppHostFileName)) && 42!File.Exists(Path.Combine(appPath, ModernAppHostFileName));
Projects\PrebuiltAppHostServer.cs (9)
135if (managedPath is null || !File.Exists(managedPath)) 413if (!File.Exists(projectPath)) 474if (!File.Exists(projectPath)) 547if (File.Exists(candidate)) 624if (!File.Exists(assetsPath) || !File.Exists(stampPath)) 1542if (!File.Exists(filePath)) 1554if (!File.Exists(filePath)) 1587if (!File.Exists(assetsFilePath))
Projects\ProjectLocator.cs (2)
992else if (File.Exists(projectFile.FullName)) 1254if (shouldPreserveExistingDefault && File.Exists(resolvedPath))
Projects\ProjectUpdater.cs (1)
1034if (File.Exists(directoryPackagesPropsPath))
Projects\TypeScriptAppHostToolchainResolver.cs (7)
59if (File.Exists(Path.Combine(candidateDirectory.FullName, BunLockFileName))) 64if (File.Exists(Path.Combine(candidateDirectory.FullName, BunBinaryLockFileName))) 69if (File.Exists(Path.Combine(candidateDirectory.FullName, PnpmLockFileName))) 75if (File.Exists(yarnLockFilePath)) 85if (File.Exists(Path.Combine(candidateDirectory.FullName, YarnConfigFileName))) 90if (File.Exists(Path.Combine(candidateDirectory.FullName, PackageLockFileName))) 303if (!File.Exists(packageJsonPath))
Scaffolding\ScaffoldingService.cs (7)
192if (fileName.Equals(PackageJsonFileName, StringComparison.OrdinalIgnoreCase) && File.Exists(filePath)) 201else if (IsGitIgnoreFile(fileName) && File.Exists(filePath)) 206else if (IsVsCodeSettingsFile(fileName) && File.Exists(filePath)) 245if (profiles is not null && File.Exists(appHostRunPath)) 268if (IsTypeScriptLanguage(language) && File.Exists(Path.Combine(directory.FullName, PackageJsonFileName))) 509!File.Exists(Path.Combine(directory.FullName, PackageJsonFileName)) || 550if (File.Exists(filePath) || Directory.Exists(filePath))
src\Shared\BundleDiscovery.cs (3)
138if (File.Exists(dcpExePath)) 169if (File.Exists(managedExe)) 282return File.Exists(managedPath) ? managedPath : null;
src\Shared\IntegrationPackageProbeManifest.cs (2)
112if (!File.Exists(normalizedManifestPath)) 341if (!File.Exists(normalizedPath))
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
src\Shared\PathNormalizer.cs (1)
253if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
src\Shared\UserSecrets\IsolatedUserSecretsHelper.cs (2)
26if (!File.Exists(originalSecretsPath)) 64if (File.Exists(secretsPath))
src\Shared\UserSecrets\SecretsStore.cs (2)
99if (File.Exists(tempFilename)) 116if (!File.Exists(path))
Telemetry\InternalMicrosoftDetector.cs (7)
301if (!File.Exists(_cacheFilePath)) 405if (!File.Exists(accountStore)) 478if (!File.Exists(stateDatabasePath)) 1008if (!File.Exists(filePath)) 1054if (File.Exists(path)) 1130if (!File.Exists("/proc/sys/kernel/osrelease")) 1162if (File.Exists(candidate))
Telemetry\UnixMachineInformationProvider.cs (1)
106if (!File.Exists(path))
Templating\CliTemplateFactory.EmptyTemplate.cs (1)
153if (!File.Exists(aspireConfigPath))
Templating\DotNetTemplateFactory.cs (1)
117if (File.Exists(Path.Combine(directory, dotnetFileName)))
Utils\AppHostHelper.cs (1)
179if (File.Exists(socketPath))
Utils\ArchiveHelper.cs (1)
133if (File.Exists(fullPath))
Utils\AspireRepositoryDetector.cs (2)
97if (File.Exists(Path.Combine(currentDirectory, AspireSolutionFileName))) 117if (File.Exists(fullPath))
Utils\CliDownloader.cs (1)
144if (File.Exists(lddPath))
Utils\ConfigurationHelper.cs (6)
37if (File.Exists(newSettingsPath)) 64if (File.Exists(legacySettingsPath)) 74if (File.Exists(globalSettingsFile.FullName)) 155if (File.Exists(configPath)) 161if (File.Exists(legacyPath)) 176if (!File.Exists(filePath))
Utils\EnvironmentChecker\DcpConnectionChecker.cs (1)
383while (!File.Exists(_kubeconfigPath))
Utils\EnvironmentChecker\DcpConnectionHealthCheck.cs (1)
47if (!File.Exists(dcpExecutablePath))
Utils\EnvironmentChecker\DcpDeveloperCertificateCache.cs (1)
33certificateManager.ExportCertificate(certificate, certificatePath, includePrivateKey: !File.Exists(keyPath), password: null, CertificateKeyExportFormat.Pem);
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (1)
48if (!File.Exists(configPath))
Utils\EnvironmentChecker\DevCertsCheck.cs (2)
294if (!File.Exists(certificateFile)) 391if (!File.Exists(certificateFile))
Utils\EnvironmentChecker\LegacySettingsFileCheck.cs (2)
41if (File.Exists(modernConfigPath)) 48if (File.Exists(legacySettingsPath))
Utils\EnvironmentChecker\WslEnvironmentCheck.cs (1)
226return File.Exists(ProcVersionPath) ? File.ReadAllText(ProcVersionPath) : null;
Utils\FileDeleteHelper.cs (1)
69if (!File.Exists(path))
Utils\FirstTimeUseNoticeSentinel.cs (1)
27return File.Exists(_sentinelFilePath);
Utils\ReparsePoint.cs (2)
107return Directory.Exists(path) || File.Exists(path); 236if (File.Exists(path))
aspire-managed (16)
NuGet\Commands\LayoutCommand.cs (2)
76if (!File.Exists(assetsPath)) 139if (File.Exists(destPath) &&
NuGet\Commands\NuGetPackageAssetResolver.cs (7)
52if (!File.Exists(assetsPath)) 201if (!File.Exists(sourcePath)) 215if (File.Exists(xmlSourcePath)) 260if (runtimeIdentifierGraphPath is not null && File.Exists(runtimeIdentifierGraphPath)) 333if (!File.Exists(sourcePath)) 364if (!File.Exists(sourcePath)) 405if (!File.Exists(sourcePath))
NuGet\Commands\RestoreCommand.cs (1)
335if (File.Exists(graphPath))
NuGet\Commands\SearchCommand.cs (1)
181if (!string.IsNullOrEmpty(configPath) && File.Exists(configPath))
src\Shared\BundleDiscovery.cs (3)
138if (File.Exists(dcpExePath)) 169if (File.Exists(managedExe)) 282return File.Exists(managedPath) ? managedPath : null;
src\Shared\IntegrationPackageProbeManifest.cs (2)
112if (!File.Exists(normalizedManifestPath)) 341if (!File.Exists(normalizedPath))
Aspire.Acquisition.Tests (40)
Scripts\Common\ScriptFunctionCommand.cs (1)
64if (!File.Exists(fullScriptPath))
Scripts\Common\ScriptHostFixture.cs (1)
185if (!File.Exists(filePath))
Scripts\Common\ScriptToolCommand.cs (1)
70if (!File.Exists(fullScriptPath))
Scripts\PRScriptInstallE2ETests.cs (2)
57Assert.True(File.Exists(Path.Combine(binDir, "aspire")), $"CLI binary missing under {binDir}"); 60Assert.True(File.Exists(sidecarPath), $"Route sidecar missing at {sidecarPath}");
Scripts\PRScriptInstallerModeTests.cs (5)
422if (File.Exists(path)) 649Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.sh"))); 783Assert.True(File.Exists(Path.Combine(outputDir, "Microsoft.Aspire.yaml"))); 784Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.ps1"))); 932Assert.True(File.Exists(expected),
Scripts\PRScriptPowerShellTests.cs (4)
477File.Exists(sidecarPath), 573File.Exists(sidecarPath), 588Assert.False(File.Exists(globalConfig), $"Unexpected global config at {globalConfig}"); 621Assert.False(File.Exists(binSidecar), $"--local-dir install must not write sidecar at {binSidecar} (unmanaged route).");
Scripts\PRScriptShellTests.cs (5)
552File.Exists(sidecarPath), 636File.Exists(sidecarPath), 651Assert.False(File.Exists(globalConfig), $"Unexpected global config at {globalConfig}"); 686Assert.False(File.Exists(binSidecar), $"--local-dir install must not write sidecar at {binSidecar} (unmanaged route)."); 728File.Exists(sidecarPath),
Scripts\PRScriptToolModeTests.cs (6)
446Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")), 507Assert.False(File.Exists(sidecarPath), $"Tool mode must not write the PR-route sidecar at {sidecarPath}."); 512Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")), 1022Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")), 1051Assert.False(File.Exists(sidecarPath), $"Tool mode must not write the PR-route sidecar at {sidecarPath}."); 1056Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
Scripts\ReleaseScriptFunctionTests.cs (2)
316Assert.True(File.Exists(Path.Combine(destPath, "aspire")), 337Assert.True(File.Exists(Path.Combine(destPath, "aspire.exe")),
Scripts\ReleaseScriptPowerShellTests.cs (4)
365File.Exists(globalConfig), 387File.Exists(configPath), 410File.Exists(sidecarPath), 428File.Exists(sidecarPath),
Scripts\ReleaseScriptPSFunctionTests.cs (3)
283Assert.True(File.Exists(Path.Combine(destPath, "aspire")), 304Assert.True(File.Exists(Path.Combine(destPath, "aspire.exe")), 463Assert.False(File.Exists(cliPath));
Scripts\ReleaseScriptShellTests.cs (5)
182Assert.True(File.Exists(Path.Combine(installPath, ".aspire-install.json"))); 299File.Exists(globalConfig), 321File.Exists(configPath), 344File.Exists(sidecarPath), 364File.Exists(sidecarPath),
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Cli.EndToEnd.Tests (109)
AgentCommandTests.cs (1)
266Assert.True(File.Exists(skillFile), $"Expected {skillName} SKILL.md at {skillFile}");
AppHostSyntaxErrorOutputTests.cs (1)
145var recordingOffset = File.Exists(recordingPath) ? new FileInfo(recordingPath).Length : 0;
BundleSmokeTests.cs (8)
71Assert.True(File.Exists(appHostProjectPath), $"Expected AppHost project file to exist at: {appHostProjectPath}"); 72Assert.True(File.Exists(appHostSourcePath), $"Expected AppHost source file to exist at: {appHostSourcePath}"); 102Assert.True(File.Exists(argsOutputPath), $"Expected AppHost to write forwarded args to: {argsOutputPath}"); 136Assert.True(File.Exists(appHostProjectPath), $"Expected AppHost project file to exist at: {appHostProjectPath}"); 137Assert.True(File.Exists(appHostSourcePath), $"Expected AppHost source file to exist at: {appHostSourcePath}"); 197Assert.True(File.Exists(argsOutputPath), $"Expected AppHost to write forwarded args to: {argsOutputPath}"); 227Assert.True(File.Exists(appHostSourcePath), $"Expected AppHost source file to exist at: {appHostSourcePath}"); 258Assert.True(File.Exists(argsOutputPath), $"Expected AppHost to write forwarded args to: {argsOutputPath}");
ChannelUpdateWorkflowTests.cs (3)
488if (!File.Exists(aspireConfigPath)) 502if (!File.Exists(aspireConfigPath)) 526if (!File.Exists(aspireConfigPath))
ConfigDiscoveryTests.cs (8)
59Assert.True(File.Exists(primaryConfigPath), $"Expected Primary config at: {primaryConfigPath}"); 60Assert.True(File.Exists(alternateConfigPath), $"Expected Alternate config at: {alternateConfigPath}"); 61Assert.True(File.Exists(alternateAppHostPath), $"Expected Alternate AppHost source file to exist at: {alternateAppHostPath}"); 123Assert.True(File.Exists(alternateRunMarkerPath), $"Expected the Alternate AppHost to run and write: {alternateRunMarkerPath}"); 126Assert.False(File.Exists(alternateConfigPath), $"Explicit alternate AppHost should not create a local config at: {alternateConfigPath}"); 167Assert.True(File.Exists(projectConfigPath), 200Assert.False(File.Exists(parentConfigPath), 205Assert.True(File.Exists(projectConfigPath),
ConfigHealingTests.cs (1)
76if (!File.Exists(configFilePath))
ConfigMigrationTests.cs (8)
63if (!File.Exists(filePath)) 85if (!File.Exists(filePath)) 132if (File.Exists(newConfigPath)) 238if (File.Exists(newConfigPath)) 302if (File.Exists(newConfigPath)) 363if (File.Exists(f)) 397if (File.Exists(legacyPath)) 456if (File.Exists(newConfigPath))
CSharpInitTests.cs (2)
58Assert.True(File.Exists(appHostCs), $"Expected apphost.cs to exist at: {appHostCs}"); 59Assert.True(File.Exists(aspireConfigJson), $"Expected aspire.config.json to exist at: {aspireConfigJson}");
CSharpProjectModeInitTests.cs (4)
89File.Exists(workspaceNuGetConfig), 92Assert.True(File.Exists(appHostCsproj), $"Expected AppHost csproj at: {appHostCsproj}"); 161File.Exists(workspaceNuGetConfig), 165Assert.True(File.Exists(leftoverPath), $"Pre-existing AppHost file should be preserved: {leftoverPath}");
DoctorCommandTests.cs (1)
127var recordingOffset = File.Exists(recordingPath) ? new FileInfo(recordingPath).Length : 0;
EmulatedLocalReleaseBuildTests.cs (4)
312if (!File.Exists(csprojPath)) 327if (!File.Exists(csprojPath)) 351if (!File.Exists(configPath)) 371if (!File.Exists(configPath))
EmulatedReleasedBuildTests.cs (2)
225if (!File.Exists(csprojPath)) 240if (!File.Exists(configPath))
EmulatedStagingBuildTests.cs (3)
289if (!File.Exists(csprojPath)) 308if (!File.Exists(configPath)) 335if (!File.Exists(configPath))
Helpers\CaptureWorkspaceOnFailureAttribute.cs (2)
74File.Exists(filePath)) 107File.Exists(filePath))
Helpers\CliE2ETestHelpers.cs (2)
607if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx"))) 1114var config = File.Exists(configPath)
Helpers\GitIgnoreAssertions.cs (1)
13Assert.True(File.Exists(gitIgnorePath), $"Expected generated .gitignore at {gitIgnorePath}");
Helpers\TypeScriptAppHostToolchainTestHelpers.cs (3)
52if (File.Exists(lockFilePath)) 163if (!File.Exists(yarnLockPath)) 170else if (File.Exists(yarnConfigPath))
JavaCodegenValidationTests.cs (4)
64var initialCodegenHash = File.Exists(codegenHashPath) ? File.ReadAllText(codegenHashPath) : null; 67if (File.Exists(builderPath) && File.ReadAllText(builderPath).Contains("addSqlServer")) 97if (!File.Exists(filePath)) 119var restoredCodegenHash = File.Exists(codegenHashPath) ? File.ReadAllText(codegenHashPath) : null;
LaunchProfileTests.cs (3)
45Assert.True(File.Exists(appHostSourcePath), $"Expected AppHost source file to exist at: {appHostSourcePath}"); 46Assert.True(File.Exists(launchSettingsPath), $"Expected launch settings to exist at: {launchSettingsPath}"); 97Assert.True(File.Exists(profileOutputPath), $"Expected AppHost to write selected profile details to: {profileOutputPath}");
LocalConfigMigrationTests.cs (2)
91while (!File.Exists(configPath) && DateTime.UtcNow < deadline) 103Assert.True(File.Exists(configPath), "aspire.config.json was not created by migration");
McpDocsE2ETests.cs (1)
32if (!File.Exists(cliProjectPath))
NewChannelNuGetConfigTests.cs (2)
67Assert.True(File.Exists(nugetConfigPath), 72Assert.False(File.Exists(nugetConfigPath),
RadiusDeployTests.cs (1)
145Assert.True(File.Exists(appBicepPath), $"Expected generated Bicep at '{appBicepPath}'.");
RadiusPublishTests.cs (2)
115Assert.True(File.Exists(appBicepPath), $"Expected generated Bicep at '{appBicepPath}'."); 127Assert.True(File.Exists(bicepConfigPath), $"Expected generated bicepconfig.json at '{bicepConfigPath}'.");
SingleFileAppHostInitDotnetRunTests.cs (3)
70Assert.True(File.Exists(appHostCs), $"Expected apphost.cs to exist at: {appHostCs}"); 71Assert.True(File.Exists(aspireConfigJson), $"Expected aspire.config.json to exist at: {aspireConfigJson}"); 74File.Exists(appHostRunJson),
SmokeTests.cs (3)
170if (!File.Exists(appHostPath)) 184if (!File.Exists(appHostPath)) 198if (!File.Exists(configPath))
tests\Aspire.Hosting.TestUtilities\Utils\MSBuildUtils.cs (1)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\CliInstallStrategy.cs (1)
297if (!File.Exists(archivePath))
TypeScriptCodegenValidationTests.cs (6)
82if (!File.Exists(lockFilePath)) 103if (!File.Exists(filePath)) 171if (!File.Exists(aspireModulePath)) 188var initialCodegenHash = File.Exists(codegenHashPath) ? File.ReadAllText(codegenHashPath) : null; 207if (!File.Exists(filePath)) 232var restoredCodegenHash = File.Exists(codegenHashPath) ? File.ReadAllText(codegenHashPath) : null;
TypeScriptLegacyAppHostTests.cs (3)
109if (File.Exists(mtsPath)) 192if (!File.Exists(filePath)) 219if (File.Exists(filePath))
TypeScriptMigrateAppHostTests.cs (4)
99if (File.Exists(mtsPath)) 158if (File.Exists(legacyAppHost)) 166if (!File.Exists(modernAppHost)) 199if (!File.Exists(filePath))
TypeScriptPolyglotTests.cs (9)
123File.Exists(appHostLockFilePath), 130File.Exists(viteLockFilePath), 229File.Exists(appHostLockFilePath), 236File.Exists(guestLockFilePath), 285File.Exists(lockFilePath), 402Assert.False(File.Exists(Path.Combine(projectRoot, "tsconfig.apphost.json"))); 403Assert.False(File.Exists(Path.Combine(projectRoot, "apphost.mts"))); 407Assert.True(File.Exists(appHostPath)); 421Assert.True(File.Exists(Path.Combine(appHostDirectory, "tsconfig.apphost.json")));
TypeScriptPublishTests.cs (3)
267Assert.True(File.Exists(dockerComposePath), $"Expected docker-compose output at {dockerComposePath}"); 345Assert.True(File.Exists(envFilePath), $"Expected env file at {envFilePath}"); 395Assert.True(File.Exists(dockerfilePath), $"Expected Dockerfile for resource '{resourceName}' at {dockerfilePath}");
TypeScriptReusablePackageTests.cs (2)
45Assert.True(File.Exists(appAppHostPath), $"Expected the CLI-created app to contain {appAppHostPath}."); 58Assert.False(File.Exists(helperAppHostPath), $"Config-only helper package unexpectedly contained {helperAppHostPath}.");
TypeScriptStarterSmokeTests.cs (2)
60if (!File.Exists(aspireModulePath)) 101if (!File.Exists(configPath))
TypeScriptStarterTemplateTests.cs (1)
47if (!File.Exists(aspireModulePath))
UpdateChannelNuGetConfigOrderingTests.cs (2)
99Assert.True(File.Exists(appHostCsPath), $"Expected apphost.cs at: {appHostCsPath}"); 100Assert.True(File.Exists(aspireConfigPath), $"Expected aspire.config.json at: {aspireConfigPath}");
Aspire.Cli.Tests (281)
Acquisition\InstallationDiscoveryDiscoverAllTests.cs (1)
862Assert.True(File.Exists(firmlinkedProcessPath), "firmlinked /private/var path should resolve to the same file");
Acquisition\InstallSidecarWriterTests.cs (1)
56Assert.False(File.Exists(sidecarPath));
Acquisition\PeerInstallProbeTests.cs (2)
92Assert.True(File.Exists(fakePeer.ArgvFile), $"Expected argv recorder file at {fakePeer.ArgvFile} to exist."); 431if (File.Exists(pidFile))
Acquisition\WingetRegistryProbeTests.cs (2)
26Assert.Equal(expectSidecar, File.Exists(sidecarPath)); 90Assert.True(File.Exists(sidecarPath));
Agents\AspireSkillsInstallerTests.cs (7)
229Assert.True(File.Exists(Path.Combine( 282Assert.False(File.Exists(Path.Combine( 457Assert.False(File.Exists(Path.Combine(cachedBundleDirectory, "skill-manifest.json"))); 878Assert.True(File.Exists(Path.Combine( 1037Assert.False(File.Exists($"{activeTemporaryDirectory}.lock")); 1460Assert.True(File.Exists(Path.Combine(targetDirectory, "skill-manifest.json"))); 1776Assert.False(File.Exists(Path.Combine(
Agents\CopilotCliAgentEnvironmentScannerTests.cs (1)
58Assert.True(File.Exists(mcpConfigPath));
Agents\PlaywrightCliInstallerTests.cs (6)
661Assert.True(File.Exists(Path.Combine(tempDir, ".agents", "skills", "playwright-cli", "SKILL.md"))); 662Assert.True(File.Exists(Path.Combine(tempDir, ".agents", "skills", "playwright-cli", "subdir", "extra.md"))); 666Assert.True(File.Exists(Path.Combine(tempDir, ".github", "skills", "playwright-cli", "SKILL.md"))); 667Assert.True(File.Exists(Path.Combine(tempDir, ".github", "skills", "playwright-cli", "subdir", "extra.md"))); 704Assert.False(File.Exists(Path.Combine(targetDir, "stale.md"))); 755Assert.True(File.Exists(Path.Combine(tempDir, ".agents", "skills", "playwright-cli", "SKILL.md")));
Agents\TelemetryHookConfiguratorTests.cs (2)
28Assert.True(File.Exists(hookFile)); 57Assert.True(File.Exists(Path.Combine(copilotHome.FullName, "hooks", "aspire-telemetry.json")));
Agents\TelemetryHookInstallerTests.cs (2)
25Assert.True(File.Exists(scripts.ShellScriptPath)); 26Assert.True(File.Exists(scripts.PowerShellScriptPath));
Agents\TelemetryHookScriptTests.cs (1)
453=> File.Exists(capturePath)
Agents\VsCodeAgentEnvironmentScannerTests.cs (2)
127Assert.True(File.Exists(mcpJsonPath)); 144Assert.True(File.Exists(mcpJsonPath));
AssemblyMetadataChannelTests.cs (2)
42Assert.True(File.Exists(csprojPath), $"Expected csproj at {csprojPath}"); 61while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "global.json")))
Backchannel\AppHostConnectionResolverTests.cs (2)
92Assert.False(File.Exists(socketPath)); 324Assert.False(File.Exists(socketPath));
Backchannel\OrphanedAppHostCollectorTests.cs (4)
244Assert.False(File.Exists(socketPath)); 270Assert.True(File.Exists(socketPath)); 302Assert.True(File.Exists(throwingSocket)); 303Assert.False(File.Exists(okSocket));
BundleServiceIntegrationTests.cs (6)
65Assert.True(File.Exists(managedExe), $"managed exe should exist at {managedExe}"); 379Assert.True(File.Exists(managedExe), $"managed exe should exist at {managedExe}"); 444Assert.True(File.Exists(managedExe), $"managed exe should exist at {managedExe}"); 493Assert.True(File.Exists(managedExe)); 634if (!Directory.Exists(managedDir) || !File.Exists(managedExe) || !Directory.Exists(dcpDir) || !File.Exists(dcpExe))
Caching\DiskCacheTests.cs (1)
131Assert.False(File.Exists(oldName));
Certificates\DeveloperCertificateCacheWriteTests.cs (2)
45Assert.True(File.Exists(cachedPfxPath)); 46Assert.True(File.Exists(cachedKeyPath));
Certificates\UnixCertificateManagerTests.cs (1)
202Assert.False(File.Exists(certificatePath));
Commands\AgentInitCommandTests.cs (2)
836Assert.True(File.Exists(skillPath), $"Expected skill file at {skillPath}"); 918Assert.True(File.Exists(hookFile), $"Expected telemetry hook at {hookFile}");
Commands\AppHostLauncherTests.cs (1)
397Assert.False(File.Exists(socketPath));
Commands\CacheCommandTests.cs (4)
63Assert.False(File.Exists(Path.Combine(restoreDir.FullName, "test.dll"))); 84Assert.False(File.Exists(cacheEntry)); 206Assert.True(File.Exists(keepFile)); 207Assert.False(File.Exists(deleteFile));
Commands\ConfigCommandTests.cs (5)
123Assert.True(File.Exists(settingsPath)); 183Assert.True(File.Exists(settingsPath)); 208Assert.True(File.Exists(settingsPath)); 937if (File.Exists(settingsPath)) 1001Assert.False(File.Exists(configPath));
Commands\DoctorCommandTests.cs (1)
85Assert.SkipUnless(File.Exists("/etc/os-release"), "Linux /etc/os-release is required for this test.");
Commands\ExportCommandTests.cs (14)
66Assert.True(File.Exists(outputPath), "Export zip file should be created"); 137Assert.True(File.Exists(outputPath), $"Export zip file should be created at the specified path: {outputPath}"); 172Assert.False(File.Exists(outputPath), "No zip should be created when the AppHost is not running"); 285Assert.True(File.Exists(outputPath), "Export zip file should be created"); 347Assert.True(File.Exists(outputPath), "Export zip file should be created"); 465Assert.True(File.Exists(outputPath), "Export zip file should be created"); 523Assert.True(File.Exists(outputPath), "Export zip file should be created"); 583Assert.True(File.Exists(outputPath), "Export zip file should be created"); 633Assert.True(File.Exists(outputPath)); 675Assert.True(File.Exists(outputPath)); 719Assert.True(File.Exists(outputPath)); 755Assert.False(File.Exists(outputPath), "No zip should be created when the resource doesn't exist"); 794Assert.True(File.Exists(outputPath), "Export zip file should be created"); 841Assert.True(File.Exists(outputPath), "Export zip file should be created even without dashboard");
Commands\InitCommandTests.cs (31)
109Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"))); 150Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"))); 166Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 194Assert.True(File.Exists(runJsonPath), "apphost.run.json should be created so `dotnet run apphost.cs` works."); 338Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json"))); 362Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 397Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"))); 428Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"))); 475Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"))); 476Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-apphost", "apphost.mts"))); 587Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 609Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 629Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 632Assert.True(File.Exists(aspireSkillPath), $"Expected aspire skill file at {aspireSkillPath}"); 787File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")), 1058Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 1061Assert.True(File.Exists(nugetConfigPath), $"nuget.config should be created in workspace for channel '{contextChannel}'."); 1093Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 1096Assert.False(File.Exists(nugetConfigPath), "stable-identity init must not drop a nuget.config (stable packages resolve from ambient nuget.org)."); 1131Assert.True(File.Exists(configPath)); 1658nugetConfigContentAtNewProjectTime = File.Exists(nugetConfigPath) 1676Assert.True(File.Exists(nugetConfigPath), $"nuget.config should be created in the solution directory for channel '{contextChannel}'."); 1727Assert.False(File.Exists(nugetConfigPath), "stable-identity init must not drop a nuget.config (stable packages resolve from ambient nuget.org)."); 1750Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 1772Assert.True(File.Exists(nugetConfigPath), "rerun must create the workspace nuget.config even though the AppHost dir already exists."); 1791Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 1809Assert.True(File.Exists(nugetConfigPath), "rerun must create the workspace nuget.config even though apphost.cs already exists."); 1857Assert.True(File.Exists(Path.Combine(solutionDir.FullName, "nuget.config")), 1859Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")), 2038File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")), 2085Assert.True(File.Exists(nugetConfigPath));
Commands\NewCommandTemplateConfigPersistenceTests.cs (1)
302Assert.True(File.Exists(appHostFile));
Commands\NewCommandTests.cs (29)
150Assert.True(File.Exists(nugetConfigPath)); 983Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", "apphost.mts"))); 984Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", "aspire.config.json"))); 1235Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", "apphost.mts"))); 1557Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", "AppHost.java"))); 1593Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", "apphost.py"))); 1609Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", "apphost.cs"))); 1639var appHostCreated = File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", "apphost.cs")); 1668Assert.True(File.Exists(aspireConfigPath)); 1669Assert.True(File.Exists(appHostRunJsonPath), "apphost.run.json must be emitted alongside aspire.config.json so dotnet run picks up matching URLs."); 1702Assert.True(File.Exists(aspireConfigPath)); 1703Assert.True(File.Exists(appHostRunJsonPath), "apphost.run.json must be emitted alongside aspire.config.json so dotnet run picks up matching URLs."); 1776Assert.True(File.Exists(aspireConfigPath)); 1783Assert.True(File.Exists(appHostRunJsonPath)); 2062Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output", LanguageInfo.GeneratedFolderName, "aspire.mts"))); 2368Assert.True(File.Exists(aspireSkillPath), $"Expected aspire skill file at {aspireSkillPath}"); 2509Assert.True(File.Exists(skillPath)); 2549Assert.False(File.Exists(skillPath)); 2930Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 2994Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 3147Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 3215Assert.True(File.Exists(Path.Combine(selectedOutputPath.FullName, "apphost.ts"))); 3216Assert.False(File.Exists(Path.Combine(selectedOutputPath.FullName, projectName, "apphost.ts"))); 3269Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 3295Assert.False(File.Exists(skillPath)); 3321Assert.True(File.Exists(skillPath)); 3323Assert.False(File.Exists(aspireifySkillPath)); 3349Assert.True(File.Exists(skillPath)); 3351Assert.False(File.Exists(aspireifySkillPath));
Commands\RunCommandTests.cs (2)
145Assert.True(File.Exists(socketPath), "Validation should happen before existing AppHost instances are stopped."); 3708if (File.Exists(originalSecretsPath))
Commands\SdkDumpCommandTests.cs (2)
262Assert.True(File.Exists(projectPath), $"Could not find Aspire.Hosting project at '{projectPath}'."); 384if (File.Exists(Path.Combine(currentDirectory.FullName, "Aspire.slnx")))
Commands\StartCommandTests.cs (1)
158Assert.True(File.Exists(socketPath), "Validation should happen before existing AppHost instances are stopped.");
Commands\StopCommandTests.cs (6)
270Assert.False(File.Exists(primaryConnection.SocketPath)); 271Assert.True(File.Exists(nestedConnection.SocketPath)); 348Assert.True(File.Exists(connection.SocketPath)); 388Assert.False(File.Exists(connection.SocketPath)); 1192Assert.True(File.Exists(socketPath)); 1213Assert.False(File.Exists(socketPath));
Commands\UpdateCommandTests.cs (5)
200Assert.False(File.Exists(oldBackup1), "Old backup file should be deleted"); 201Assert.False(File.Exists(oldBackup2), "Old backup file should be deleted"); 202Assert.True(File.Exists(otherFile), "Other files should not be deleted"); 223Assert.True(File.Exists(oldBackup), "Locked file should still exist on Windows"); 227Assert.False(File.Exists(oldBackup), "Locked file should be deleted on Mac/Linux");
Configuration\AspireConfigFileTests.cs (3)
187Assert.True(File.Exists(filePath)); 204Assert.True(File.Exists(Path.Combine(subDir, AspireConfigFile.FileName))); 532Assert.True(File.Exists(configPath));
Configuration\ConfigurationHelperTests.cs (3)
200Assert.False(File.Exists(aspireConfigPath), "Precondition: aspire.config.json should not yet exist."); 209File.Exists(aspireConfigPath), 277Assert.False(File.Exists(migratedPath), "Unparseable legacy file must not produce an aspire.config.json on disk.");
Configuration\ConfigurationServiceTests.cs (1)
119Assert.True(File.Exists(legacySettingsPath));
Configuration\DotNetBasedAppHostServerChannelResolutionTests.cs (1)
72Assert.False(File.Exists(Path.Combine(appPath, AspireConfigFile.FileName)));
Configuration\PrebuiltAppHostServerChannelResolutionTests.cs (1)
64Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, AspireConfigFile.FileName)));
DotNet\ProcessExecutionDetachedTests.cs (1)
474while (!File.Exists(path))
Git\GitWorktreeTests.cs (1)
229var expectedRoot = File.Exists(caseVariantGitFile)
Mcp\E2E\McpDocsE2ETests.cs (2)
289while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "Aspire.slnx"))) 301if (!File.Exists(cliProjectPath))
Migrations\TypeScriptAppHostMigrationTests.cs (2)
214Assert.False(File.Exists(Path.Combine(root.FullName, "apphost.ts"))); 234Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, "apphost.ts")));
Npm\AspireJsLauncherTests.cs (2)
139Assert.True(File.Exists(cachedBinaryPath), $"Expected cached binary at {cachedBinaryPath}"); 408while (current is not null && !File.Exists(Path.Combine(current, "Aspire.slnx")))
Packaging\NuGetConfigMergerTests.cs (6)
47Assert.True(File.Exists(targetConfigPath)); 71Assert.True(File.Exists(targetConfigPath)); 760Assert.True(File.Exists(targetConfigPath)); 790Assert.False(File.Exists(targetConfigPath)); 840Assert.True(File.Exists(targetConfigPath)); 905Assert.True(File.Exists(targetConfigPath));
Packaging\PackagingServiceTests.cs (2)
1122Assert.True(File.Exists(nugetConfigPath)); 1377Assert.True(File.Exists(nugetConfigPath));
ProfileCaptureServiceTests.cs (4)
337Assert.True(File.Exists(outputPath)); 373Assert.True(File.Exists(options.OutputPath)); 394Assert.False(File.Exists(options.OutputPath)); 410Assert.False(File.Exists(options.OutputPath));
Projects\AppHostServerProjectTests.cs (3)
107Assert.True(File.Exists(programCs)); 130Assert.True(File.Exists(appSettingsPath)); 401Assert.True(File.Exists(projectFilePath), $"Project file should be created at {projectFilePath}");
Projects\DotNetAppHostProjectTests.cs (3)
395Assert.False(File.Exists(socketPath)); 412Assert.True(File.Exists(socketPath)); 4155while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
Projects\DotNetBasedAppHostServerScaffoldCacheTests.cs (5)
36Assert.True(File.Exists(assetsPath), 60Assert.False(File.Exists(assetsPath), 87Assert.True(File.Exists(programPath), "Program.cs was not restored after being deleted."); 110Assert.False(File.Exists(stalePath), 137Assert.False(File.Exists(assetsPath),
Projects\GuestAppHostProjectTests.cs (4)
72Assert.True(File.Exists(kept)); 73Assert.False(File.Exists(obsolete)); 89Assert.True(File.Exists(handWritten)); 837Assert.False(File.Exists(socketPath));
Projects\GuestRuntimeTests.cs (6)
755Assert.True(File.Exists(logFilePath), "Log file should exist"); 765if (File.Exists(logFilePath)) 976Assert.False(File.Exists(migrationFilePath)); 981Assert.True(File.Exists(migrationFilePath)); 1059Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "classes", ".aspire-compile-stamp"))); 1389Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "classes", ".aspire-compile-stamp")));
Projects\PrebuiltAppHostServerTests.cs (6)
1403Assert.True(File.Exists(appSettingsPath)); 2252restoreConfigFileExistedDuringBuild = restoreConfigFile is not null && File.Exists(restoreConfigFile); 2399Assert.True(File.Exists(Path.Combine(layoutPath, "libs", "MyIntegration.dll"))); 2658Assert.True(File.Exists(lockedFilePath)); 2659Assert.True(File.Exists(Path.Combine(secondLayoutPath, "libs", "MyIntegration.dll"))); 2887if (!File.Exists(sourcePath) || File.ReadAllText(sourcePath) != content)
Projects\ProjectLocatorTests.cs (10)
529Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName))); 579Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName))); 1413Assert.True(File.Exists(mismatchedCasePath)); 1571Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName))); 1641Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName))); 1695Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName))); 1740Assert.True(File.Exists(aspireConfigFilePath), "aspire.config.json should have been created by migration from .aspire/settings.json"); 2329Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName))); 4057Assert.True(File.Exists(pathThroughLink), "Symlinked path should resolve to the real apphost file."); 4098if (!File.Exists(differentlyCasedPath))
Projects\ProjectUpdaterTests.cs (4)
1562Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 1563Assert.False(File.Exists(Path.Combine(appHostProjectFile.DirectoryName!, "nuget.config"))); 1611Assert.True(File.Exists(nugetConfigPath)); 1631Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
Projects\RunningInstanceManagerTests.cs (2)
46Assert.True(File.Exists(socketPath)); 55Assert.False(File.Exists(socketPath));
Secrets\SecretsStoreTests.cs (2)
37Assert.True(File.Exists(path)); 207Assert.True(File.Exists(path));
Templating\DotNetTemplateFactoryTests.cs (10)
65Assert.True(File.Exists(nugetConfigPath), "nuget.config should be created in working directory for in-place creation"); 97Assert.True(File.Exists(nugetConfigPath), "nuget.config should exist in working directory"); 141Assert.True(File.Exists(outputConfigPath), "nuget.config should be created in output directory"); 177Assert.True(File.Exists(outputConfigPath), "nuget.config should exist in output directory"); 204Assert.False(File.Exists(workingConfigPath), "No nuget.config should be created in working directory"); 208Assert.True(File.Exists(outputConfigPath), "nuget.config should be created in output directory"); 231Assert.False(File.Exists(workingConfigPath), "No nuget.config should be created for implicit channel"); 232Assert.False(File.Exists(outputConfigPath), "No nuget.config should be created for implicit channel"); 252Assert.False(File.Exists(workingConfigPath), "No nuget.config should be created when no mappings exist"); 253Assert.False(File.Exists(outputConfigPath), "No nuget.config should be created when no mappings exist");
Templating\JavaAppHostTemplateTests.cs (5)
46Assert.True(File.Exists(path), $"Expected the java-starter VS Code settings at {path}"); 84Assert.True(File.Exists(pomPath), $"Expected the java-starter API's Maven project at {pomPath}"); 133Assert.True(File.Exists(path), $"Expected the java-starter Maven wrapper at {path}"); 137Assert.True(File.Exists(propertiesPath), $"Expected the java-starter wrapper properties at {propertiesPath}"); 161Assert.True(File.Exists(path), $"Expected the java-starter AppHost at {path}");
Templating\JavaStarterScaffoldTests.cs (3)
38Assert.True(File.Exists(wrapperPath), $"Expected the scaffolded Maven wrapper at {wrapperPath}"); 78Assert.True(File.Exists(Path.Combine(outputDirectory, "frontend", "vite.config.ts"))); 79Assert.True(File.Exists(Path.Combine(outputDirectory, "AppHost.java")));
Templating\TemplateGitIgnoreTests.cs (1)
16Assert.True(File.Exists(filePath), $"Expected template .gitignore at {filePath}");
Templating\TemplateNuGetConfigServiceTests.cs (6)
179Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 1124Assert.True(File.Exists(configPath)); 1161Assert.False(File.Exists(Path.Combine(outputDir.FullName, "nuget.config"))); 1207Assert.True(File.Exists(configPath)); 1267Assert.True(File.Exists(configPath)); 1277Assert.False(File.Exists(configPath));
TestServices\ProcessTestHelpers.cs (1)
14if (File.Exists(pidFile))
Utils\AppHostHelperTests.cs (6)
367Assert.True(File.Exists(oldFormatSocket), "Old format socket should still exist (can't detect orphan)"); 368Assert.False(File.Exists(orphanedSocket), "Orphaned socket should be deleted"); 369Assert.True(File.Exists(liveSocket), "Live socket should still exist"); 407Assert.False(File.Exists(orphanedSocket)); 408Assert.True(File.Exists(liveSocket)); 409Assert.True(File.Exists(pidlessSocket));
Utils\CliPathHelperTests.cs (5)
333Assert.True(File.Exists(firmlinkedPath), "firmlinked /private/var path should resolve to the same physical file"); 411Assert.False(File.Exists(staleFile)); 412Assert.True(File.Exists(freshFile)); 440Assert.False(File.Exists(matching)); 441Assert.True(File.Exists(unrelated));
Utils\CliTestHelperTests.cs (2)
26Assert.True(File.Exists(logFilePath), $"Log file should exist at {logFilePath}"); 33Assert.False(File.Exists(logFilePath), "Log file should be deleted after workspace disposal");
Utils\FileSystemHelperTests.cs (8)
28Assert.True(File.Exists(Path.Combine(destDir, "file1.txt"))); 29Assert.True(File.Exists(Path.Combine(destDir, "file2.txt"))); 30Assert.True(File.Exists(Path.Combine(destDir, "file3.cs"))); 58Assert.True(File.Exists(Path.Combine(destDir, "root.txt"))); 60Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "level1.txt"))); 62Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt"))); 166Assert.True(File.Exists(copiedFilePath)); 198Assert.True(File.Exists(filePath));
Utils\FirstTimeUseNoticeSentinelTests.cs (3)
54Assert.True(File.Exists(sentinelFilePath)); 73Assert.True(File.Exists(sentinelFilePath)); 91Assert.True(File.Exists(sentinelFilePath));
Utils\IsolatedUserSecretsHelperTests.cs (3)
75Assert.True(File.Exists(isolatedPath)); 119Assert.True(File.Exists(secretsPath)); 126Assert.False(File.Exists(secretsPath));
Utils\ReparsePointTests.cs (5)
90Assert.True(File.Exists(Path.Combine(real, "legacy"))); 127Assert.True(File.Exists(markerPath)); 293Assert.True(File.Exists(markerPath)); 382Assert.True(File.Exists(Path.Combine(targetV1, "id"))); 456Assert.True(File.Exists(Path.Combine(targetV1, "id")));
Aspire.Dashboard (3)
ServiceClient\DashboardRunStore.cs (2)
148if (!File.Exists(DatabasePath)) 200!File.Exists(Path.Combine(directory, DatabaseFileName)))
ServiceClient\DashboardSqliteDatabase.cs (1)
81if (!File.Exists(databasePath))
Aspire.Dashboard.Tests (15)
BlazorAssetsTests.cs (2)
16Assert.True(File.Exists(blazorWebJsPath), $"Expected generated Blazor asset at {blazorWebJsPath}"); 29while (directory is not null && !File.Exists(Path.Combine(directory.FullName, "Aspire.slnx")))
Model\DashboardDataSourceTests.cs (10)
114Assert.False(File.Exists(metadataPath)); 123Assert.False(File.Exists(metadataPath)); 178Assert.False(File.Exists(Path.Combine(runStore.RunDirectory, "run.json"))); 234Assert.True(File.Exists(databasePath)); 238Assert.False(File.Exists(databasePath)); 433Assert.False(File.Exists(databasePath)); 465Assert.True(File.Exists($"{databasePath}-wal")); 466Assert.True(File.Exists($"{databasePath}-shm")); 659Assert.False(File.Exists(prunedRun.DatabasePath)); 663Assert.All(selectableRuns, run => Assert.True(File.Exists(run.DatabasePath)));
tests\Shared\Playwright\PlaywrightProvider.cs (2)
20if (!string.IsNullOrEmpty(browserPath) && !File.Exists(browserPath)) 31if (File.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Deployment.EndToEnd.Tests (3)
AcaDeploymentErrorOutputTests.cs (1)
135Assert.True(File.Exists(deployOutputFile), $"Deploy output file not found at {deployOutputFile}");
Helpers\DeploymentE2ETestHelpers.cs (1)
205return candidates.Find(File.Exists);
tests\Shared\CliInstallStrategy.cs (1)
297if (!File.Exists(archivePath))
Aspire.EndToEnd.Tests (8)
tests\Shared\Playwright\PlaywrightProvider.cs (2)
20if (!string.IsNullOrEmpty(browserPath) && !File.Exists(browserPath)) 31if (File.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
103.FirstOrDefault(File.Exists); 126.FirstOrDefault(File.Exists);
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (3)
18public string CustomHiveDirectory => File.Exists(_stampFilePath) 37if (BuildEnvironment.IsRunningOnCI && File.Exists(_stampFilePath)) 51if (File.Exists(_stampFilePath))
Aspire.Hosting (45)
ApplicationModel\AspireStore.cs (1)
68if (!File.Exists(finalFilePath))
ApplicationModel\AspireStoreExtensions.cs (1)
26if (!File.Exists(sourceFilename))
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
207if (File.Exists(fullPath))
ApplicationModel\DockerfileBuildAnnotation.cs (2)
173if (File.Exists(contextRootIgnore)) 175if (File.Exists(perDockerfileIgnore) &&
ApplicationModel\ProjectResource.cs (1)
199if (File.Exists(tempDockerfilePath))
ApplicationModel\RequiredCommandValidator.cs (1)
200return File.Exists(candidate) ? candidate : null;
Backchannel\AuxiliaryBackchannelService.cs (2)
80if (File.Exists(SocketPath)) 129if (SocketPath != null && File.Exists(SocketPath))
Backchannel\BackchannelService.cs (2)
51if (File.Exists(unixSocketPath)) 129if (_socketPath is not null && File.Exists(_socketPath))
ContainerResourceBuilderExtensions.cs (1)
1501if (!Directory.Exists(sourceFullPath) && !File.Exists(sourceFullPath))
Dashboard\DashboardEventHandlers.cs (3)
137if (!File.Exists(runtimeConfigPath)) 209if (!File.Exists(originalRuntimeConfig)) 321if (!File.Exists(dashboardDll))
Dcp\DcpDependencyCheck.cs (1)
47if (!File.Exists(dcpPath))
Dcp\DcpHost.cs (1)
298if (!File.Exists(dcpExePath))
Dcp\KubernetesService.cs (1)
607using var activity = ProfilingTelemetry.StartDcpEnsureKubernetesClient(configuration, File.Exists(locations.DcpKubeconfigPath));
Devcontainers\DevcontainerSettingsWriter.cs (1)
247if (!File.Exists(path))
DeveloperCertificateService.cs (4)
232return File.Exists(certificateFileName) && File.Exists(keyFileName) 281if (!File.Exists(certFileName)) 307if (!File.Exists(path))
DistributedApplicationBuilder.cs (1)
1011if (!File.Exists(deploymentStatePath))
DistributedApplicationOptions.cs (3)
184if (File.Exists(csprojPath)) 191else if (File.Exists(fullPath) && fullPath.EndsWith(".csproj", StringComparison.OrdinalIgnoreCase)) 205if (File.Exists(csprojPath))
Lifecycle\TerminalHostEventingSubscriber.cs (1)
79if (!File.Exists(terminalHostPath))
Lifecycle\TerminalHostOrphanCleanupService.cs (3)
481=> File.Exists(TerminalHostPaths.GetSocketPath(trmnlDirectory, replicaId, TerminalHostPaths.ProducerSockPurpose)) 482|| File.Exists(TerminalHostPaths.GetSocketPath(trmnlDirectory, replicaId, TerminalHostPaths.ConsumerSockPurpose)) 483|| File.Exists(TerminalHostPaths.GetSocketPath(trmnlDirectory, replicaId, TerminalHostPaths.ControlSockPurpose));
Pipelines\DistributedApplicationPipeline.cs (1)
77if (deploymentStateManager.StateFilePath is string stateFilePath && File.Exists(stateFilePath))
Pipelines\Internal\DeploymentStateManagerBase.cs (2)
80if (statePath is not null && File.Exists(statePath)) 306if (StateFilePath is string stateFilePath && File.Exists(stateFilePath))
Publishing\ContainerRuntimeBase.cs (1)
587if (context.EnvFilePath is not null && File.Exists(context.EnvFilePath))
src\Shared\BundleDiscovery.cs (3)
138if (File.Exists(dcpExePath)) 169if (File.Exists(managedExe)) 282return File.Exists(managedPath) ? managedPath : null;
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (3)
76if (!File.Exists(projectMetadata.ProjectPath)) 90if (!File.Exists(launchSettingsFilePath)) 100if (File.Exists(runSettingsFilePath))
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
24if (!File.Exists(launchSettingsFilePath))
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
src\Shared\PathNormalizer.cs (1)
253if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Utils\FileSystemService.cs (1)
262if (File.Exists(_path))
Aspire.Hosting.Azure (1)
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
Aspire.Hosting.Azure.Functions (4)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (3)
76if (!File.Exists(projectMetadata.ProjectPath)) 90if (!File.Exists(launchSettingsFilePath)) 100if (File.Exists(runSettingsFilePath))
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
24if (!File.Exists(launchSettingsFilePath))
Aspire.Hosting.Azure.Kubernetes (1)
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
Aspire.Hosting.Azure.Kubernetes.Tests (2)
AzureKubernetesIngressTests.cs (1)
34Assert.True(File.Exists(ingressPath), $"Expected ingress YAML at {ingressPath}");
AzureKubernetesPersistentVolumeTests.cs (1)
37Assert.True(File.Exists(claimPath), $"Expected persistent volume claim YAML at {claimPath}.");
Aspire.Hosting.Azure.Tests (32)
AzureAppServiceTests.cs (3)
561Assert.True(File.Exists(mainBicepPath), $"Expected publish to produce '{mainBicepPath}'."); 565Assert.True(File.Exists(envBicepPath), $"Expected publish to produce '{envBicepPath}'."); 569Assert.True(File.Exists(apiBicepPath), $"Expected publish to produce '{apiBicepPath}'.");
AzureBicepResourceTests.cs (2)
275Assert.True(File.Exists(templateFile.Path), $"The template file should exist at {templateFile.Path}"); 317Assert.True(File.Exists(templateFile.Path), $"The template file should exist at {templateFile.Path}");
AzureContainerAppEnvironmentExtensionsTests.cs (2)
566Assert.True(File.Exists(mainBicepPath), $"Expected publish to produce '{mainBicepPath}'."); 570Assert.True(File.Exists(envBicepPath), $"Expected publish to produce '{envBicepPath}'.");
AzureDeployerTests.cs (14)
1657if (File.Exists(deploymentStatePath)) 1665Assert.True(File.Exists(deploymentStatePath)); 1671if (File.Exists(deploymentStatePath)) 1717Assert.True(File.Exists(deploymentStatePath)); 1719if (File.Exists(deploymentStatePath)) 1746if (File.Exists(deploymentStatePath)) 1754Assert.False(File.Exists(deploymentStatePath)); 1779if (File.Exists(stagingStatePath)) 1787Assert.True(File.Exists(stagingStatePath)); 1792if (File.Exists(stagingStatePath)) 1840Assert.False(File.Exists(deploymentStatePath)); 1870Assert.True(File.Exists(deploymentStatePath)); 1925Assert.True(File.Exists(deploymentStatePath)); 1937if (deploymentStatePath is not null && File.Exists(deploymentStatePath))
AzureEnvironmentResourceTests.cs (10)
35Assert.True(File.Exists(mainBicepPath)); 39Assert.True(File.Exists(envBicepPath)); 72Assert.True(File.Exists(mainBicepPath)); 123Assert.True(File.Exists(mainBicepPath)); 251Assert.True(File.Exists(mainBicepPath)); 256Assert.True(File.Exists(includedStorageBicepPath), "Included storage should have a bicep file generated"); 260Assert.False(File.Exists(excludedStorageBicepPath), "Excluded storage should not have a bicep file generated"); 282Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}"); 342Assert.True(File.Exists(mainBicepPath), "main.bicep should be generated"); 345Assert.True(File.Exists(resourceBicepPath), "custom-resource/custom-resource.bicep should be generated");
AzureManifestUtils.cs (1)
39if (pathNode?.ToString() is not { } path || !File.Exists(Path.Combine(manifestDir, path)))
Aspire.Hosting.Blazor (3)
BlazorGatewayExtensions.cs (2)
507if (!File.Exists(srcEndpoints)) 584if (!File.Exists(scriptPath))
Manifests\EndpointsManifestTransformer.cs (1)
88if (!File.Exists(runtimePath))
Aspire.Hosting.Blazor.Tests (2)
AddDotnetProjectBlazorGatewayTests.cs (1)
24Assert.True(File.Exists(projectMetadata.ProjectPath));
EndpointsManifestTransformerTests.cs (1)
194Assert.True(File.Exists(outputPath));
Aspire.Hosting.Browsers (9)
BrowserEndpointDiscovery.cs (1)
59if (!File.Exists(metadataPath))
BrowserHost.cs (1)
230if (!File.Exists(devToolsActivePortFilePath))
BrowserHostRegistry.cs (1)
340if (File.Exists(localStatePath))
BrowserLogsArtifacts.cs (1)
80catch (IOException) when (attempt < 99 && File.Exists(filePath))
ChromiumBrowserResolver.cs (4)
24if (Path.IsPathRooted(browser) && File.Exists(browser)) 35if (File.Exists(candidate)) 81if (File.Exists(localStatePath)) 167if (File.Exists(localStatePath))
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
Aspire.Hosting.Browsers.Tests (13)
BrowserHostTests.cs (2)
57Assert.False(File.Exists(devToolsActivePortPath)); 58Assert.False(File.Exists(BrowserEndpointDiscovery.GetEndpointMetadataFilePath(userDataDirectory.FullName)));
BrowserLogsSessionManagerTests.cs (2)
274Assert.False(File.Exists(metadataPath)); 337Assert.False(File.Exists(metadataPath));
src\Aspire.Hosting.Browsers\BrowserEndpointDiscovery.cs (1)
59if (!File.Exists(metadataPath))
src\Aspire.Hosting.Browsers\BrowserHost.cs (1)
230if (!File.Exists(devToolsActivePortFilePath))
src\Aspire.Hosting.Browsers\BrowserHostRegistry.cs (1)
340if (File.Exists(localStatePath))
src\Aspire.Hosting.Browsers\BrowserLogsArtifacts.cs (1)
80catch (IOException) when (attempt < 99 && File.Exists(filePath))
src\Aspire.Hosting.Browsers\ChromiumBrowserResolver.cs (4)
24if (Path.IsPathRooted(browser) && File.Exists(browser)) 35if (File.Exists(candidate)) 81if (File.Exists(localStatePath)) 167if (File.Exists(localStatePath))
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
Aspire.Hosting.CodeGeneration.Go (2)
GoLanguageSupport.cs (2)
113if (!File.Exists(appHostPath)) 119if (!File.Exists(goModPath))
Aspire.Hosting.CodeGeneration.Java (1)
JavaLanguageSupport.cs (1)
126if (File.Exists(Path.Combine(directoryPath, relativePath)))
Aspire.Hosting.CodeGeneration.Python (3)
PythonLanguageSupport.cs (3)
143if (!File.Exists(appHostPath)) 148var hasPylock = File.Exists(Path.Combine(directoryPath, "pylock.apphost.toml")); 149var hasRequirements = File.Exists(Path.Combine(directoryPath, "apphost_requirements.txt"));
Aspire.Hosting.CodeGeneration.Rust (2)
RustLanguageSupport.cs (2)
117if (!File.Exists(appHostPath)) 123if (!File.Exists(cargoPath))
Aspire.Hosting.CodeGeneration.TypeScript (5)
TypeScriptLanguageSupport.cs (5)
180File.Exists(Path.Combine(parent.FullName, PackageJsonFileName)); 186return File.Exists(packageJsonPath); 226var appHostFileName = File.Exists(Path.Combine(directoryPath, AppHostFileName)) 230if (!File.Exists(appHostPath)) 237if (!File.Exists(packageJsonPath))
Aspire.Hosting.Containers.Tests (2)
DockerSocketBindMountTests.cs (1)
49Assert.True(File.Exists(infoFile));
WithDockerfileTests.cs (1)
931Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}");
Aspire.Hosting.Docker (5)
DockerComposeEnvironmentResource.cs (2)
406if (!File.Exists(dockerComposeFilePath)) 450if (!File.Exists(dockerComposeFilePath))
EnvFile.cs (2)
30if (!File.Exists(path)) 95if (File.Exists(_path))
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
Aspire.Hosting.Docker.Tests (43)
DockerComposePublisherTests.cs (36)
102Assert.True(File.Exists(composePath)); 103Assert.True(File.Exists(envPath)); 139Assert.True(File.Exists(composePath)); 140Assert.True(File.Exists(envPath)); 166Assert.True(File.Exists(composePath)); 195Assert.True(File.Exists(composePath)); 246Assert.True(File.Exists(composePath)); 248Assert.True(File.Exists(envPath)); 273Assert.True(File.Exists(envFilePath)); 278Assert.True(File.Exists(envFilePath)); 314Assert.True(File.Exists(envFilePath)); 319Assert.True(File.Exists(envFilePath)); 345Assert.True(File.Exists(composePath)); 371Assert.True(File.Exists(composePath)); 403Assert.True(File.Exists(composePath)); 434Assert.True(File.Exists(composePath)); 462Assert.True(File.Exists(composePath)); 488Assert.True(File.Exists(composePath)); 516Assert.True(File.Exists(composePath)); 548Assert.True(File.Exists(composePath)); 573Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}"); 597Assert.False(File.Exists(composePath)); 653Assert.True(File.Exists(envFilePath), $"Expected env file at {envFilePath}"); 861Assert.True(File.Exists(composePath)); 862Assert.True(File.Exists(envPath)); 887Assert.True(File.Exists(composePath)); 919Assert.True(File.Exists(composePath)); 920Assert.True(File.Exists(envPath)); 958Assert.True(File.Exists(composePath)); 959Assert.True(File.Exists(envPath)); 1006Assert.True(File.Exists(composePath)); 1007Assert.True(File.Exists(envPath)); 1040Assert.True(File.Exists(composePath)); 1041Assert.True(File.Exists(envPath)); 1083Assert.True(File.Exists(composePath)); 1117Assert.True(File.Exists(composePath));
DockerComposeTests.cs (6)
64Assert.True(File.Exists(composeFile), "Docker Compose file was not created."); 86Assert.True(File.Exists(composeFile), "Docker Compose file was not created."); 188Assert.True(File.Exists(composeFile), "Docker Compose file was not created."); 222Assert.True(File.Exists(composeFile), "Docker Compose file was not created."); 261Assert.True(File.Exists(composeFile), "Docker Compose file was not created."); 348Assert.True(File.Exists(composePath));
EnvFileTests.cs (1)
153Assert.True(File.Exists(envFilePath));
Aspire.Hosting.Dotnet (5)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (3)
76if (!File.Exists(projectMetadata.ProjectPath)) 90if (!File.Exists(launchSettingsFilePath)) 100if (File.Exists(runSettingsFilePath))
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
24if (!File.Exists(launchSettingsFilePath))
src\Shared\PathNormalizer.cs (1)
253if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectResourceTests.cs (1)
165Assert.False(File.Exists(Path.Combine(workspace.Path, "aspire-manifest.json")));
Aspire.Hosting.Go (4)
GoHostingExtensions.cs (3)
167if (File.Exists(Path.Combine(appDirectory, "Dockerfile"))) 186var hasGoMod = File.Exists(Path.Combine(appDirectory, "go.mod")); 187var hasGoSum = File.Exists(Path.Combine(appDirectory, "go.sum"));
GoVersionDetector.cs (1)
15if (!File.Exists(goModPath))
Aspire.Hosting.Go.Tests (1)
AddGoAppTests.cs (1)
788Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated in publish mode");
Aspire.Hosting.Java (20)
JavaBuildToolResolver.cs (7)
31var hasMaven = File.Exists(Path.Combine(appDirectory, "pom.xml")); 32var hasGradle = s_gradleBuildFileNames.Any(fileName => File.Exists(Path.Combine(appDirectory, fileName))); 89if (File.Exists(candidate) 100if (Directory.Exists(gitPath) || File.Exists(gitPath)) 116JavaBuildTool.Gradle => File.Exists(Path.Combine(directory, "settings.gradle")) 117|| File.Exists(Path.Combine(directory, "settings.gradle.kts")), 120JavaBuildTool.Maven => File.Exists(Path.Combine(directory, "pom.xml")),
JavaDockerfileGenerator.cs (5)
123&& !File.Exists(Path.Combine(appDirectory, ".dockerignore"))) 782if (!File.Exists(path)) 1004if (!File.Exists(propertiesPath)) 1049if (!File.Exists(resolvedWrapperPath)) 1076if (!File.Exists(Path.Combine(appDirectory, posixSibling.Replace('/', Path.DirectorySeparatorChar))))
JavaHostingExtensions.cs (5)
117if (File.Exists(Path.Combine(appDirectory, "Dockerfile"))) 1530if (File.Exists(wrapperPath)) 1954return File.Exists(runJar) ? Path.GetFullPath(runJar) : null; 2021if (!File.Exists(pomPath)) 2059if (!File.Exists(settingsPath))
JavaVersionDetector.cs (2)
77if (!File.Exists(pomPath)) 201if (!File.Exists(buildScriptPath))
src\Shared\PathNormalizer.cs (1)
253if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.Java.Tests (4)
AddJavaAppPublishTests.cs (4)
68Assert.True(File.Exists(destination)); 416Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 1779File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")), 2054return File.Exists(ignorePath)
Aspire.Hosting.JavaScript (21)
JavaScriptHostingExtensions.cs (20)
177if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile"))) 281if (File.Exists(Path.Combine(appDirectory, "package.json"))) 520if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile"))) 706if (File.Exists(Path.Combine(appDirectory, "package.json"))) 1170if (File.Exists(Path.Combine(appDirectory, "Dockerfile"))) 1545if (File.Exists(candidatePath)) 1850var hasBunLock = File.Exists(Path.Combine(workingDirectory, "bun.lock")) || 1851File.Exists(Path.Combine(workingDirectory, "bun.lockb")); 1856if (File.Exists(Path.Combine(workingDirectory, "bun.lock"))) 1860if (File.Exists(Path.Combine(workingDirectory, "bun.lockb"))) 1900File.Exists(Path.Combine(resource.Resource.WorkingDirectory, "package-lock.json")) 1918var hasYarnLock = File.Exists(Path.Combine(workingDirectory, "yarn.lock")); 1919var hasYarnrc = File.Exists(Path.Combine(workingDirectory, ".yarnrc.yml")); 1997var hasPnpmLock = File.Exists(Path.Combine(workingDirectory, "pnpm-lock.yaml")); 1998var hasPnpmWorkspace = File.Exists(Path.Combine(workingDirectory, "pnpm-workspace.yaml")); 2053if (!File.Exists(packageJsonPath)) 2442if (!File.Exists(configPath)) 2567if (File.Exists(nvmrcPath)) 2580if (File.Exists(nodeVersionPath)) 2593if (File.Exists(toolVersionsPath))
src\Shared\PathNormalizer.cs (1)
253if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.JavaScript.Tests (8)
AddBunAppTests.cs (4)
96Assert.True(File.Exists(perDockerfileIgnorePath), $"Expected per-Dockerfile dockerignore at {perDockerfileIgnorePath}"); 101Assert.False(File.Exists(Path.Combine(appDir, ".dockerignore")), "Aspire should not write a .dockerignore into the user's source tree."); 124Assert.True(File.Exists(perDockerfileIgnorePath)); 135Assert.False(File.Exists(perDockerfileIgnorePath), "Aspire should not shadow a user-authored context-root .dockerignore.");
AddJavaScriptAppTests.cs (2)
565Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}"); 661Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}");
AddNodeAppTests.cs (2)
366Assert.True(File.Exists(nodeDockerfilePath), "Dockerfile should be generated for NodeApp"); 423Assert.True(File.Exists(nodeDockerfilePath), "Dockerfile should be generated for NodeApp");
Aspire.Hosting.Kubernetes (3)
Deployment\HelmDeploymentEngine.cs (3)
245if (!File.Exists(valuesFilePath)) 446if (File.Exists(valuesFilePath)) 452if (File.Exists(deployValuesFilePath))
Aspire.Hosting.Kubernetes.Tests (37)
KubernetesDeployTests.cs (13)
1003Assert.True(File.Exists(deployValuesPath), "values.env.yaml should be created"); 1032Assert.False(File.Exists(deployValuesPath), "values.env.yaml should not be created when there are no captured values"); 1062Assert.True(File.Exists(deployValuesPath)); 1138Assert.True(File.Exists(deployValuesPath)); 1307Assert.True(File.Exists(deployValuesPath), "values.env.yaml should be created"); 1331Assert.False(File.Exists(deployValuesPath)); 1370Assert.True(File.Exists(valuesPath), "values.yaml should exist"); 1393if (File.Exists(serverSecretsTemplatePath)) 1445Assert.True(File.Exists(valuesPath), "values.yaml should exist"); 1504Assert.True(File.Exists(overridePath), "Override file should be created"); 1562Assert.True(File.Exists(overridePath), "Override file should be created"); 1781Assert.True(File.Exists(valuesPath)); 1816Assert.True(File.Exists(valuesPath));
KubernetesGatewayTests.cs (1)
597Assert.True(File.Exists(gatewayFile));
KubernetesIngressTests.cs (8)
35Assert.True(File.Exists(ingressPath), $"Expected ingress YAML at {ingressPath}"); 65Assert.True(File.Exists(ingressPath), $"Expected ingress YAML at {ingressPath}"); 109Assert.True(File.Exists(ingressPath), $"Expected ingress YAML at {ingressPath}"); 116Assert.True(File.Exists(valuesPath), $"Expected values.yaml at {valuesPath}"); 615Assert.True(File.Exists(publicPath), $"Public ingress YAML not found at {publicPath}"); 616Assert.True(File.Exists(internalPath), $"Internal ingress YAML not found at {internalPath}"); 648Assert.True(File.Exists(ingressPath), $"Expected ingress YAML at {ingressPath}"); 799Assert.True(File.Exists(ingressPath));
KubernetesPublisherTests.cs (15)
111Assert.True(File.Exists(deploymentPath)); 213Assert.True(File.Exists(manifestPath), $"Manifest should exist at {manifestPath}"); 379Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}"); 1438Assert.True(File.Exists(filePath), $"Expected publisher to emit {expectedFile}."); 1457Assert.False(File.Exists(legacyPv), "DefaultStorageType=\"pvc\" must not emit a bare PV; dynamic provisioning is driven by the PVC's storageClassName."); 1487Assert.True(File.Exists(deploymentPath)); 1532Assert.True(File.Exists(filePath), $"Expected publisher to emit {expectedFile}."); 1545Assert.False(File.Exists(legacyPvc), "Bound volumes must not also be emitted via the env-default PV/PVC path."); 1549Assert.False(File.Exists(deploymentPath), "Workloads bound to a persistent volume must render as a StatefulSet, not a Deployment."); 1587Assert.True(File.Exists(filePath), $"Expected publisher to emit {expectedFile}."); 1690Assert.True(File.Exists(statefulSetPath)); 1696Assert.True(File.Exists(pvcPath)); 1760Assert.True(File.Exists(statefulSetPath), $"Expected StatefulSet manifest at {statefulSetPath}"); 1834Assert.True(File.Exists(pvcPath), $"Expected PVC manifest at {pvcPath}"); 1846Assert.True(File.Exists(valuesPath), $"Expected values.yaml at {valuesPath}");
Aspire.Hosting.Maui (1)
src\Shared\PathNormalizer.cs (1)
253if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.Python (13)
PythonAppResourceBuilderExtensions.cs (10)
434if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile"))) 512if (File.Exists(Path.Combine(appDirectoryFullPath, "pyproject.toml")) || 513File.Exists(Path.Combine(appDirectoryFullPath, "requirements.txt"))) 533var hasUvLock = File.Exists(uvLockPath); 642var hasRequirementsTxt = File.Exists(requirementsTxtPath); 682var hasPyprojectToml = File.Exists(pyprojectTomlPath); 1157if (File.Exists(Path.Combine(workingDirectory, "pyproject.toml"))) 1162else if (File.Exists(Path.Combine(workingDirectory, "requirements.txt"))) 1271if (File.Exists(fullPath)) 1284if (File.Exists(fullPath))
PythonVersionDetector.cs (3)
21if (File.Exists(pythonVersionFile)) 32if (File.Exists(pyprojectFile)) 61if (!File.Exists(pythonExecutable))
Aspire.Hosting.Python.Tests (14)
AddPythonAppTests.cs (13)
1293Assert.True(File.Exists(scriptDockerfilePath), "Dockerfile should be generated for script entrypoint"); 1296Assert.True(File.Exists(moduleDockerfilePath), "Dockerfile should be generated for module entrypoint"); 1299Assert.True(File.Exists(executableDockerfilePath), "Dockerfile should be generated for executable entrypoint"); 1359Assert.True(File.Exists(scriptDockerfilePath), "Dockerfile should be generated for script entrypoint"); 1362Assert.True(File.Exists(moduleDockerfilePath), "Dockerfile should be generated for module entrypoint"); 1365Assert.True(File.Exists(executableDockerfilePath), "Dockerfile should be generated for executable entrypoint"); 1813Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated"); 1855Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated for non-UV Python app"); 1905Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated for non-UV Python app"); 1937Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated for Python app"); 1974Assert.True(File.Exists(scriptDockerfilePath), "Dockerfile should be generated for script entrypoint"); 1977Assert.True(File.Exists(moduleDockerfilePath), "Dockerfile should be generated for module entrypoint"); 1980Assert.True(File.Exists(executableDockerfilePath), "Dockerfile should be generated for executable entrypoint");
AddUvicornAppTests.cs (1)
89Assert.True(File.Exists(appDockerfilePath), "Dockerfile should be generated for script entrypoint");
Aspire.Hosting.Radius (3)
Publishing\RadiusDeploymentPipelineStep.cs (1)
119if (!File.Exists(bicepPath))
Publishing\SealedSecretApplyStep.cs (2)
175return File.Exists(artifact) ? artifact : sourceManifestPath; 680if (!File.Exists(configPath))
Aspire.Hosting.Radius.Tests (4)
Publishing\RadiusDeployParametersTests.cs (1)
91Assert.False(File.Exists(path));
Publishing\SealedSecretPublishTests.cs (3)
187Assert.True(File.Exists(destinationA)); 192Assert.True(File.Exists(destinationB)); 193Assert.False(File.Exists(destinationA), "The obsolete store's manifest must be pruned on republish.");
Aspire.Hosting.RemoteHost (7)
AssemblyLoader.cs (1)
357if (!File.Exists(libsPath))
AtsCapabilityScanner.cs (1)
3399if (File.Exists(xmlPath))
IntegrationLoadContext.cs (1)
140if (File.Exists(path))
JsonRpcServer.cs (2)
141if (File.Exists(_socketPath)) 313if (File.Exists(_socketPath))
src\Shared\IntegrationPackageProbeManifest.cs (2)
112if (!File.Exists(normalizedManifestPath)) 341if (!File.Exists(normalizedPath))
Aspire.Hosting.RemoteHost.Tests (2)
IntegrationLoadContextTests.cs (1)
42Assert.True(File.Exists(assemblyPath));
JsonRpcAuthenticationTests.cs (1)
149if (!OperatingSystem.IsWindows() && File.Exists(_socketPath))
Aspire.Hosting.Rust (5)
RustDockerfileGenerator.cs (2)
68&& !File.Exists(Path.Combine(workingDirectory, ".dockerignore"))) 279if (!File.Exists(candidate) && !Directory.Exists(candidate))
RustHostingExtensions.cs (2)
609if (File.Exists(Path.Combine(candidate, "Cargo.lock"))) 751if (File.Exists(Path.Combine(workingDirectory, "Dockerfile")))
src\Shared\PathNormalizer.cs (1)
253if (storedLinkTarget is null && !File.Exists(current) && !Directory.Exists(current))
Aspire.Hosting.Rust.Tests (16)
AddRustAppPublishTests.cs (11)
418Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 473Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 503Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 521Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 545Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 594if (!File.Exists(Path.Combine(sourceDir.FullName, differentlyCasedPath))) 622if (!File.Exists(Path.Combine(sourceDir.FullName, composedManifestPath))) 781if (!File.Exists(differentlyCasedCanonicalManifest)) 813Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 836Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile"))); 995Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore")));
RustDockerfileShellTests.cs (5)
56Assert.False(File.Exists(Path.Combine(artifactDirectory, "api"))); 85Assert.False(File.Exists(rootCandidate)); 86Assert.False(File.Exists(staleTargetCandidate)); 109Assert.False(File.Exists(markerPath)); 195=> File.Exists(invocationLog)
Aspire.Hosting.Sdk.Tests (12)
AppHostSdkTargetsTests.cs (12)
452Assert.False(File.Exists(shadowCaptureFile), "The working-directory Aspire shim was invoked instead of the resolved PATH command."); 493Assert.False(File.Exists(shadowCaptureFile), "The working-directory DNX shim was invoked instead of the resolved PATH command."); 830Assert.True(File.Exists(childPidPath), $"The child process did not record its PID. MSBuild output:{Environment.NewLine}{result.Output}"); 1614Assert.True(File.Exists(toolPath), $"Aspire.RuntimeIdentifier.Tool was not built at '{toolPath}'. Build the test project to produce it."); 1626Assert.True(File.Exists(taskAssemblyPath), $"Aspire.Hosting.Tasks was not built at '{taskAssemblyPath}'. Build the test project to produce it."); 1637if (!File.Exists(vswherePath)) 1655.FirstOrDefault(File.Exists); 1665Assert.True(File.Exists(path), $"The file specified by {metadataName} was not built at '{path}'."); 1755File.Exists(Path.Combine(aspireHome, "bundle", "dcp", OperatingSystem.IsWindows() ? "dcp.exe" : "dcp")), 1758File.Exists(Path.Combine(aspireHome, "bundle", "managed", OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed")), 1807return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName))); 1916while (directory is not null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
Aspire.Hosting.Tasks (7)
CommandPathResolver.cs (1)
71if (!File.Exists(path))
ResolveAspireCliBundle.cs (4)
112if (File.Exists(AspireCliPath) && TryResolveFromCliPath(AspireCliPath, out var explicitCliBundle)) 234if (!File.Exists(dcpPath) || !File.Exists(managedPath)) 436if (!File.Exists(sidecarPath))
ResolveAspireCliInvocation.cs (2)
123if (!File.Exists(dotnetPath) || !TryGetLatestSdkVersion(dotnetPath, out var sdkVersion)) 129if (!File.Exists(sdkPath))
Aspire.Hosting.Testing (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
24if (!File.Exists(launchSettingsFilePath))
Aspire.Hosting.Testing.Tests (5)
TestingBuilderTests.cs (1)
57Assert.True(File.Exists(testProjectAssemblyPath), $"TestProject.AppHost.dll not found at {testProjectAssemblyPath}.");
tests\Aspire.Hosting.TestUtilities\Utils\MSBuildUtils.cs (1)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\Playwright\PlaywrightProvider.cs (2)
20if (!string.IsNullOrEmpty(browserPath) && !File.Exists(browserPath)) 31if (File.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Hosting.Tests (122)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (10)
88Assert.False(File.Exists(dockerfilePath)); 92if (File.Exists(dockerfilePath)) 122Assert.True(File.Exists(dockerfilePath)); 128if (File.Exists(dockerfilePath)) 164Assert.True(File.Exists(dockerfilePath)); 168if (File.Exists(dockerfilePath)) 207Assert.True(File.Exists(dockerfilePath)); 211if (File.Exists(dockerfilePath)) 226if (!File.Exists(differentCasingDockerfilePath)) 265Assert.False(File.Exists(perDockerfileIgnore));
AspireStoreTests.cs (2)
84Assert.True(File.Exists(filePath)); 98Assert.True(File.Exists(filePath));
Backchannel\AppHostRpcTargetUploadTests.cs (2)
39Assert.False(File.Exists(filePath)); 162Assert.True(File.Exists(replacementPath));
Backchannel\AuxiliaryBackchannelTests.cs (2)
42Assert.True(File.Exists(service.SocketPath)); 298Assert.True(File.Exists(service.SocketPath), $"Socket file should exist at: {service.SocketPath}");
Dashboard\DashboardEventHandlersTests.cs (4)
622Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist"); 702Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist"); 771Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist"); 838Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist");
Dashboard\DashboardServiceTests.cs (8)
857Assert.False(File.Exists(filePath)); 883Assert.True(File.Exists(filePath)); 942Assert.True(File.Exists(replacementPath)); 1148Assert.True(File.Exists(filePath)); 1149Assert.True(File.Exists(secondFilePath)); 1159Assert.False(File.Exists(filePath)); 1160Assert.False(File.Exists(secondFilePath)); 1232Assert.True(File.Exists(file.FilePath));
Dashboard\InteractionFileUploadStoreTests.cs (23)
31Assert.True(File.Exists(filePath)); 89Assert.True(File.Exists(filePath)); 94Assert.False(File.Exists(filePath)); 114Assert.True(File.Exists(replacementPath)); 140Assert.True(File.Exists(replacementPath)); 159Assert.True(File.Exists(filePath)); 164Assert.False(File.Exists(filePath)); 177Assert.True(File.Exists(filePath)); 182Assert.False(File.Exists(filePath)); 195Assert.True(File.Exists(filePath)); 210Assert.False(File.Exists(filePath)); 224Assert.True(File.Exists(filePath)); 229Assert.False(File.Exists(filePath)); 244Assert.True(File.Exists(filePath)); 261Assert.True(File.Exists(acceptedFilePath)); 263Assert.False(File.Exists(lateFilePath)); 280Assert.True(File.Exists(filePath)); 314Assert.True(File.Exists(filePath)); 364Assert.True(File.Exists(replacementPath)); 512Assert.True(File.Exists(filePath1)); 513Assert.True(File.Exists(filePath2)); 519Assert.False(File.Exists(filePath1)); 520Assert.False(File.Exists(filePath2));
Dcp\DcpHostNotificationTests.cs (1)
712if (File.Exists(path))
Dcp\KubernetesServiceTests.cs (1)
34Assert.False(File.Exists(kubeconfigPath));
DistributedApplicationBuilderTests.cs (2)
178if (File.Exists(userSecretsPath)) 274if (File.Exists(userSecretsPath))
FileSystemServiceTests.cs (21)
71Assert.True(File.Exists(tempFile.Path)); 82Assert.True(File.Exists(tempFile.Path)); 93Assert.True(File.Exists(path)); 97Assert.False(File.Exists(path)); 108Assert.True(File.Exists(filePath)); 113Assert.False(File.Exists(filePath)); 155Assert.True(File.Exists(extractedPath)); 194Assert.True(File.Exists(tempFile1.Path)); 195Assert.True(File.Exists(tempFile2.Path)); 226Assert.True(File.Exists(filePath)); 232Assert.False(File.Exists(filePath)); 246Assert.True(File.Exists(filePath)); 253Assert.True(File.Exists(filePath)); 288Assert.True(File.Exists(filePath)); 294Assert.True(File.Exists(filePath)); 321Assert.False(File.Exists(file1Path)); 323Assert.True(File.Exists(file2Path)); 329Assert.False(File.Exists(file2Path)); 359Assert.False(File.Exists(filePath)); 375Assert.True(File.Exists(filePath)); 381Assert.False(File.Exists(filePath));
MSBuildTests.cs (1)
1133return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName)));
PathLookupHelperTests.cs (1)
227if (!File.Exists(path))
Publishing\ResourceContainerImageManagerTests.cs (2)
861if (File.Exists(tempFile)) 1582File.Exists(expectedArchivePath),
SecretsStoreTests.cs (3)
80if (!File.Exists(manager.FilePath)) 97if (File.Exists(filePath)) 106if (File.Exists(userSecretsPath))
UserSecretsParameterDefaultTests.cs (4)
69if (File.Exists(userSecretsPath)) 391if (File.Exists(manager.FilePath)) 415if (File.Exists(filePath)) 424if (File.Exists(userSecretsPath))
WithTerminalTests.cs (35)
329File.Exists(host.Layout.MetadataPath), 343Assert.False(File.Exists(path), $"Expected '{path}' to be deleted after ApplicationStopped."); 379Assert.True(File.Exists(host.Layout.MetadataPath)); 405Assert.False(File.Exists(TerminalHostPaths.GetMetadataTemporaryPath(host.Layout.MetadataPath))); 465Assert.False(File.Exists(orphanMetadataPath), "Dead-owner sidecar should be swept on startup."); 466Assert.False(File.Exists(orphanProducerPath), "Dead-owner producer socket should be swept on startup."); 467Assert.False(File.Exists(orphanConsumerPath), "Dead-owner consumer socket should be swept on startup."); 468Assert.False(File.Exists(orphanControlPath), "Dead-owner control socket should be swept on startup."); 517Assert.True(File.Exists(liveMetadataPath), "Live-owner sidecar must be preserved by the sweep."); 518Assert.True(File.Exists(liveProducerPath), "Live-owner socket must be preserved by the sweep."); 558Assert.False(File.Exists(metadataPath)); 559Assert.False(File.Exists(producerPath)); 597Assert.True(File.Exists(metadataPath)); 598Assert.True(File.Exists(producerPath)); 599Assert.True(File.Exists(sentinelPath), "Metadata content must never be used as a file search pattern."); 624Assert.True(File.Exists(metadataPath)); 625Assert.True(File.Exists(producerPath)); 651Assert.True(File.Exists(metadataPath)); 652Assert.True(File.Exists(producerPath)); 668Assert.False(File.Exists(metadataPath)); 691Assert.False(File.Exists(expiredPath)); 692Assert.True(File.Exists(recentPath)); 723Assert.True(File.Exists(metadataPath)); 724Assert.True(File.Exists(producerPath)); 756Assert.True(File.Exists(metadataPath)); 757Assert.True(File.Exists(producerPath)); 787Assert.True(File.Exists(metadataPath)); 788Assert.True(File.Exists(producerPath)); 813Assert.True(File.Exists(metadataPath)); 814Assert.True(File.Exists(producerPath)); 840Assert.True(File.Exists(metadataPath)); 841Assert.True(File.Exists(producerPath)); 871Assert.False(File.Exists(metadataPath)); 872Assert.False(File.Exists(producerPath)); 891Assert.True(File.Exists(metadataPath));
Aspire.Hosting.TestUtilities (1)
Utils\MSBuildUtils.cs (1)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
Aspire.Hosting.Yarp.Tests (1)
YarpConfigGeneratorTests.cs (1)
293Assert.True(File.Exists(composeFile), "Docker Compose file was not created.");
Aspire.Managed.Tests (3)
TerminalHostSignalTests.cs (3)
68Assert.All(socketPaths, path => Assert.False(File.Exists(path), $"Expected '{path}' to be unlinked.")); 166Assert.All(socketPaths, path => Assert.False(File.Exists(path), $"Expected '{path}' to be unlinked.")); 238while (expectedPaths.Any(path => !File.Exists(path)))
Aspire.Playground.Tests (5)
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
tests\Aspire.TestUtilities\TestcontainersPodmanConfiguration.cs (1)
288private static bool SocketExists(string? path) => !string.IsNullOrEmpty(path) && File.Exists(path);
tests\Shared\Playwright\PlaywrightProvider.cs (2)
20if (!string.IsNullOrEmpty(browserPath) && !File.Exists(browserPath)) 31if (File.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.RuntimeIdentifier.Tool (1)
Program.cs (1)
49if (!File.Exists(rgp))
Aspire.Templates.Tests (11)
LocalhostTldHostnameTests.cs (1)
74Assert.True(File.Exists(launchSettingsPath), $"launchSettings.json/apphost.run.json file not found at {launchSettingsPath}");
NewUpAndBuildStandaloneTemplateTests.cs (1)
76Assert.True(File.Exists(Path.Combine(webProjectDirectory, "Components", "Layout", "NavMenu.razor.js")));
TemplateTestsBase.cs (1)
75Assert.True(File.Exists(testProjectPath), $"Expected tests project file at {testProjectPath}");
tests\Shared\Playwright\PlaywrightProvider.cs (2)
20if (!string.IsNullOrEmpty(browserPath) && !File.Exists(browserPath)) 31if (File.Exists(probePath))
tests\Shared\Playwright\TestUtils.cs (1)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
103.FirstOrDefault(File.Exists); 126.FirstOrDefault(File.Exists);
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (3)
18public string CustomHiveDirectory => File.Exists(_stampFilePath) 37if (BuildEnvironment.IsRunningOnCI && File.Exists(_stampFilePath)) 51if (File.Exists(_stampFilePath))
Aspire.TerminalHost (3)
TerminalHostControlListener.cs (1)
59if (File.Exists(_socketPath))
TerminalReplica.cs (2)
580if (File.Exists(path)) 615if (File.Exists(path))
Aspire.TerminalHost.Tests (8)
TerminalHostAppTests.cs (8)
59Assert.True(File.Exists(control)); 262Assert.True(File.Exists(args.ProducerUdsPath)); 263Assert.True(File.Exists(args.ConsumerUdsPath)); 405Assert.True(File.Exists(args.ProducerUdsPath), "Producer socket should be bound while the replica waits."); 406Assert.True(File.Exists(args.ConsumerUdsPath), "Consumer socket should be bound while the replica waits."); 418File.Exists(args.ProducerUdsPath), 421File.Exists(args.ConsumerUdsPath), 934if (File.Exists(path))
Aspire.TestTools (3)
GitHubCli.cs (3)
219if (File.Exists(fixturePath)) 344if (File.Exists(outputPath)) 382return File.Exists(fixturePath);
Aspire.TestUtilities (2)
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
TestcontainersPodmanConfiguration.cs (1)
288private static bool SocketExists(string? path) => !string.IsNullOrEmpty(path) && File.Exists(path);
blazor-devserver (1)
Server\Program.cs (1)
30name = !File.Exists(name) ? Path.ChangeExtension(applicationPath, ".StaticWebAssets.xml") : name;
CatalogService (1)
CatalogApi.cs (1)
42if (!File.Exists(path))
cdac-build-tool (1)
ComposeCommand.cs (1)
61if (!System.IO.File.Exists(templateFilePath))
crossgen2 (1)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
351&& File.Exists(originalPdbPath))
Crossgen2Tasks (13)
PrepareForReadyToRunCompilation.cs (1)
120!string.IsNullOrEmpty(diaSymReaderPath) && File.Exists(diaSymReaderPath);
ResolveReadyToRunCompilers.cs (4)
390return File.Exists(_crossgenTool.ToolPath) && File.Exists(_crossgenTool.ClrJitPath); 418if (!File.Exists(_crossgen2Tool.ClrJitPath)) 425return File.Exists(_crossgen2Tool.ToolPath);
RunReadyToRunCompiler.cs (8)
103if (!File.Exists(Crossgen2Tool.ItemSpec)) 109if (!string.IsNullOrEmpty(hostPath) && !File.Exists(hostPath)) 117if (!File.Exists(jitPath)) 151if (!File.Exists(CrossgenTool.ItemSpec)) 156if (!File.Exists(CrossgenTool.GetMetadata(MetadataKeys.JitPath))) 169if (!string.IsNullOrEmpty(DiaSymReader) && !File.Exists(DiaSymReader)) 181if (!File.Exists(_outputR2RImage)) 194if (!File.Exists(_inputAssembly))
csc (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
455if (!File.Exists(processFilePath)) 556if (!File.Exists(serverInfo.processFilePath)) 848if (!File.Exists(FilePath))
src\roslyn\src\Compilers\Shared\RuntimeHostInfo.cs (1)
102if (File.Exists(filePath))
CSharpSyntaxGenerator (1)
Program.cs (1)
72if (!File.Exists(inputFile))
datacollector (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))
datacollector.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))
dotnet (86)
BuildServer\VBCSCompilerServer.cs (1)
49if (File.Exists(vbcsCompilerPath))
CommandFactory\CommandResolution\AppBaseDllCommandResolver.cs (1)
23if (File.Exists(localPath))
CommandFactory\CommandResolution\MSBuildProject.cs (2)
166if (!File.Exists(lockFilePath)) 183.FirstOrDefault(p => Path.IsPathRooted(p) && File.Exists(p));
CommandFactory\CommandResolution\PackagedCommandSpecFactory.cs (1)
53if (!File.Exists(commandPath))
CommandFactory\CommandResolution\PackagedCommandSpecFactoryWithCliRuntime.cs (2)
22if (!File.Exists(runtimeConfigFile)) 77return File.Exists(preferCliRuntimePath);
CommandFactory\CommandResolution\ProjectDependenciesCommandResolver.cs (2)
97if (!File.Exists(depsFilePath)) 108if (!File.Exists(runtimeConfigPath))
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (3)
235lockedToken => Task.FromResult(File.Exists(path)), 308if (!File.Exists(depsPath)) 322!File.Exists(toolDepsJsonGeneratorProject))
CommandFactory\CommandResolution\PublishedPathCommandResolver.cs (2)
39if (!File.Exists(depsFilePath)) 49if (!File.Exists(runtimeConfigPath))
Commands\Fsi\FsiForwardingApp.cs (1)
32return File.Exists(path);
Commands\Help\HelpCommand.cs (3)
66var fileName = File.Exists(@"/usr/bin/xdg-open") ? @"/usr/bin/xdg-open" : 67File.Exists(@"/usr/sbin/xdg-open") ? @"/usr/sbin/xdg-open" : 68File.Exists(@"/sbin/xdg-open") ? @"/sbin/xdg-open" :
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (1)
205if (!File.Exists(projectToLoad))
Commands\Package\Add\PackageAddCommand.cs (2)
34if (!File.Exists(fileOrDirectory)) 136if (File.Exists(filePath))
Commands\Package\List\PackageListCommand.cs (1)
180if (!File.Exists(resultPath))
Commands\Package\Remove\PackageRemoveCommand.cs (1)
38if (!File.Exists(fileOrDirectory))
Commands\Project\Convert\ProjectConvertCommand.cs (2)
247if (File.Exists(targetItemFullPath)) 369if (!File.Exists(itemFullPath))
Commands\Run\CSharpCompilerCommand.cs (3)
295if (!File.Exists(file)) 356if (!File.Exists(runtimeConfigPath)) return null; 413if (!File.Exists(frameworkListPath))
Commands\Run\EnvironmentVariablesToMSBuild.cs (1)
125if (propsFilePath is not null && File.Exists(propsFilePath))
Commands\Run\FileBasedAppRunPlan.cs (4)
113if (!File.Exists(entryPointFileFullPath)) 259if (!File.Exists(filePath)) 322if (File.Exists(implicitBuildFilePath)) 449!File.Exists(previousRunCommand))
Commands\Run\RunCommand.cs (1)
726if (projectFilePath is not null && !emptyProjectOption && !File.Exists(projectFilePath))
Commands\Sdk\Check\SdkCheckCommand.cs (1)
35_sdkCheckConfig = File.Exists(configFilePath) ? JsonSerializer.Deserialize(File.ReadAllText(configFilePath), SdkCheckJsonSerializerContext.Default.SdkCheckConfig) : null;
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
404if (!recursionStack.Add(fullPath) || !File.Exists(fullPath))
Commands\Test\MTP\MSBuildUtility.cs (3)
372token.EndsWith(".slnx", StringComparison.OrdinalIgnoreCase)) && File.Exists(token)) 385else if (Path.GetExtension(token).EndsWith("proj", StringComparison.OrdinalIgnoreCase) && File.Exists(token)) 417File.Exists(token))
Commands\Test\MTP\SolutionAndProjectUtility.cs (2)
724bool hasLaunchSettings = File.Exists(launchSettingsPath); 727bool hasRunJson = File.Exists(runJsonPath);
Commands\Test\MTP\Terminal\FileUtilities.cs (1)
26return !File.Exists(lowerCased);
Commands\Test\MTP\ValidationUtility.cs (1)
149if (!File.Exists(filePath))
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (2)
176if (!string.IsNullOrEmpty(_configFilePath) && !File.Exists(_configFilePath)) 303if (!string.IsNullOrEmpty(_configFilePath) && !File.Exists(_configFilePath))
Commands\Tool\Install\ToolInstallLocalInstaller.cs (1)
28if (!string.IsNullOrEmpty(configFilePath) && !File.Exists(configFilePath))
Commands\Workload\FileBasedWorkloadInstallationRecordRepositoryFactory.cs (1)
27=> File.Exists(Path.Combine(dotnetDir, "metadata", "workloads", sdkFeatureBand.ToString(), "userlocal"));
Commands\Workload\Install\FileBasedInstaller.cs (6)
181if (!File.Exists(packagePath)) 252if (File.Exists(file)) 323if (!File.Exists(packagePath)) 363if (!string.IsNullOrEmpty(packagePath) && File.Exists(packagePath) && (offlineCache == null || !offlineCache.HasValue)) 664return File.Exists(packInfo.Path); 854if (File.Exists(packInstallRecord))
Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (8)
89if (File.Exists(sentinelPath)) 103var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents(); 120if (File.Exists(filePath)) 130if (File.Exists(workloadSetVersionFilePath)) 252if (!string.IsNullOrEmpty(packagePath) && File.Exists(packagePath) && (offlineCache == null || !offlineCache.HasValue)) 292if (!File.Exists(manifestPath)) 304if (File.Exists(adManifestFeatureBandPath)) 329if (File.Exists(sentinelPath))
Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
47if (!File.Exists(path)) 61if (File.Exists(path))
Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
99if (!backgroundUpdatesDisabled && File.Exists(adUpdatesFile))
Commands\Workload\Install\WorkloadManifestUpdater.Managed.cs (1)
193else if (File.Exists(rollbackDefinitionFilePath))
Commands\Workload\InstallStateContents.cs (1)
31return File.Exists(path) ? FromString(File.ReadAllText(path)) : new InstallStateContents();
MsbuildProject.cs (2)
55if (File.Exists(fileOrDirectory)) 67if (!File.Exists(projectPath))
Parser.cs (1)
311if (File.Exists(filePath))
ReleasePropertyProjectLocator.cs (2)
269return File.Exists(path) && Path.GetExtension(path).EndsWith("proj"); 275return File.Exists(path) && (Path.GetExtension(path).Equals(".sln") || Path.GetExtension(path).Equals(".slnx"));
SdkVulnerability\SdkReleaseMetadataCache.cs (3)
60if (File.Exists(sentinelPath)) 84if (!File.Exists(summaryPath)) 176if (File.Exists(sentinelPath))
SlnFileFactory.cs (1)
28if (File.Exists(slnFileOrDirectory))
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26425.101\contentFiles\cs\net11.0\BuildServerConnection.cs (3)
455if (!File.Exists(processFilePath)) 556if (!File.Exists(serverInfo.processFilePath)) 848if (!File.Exists(FilePath))
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26425.101\contentFiles\cs\net11.0\RuntimeHostInfo.cs (1)
102if (File.Exists(filePath))
src\sdk\src\Common\SdkVulnerabilityCacheReader.cs (1)
49if (!File.Exists(summaryPath))
src\sdk\src\Common\WorkloadFileBasedInstall.cs (1)
16=> dotnetDir is not null && File.Exists(GetUserInstallFilePath(dotnetDir, sdkFeatureBand));
SudoEnvironmentDirectoryOverride.cs (2)
65.FirstOrDefault(f => File.Exists(f)); 70if (File.Exists(overriddenNugetConfig))
Telemetry\DevDeviceIDGetter.cs (2)
63if (File.Exists(cacheFilePath)) 72if (File.Exists(cacheFilePath))
Telemetry\TelemetryDiskLogger.cs (1)
54var jsonText = !File.Exists(logPath) ? """{"activities":[]}""" : File.ReadAllText(logPath);
dotnet-aot (34)
NativeEntryPoint.cs (2)
255if (File.Exists(dotnetDll) && File.Exists(runtimeConfig))
src\sdk\src\Cli\dotnet\CommandFactory\CommandResolution\AppBaseDllCommandResolver.cs (1)
23if (File.Exists(localPath))
src\sdk\src\Cli\dotnet\CommandFactory\CommandResolution\PublishedPathCommandResolver.cs (2)
39if (!File.Exists(depsFilePath)) 49if (!File.Exists(runtimeConfigPath))
src\sdk\src\Cli\dotnet\Commands\Fsi\FsiForwardingApp.cs (1)
32return File.Exists(path);
src\sdk\src\Cli\dotnet\Commands\Run\FileBasedAppRunPlan.cs (4)
113if (!File.Exists(entryPointFileFullPath)) 259if (!File.Exists(filePath)) 322if (File.Exists(implicitBuildFilePath)) 449!File.Exists(previousRunCommand))
src\sdk\src\Cli\dotnet\Commands\Sdk\Check\SdkCheckCommand.cs (1)
35_sdkCheckConfig = File.Exists(configFilePath) ? JsonSerializer.Deserialize(File.ReadAllText(configFilePath), SdkCheckJsonSerializerContext.Default.SdkCheckConfig) : null;
src\sdk\src\Cli\dotnet\Commands\Workload\FileBasedWorkloadInstallationRecordRepositoryFactory.cs (1)
27=> File.Exists(Path.Combine(dotnetDir, "metadata", "workloads", sdkFeatureBand.ToString(), "userlocal"));
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (8)
89if (File.Exists(sentinelPath)) 103var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents(); 120if (File.Exists(filePath)) 130if (File.Exists(workloadSetVersionFilePath)) 252if (!string.IsNullOrEmpty(packagePath) && File.Exists(packagePath) && (offlineCache == null || !offlineCache.HasValue)) 292if (!File.Exists(manifestPath)) 304if (File.Exists(adManifestFeatureBandPath)) 329if (File.Exists(sentinelPath))
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
47if (!File.Exists(path)) 61if (File.Exists(path))
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadManifestUpdater.cs (1)
99if (!backgroundUpdatesDisabled && File.Exists(adUpdatesFile))
src\sdk\src\Cli\dotnet\Commands\Workload\InstallStateContents.cs (1)
31return File.Exists(path) ? FromString(File.ReadAllText(path)) : new InstallStateContents();
src\sdk\src\Cli\dotnet\MsbuildProject.cs (2)
55if (File.Exists(fileOrDirectory)) 67if (!File.Exists(projectPath))
src\sdk\src\Cli\dotnet\Parser.cs (1)
311if (File.Exists(filePath))
src\sdk\src\Cli\dotnet\SdkVulnerability\SdkReleaseMetadataCache.cs (3)
60if (File.Exists(sentinelPath)) 84if (!File.Exists(summaryPath)) 176if (File.Exists(sentinelPath))
src\sdk\src\Cli\dotnet\SlnFileFactory.cs (1)
28if (File.Exists(slnFileOrDirectory))
src\sdk\src\Cli\dotnet\Telemetry\DevDeviceIDGetter.cs (2)
63if (File.Exists(cacheFilePath)) 72if (File.Exists(cacheFilePath))
src\sdk\src\Cli\dotnet\Telemetry\TelemetryDiskLogger.cs (1)
54var jsonText = !File.Exists(logPath) ? """{"activities":[]}""" : File.ReadAllText(logPath);
dotnet-dev-certs (11)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
540if (!File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
131return File.Exists(GetCertificateFilePath(candidate)) ? 457if (File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
115if (File.Exists(certPath)) 247if (File.Exists(certPath)) 473if (File.Exists(certPath)) 610if (File.Exists(Path.Combine(searchFolder, command))) 646if (File.Exists(WslInteropPath) || File.Exists(WslInteropLatePath)) 1051if (!File.Exists(linkPath))
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
dotnet-format (6)
Analyzers\AnalyzerReferenceInformationProvider.cs (1)
43if (path is null || !File.Exists(path))
CodeFormatter.cs (1)
220(formatOptions.FileMatcher.HasMatches(document.FilePath) && File.Exists(document.FilePath));
Utilities\EditorConfigFinder.cs (1)
31if (File.Exists(editorConfigPath))
Utilities\ProcessRunner.cs (1)
45if (File.Exists(file))
Workspaces\FolderWorkspace_FolderSolutionLoader.cs (1)
79if (File.Exists(filePath))
Workspaces\MSBuildWorkspaceFinder.cs (1)
75if (!File.Exists(workspacePath))
dotnet-getdocument (4)
Commands\InvokeCommand.cs (3)
69if (File.Exists(configPath)) 94if (!string.IsNullOrEmpty(projectAssetsFile) && File.Exists(projectAssetsFile)) 110if (File.Exists(runtimeConfigPath))
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
dotnet-Microsoft.XmlSerializer.Generator (5)
Sgen.cs (5)
341if (File.Exists(codePath)) 355if (File.Exists(codePath)) 397if (!success && toDeleteFile && File.Exists(codePath)) 590if (File.Exists(reference)) 645if (File.Exists(reference))
dotnet-openapi (6)
Commands\AddFileCommand.cs (1)
54return File.Exists(GetFullPath(file));
Commands\BaseCommand.cs (4)
102if (!File.Exists(project)) 137return File.Exists(Path.GetFullPath(file)) && file.EndsWith(".csproj", StringComparison.Ordinal); 350if (!File.Exists(filePath)) 515var destinationExists = File.Exists(destinationPath);
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
dotnet-sql-cache (1)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
dotnet-suggest (3)
FileSuggestionRegistration.cs (2)
45|| !File.Exists(_registrationConfigurationFilePath)) 75if (_registrationConfigurationFilePath != null && File.Exists(_registrationConfigurationFilePath))
SuggestionStore.cs (1)
61if (!File.Exists(exeFileName))
dotnet-svcutil-lib (25)
CodeSerializer.cs (1)
79if (File.Exists(_outputFilePath))
CommandProcessorOptions.cs (4)
445if (!IsUpdateOperation && this.ToolContext <= OperationalContext.Global && File.Exists(filePath)) 532if (!PathHelper.IsUnderDirectory(svcutilParmasFile, projectDirInfo, out paramsFilePath, out fileRelPath) || !File.Exists(paramsFilePath)) 535if (!PathHelper.IsUnderDirectory(wcfcsParamsFile, projectDirInfo, out paramsFilePath, out fileRelPath) || !File.Exists(paramsFilePath)) 706if (File.Exists(projectFullPath))
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReader.cs (1)
1895} while (File.Exists(dumpFileName));
Metadata\MetadataDocumentLoader.cs (5)
527if (!File.Exists(fullFileName)) 535if (!File.Exists(fullFileName) && !string.IsNullOrWhiteSpace(specNamespace)) 544if (!File.Exists(fullFileName) && !Path.IsPathRooted(schemaLocation)) 548if (!File.Exists(fullFileName)) 555if (File.Exists(fullFileName))
Metadata\MetadataDocumentSaver.cs (1)
71var fileInfo = this.MetadataFiles.FirstOrDefault(fi => File.Exists(fi.FilePath));
Metadata\MetadataFileNameManager.cs (1)
183if (File.Exists(filePath))
Shared\MSBuildProj.cs (5)
322if (fullPath == null || !File.Exists(fullPath)) 396if (File.Exists(fullPath)) 803if (File.Exists(assetsFile) && !(this.TargetFramework.Contains("-") && !this.TargetFramework.ToLower().Contains("windows"))) 888if (File.Exists(depsFile)) 920if (File.Exists(dependency.FullPath) && !assemblyDependencies.Contains(dependency))
Shared\ProjectPropertyResolver.cs (2)
149while (dotnetDir != null && !(File.Exists(Path.Combine(dotnetDir, "dotnet")) || File.Exists(Path.Combine(dotnetDir, "dotnet.exe"))))
Shared\Utilities\PathHelper.cs (1)
209if (File.Exists(filePath))
Shared\Utilities\RuntimeEnvironmentHelper.cs (3)
47if (!File.Exists(Path.Combine(destinationDirectory, "global.json"))) 53if (!File.Exists(Path.Combine(destinationDirectory, "nuget.config"))) 73if (File.Exists(nugetConfigPath))
Tool.cs (1)
145if (!File.Exists(options.OutputFile.FullName))
dotnet-svcutil-lib.Tests (16)
E2ETests.cs (6)
174if (!File.Exists(wsdlFile)) 180Assert.True(File.Exists(wsdlFile), $"{wsdlFile} not initialized!"); 226if (!File.Exists(assemblyPath)) 238Assert.True(File.Exists(binProjPath), $"{nameof(binProjPath)} not initialized!"); 239Assert.True(File.Exists(libProjPath), $"{nameof(libProjPath)} not initialized!"); 369Assert.True(File.Exists(srcParamsFilePath), $"{nameof(srcParamsFilePath)} not initialized!");
ProjectUtils.cs (5)
28if (forceNew && File.Exists(filePath)) 31if (File.Exists(dstProgramFile)) 36if (File.Exists(filePath)) 87Assert.True(File.Exists(project?.FullPath), $"{nameof(project)} is not initialized!"); 175Assert.True(File.Exists(project?.FullPath), $"{nameof(project)} is not initialized!");
TestInit.cs (5)
95if (!File.Exists(filePath)) 167Assert.True(File.Exists(g_StarterProject.FullPath), $"{nameof(g_StarterProject)} is not initialized!"); 268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile)))) 354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile)))) 590Assert.True(rootSolutionFolder != null && File.Exists(rootSolutionFolder), $"Unable to find dotnet-svcutil.sln file, current dir: {parentDir}");
dotnet-svcutil.xmlserializer (4)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (1)
209if (File.Exists(potentialPath))
Microsoft\Tools\ServiceModel\SvcUtil\XmlSerializerGenerator.cs (3)
70if (File.Exists(codePath)) 90if (!success && toDeleteFile && File.Exists(codePath)) 100if (File.Exists(sgenSource))
dotnet-svcutil.xmlserializer.IntegrationTests (3)
SvcutilTests.cs (3)
22Assert.False(File.Exists(outputFile)); 25if (File.Exists(smassemblypath)) 28Assert.True(File.Exists(outputFile));
dotnet-user-jwts (13)
Helpers\DevJwtCliHelpers.cs (4)
95if (!File.Exists(fullPath)) 116else if (!File.Exists(Path.Combine(Path.GetDirectoryName(projectPath), appsettingsFile))) 139if (File.Exists(fileBasedAppLaunchSettingsFilePath)) 147if (File.Exists(launchSettingsFilePath))
Helpers\JwtAuthenticationSchemeSettings.cs (1)
18var config = File.Exists(filePath)
Helpers\JwtStore.cs (1)
28if (File.Exists(_filePath))
Helpers\SigningKeysHandler.cs (1)
66if (File.Exists(secretsFilePath))
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
src\aspnetcore\src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
47if (!File.Exists(projectPath))
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (4)
119if (!File.Exists(outputFile)) 203if (!File.Exists(outputFile)) 257var targetPath = searchPaths.Select(p => Path.Combine(p, "SecretManager.targets")).FirstOrDefault(File.Exists); 270if (File.Exists(file))
dotnet-user-secrets (6)
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
src\aspnetcore\src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
47if (!File.Exists(projectPath))
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (4)
119if (!File.Exists(outputFile)) 203if (!File.Exists(outputFile)) 257var targetPath = searchPaths.Select(p => Path.Combine(p, "SecretManager.targets")).FirstOrDefault(File.Exists); 270if (File.Exists(file))
dotnet-watch (3)
Program.cs (1)
235if (!File.Exists(projectPath))
Watch\MsBuildFileSetFactory.cs (2)
75var success = exitCode == 0 && File.Exists(watchList); 196var targetPath = searchPaths.Select(p => Path.Combine(p, WatchTargetsFileName)).FirstOrDefault(File.Exists);
GenerateAnalyzerNuspec (5)
Program.cs (5)
159if (File.Exists(resourceAssemblyFullPath)) 192if (File.Exists(fileWithPath)) 269if (File.Exists(fileWithPath)) 278if (File.Exists(fileWithPath)) 287if (File.Exists(fileWithPath))
GenerateDocumentationAndConfigFiles (6)
Program.cs (4)
275if (!File.Exists(path)) 875if (!File.Exists(assemblyPath)) 908var shippedFileExists = File.Exists(shippedFile); 909var unshippedFileExists = File.Exists(unshippedFile);
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
66if (File.Exists(potentialAssemblyPath))
GetDocument.Insider (2)
Commands\GetDocumentCommand.cs (1)
96if (!File.Exists(assemblyPath))
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
HelixTestTasks (1)
GroupWorkItems.cs (1)
50if (File.Exists(item.ItemSpec))
ilasm (6)
Program.cs (6)
51if (!File.Exists(file)) 177if (File.Exists(path)) 184if (File.Exists(fullPath)) 193if (File.Exists(fullPath)) 205if (File.Exists(path)) 212if (File.Exists(fullPath))
ilc (2)
Program.cs (1)
307if (!File.Exists(linkTrimFilePath))
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
351&& File.Exists(originalPdbPath))
ILCompiler.Compiler (2)
src\runtime\src\coreclr\tools\Common\Compiler\CompilerTypeSystemContext.cs (2)
346if (!Path.IsPathRooted(candidatePath) || !File.Exists(candidatePath)) 350if (!File.Exists(candidatePath))
ILCompiler.ReadyToRun (2)
src\runtime\src\coreclr\tools\Common\Compiler\CompilerTypeSystemContext.cs (2)
346if (!Path.IsPathRooted(candidatePath) || !File.Exists(candidatePath)) 350if (!File.Exists(candidatePath))
illink (8)
ILLink.Tasks (5)
CreateRuntimeRootDescriptorFile.cs (5)
103if (!File.Exists(namespaceFilePath)) 110if (!File.Exists(mscorlibFilePath)) 117if (!File.Exists(cortypeFilePath)) 124if (!File.Exists(rexcepFilePath)) 133if (!File.Exists(iLLinkTrimXmlFilePath))
Infrastructure.Common (1)
CertificateManager.cs (1)
274if (!File.Exists(OSXCustomKeychainFilePath))
Infrastructure.Tests (49)
CreateFailingTestIssue\CreateFailingTestIssueFixture.cs (1)
20if (!File.Exists(ToolProjectPath))
DownloadFailingJobLogs\DownloadFailingJobLogsFixture.cs (2)
22if (!File.Exists(ToolPath)) 27if (!File.Exists(DotNetPath))
DownloadFailingJobLogs\DownloadFailingJobLogsToolTests.cs (2)
62Assert.True(File.Exists(logPath)); 66Assert.True(File.Exists(extractedTrx));
ExtractTestPartitions\ExtractTestPartitionsFixture.cs (1)
56if (!File.Exists(projectPath))
ExtractTestPartitions\ExtractTestPartitionsTests.cs (8)
44Assert.True(File.Exists(outputFile), "Output file should be created"); 69Assert.False(File.Exists(outputFile), "Output file should NOT be created for Collection-only attributes"); 90Assert.True(File.Exists(outputFile), "Output file should be created"); 111Assert.False(File.Exists(outputFile), "Output file should NOT be created when no partitions found"); 206Assert.True(File.Exists(outputFile), "Output file should be created in nested directory"); 225Assert.True(File.Exists(outputFile), "Output file should be created"); 249Assert.True(File.Exists(outputFile), "Output file should be created"); 274Assert.True(File.Exists(outputFile), "Output file should be created");
ExtractTestPartitions\MockAssemblyBuilder.cs (2)
244if (File.Exists(netstandardPath)) 253if (File.Exists(runtimePath))
GenerateTestSummary\GenerateTestSummaryFixture.cs (1)
20if (!File.Exists(ToolProjectPath))
Pipelines\ExtensionE2eRecorderStepTests.cs (1)
77var invocations = File.Exists(invocationLog) ? File.ReadAllLines(invocationLog) : [];
Pipelines\NixCliPackageTests.cs (1)
194Assert.False(File.Exists(outputPath), "versions.json must not be written when the override set is incomplete.");
Pipelines\NpmCliPackageTests.cs (1)
353Assert.True(File.Exists(Path.Combine(package.RidPackageRoot, "bin", expectation.BinaryName)));
PowerShellScripts\BuildTestMatrixTests.cs (1)
659Assert.True(File.Exists(propsPath), $"CITestsProperties.props not found at {propsPath}");
PowerShellScripts\DownloadNativeArchivesTests.cs (5)
197File.Exists(Path.Combine(_workspace.Path, "escaped", "aspire-cli-linux-x64-13.4.0.tar.gz")), 236Assert.True(File.Exists(Path.Combine( 272Assert.True(File.Exists(Path.Combine( 335Assert.True(File.Exists(Path.Combine( 373Assert.True(File.Exists(Path.Combine(
PowerShellScripts\SplitTestProjectsTests.cs (1)
117Assert.True(File.Exists(outputFile), "Output file should exist");
Shared\RepoRoot.cs (1)
27if (File.Exists(System.IO.Path.Combine(directory.FullName, "Aspire.slnx")))
src\Shared\PathLookupHelper.cs (1)
228if (!File.Exists(path))
TestTriggerMap\SelectTestsAcceptanceTests.cs (2)
944if (File.Exists(baseline) && Directory.Exists(Path.Combine(polyglotRoot, name))) 973.Where(name => name is not null && File.Exists(Path.Combine(testsDir, name!, $"{name}.csproj")))
TestTriggerMap\SelectTestsCliTests.cs (7)
74Assert.False(File.Exists(propsPath)); 454Assert.False(File.Exists(propsPath)); 561Assert.False(File.Exists(propsPath)); 683Assert.False(File.Exists(propsPath)); 888Assert.False(File.Exists(propsPath)); 938Assert.False(File.Exists(propsPath)); 1075if (File.Exists(outputPath))
TestTriggerMap\SelectTestsLayer1IntegrationTests.cs (1)
358if (File.Exists(outputPath))
TestTriggerMap\TestTriggerMapTests.cs (4)
170.Where(rel => File.Exists(Path.Combine(RepoRoot.Path, rel))) 272bool WorkflowExists(string file) => File.Exists(Path.Combine(workflowsDir, file)); 413.Where(name => !File.Exists(Path.Combine(RepoRoot.Path, "tests", name, $"{name}.csproj"))) 427Assert.True(File.Exists(Path.Combine(RepoRoot.Path, s_map.Prefilter.PatternsFile!)),
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (2)
316Assert.True(File.Exists(scriptPath), $"Expected helper script at '{ScriptRelativePath}'."); 523Assert.True(File.Exists(workflowPath), $"Expected workflow file at '{WorkflowRelativePath}'.");
WorkflowScripts\ExtensionReleaseFastPathWorkflowTests.cs (1)
191Assert.False(File.Exists(RepoPath(".github", "workflows", "copilot-review-dispatch.yml")));
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (3)
584Assert.True(File.Exists(s_releaseNotesGeneratorPath), $"Expected release notes generator at '{s_releaseNotesGeneratorPath}'."); 643Assert.True(File.Exists(scriptPath), $"Expected helper script at '{scriptPath}'."); 755Assert.True(File.Exists(scriptPath), $"Expected helper script at '{scriptPath}'.");
installer.tasks (2)
GenerateFileVersionProps.cs (1)
167if (File.Exists(filePath))
GenerateRunScript.cs (1)
34if (!File.Exists(TemplatePath))
Microsoft.Agents.AI.ProjectTemplates.Tests (2)
WellKnownPaths.cs (2)
47if (Directory.Exists(gitPath) || File.Exists(gitPath)) 68if (!File.Exists(dotNetExePath))
Microsoft.Arcade.Common (4)
CommandFactory.cs (2)
64if (File.Exists(executable + ".exe")) 76if (File.Exists(candidate))
FileSystem.cs (1)
17public bool FileExists(string path) => File.Exists(path);
ZipArchiveManager.cs (1)
29bool archiveExists = File.Exists(archivePath);
Microsoft.AspNetCore.Components.Testing (2)
_generated\0\StartupHook.g.cs (1)
17if (File.Exists(candidatePath))
Infrastructure\E2EManifest.cs (1)
24if (!File.Exists(manifestPath))
Microsoft.AspNetCore.Components.Testing.Tasks (2)
GenerateE2EManifest.cs (2)
145if (File.Exists(appHostPath)) 150else if (!isCompiledHarness && File.Exists(appDllPath))
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHostBuilder.cs (1)
210if (File.Exists(configFile))
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
DebugProxyLauncher.cs (1)
130if (!File.Exists(debugProxyPath))
src\aspnetcore\src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
78if (File.Exists(candidateDotNetExePath))
Microsoft.AspNetCore.Components.WebView (1)
WebViewManager.cs (1)
284if (File.Exists(manifestPath))
Microsoft.AspNetCore.DataProtection (2)
Internal\ContainerUtils.cs (2)
34if (!File.Exists(mountsFile)) 99if (!File.Exists(procFile))
Microsoft.AspNetCore.DeveloperCertificates.XPlat (10)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
540if (!File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
131return File.Exists(GetCertificateFilePath(candidate)) ? 457if (File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
115if (File.Exists(certPath)) 247if (File.Exists(certPath)) 473if (File.Exists(certPath)) 610if (File.Exists(Path.Combine(searchFolder, command))) 646if (File.Exists(WslInteropPath) || File.Exists(WslInteropLatePath)) 1051if (!File.Exists(linkPath))
Microsoft.AspNetCore.Diagnostics (1)
src\aspnetcore\src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
110if (File.Exists(stackFrame.File))
Microsoft.AspNetCore.Hosting (2)
src\aspnetcore\src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
110if (File.Exists(stackFrame.File))
StaticWebAssets\StaticWebAssetsLoader.cs (1)
51if (candidate != null && File.Exists(candidate))
Microsoft.AspNetCore.InternalTesting (6)
AssemblyTestLog.cs (3)
142if (File.Exists(testOutputFile)) 150if (!File.Exists(testOutputFile)) 280if (File.Exists(fileName))
TestFileOutputContext.cs (1)
67while (File.Exists(path))
xunit\DockerOnlyAttribute.cs (1)
27if (!File.Exists(procFile))
xunit\SkipOnAlpineAttribute.cs (1)
30RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists("/etc/os-release") &&
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationParts\RelatedAssemblyAttribute.cs (1)
44return GetRelatedAssemblies(assembly, throwOnError, File.Exists, new AssemblyLoadContextWrapper(loadContext));
Microsoft.AspNetCore.Mvc.Testing (2)
WebApplicationFactory.cs (2)
422var fromFile = File.Exists("MvcTestingAppManifest.json"); 471if (File.Exists(contentRootMarker))
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\FileUtilities.cs (1)
75while (File.Exists(uniquePath));
Microsoft.AspNetCore.Server.IIS (1)
src\aspnetcore\src\Shared\StackTrace\ExceptionDetails\ExceptionDetailsProvider.cs (1)
110if (File.Exists(stackFrame.File))
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Deployers\ApplicationDeployer.cs (1)
106if (!File.Exists(executableName))
Deployers\NginxDeployer.cs (2)
180if (!File.Exists(pidFile)) 197if (File.Exists(_configFile))
Deployers\SelfHostDeployer.cs (1)
137Logger.LogInformation($"{File.Exists(executableName)}");
xunit\IISExpressAncmSchema.cs (1)
25if (!File.Exists(ancmConfigPath))
Microsoft.AspNetCore.Server.Kestrel.Core (11)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
540if (!File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
131return File.Exists(GetCertificateFilePath(candidate)) ? 457if (File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
115if (File.Exists(certPath)) 247if (File.Exists(certPath)) 473if (File.Exists(certPath)) 610if (File.Exists(Path.Combine(searchFolder, command))) 646if (File.Exists(WslInteropPath) || File.Exists(WslInteropLatePath)) 1051if (!File.Exists(linkPath))
TlsConfigurationLoader.cs (1)
157File.Exists(certificatePath))
Microsoft.AspNetCore.SpaProxy (1)
SpaHostingStartup.cs (1)
21if (File.Exists(spaProxyConfigFile))
Microsoft.AspNetCore.StaticAssets (1)
StaticAssetsEndpointRouteBuilderExtensions.cs (1)
65if (!File.Exists(manifestPath))
Microsoft.Build (4)
BackEnd\BuildManager\CoordinatorClient.cs (2)
492if (File.Exists(coordinatorDll) && 505if (File.Exists(coordinatorExe))
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
569return File.Exists(dllPath) ? dllPath : msbuildLocation;
src\msbuild\src\Shared\TypeLoader.cs (1)
267if (string.IsNullOrEmpty(assemblyFilePath) || !File.Exists(assemblyFilePath))
Microsoft.Build.Framework (3)
FileSystem\ManagedFileSystem.cs (1)
144return File.Exists(path);
NativeMethods.cs (2)
576return !File.Exists(pathWithUpperCase.ToLowerInvariant()); 918return File.Exists(path)
Microsoft.Build.Tasks.CodeAnalysis (9)
src\roslyn\src\Compilers\Core\MSBuildTask\CopyRefAssembly.cs (2)
36if (!File.Exists(SourcePath)) 42if (File.Exists(DestinationPath))
src\roslyn\src\Compilers\Core\MSBuildTask\GenerateMSBuildEditorConfig.cs (1)
117if (File.Exists(targetFileName))
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
1249if (!File.Exists(reference.ItemSpec))
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
85_useAppHost = useAppHost = File.Exists(Path.Combine(GetToolDirectory(), AppHostToolName));
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
455if (!File.Exists(processFilePath)) 556if (!File.Exists(serverInfo.processFilePath)) 848if (!File.Exists(FilePath))
src\roslyn\src\Compilers\Shared\RuntimeHostInfo.cs (1)
102if (File.Exists(filePath))
Microsoft.Build.Tasks.Core (2)
FileIO\WriteLinesToFile.cs (1)
226if (System.IO.File.Exists(temporaryFilePath))
Touch.cs (1)
167File.Exists,
Microsoft.Build.Tasks.Git (15)
GitDataReader\GitConfig.Reader.cs (5)
120if (File.Exists(programDataConfig)) 131if (File.Exists(systemConfig)) 142if (File.Exists(xdgConfig)) 152if (File.Exists(globalConfig)) 160if (File.Exists(localConfig))
GitDataReader\GitEnvironment.cs (2)
138var gitExe = paths.FirstOrDefault(dir => !string.IsNullOrWhiteSpace(dir) && File.Exists(PathUtils.CombinePaths(dir, "git.exe"))); 144var gitCmd = paths.FirstOrDefault(dir => !string.IsNullOrWhiteSpace(dir) && File.Exists(PathUtils.CombinePaths(dir, "git.cmd")));
GitDataReader\GitIgnore.cs (1)
105if (!File.Exists(path))
GitDataReader\GitReferenceResolver.cs (2)
71if (!File.Exists(packedRefsPath)) 361if (!File.Exists(path))
GitDataReader\GitRepository.cs (5)
186File.Exists(dotGitPath) ? ReadDotGitFile(dotGitPath) : null; 282if (!File.Exists(submodulesConfigFile)) 401else if (File.Exists(dotGitPath)) 460if (!File.Exists(Path.Combine(directory, GitHeadFileName))) 468if (File.Exists(commonLinkPath))
Microsoft.Build.Utilities.Core (2)
ToolLocationHelper.cs (2)
2870FileExists fileExists = new FileExists(File.Exists); 3587if (!File.Exists(toolPath))
Microsoft.CodeAnalysis (14)
AssemblyUtilities.cs (2)
39if (File.Exists(satelliteAssemblyPath)) 45if (File.Exists(satelliteAssemblyPath))
CommandLine\CommandLineArguments.cs (1)
578string? resolvedPath = FileUtilities.ResolveRelativePath(reference.FilePath, basePath: null, baseDirectory: BaseDirectory, searchPaths: ReferencePaths, fileExists: File.Exists);
CommandLine\CommonCompiler.cs (1)
131if (!SuppressDefaultResponseFile(args) && File.Exists(responseFile))
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
319if (File.Exists(filePath))
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (2)
385if (File.Exists(originalPath)) 401if (File.Exists(cachePath))
FileSystem\ICommonCompilerFileSystem.cs (1)
61public bool FileExists(string filePath) => File.Exists(filePath);
FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
RuleSet\RuleSetInclude.cs (2)
112if (File.Exists(includePath)) 121if (File.Exists(includePath))
SourceFileResolver.cs (1)
121return File.Exists(resolvedPath);
StrongName\StrongNameFileSystem.cs (1)
40return File.Exists(fullPath);
XmlFileResolver.cs (1)
87return File.Exists(resolvedPath);
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
66if (File.Exists(potentialAssemblyPath))
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
66if (File.Exists(potentialAssemblyPath))
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
SyncedSource\FileBasedPrograms\FileLevelDirectiveHelpers.cs (2)
573else if (!File.Exists(resolvedProjectPath)) 668if (!File.Exists(resolvedFilePath))
SyncedSource\FileBasedPrograms\VirtualProjectBuilder.cs (2)
176if (!File.Exists(entryPointFilePath)) 417if (!File.Exists(filePath))
Microsoft.CodeAnalysis.Features (10)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
100if (hasDocWithSuppressionsName || File.Exists(suppressionsFilePath))
Diagnostics\Service\DiagnosticAnalyzerComparer.cs (1)
39if (path == null || !File.Exists(path))
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (2)
111if (!File.Exists(fileInfo.TemporaryFilePath)) 187if (!skipWritingFile && !File.Exists(fileInfo.TemporaryFilePath))
PdbSourceDocument\ImplementationAssemblyLookupService.cs (3)
69while (File.Exists(dllPath)) 137if (IOUtilities.PerformIO(() => File.Exists(pathToTry))) 183if (IOUtilities.PerformIO(() => File.Exists(dllPath)))
PdbSourceDocument\PdbFileLocatorService.cs (1)
124if (File.Exists(fileName))
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (2)
50if (File.Exists(filePath) && 166if (PathUtilities.IsAbsolute(sourceDocument.FilePath) && File.Exists(sourceDocument.FilePath))
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\DefaultRazorProjectItem.cs (1)
61public override bool Exists => _fileInfo?.Exists ?? System.IO.File.Exists(PhysicalPath);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
Microsoft.CodeAnalysis.Scripting (14)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
333if (File.Exists(path))
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (4)
513if (File.Exists(dir) || Directory.Exists(dir)) 527if (File.Exists(dir)) 593if (File.Exists(Path.Combine(assemblyDirectory, docSubdirectory, docFileName))) 603if (File.Exists(Path.Combine(assemblyDirectory, docFileName)))
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (2)
126if (File.Exists(fullPath)) 198=> TrustedPlatformAssemblies.TryGetValue(name, out var path) && File.Exists(path) ? CreateFromFile(path, properties) : null;
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\GacFileResolver.cs (1)
77return File.Exists(path) ? path : null;
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (5)
46if (!File.Exists(corlibFriendPath)) 54if (File.Exists(corlibFriendPath)) 89if (File.Exists(assemblyPath)) 112if (!File.Exists(assemblyPath)) 189if (!File.Exists(assemblyPath))
Microsoft.CodeAnalysis.Workspaces (8)
Rename\ConflictEngine\MutableConflictResolution.cs (2)
102if (File.Exists(document.FilePath)) 109while (File.Exists(newDocumentFilePath))
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
319if (File.Exists(filePath))
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (2)
385if (File.Exists(originalPath)) 401if (File.Exists(cachePath))
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
66if (File.Exists(potentialAssemblyPath))
Utilities\Documentation\XmlDocumentationProvider.cs (1)
49if (!File.Exists(xmlDocCommentFilePath))
Microsoft.CodeAnalysis.Workspaces.MSBuild (13)
MSBuild\BuildHostProcessManager.cs (3)
37private static bool IsLoadedFromNuGetPackage => File.Exists(Path.Combine(MSBuildWorkspaceDirectory, "..", "..", "microsoft.codeanalysis.workspaces.msbuild.nuspec")); 167if (dotnetPath is null || processPath == dotnetPath || !File.Exists(dotnetPath)) 329if (!File.Exists(buildHostPath))
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (5)
320if (outputRefFilePath != null && !File.Exists(outputRefFilePath)) 326if (outputFilePath != null && !File.Exists(outputFilePath)) 343return outputFilePaths.Any(path => builder.Contains(path) && File.Exists(path)); 356if ((builder.Contains(outputFilePath) && File.Exists(outputFilePath)) || 357(builder.Contains(outputRefFilePath) && File.Exists(outputRefFilePath)))
MSBuild\MSBuildProjectLoader.Worker.cs (1)
336if (fullPath != null && File.Exists(fullPath))
MSBuild\MSBuildWorkspace.cs (1)
553if (File.Exists(fullPath))
MSBuild\PathResolver.cs (2)
34if (!File.Exists(absolutePath)) 59if (!File.Exists(absolutePath))
MSBuild\SolutionFileReader.SolutionFilterReader.cs (1)
40if (!File.Exists(solutionFilename))
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
MonoMSBuildDiscovery.cs (1)
78.FirstOrDefault(File.Exists);
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
585if (!File.Exists(path))
Microsoft.Data.Analysis.Tests (2)
DataFrame.IOTests.cs (1)
1333if (File.Exists(SQLitePath))
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
585if (!File.Exists(path))
Microsoft.Deployment.DotNet.Releases (3)
ReleaseFile.cs (1)
117string tempPath = !File.Exists(destinationPath) ? destinationPath : Path.GetTempFileName();
Utils.cs (2)
98if (!File.Exists(fileName)) 135if (!File.Exists(path))
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsIpc\IpcUnixDomainSocket.cs (1)
38if (_ownsSocketFile && !string.IsNullOrEmpty(_path) && File.Exists(_path))
Microsoft.DotNet.ApiCompat.Task (1)
ValidateAssembliesTask.cs (1)
165if (File.Exists(SemaphoreFile))
Microsoft.DotNet.ApiSymbolExtensions (3)
AssemblySymbolLoader.cs (3)
311if (File.Exists(possiblePath)) 362else if (File.Exists(path)) 468if (File.Exists(potentialPath))
Microsoft.DotNet.Arcade.Sdk (7)
src\DownloadFile.cs (2)
62if (File.Exists(DestinationPath) && !Overwrite) 115if (File.Exists(filePath)) {
src\GenerateChecksums.cs (1)
34if (!File.Exists(item.ItemSpec))
src\InstallDotNetCore.cs (3)
48if (!File.Exists(GlobalJsonPath)) 53if (!File.Exists(DotNetInstallScript)) 87if (!File.Exists(VersionsPropsPath))
src\LocateDotNet.cs (1)
71var dotNetDir = paths.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault(p => File.Exists(Path.Combine(p, fileName)));
Microsoft.DotNet.Build.Tasks.FileCatalog (2)
GenerateFileCatalog.cs (2)
40if (File.Exists(OutputPath)) 59if (!File.Exists(path))
Microsoft.DotNet.Build.Tasks.Installers (9)
src\CreateRpmPackage.cs (1)
151if (!File.Exists(trigger.ItemSpec))
src\CreateWixBuildWixpack.cs (5)
148if (File.Exists(OutputFile)) 511if (!File.Exists(xmlPath)) 649if (File.Exists(includeFilePath)) 667if (File.Exists(potentialPath)) 1021if (File.Exists(source))
src\CreateWixCommandPackageDropBase.cs (3)
68if(File.Exists(OutputFile)) 293if (File.Exists(possiblePath)) 301else if (File.Exists(oldPath))
Microsoft.DotNet.Build.Tasks.Packaging (11)
GenerateNuSpec.cs (1)
133if (!File.Exists(OutputFileName))
GetApplicableAssetsFromPackages.cs (1)
208if (File.Exists(pdbPath))
GetAssemblyReferences.cs (1)
50if (!File.Exists(assemblyItem.ItemSpec))
GetLayoutFiles.cs (1)
139if (File.Exists(symbolSource))
GetPackageDescription.cs (1)
55if (!File.Exists(descriptionPath))
GetRuntimeJsonValues.cs (1)
31if (string.IsNullOrEmpty(JsonFilename) || !File.Exists(JsonFilename))
GetRuntimeTargets.cs (1)
30if (string.IsNullOrEmpty(JsonFilename) || !File.Exists(JsonFilename))
NuGetPack.cs (2)
173if (!File.Exists(nuspecPath)) 394file.Source = File.Exists(packedPackageSourcePath) ? packedPackageSourcePath : fileName;
PackageItem.cs (1)
76if (_version == null && IsDll && File.Exists(SourcePath))
UpdatePackageIndex.cs (1)
91PackageIndex index = File.Exists(indexFilePath) ?
Microsoft.DotNet.Build.Tasks.Templating (1)
GenerateFileFromTemplate.cs (1)
71if (!File.Exists(TemplateFile))
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
OptProf\GenerateTrainingInputFiles.cs (1)
155while (File.Exists(fullPath));
Microsoft.DotNet.Build.Tasks.Workloads (3)
EmbeddedTemplates.cs (1)
42if (File.Exists(destinationPath))
Utils.cs (1)
201if (File.Exists(path))
Wix\WixToolTaskBase.cs (1)
42if (!File.Exists(toolPath))
Microsoft.DotNet.Cli.CoreUtils (1)
DotnetVersionFile.cs (1)
33Exists = File.Exists(versionFilePath);
Microsoft.DotNet.Cli.Definitions (3)
Commands\Test\TestCommandDefinition.cs (1)
113if (File.Exists(globalJsonPath))
Common\TargetPlatformOptions.cs (1)
120string[] currentRuntimeIdentifiers = File.Exists(runtimeIdentifierChainPath) ? [.. File.ReadAllLines(runtimeIdentifierChainPath).Where(l => !string.IsNullOrEmpty(l))] : [];
src\sdk\src\Resolvers\Microsoft.DotNet.NativeWrapper\EnvironmentProvider.cs (1)
47.FirstOrDefault(File.Exists);
Microsoft.DotNet.Cli.Utils (9)
EnvironmentProvider.cs (2)
82.FirstOrDefault(File.Exists); 95.FirstOrDefault(File.Exists);
Extensions\LockFileFormatExtensions.cs (1)
17if (!File.Exists(path))
Muxer.cs (1)
47if (File.Exists(muxerPathMaybe))
PathUtility.cs (4)
86if (!File.Exists(path)) 104return !File.Exists(path); 348if (!File.Exists(p) && (!allowDirectories || !Directory.Exists(p))) 383if (File.Exists(filePath))
RuntimeEnvironment.cs (1)
128if (File.Exists("/etc/os-release"))
Microsoft.DotNet.CMake.Sdk (2)
src\GetCMakeArtifactsFromFileApi.cs (2)
83if (!File.Exists(codeModelFile)) 166if (!File.Exists(targetFile))
Microsoft.DotNet.GenFacades (3)
NotSupportedAssemblyGenerator.cs (2)
47if (!string.IsNullOrEmpty(ApiExclusionListPath) && File.Exists(ApiExclusionListPath)) 57if (!File.Exists(sourceFile))
TypeParser.cs (1)
143if (!File.Exists(sourceFile))
Microsoft.DotNet.HotReload.Utils.Generator (1)
BaselineProject.cs (1)
95if (!File.Exists(outputAsm)) {
Microsoft.DotNet.HotReload.Utils.Generator.Tasks (1)
HotReloadDeltaGeneratorComputeScriptOutputs.cs (1)
56if (!System.IO.File.Exists(DeltaScript))
Microsoft.DotNet.HotReload.Watch (2)
Build\ProjectGraphFactory.cs (1)
117if (!File.Exists(projectPath))
HotReload\HotReloadDotNetWatcher.cs (1)
732if (!File.Exists(targetPath))
Microsoft.DotNet.InternalAbstractions (1)
FileWrapper.cs (1)
10return File.Exists(path);
Microsoft.DotNet.MacOsPkg.Core (4)
AppBundle.cs (1)
29File.Exists(Path.Combine(path, "Contents", "Info.plist"));
MacOsPkgCore.cs (2)
20if (!File.Exists(srcPath) || !Utilities.IsPkg(srcPath) && !Utilities.IsAppBundle(srcPath)) 102if (!File.Exists(srcPath) || (!Utilities.IsPkg(srcPath) && !Utilities.IsAppBundle(srcPath)))
Utilities.cs (1)
29else if (File.Exists(path))
Microsoft.DotNet.NativeWrapper (2)
EnvironmentProvider.cs (1)
47.FirstOrDefault(File.Exists);
HostFxrLocator.cs (1)
48fileExists: File.Exists);
Microsoft.DotNet.PackageValidation (1)
Package.cs (1)
130if (!File.Exists(Path.GetFullPath(packagePath)))
Microsoft.DotNet.ProjectTools (7)
LaunchSettings\LaunchSettings.cs (2)
42bool hasLaunchSetttings = File.Exists(launchSettingsPath); 46bool hasRunJson = File.Exists(runJsonPath);
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\FileLevelDirectiveHelpers.cs (2)
573else if (!File.Exists(resolvedProjectPath)) 668if (!File.Exists(resolvedFilePath))
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\VirtualProjectBuilder.cs (3)
176if (requireFileToExist && !File.Exists(entryPointFilePath)) 187if (!requireFileToExist && !File.Exists(entryPointFilePath)) 423if (!File.Exists(filePath))
Microsoft.DotNet.SdkResolver (1)
NETCoreSdkResolver.cs (1)
138if (!File.Exists(minimumVersionFilePath))
Microsoft.DotNet.SharedFramework.Sdk (2)
src\GenerateSharedFrameworkDepsFile.cs (1)
125if (File.Exists(depsFilePath))
src\ValidateFileVersions.cs (1)
96if (File.Exists(filePath))
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\WriteUsageReports.cs (2)
79if (File.Exists(ProdConBuildManifestFile)) 93if (File.Exists(PoisonedReportFile))
Microsoft.DotNet.TemplateLocator (13)
src\sdk\src\Cli\dotnet\Commands\Workload\InstallStateContents.cs (1)
31return File.Exists(path) ? FromString(File.ReadAllText(path)) : new InstallStateContents();
src\sdk\src\Common\WorkloadFileBasedInstall.cs (1)
16=> dotnetDir is not null && File.Exists(GetUserInstallFilePath(dotnetDir, sdkFeatureBand));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (6)
110if (!File.Exists(knownManifestIdsFilePath)) 115if (File.Exists(knownManifestIdsFilePath)) 488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json"))) 500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json"))) 559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json"))) 669if (File.Exists(globalJsonPath))
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadInstallType.cs (1)
29dotnetDir is not null && File.Exists(Path.Combine(
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (1)
18static readonly Func<string, bool> _fileExists = File.Exists;
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (2)
31string[] currentRuntimeIdentifiers = File.Exists(runtimeIdentifierChainPath) ? 355_fileExistOverride?.Invoke(packPath) ?? File.Exists(packPath) :
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (1)
100if (File.Exists(Path.Combine(path, "baseline.workloadset.json")))
Microsoft.DotNet.XliffTasks (2)
Model\Document.cs (1)
79if (File.Exists(path))
Tasks\XlfTask.cs (1)
83if (File.Exists(path))
Microsoft.Extensions.AI.Abstractions.Tests (27)
Contents\DataContentTests.cs (26)
332if (File.Exists(tempPath)) 359if (File.Exists(tempPath)) 385if (File.Exists(tempPath)) 413if (File.Exists(tempPath)) 467Assert.True(File.Exists(actualPath)); 472if (File.Exists(tempPath)) 494Assert.True(File.Exists(actualPath)); 499if (File.Exists(tempPath)) 526Assert.True(File.Exists(actualPath)); 555Assert.True(File.Exists(actualPath)); 582Assert.True(File.Exists(actualPath)); 586if (File.Exists(tempPath)) 611Assert.True(File.Exists(expectedAbsolute)); 616if (File.Exists(expectedAbsolute)) 640Assert.True(File.Exists(savedPath)); 669Assert.True(File.Exists(expectedAbsolute)); 674if (File.Exists(expectedAbsolute)) 753Assert.True(File.Exists(savedPath)); 784if (File.Exists(tempPath)) 810if (File.Exists(tempPath)) 850Assert.True(File.Exists(expectedPath)); 879Assert.True(File.Exists(filePath)); 911if (File.Exists(tempPath)) 938if (File.Exists(tempPath)) 964Assert.True(File.Exists(tempPath)); 970if (File.Exists(tempPath))
Files\HostedFileClientExtensionsTests.cs (1)
220Assert.True(File.Exists(expectedAbsolute));
Microsoft.Extensions.AI.Evaluation.Console (2)
Telemetry\DeviceIdHelper.cs (1)
92if (File.Exists(cacheFilePath))
Telemetry\TelemetryConstants.cs (1)
112_firstUseSentinelFileExists = File.Exists(_firstUseSentinelFilePath);
Microsoft.Extensions.AI.Evaluation.Reporting (2)
Storage\DiskBasedResponseCache.cs (2)
304bool contentsFileExists = File.Exists(contentsFilePath); 305bool entryFileExists = File.Exists(entryFilePath);
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIHostedFileClientIntegrationTests.cs (1)
246Assert.True(File.Exists(savedPath));
Microsoft.Extensions.AI.Templates.Tests (2)
WellKnownPaths.cs (2)
47if (Directory.Exists(gitPath) || File.Exists(gitPath)) 68if (!File.Exists(dotNetExePath))
Microsoft.Extensions.DependencyModel (1)
FileWrapper.cs (1)
14return File.Exists(path);
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\StartupHook.cs (1)
61return File.Exists(path) ? AssemblyLoadContext.Default.LoadFromAssemblyPath(path) : null;
Microsoft.Extensions.Http.Resilience.Tests (2)
BuildTransitive\GrpcNetClientFactoryVersionTargetTests.cs (2)
410return File.Exists(repoDotnetPath) ? repoDotnetPath : dotnetFileName; 427if (File.Exists(targetPath))
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
40if (!File.Exists(filePath))
Microsoft.Extensions.ServiceDiscovery.Dns (4)
DnsSrvServiceEndpointProviderFactory.cs (4)
87if (File.Exists(s_serviceAccountNamespacePath)) 97if (!File.Exists(s_resolveConfPath)) 134if (!File.Exists(tokenPath)) 140return File.Exists(certPath);
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
GeneratorTests.cs (2)
64if (File.Exists(goldenReportFile)) 155Assert.True(File.Exists(Path.Combine(fullReportPath, "ComplianceReport.json")));
Microsoft.Gen.MetadataExtractor.Unit.Tests (3)
GeneratorTests.cs (3)
84if (File.Exists(goldenReportPath)) 133Assert.False(File.Exists(Path.Combine(Path.GetTempPath(), ReportFilename))); 183Assert.True(File.Exists(Path.Combine(fullReportPath, ReportFilename)));
Microsoft.Gen.MetricsReports.Unit.Tests (3)
GeneratorTests.cs (3)
49if (File.Exists(goldenReportPath)) 93Assert.False(File.Exists(Path.Combine(Path.GetTempPath(), ReportFilename))); 136Assert.True(File.Exists(Path.Combine(fullReportPath, ReportFilename)));
Microsoft.Maui (1)
Fonts\FileSystemEmbeddedFontLoader.cs (1)
57 if (File.Exists(filePath))
Microsoft.Maui.Controls.Build.Tasks (1)
XamlCTask.cs (1)
164 if (!File.Exists(Assembly))
Microsoft.Maui.Resizetizer (7)
AndroidAdaptiveIconGenerator.cs (2)
148 if (File.Exists(adaptiveIconDestination) && File.Exists(adaptiveIconRoundDestination))
SkiaSharpAppIconTools.cs (2)
18 var hasBackground = !string.IsNullOrWhiteSpace(info.Filename) && File.Exists(info.Filename); 19 var hasForeground = !string.IsNullOrWhiteSpace(info.ForegroundFilename) && File.Exists(info.ForegroundFilename);
TizenSplashUpdater.cs (1)
44 if (File.Exists(destination))
Utils.cs (2)
56 var exists = File.Exists(path); 63 if (checkExists && !File.Exists(source))
Microsoft.ML.AutoML (1)
AutoMLExperiment\ITrialResultManager.cs (1)
130if (!File.Exists(filePath))
Microsoft.ML.AutoML.Tests (2)
DatasetUtil.cs (2)
205if (File.Exists(relativeFilePath)) 228if (File.Exists(Path.Combine(destFolder, flag)))
Microsoft.ML.Core (7)
ComponentModel\AssemblyLoadingUtils.cs (1)
34if (!File.Exists(path))
Utilities\PathUtils.cs (2)
106if (File.Exists(candidate)) 115if (File.Exists(candidate))
Utilities\ResourceManagerUtils.cs (4)
111if (File.Exists(filePath) || !string.IsNullOrEmpty(error)) 169if (File.Exists(filePath)) 251if (File.Exists(path)) 256if (File.Exists(path))
Microsoft.ML.Core.Tests (4)
UnitTests\TestResourceDownload.cs (4)
67if (File.Exists(Path.Combine(saveToDir, fileName))) 96if (File.Exists(Path.Combine(saveToDir, fileName))) 124if (!File.Exists(GetOutputPath("copyto", "sentiment.emd"))) 140if (File.Exists(GetOutputPath("copyto", "sentiment.emd")))
Microsoft.ML.Data (4)
DataLoadSave\Binary\BinaryLoaderSaverCatalog.cs (1)
50if (!File.Exists(path))
DataLoadSave\Text\TextLoaderSaverCatalog.cs (1)
313if (!File.Exists(path) && StreamUtils.ExpandWildCards(path).Length < 1)
Utilities\StreamUtils.cs (2)
65if (File.Exists(pattern)) 158if (!File.Exists(currentPattern))
Microsoft.ML.EntryPoints (1)
JsonUtils\ExecuteGraphCommand.cs (1)
45_host.CheckUserArg(args.GraphPath != null && File.Exists(args.GraphPath), nameof(args.GraphPath), "Graph path does not exist");
Microsoft.ML.OnnxTransformer (1)
OnnxTransform.cs (1)
263Host.CheckIO(File.Exists(options.ModelFile), "Model file {0} does not exists.", options.ModelFile);
Microsoft.ML.OnnxTransformerTest (4)
OnnxTransformTests.cs (4)
797Assert.True(File.Exists(onnxModel.ModelStream.Name)); 802Assert.False(File.Exists(onnxModel.ModelStream.Name)); 815Assert.True(File.Exists(onnxModel.ModelStream.Name)); 821Assert.True(File.Exists(onnxModel.ModelStream.Name));
Microsoft.ML.PerformanceTests (12)
BenchmarkBase.cs (1)
44if (File.Exists(filePath))
ImageClassificationBench.cs (3)
161if (File.Exists(relativeFilePath)) 197if (File.Exists(Path.Combine(destFolder, flag))) return; 233if (!overwrite && File.Exists(filename))
Numeric\Ranking.cs (5)
28if (!File.Exists(_mslrWeb10kValidate)) 31if (!File.Exists(_mslrWeb10kTrain)) 79if (!File.Exists(_mslrWeb10kTest)) 82if (!File.Exists(_mslrWeb10kValidate)) 85if (!File.Exists(_mslrWeb10kTrain))
RffTransform.cs (1)
24if (!File.Exists(_dataPathDigits))
Text\MultiClassClassification.cs (2)
25if (!File.Exists(_dataPathWiki)) 102if (!File.Exists(_dataPathWiki))
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
717if (!File.Exists(filename))
Microsoft.ML.Samples (10)
Dynamic\TensorFlow\ImageClassification.cs (2)
26if (!File.Exists(modelLocation)) 120if (File.Exists(dataFile))
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
264if (File.Exists(relativeFilePath)) 296if (File.Exists(Path.Combine(destFolder, flag))) return;
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
296if (File.Exists(relativeFilePath)) 328if (File.Exists(Path.Combine(destFolder, flag))) return;
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
252if (File.Exists(relativeFilePath)) 284if (File.Exists(Path.Combine(destFolder, flag))) return;
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
273if (File.Exists(relativeFilePath)) 305if (File.Exists(Path.Combine(destFolder, flag))) return;
Microsoft.ML.Samples.GPU (10)
docs\e4e90a0f3c9b109a\LearningRateSchedulingCifarResnetTransferLearning.cs (2)
296if (File.Exists(relativeFilePath)) 328if (File.Exists(Path.Combine(destFolder, flag))) return;
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (2)
26if (!File.Exists(modelLocation)) 120if (File.Exists(dataFile))
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (2)
264if (File.Exists(relativeFilePath)) 296if (File.Exists(Path.Combine(destFolder, flag))) return;
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (2)
252if (File.Exists(relativeFilePath)) 284if (File.Exists(Path.Combine(destFolder, flag))) return;
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (2)
273if (File.Exists(relativeFilePath)) 305if (File.Exists(Path.Combine(destFolder, flag))) return;
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
193if (File.Exists(dataFile))
Microsoft.ML.Sweeper (3)
ConfigRunner.cs (3)
84if (!File.Exists(Exe) && !File.Exists(Exe + ".exe")) 211if (File.Exists(errorFile) && new FileInfo(errorFile).Length == 0)
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
408env.CheckUserArg(File.Exists(modelPath), nameof(modelPath));
Microsoft.ML.TensorFlow.Tests (7)
TensorflowTests.cs (7)
1433if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName)) 1434&& File.Exists(Path.Combine(workspacePath, validationSetBottleneckCachedValuesFileName))) 1734Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.TrainSetBottleneckCachedValuesFileName))); 1735Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.ValidationSetBottleneckCachedValuesFileName))); 1736Assert.True(File.Exists(Path.Combine(Path.GetTempPath(), "MLNET", ImageClassificationTrainer.ModelFileName[options.Arch]))); 1969if (File.Exists(relativeFilePath)) 1983if (File.Exists(Path.Combine(destFolder, flag)))
Microsoft.ML.TestFramework (3)
BaseTestBaseline.cs (3)
289if (File.Exists(baselinePath)) 940if (!File.Exists(outPath)) 954if (!File.Exists(basePath))
Microsoft.ML.TestFrameworkCommon (4)
TestDownloadUtils.cs (3)
27if (File.Exists(filePath)) 48catch (IOException) when (File.Exists(filePath)) 55if (File.Exists(temporaryFilePath))
Utility\LibraryLoader.cs (1)
99if (!Path.IsPathRooted(loadTarget) || File.Exists(loadTarget))
Microsoft.ML.Tokenizers (2)
Model\BpeOptions.cs (2)
44if (!File.Exists(vocabFile)) 61if (!File.Exists(mergesFile))
Microsoft.ML.Tokenizers.Data.Tests (1)
test\Microsoft.ML.Tokenizers.Tests\Utils.cs (1)
41if (File.Exists(file))
Microsoft.ML.Tokenizers.Tests (1)
Utils.cs (1)
41if (File.Exists(file))
Microsoft.ML.Transforms (4)
LoadTransform.cs (1)
71h.CheckUserArg(File.Exists(args.ModelFile), nameof(args.ModelFile), "File does not exist");
SvmLight\SvmLightLoaderSaverCatalog.cs (2)
72if (!File.Exists(path)) 94if (!File.Exists(path))
Text\WordEmbeddingsExtractor.cs (1)
653if (!File.Exists(_modelFileNameWithPath))
Microsoft.ML.Vision (10)
DnnRetrainTransform.cs (2)
440if (File.Exists(destination)) 447if (File.Exists(destination))
ImageClassificationTrainer.cs (8)
676File.Exists(validationSetBottleneckCachedValuesFilePath + "_features.bin") && 677File.Exists(validationSetBottleneckCachedValuesFilePath + "_labels.bin"); 693!(File.Exists(trainSetBottleneckCachedValuesFilePath + "_features.bin") && 694File.Exists(trainSetBottleneckCachedValuesFilePath + "_labels.bin"))) 902(File.Exists(validationSetBottleneckFilePath + "_labels.bin") && 903File.Exists(validationSetBottleneckFilePath + "_features.bin"))); 906File.Exists(trainBottleneckFilePath + "_labels.bin") && 907File.Exists(trainBottleneckFilePath + "_features.bin"));
Microsoft.NET.Build.Containers (2)
LocalDaemons\ContainerRuntimeOperations.cs (1)
164if (File.Exists(fullPath))
LocalDaemons\DockerCli.cs (1)
59if (File.Exists(fullPath))
Microsoft.NET.Build.Extensions.Tasks (4)
GetDependsOnNETStandard.cs (1)
52if (File.Exists(absoluteRefPath))
src\sdk\src\Tasks\Common\ConflictResolution\ConflictItem.cs (1)
111_exists = ItemType == ConflictItemType.Platform || File.Exists(SourcePathForFileAccess);
src\sdk\src\Tasks\Common\ConflictResolution\FrameworkListReader.cs (1)
57if (!File.Exists(frameworkListPath))
src\sdk\src\Tasks\Common\ConflictResolution\PlatformManifestReader.cs (1)
19if (!File.Exists(path))
Microsoft.NET.Build.Tasks (42)
CheckSdkVulnerabilities.cs (1)
46if (!File.Exists(summaryPath))
DependencyContextBuilder.cs (2)
657var runtimeFile = !string.IsNullOrWhiteSpace(assembly.Path) && File.Exists(assembly.Path) ? CreateRuntimeFile(referenceProjectInfo.OutputName, assembly.Path, assembly.DestinationSubPath) : 658libraryPath != null && File.Exists(libraryPath) ? CreateRuntimeFile(referenceProjectInfo.OutputName, libraryPath) :
FrameworkPackages\FrameworkPackages.cs (1)
138.Where(d => File.Exists(d.Overrides))
GenerateRuntimeConfigurationFiles.cs (1)
290if (!File.Exists(userConfigPath))
GetPackagesToPrune.cs (1)
268if (File.Exists(packageOverridesPath))
NugetContentAssetPreprocessor.cs (1)
33if (!File.Exists(pathToFinalAsset))
PickBestRid.cs (1)
49if (!File.Exists(runtimeGraphPath))
PrepareForReadyToRunCompilation.cs (1)
122!string.IsNullOrEmpty(diaSymReaderPath) && File.Exists(diaSymReaderPath);
ResolvePackageAssets.cs (1)
1208if (File.Exists(xmlFilePath))
ResolveReadyToRunCompilers.cs (4)
411return File.Exists(_crossgenTool.ToolPath) && File.Exists(_crossgenTool.ClrJitPath); 439if (!File.Exists(_crossgen2Tool.ClrJitPath)) 446return File.Exists(_crossgen2Tool.ToolPath);
ResolveRuntimePackAssets.cs (1)
154if (File.Exists(absoluteRuntimeListPath))
ResolveTargetingPackAssets.cs (3)
246if (File.Exists(platformManifestPath)) 251if (File.Exists(packageOverridesPath)) 469usePathElementsInFrameworkListPathAsFallBack = !File.Exists(dllPath);
RunReadyToRunCompiler.cs (8)
108if (!File.Exists(Crossgen2Tool.ItemSpec)) 114if (!string.IsNullOrEmpty(hostPath) && !File.Exists(hostPath)) 122if (!File.Exists(jitPath)) 156if (!File.Exists(CrossgenTool.ItemSpec)) 161if (!File.Exists(CrossgenTool.GetMetadata(MetadataKeys.JitPath))) 174if (!string.IsNullOrEmpty(DiaSymReader) && !File.Exists(DiaSymReader)) 186if (!File.Exists(_outputR2RImage)) 199if (!File.Exists(_inputAssembly))
src\sdk\src\Cli\dotnet\Commands\Workload\InstallStateContents.cs (1)
31return File.Exists(path) ? FromString(File.ReadAllText(path)) : new InstallStateContents();
src\sdk\src\Common\WorkloadFileBasedInstall.cs (1)
16=> dotnetDir is not null && File.Exists(GetUserInstallFilePath(dotnetDir, sdkFeatureBand));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (6)
110if (!File.Exists(knownManifestIdsFilePath)) 115if (File.Exists(knownManifestIdsFilePath)) 488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json"))) 500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json"))) 559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json"))) 669if (File.Exists(globalJsonPath))
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadInstallType.cs (1)
29dotnetDir is not null && File.Exists(Path.Combine(
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (1)
18static readonly Func<string, bool> _fileExists = File.Exists;
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (2)
31string[] currentRuntimeIdentifiers = File.Exists(runtimeIdentifierChainPath) ? 355_fileExistOverride?.Invoke(packPath) ?? File.Exists(packPath) :
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (1)
100if (File.Exists(Path.Combine(path, "baseline.workloadset.json")))
src\sdk\src\Tasks\Common\ConflictResolution\ConflictItem.cs (1)
111_exists = ItemType == ConflictItemType.Platform || File.Exists(SourcePathForFileAccess);
src\sdk\src\Tasks\Common\ConflictResolution\FrameworkListReader.cs (1)
57if (!File.Exists(frameworkListPath))
src\sdk\src\Tasks\Common\ConflictResolution\PlatformManifestReader.cs (1)
19if (!File.Exists(path))
Microsoft.NET.HostModel (4)
AppHost\HostWriter.cs (1)
122if (File.Exists(appHostDestinationFilePath))
Bundle\Bundler.cs (2)
316if (File.Exists(bundlePath)) 408if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && File.Exists(bundlePath))
HostModelUtils.cs (1)
78public static bool IsCodesignAvailable() => File.Exists(CodesignPath);
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (5)
BrotliCompress.cs (1)
95if (!File.Exists(outputRelativePath))
CreateBlazorTrimmerRootDescriptorFile.cs (1)
23if (File.Exists(TrimmerFile.ItemSpec))
GZipCompress.cs (1)
58if (!File.Exists(outputFullPath))
src\sdk\src\StaticWebAssetsSdk\Tasks\Data\StaticWebAsset.cs (2)
1247if (!File.Exists(sourceFile)) 1256if (!File.Exists(destPath) || File.GetLastWriteTimeUtc(sourceFile) > File.GetLastWriteTimeUtc(destPath))
Microsoft.NET.Sdk.Publish.Tasks (21)
AppSettingsTransform.cs (1)
30if (!File.Exists(destinationAppSettingsFilePath))
Kudu\KuduZipDeploy.cs (1)
32if (!File.Exists(zipFileFullPath))
Tasks\GenerateEnvTransform.cs (1)
35if (File.Exists(envTransformTemplatePath))
Tasks\Kudu\KuduDeploy.cs (1)
192if (File.Exists(tempFilePath))
Tasks\MsDeploy\CreateManifestFile.cs (1)
106if (!File.Exists(ManifestFile))
Tasks\MsDeploy\CreateMSDeployScript.cs (2)
24if (!File.Exists(ScriptFullPath)) 33if (!File.Exists(ReadMeFullPath))
Tasks\MsDeploy\CreateParameterFile.cs (2)
161|| File.Exists(metadataValue))) 284if (DeclareSetParameterFile is not null && !File.Exists(DeclareSetParameterFile))
Tasks\MsDeploy\ImportParameterFile.cs (1)
168if (!File.Exists(filePath))
Tasks\MsDeploy\MSDeploy.cs (1)
268if (!File.Exists(Path.Combine(m_exePath, ToolName)))
Tasks\OneDeploy\OneDeploy.cs (1)
95if (!File.Exists(fileToPublishPath))
Tasks\TransformAppSettings.cs (2)
78if (!File.Exists(sourceAppSettingsFilePath)) 83if (!File.Exists(destinationAppSettingsFilePath))
Tasks\TransformWebConfig.cs (2)
95if (File.Exists(publishWebConfigPath)) 97if (File.Exists(projectWebConfigPath))
Tasks\WebJobs\GenerateRunCommandFile.cs (1)
27bool isRunCommandFilePresent = ProjectDirectory is not null && File.Exists(Path.Combine(ProjectDirectory, runCmdFileName));
Tasks\ZipDeploy\ZipDeploy.cs (1)
55if (!File.Exists(zipToPublishPath) || client == null)
WebConfigTelemetry.cs (2)
54if (!string.IsNullOrEmpty(solutionFileFullPath) && File.Exists(solutionFileFullPath)) 95if (!string.IsNullOrEmpty(solutionFileFullPath) && File.Exists(solutionFileFullPath))
WebConfigTransform.cs (1)
156if (File.Exists(projectWebConfigPath))
Microsoft.NET.Sdk.Razor.Tasks (3)
ReferenceResolver.cs (1)
106if (!File.Exists(file))
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerConnection.cs (2)
305if (File.Exists(dotnetPath)) 334if (!File.Exists(expectedCompilerPath))
Microsoft.NET.Sdk.StaticWebAssets.Tasks (36)
CollectStaticWebAssetsToCopy.cs (1)
58else if (File.Exists(asset.Identity))
Compression\BrotliCompress.cs (1)
96if (!File.Exists(outputRelativePath))
Compression\GZipCompress.cs (1)
40if (!File.Exists(outputRelativePath))
Data\StaticWebAsset.cs (2)
1247if (!File.Exists(sourceFile)) 1256if (!File.Exists(destPath) || File.GetLastWriteTimeUtc(sourceFile) > File.GetLastWriteTimeUtc(destPath))
DefineStaticWebAssets.Cache.cs (1)
135if (manifestPath != null && File.Exists(manifestPath))
GenerateStaticWebAssetEndpointsManifest.cs (5)
44var existingPatternString = !string.IsNullOrEmpty(ExclusionPatternsCacheFilePath) && File.Exists(exclusionCacheAbsolutePath) 48if (!string.IsNullOrEmpty(CacheFilePath) && File.Exists(manifestAbsolutePath) && File.GetLastWriteTimeUtc(manifestAbsolutePath) > File.GetLastWriteTimeUtc(cacheAbsolutePath)) 106if (!updatedManifest && File.Exists(manifestAbsolutePath)) 212if (!File.Exists(exclusionCacheAbsolutePath) || 223if (File.Exists(manifestAbsolutePath))
GenerateStaticWebAssetEndpointsPropsFile.cs (1)
96var fileExists = File.Exists(targetPropsFilePath);
GenerateStaticWebAssetsDevelopmentManifest.cs (3)
42if (File.Exists(manifestPath) && File.GetLastWriteTimeUtc(manifestPath) > File.GetLastWriteTimeUtc(TaskEnvironment.GetAbsolutePath(CacheFilePath))) 142var fileExists = File.Exists(manifestPath); 316if (File.Exists(asset.Identity))
GenerateStaticWebAssetsManifest.cs (2)
135var cacheFileExists = isManifestCacheFileConfigured && File.Exists(absolutizedManifestCacheFilePath); 136var manifestFileExists = File.Exists(absolutizedManifestPath);
GenerateStaticWebAssetsPropsFile.cs (1)
165var fileExists = File.Exists(targetPropsAbsoluteFilePath);
JSModules\GenerateJSModuleManifest.cs (1)
47var fileExists = File.Exists(OutputFile);
Legacy\GenerateStaticWebAssetsPropsFile50.cs (1)
112var fileExists = File.Exists(TargetPropsFilePath);
Legacy\GenerateV1StaticWebAssetsManifest.cs (1)
75var fileExists = File.Exists(TargetManifestPath);
OverrideHtmlAssetPlaceholders.cs (1)
64if (File.Exists(item.ItemSpec))
ReadPackageAssetsManifest.cs (1)
52if (!File.Exists(manifestPath))
ReadStaticWebAssetsManifestFile.cs (1)
34if (!File.Exists(manifestPath))
ScopedCss\ConcatenateCssFiles.cs (1)
99if (!File.Exists(outputFile) || !SameContent(content, outputFile))
ScopedCss\ConcatenateCssFiles50.cs (1)
98if (!File.Exists(OutputFile) || !SameContent(content, OutputFile))
ScopedCss\RewriteCss.cs (1)
45if (SkipIfOutputIsNewer && File.Exists(outputFile) && File.GetLastWriteTimeUtc(inputFile) < File.GetLastWriteTimeUtc(outputFile))
ServiceWorker\GenerateServiceWorkerAssetsManifest.cs (1)
102var fileExists = File.Exists(OutputPath);
ServiceWorker\UpdateServiceWorkerFileWithVersion.cs (2)
23if (!File.Exists(ServiceWorkerSource)) 35var destinationContent = File.Exists(ServiceWorkerDestination) ? File.ReadAllText(ServiceWorkerDestination) : null;
StaticWebAssetsGeneratePackagePropsFile.cs (1)
65var fileExists = File.Exists(buildTargetPath);
StaticWebAssetsGeneratePackManifest.cs (1)
85var fileExists = File.Exists(manifestPath);
StaticWebAssetsReadPackManifest.cs (1)
23if (!File.Exists(ManifestPath))
Utils\ArtifactWriter.cs (1)
22var fileExists = File.Exists(artifactPath);
Utils\AssetToCompress.cs (2)
18if (File.Exists(relatedAsset)) 28if (File.Exists(relatedAssetOriginalItemSpec))
Microsoft.NET.Sdk.WorkloadManifestReader (13)
SdkDirectoryWorkloadManifestProvider.cs (6)
110if (!File.Exists(knownManifestIdsFilePath)) 115if (File.Exists(knownManifestIdsFilePath)) 488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json"))) 500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json"))) 559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json"))) 669if (File.Exists(globalJsonPath))
src\sdk\src\Cli\dotnet\Commands\Workload\InstallStateContents.cs (1)
31return File.Exists(path) ? FromString(File.ReadAllText(path)) : new InstallStateContents();
src\sdk\src\Common\WorkloadFileBasedInstall.cs (1)
16=> dotnetDir is not null && File.Exists(GetUserInstallFilePath(dotnetDir, sdkFeatureBand));
WorkloadInstallType.cs (1)
29dotnetDir is not null && File.Exists(Path.Combine(
WorkloadManifestReader.Localization.cs (1)
18static readonly Func<string, bool> _fileExists = File.Exists;
WorkloadResolver.cs (2)
31string[] currentRuntimeIdentifiers = File.Exists(runtimeIdentifierChainPath) ? 355_fileExistOverride?.Invoke(packPath) ?? File.Exists(packPath) :
WorkloadSet.cs (1)
100if (File.Exists(Path.Combine(path, "baseline.workloadset.json")))
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (6)
CachingWorkloadResolver.cs (3)
68if (File.Exists(sentinelPath)) 121if (File.Exists(autoImportPath)) 138if (File.Exists(workloadManifestTargetPath))
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
47if (!File.Exists(path)) 61if (File.Exists(path))
src\sdk\src\Common\WorkloadFileBasedInstall.cs (1)
16=> dotnetDir is not null && File.Exists(GetUserInstallFilePath(dotnetDir, sdkFeatureBand));
Microsoft.SourceLink.Common (1)
GenerateSourceLinkFile.cs (1)
126if (File.Exists(OutputFile))
Microsoft.TemplateEngine.Abstractions (1)
PhysicalFileSystem\IPhysicalFileSystem.cs (1)
19/// Same behavior as <see cref="File.Exists(string)"/>.
Microsoft.TemplateEngine.Cli (1)
TemplatePackageCoordinator.cs (1)
212bool isPath = File.Exists(installArg) || Directory.Exists(installArg);
Microsoft.TemplateEngine.Edge (1)
ReflectionLoadProbingPath.cs (1)
231else if (File.Exists(Path.Combine(selector._path, stringName + ".dll")))
Microsoft.TemplateEngine.Utils (1)
PhysicalFileSystem.cs (1)
21return File.Exists(file);
Microsoft.TestPlatform.Build (1)
Tasks\TestTaskUtils.cs (1)
268if (!File.Exists(settingsFile))
Microsoft.TestPlatform.CoreUtilities (1)
Helpers\FileHelper.cs (1)
31=> File.Exists(path);
Microsoft.TestPlatform.CrossPlatEngine (2)
Discovery\DiscoveryManager.cs (2)
259if (!File.Exists(src) && !Directory.Exists(src)) 277if (!File.Exists(src))
Microsoft.TestPlatform.Extensions.BlameDataCollector (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))
WindowsHangDumper.cs (1)
147if (!File.Exists(dumpMinitoolPath))
Microsoft.TestPlatform.PlatformAbstractions (2)
common\System\ProcessHelper.cs (1)
51if (!File.Exists(processPath))
common\Tracing\RollingFileTraceListener.cs (1)
285if (File.Exists(archiveFileName))
Microsoft.TestPlatform.TestHostRuntimeProvider (2)
Hosting\AppxManifestFile.cs (1)
19if (File.Exists(filePath))
Hosting\DefaultTestHostManager.cs (1)
223&& !File.Exists(testhostProcessPath))
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (1)
VsTestConsoleProcessManager.cs (1)
123if (!File.Exists(consoleRunnerPath.Trim('"')))
Microsoft.VisualBasic.Core (15)
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
404If File.Exists(m_sFullPath) Then
Microsoft\VisualBasic\CompilerServices\VB6OutputFile.vb (1)
42If File.Exists(m_sFullPath) Then
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (1)
62If File.Exists(m_sFullPath) Then
Microsoft\VisualBasic\FileIO\FileSystem.vb (9)
97Return IO.File.Exists(file) 478If IO.File.Exists(directory) Then 710If Not IO.File.Exists(file) Then 795If append AndAlso IO.File.Exists(file) Then 920If IO.File.Exists(TargetDirectoryFullPath) Then 1110If Not IO.File.Exists(sourceFileFullPath) Then 1230If Not IO.File.Exists(fileFullPath) Then 1249If IO.File.Exists(Path) Then 1496If IO.File.Exists(FullPath) Then
Microsoft\VisualBasic\FileIO\TextFieldParser.vb (1)
600If Not File.Exists(fullPath) Then
Microsoft\VisualBasic\FileSystem.vb (2)
307If File.Exists(PathName) Then 318If File.Exists(PathName) Then
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Logging\FileLogTraceListener.vb (1)
613If File.Exists(fileName) Then
Microsoft.VisualStudio.TestPlatform.Common (3)
DataCollection\DataCollectionAttachmentManager.cs (2)
201if (!File.Exists(fileTransferInfo.FileName)) 216else if (File.Exists(localFilePath))
Utilities\AssemblyResolver.cs (1)
162if (!File.Exists(assemblyPath))
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (3)
TrxLogger.cs (1)
537if (shouldOverwrite && File.Exists(filePath))
Utility\TrxFileHelper.cs (2)
152if (!File.Exists(tryMePath)) 391if (File.Exists(path) || Directory.Exists(path))
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
Navigation\DiaSession.cs (2)
118pdbFilePath = !File.Exists(pdbFilePath) 122if (File.Exists(pdbFilePath))
Navigation\PortableSymbolReader.cs (1)
88using PortablePdbReader pdbReader = File.Exists(pdbFilePath)
Mono.Cecil (4)
Mono.Cecil.Cil\Symbols.cs (2)
931 if (File.Exists (pdb_file_name)) { 943 if (File.Exists (mdb_file_name)) {
Mono.Cecil\BaseAssemblyResolver.cs (1)
216 if (!File.Exists (file))
Mono.Security.Cryptography\CryptoService.cs (1)
125 if (!File.Exists (file))
Mono.Cecil.Pdb (1)
Mono.Cecil.Pdb\PdbHelper.cs (1)
83 if (File.Exists (pdb))
MSBuild (1)
src\msbuild\src\Shared\TypeLoader.cs (1)
267if (string.IsNullOrEmpty(assemblyFilePath) || !File.Exists(assemblyFilePath))
NuGet.Build.Tasks (2)
BuildTasksUtility.cs (2)
735if (File.Exists(packagesConfigPath)) 742if (File.Exists(packagesConfigPath))
NuGet.Build.Tasks.Pack (6)
GetPackOutputItemsTask.cs (1)
79if (string.IsNullOrWhiteSpace(NuspecFile) || !File.Exists(NuspecFile))
GetProjectReferencesFromAssetsFileTask.cs (2)
37if (!string.IsNullOrEmpty(ProjectAssetsFileAbsolutePath) && File.Exists(ProjectAssetsFileAbsolutePath)) 46if (!File.Exists(assetsFilePath))
PackTaskLogic.cs (3)
109if (!File.Exists(assetsFilePath)) 346if (!File.Exists(assetsFilePath)) 528if (!File.Exists(finalOutputPath))
NuGet.CommandLine.XPlat (13)
Commands\PackageReferenceCommands\AddPackageReferenceCommand.cs (1)
165if (!File.Exists(projectPath)
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (1)
447if (File.Exists(packageReferenceArgs.DgFilePath))
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (3)
58if (!File.Exists(listPackageArgs.Path)) 76? MSBuildAPIUtility.GetProjectsFromSolution(listPackageArgs.Path).Where(File.Exists) 245if (!File.Exists(assetsPath))
Commands\PackageReferenceCommands\RemovePackageReferenceCommand.cs (1)
80if (!File.Exists(projectPath)
Commands\Why\WhyCommand.cs (1)
82return File.Exists(value) || Directory.Exists(value);
Commands\Why\WhyCommandRunner.cs (3)
128if (string.IsNullOrEmpty(assetsFilePath) || !File.Exists(assetsFilePath)) 189|| (File.Exists(fullPath) 250if (!File.Exists(assetsFilePath))
Utility\MSBuildAPIUtility.cs (1)
154? GetProjectsFromSolution(projectOrSolutionFile).Where(File.Exists)
Utility\XPlatUtility.cs (2)
129if (!string.IsNullOrEmpty(fileName) && File.Exists(fileName)) 146if (!string.IsNullOrEmpty(fileName) && File.Exists(fileName))
NuGet.Commands (22)
CommandRunners\PackCommandRunner.cs (3)
132bool isExistingPackage = File.Exists(outputPath); 142if (!isExistingPackage && File.Exists(outputPath)) 164if (!isExistingPackage && File.Exists(outputPath))
RestoreCommand\Diagnostics\UnresolvedMessages.cs (1)
95if (unresolved.Name.IndexOf(Path.DirectorySeparatorChar, StringComparison.Ordinal) > -1 && File.Exists(unresolved.Name))
RestoreCommand\OriginalCaseGlobalPackageFolder.cs (2)
85if (!converted.Add(identity) || File.Exists(hashPath)) 184if (localPackage != null && File.Exists(localPackage.Package.ZipPath))
RestoreCommand\ProjectRestoreCommand.cs (1)
182if (File.Exists(runtimeGraphPath))
RestoreCommand\RequestFactory\DependencyGraphFileRequestProvider.cs (1)
41var result = (File.Exists(path) && path.EndsWith(".dg", StringComparison.OrdinalIgnoreCase));
RestoreCommand\RestoreCommand.cs (2)
1584if (!MSBuildStringUtility.IsTrueOrEmpty(restorePackagesWithLockFile) && File.Exists(packagesLockFilePath)) 1614if (!_request.RestoreForceEvaluate && File.Exists(packagesLockFilePath))
RestoreCommand\RestoreResult.cs (1)
324if (!toolCommit && !DoNotWriteDependencyGraphSpec && _dependencyGraphSpecFilePath != null && _dependencyGraphSpec != null && (DidDGHashChange || !File.Exists(_dependencyGraphSpecFilePath)))
RestoreCommand\RestoreRunner.cs (3)
382if (File.Exists(input) || Directory.Exists(input)) 393Debug.Assert(File.Exists(input) || Directory.Exists(input)); 394if (File.Exists(input))
RestoreCommand\Utility\BuildAssetsUtils.cs (2)
391return File.Exists(path); 410if (File.Exists(path))
RestoreCommand\Utility\NoOpRestoreUtilities.cs (4)
104if (!string.IsNullOrWhiteSpace(request.LockFilePath) && !File.Exists(request.LockFilePath)) 113if (!File.Exists(targetsFilePath)) 119if (!File.Exists(propsFilePath)) 127if (!File.Exists(packageLockFilePath))
RestoreCommand\Utility\PackageSpecFactory.cs (2)
441if (File.Exists(packagesConfigPath)) 448if (File.Exists(packagesConfigPath))
NuGet.Common (8)
Migrations\MigrationRunner.cs (2)
35if (!File.Exists(expectedMigrationFilename)) 48if (!File.Exists(expectedMigrationFilename))
PathUtil\FileUtility.cs (1)
221if (File.Exists(path))
PathUtil\NuGetEnvironment.cs (4)
364if (File.Exists(fullPath)) 376if (File.Exists(fullPath)) 386if (File.Exists(fullPath)) 398if (File.Exists(fullPath))
PathUtil\ProjectJsonPathUtilities.cs (1)
41if (!File.Exists(configPath))
NuGet.Configuration (6)
Settings\ConfigurationDefaults.cs (1)
38if (File.Exists(Path.Combine(directory, configFile)))
Settings\Items\FileClientCertItem.cs (2)
204if (File.Exists(originalValue)) 214if (File.Exists(relativeToConfigFilePath))
Settings\Settings.cs (1)
866if (File.Exists(file))
Utility\FileSystemUtility.cs (2)
18if (File.Exists(fullPath)) 62return File.Exists(Path.Combine(root, file));
NuGet.PackageManagement (26)
BuildIntegration\DependencyGraphRestoreUtility.cs (1)
290if (File.Exists(persistedDGSpecPath))
NuGetPackageManager.cs (3)
2993if (File.Exists(lockFilePath)) 3547if (File.Exists(packagePath)) 3597File.Exists(readmeFilePath))
PackagePreFetcher.cs (1)
88if (!File.Exists(installPath))
Projects\FolderNuGetProject.cs (5)
206if (File.Exists(packageFilePath)) 435if (File.Exists(installPath)) 491if (File.Exists(installPath)) 520if (File.Exists(filePath)) 581if (File.Exists(packageFilePath))
Projects\PackagesConfigNuGetProject.cs (6)
251return File.Exists(FullPath); 274if (File.Exists(FullPath)) 312&& !File.Exists(PackagesProjectNameConfigPath) 313&& File.Exists(PackagesConfigPath)) 317else if (!File.Exists(PackagesConfigPath) 318&& File.Exists(PackagesProjectNameConfigPath))
Utility\BuildIntegratedProjectUtility.cs (1)
64if (File.Exists(lockFilePath))
Utility\FileSystemUtility.cs (3)
23if (File.Exists(fullPath)) 36return File.Exists(path); 209if (!File.Exists(fullPath))
Utility\MSBuildNuGetProjectSystemUtility.cs (1)
27if (File.Exists(Path.Combine(msBuildNuGetProjectSystem.ProjectFullPath, path)))
Utility\PackagesConfigContentHashProvider.cs (1)
50if (File.Exists(metadataPath))
Utility\PackagesConfigLockFileUtility.cs (3)
39var lockFileExists = File.Exists(lockFileName); 96var lockFileExists = File.Exists(lockFilePath); 291if (!File.Exists(pcFile))
Utility\XmlUtility.cs (1)
15if (File.Exists(Path.Combine(root, path)))
NuGet.Packaging (13)
FallbackPackagePathResolver.cs (2)
125if (File.Exists(hashPath)) 135if (File.Exists(nupkgMetadataFilePath))
PackageCreation\Authoring\PackageBuilder.cs (1)
88if (!File.Exists(path))
PackageExtraction\PackageHelper.cs (1)
148if (File.Exists(runtimePackageFilePath))
PackageExtraction\PackagePathHelper.cs (1)
168File.Exists(packageLookupPath))
PackageExtraction\StreamExtensions.cs (1)
87if (File.Exists(fileFullPath))
PackageExtraction\ZipFilePair.cs (1)
25return FileFullPath != null && PackageEntry != null && File.Exists(FileFullPath);
PackageExtractor.cs (5)
419if (!File.Exists(nupkgMetadataFilePath)) 614if (File.Exists(targetTempNupkg)) 695if (!File.Exists(nupkgMetadataFilePath)) 805else if (!File.Exists(targetNuspec)) 965if (File.Exists(nupkgFilePath))
PackagesConfigWriter.cs (1)
533if (File.Exists(fullPath))
NuGet.ProjectModel (3)
LockFile\LockFileUtilities.cs (1)
22if (File.Exists(lockFilePath))
ProjectLockFile\PackagesLockFileUtilities.cs (2)
28return MSBuildStringUtility.IsTrue(restorePackagesWithLockFile) || File.Exists(GetNuGetLockFilePath(project)); 56if (File.Exists(path))
NuGet.Protocol (27)
HttpSource\HttpCacheUtility.cs (2)
92if (File.Exists(result.CacheFile)) 111if (!File.Exists(result.CacheFile))
LocalRepositories\FindLocalPackagesResourceUnzipped.cs (1)
140if (File.Exists(nuspecPath))
LocalRepositories\LocalV3FindPackageByIdResource.cs (3)
479return (_isFallbackFolder && File.Exists(nupkgMetadataPath)) || 480(!_isFallbackFolder && (File.Exists(hashPath) || File.Exists(nupkgMetadataPath)));
PackagesFolder\LocalPackageFileCache.cs (3)
115if (!exists && File.Exists(sha512Path)) 213if (File.Exists(manifestPath)) 232if (File.Exists(runtimeGraphFile))
Plugins\PluginCacheEntry.cs (2)
83if (File.Exists(CacheFileName)) 96if (!File.Exists(CacheFileName))
Plugins\PluginDiscoverer.cs (2)
170return File.Exists(filePath) ? PluginFileState.Valid : PluginFileState.NotFound; 197if (File.Exists(path))
Plugins\PluginDiscoveryUtility.cs (1)
93if (File.Exists(expectedPluginName))
Resources\PackageUpdateResource.cs (2)
313if (!File.Exists(symbolPackagePath)) 807if (!File.Exists(nupkgFilePath))
Utility\GlobalPackagesFolderUtility.cs (2)
45if (File.Exists(nupkgMetadataPath)) 49else if (File.Exists(hashPath))
Utility\LocalFolderUtility.cs (5)
670if (!File.Exists(nupkgPath)) 676if (!File.Exists(nuspecPath)) 682if (!File.Exists(hashPath)) 1289if (!File.Exists(nupkgMetadataPath)) 1301if (!string.IsNullOrEmpty(hashPath) && File.Exists(hashPath))
Utility\OfflineFeedUtility.cs (4)
40var nupkgFileExists = File.Exists(nupkgFilePath); 42var hashFileExists = File.Exists(hashFilePath); 44var nuspecFileExists = File.Exists(nuspecFilePath); 126(!isDirectory && !File.Exists(path)))
Pipelines.Library (1)
DistributedApplicationPipelineExtensions.cs (1)
175if (File.Exists(zipPath))
PresentationBuildTasks (4)
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
293if (!File.Exists(TaskHelper.CreateFullFilePath(strFileName, SourceDir))) // CodeQL [SM00414] Trusted build-time input, not attacker-controlled
Microsoft\Build\Tasks\Windows\UidManager.cs (1)
374if (File.Exists(fileName)) // CodeQL [SM00414] Trusted build-time path, not attacker-controlled
MS\Internal\Tasks\TaskFileService.cs (1)
252fileExists = File.Exists(fileName);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (1)
110if (!String.IsNullOrEmpty(assemblyFullPath) && File.Exists(assemblyFullPath))
PresentationFramework (5)
Microsoft\Win32\FileDialog.cs (2)
459fileExists = File.Exists(tempPath); 600if (!GetOption(FOS.FILEMUSTEXIST) || File.Exists(newFilename))
Microsoft\Win32\SaveFileDialog.cs (1)
187bool fExist = File.Exists(fileName);
System\Windows\Documents\WinRTSpellerInterop.cs (1)
428if (!File.Exists(lexiconFilePath))
System\Windows\Standard\Verify.cs (1)
265if (!File.Exists(filePath))
PresentationUI (6)
InstallationError.xaml.cs (1)
175if (File.Exists(LogFilePath) && ErrorFlag)
MS\Internal\Documents\Application\DocumentStream.cs (3)
315if (File.Exists(path)) 854if (File.Exists(targetFile)) 865if( File.Exists( backupFile ) )
MS\Internal\Documents\RightsManagementManager.cs (1)
862foundRMClient = File.Exists(msdrmdllPath);
TenFeetInstallationError.xaml.cs (1)
179if (File.Exists(LogFilePath) && ErrorFlag)
RepoTasks (12)
BatchHelixWorkItems.cs (1)
118if (!File.Exists(destPath))
GenerateTestDevCert.cs (1)
38if (File.Exists(CertificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (1)
540if (!File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (2)
131return File.Exists(GetCertificateFilePath(candidate)) ? 457if (File.Exists(certificatePath))
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
115if (File.Exists(certPath)) 247if (File.Exists(certPath)) 473if (File.Exists(certPath)) 610if (File.Exists(Path.Combine(searchFolder, command))) 646if (File.Exists(WslInteropPath) || File.Exists(WslInteropLatePath)) 1051if (!File.Exists(linkPath))
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (1)
51return File.Exists(fullPath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
66if (File.Exists(potentialAssemblyPath))
rzc (7)
DiscoverCommand.cs (1)
285if (!File.Exists(path))
GenerateCommand.cs (2)
281if (File.Exists(outputFilePath) && 395if (!File.Exists(tagHelperManifest))
ServerProtocol\ServerConnection.cs (2)
305if (File.Exists(dotnetPath)) 334if (!File.Exists(expectedCompilerPath))
ShadowCopyManager.cs (2)
54if (File.Exists(resourcesPath)) 61if (File.Exists(resourcesPath))
sdk-tasks (10)
AddMetadataIsPE.cs (1)
27var isPe = File.Exists(resultItem.GetMetadata("FullPath")) && HasMetadata(resultItem.GetMetadata("FullPath"));
CopyPreservingRelativeSymlinks.cs (1)
100if (File.Exists(destPath))
Crossgen.cs (2)
34if (!File.Exists(SourceAssembly)) 65if (File.Exists(TempOutputPath))
ExtractArchiveToDirectory.cs (1)
52if (!File.Exists(SourceArchive))
GenerateRuntimeAnalyzersSWR.cs (1)
67if (!File.Exists(path))
ReplaceFileContents.cs (1)
66var filesNotFound = InputFiles.Where(i => !File.Exists(i.ItemSpec)).Select(i => i.ItemSpec);
ReplaceFilesWithSymbolicLinks.cs (1)
84if (File.Exists(targetFile) && FilesHaveSameContent(file, targetFile))
TarGzFileCreateFromDirectory.cs (1)
57if (File.Exists(DestinationArchive))
ZipFileCreateFromDirectory.cs (1)
44if (File.Exists(DestinationArchive))
Security.TransportSecurity.IntegrationTests (1)
Tcp\ClientCredentialTypeTests.OSX.cs (1)
133if (!File.Exists(ServiceUtilHelper.OSXCustomKeychainFilePath))
SelectTests (4)
ChangedFileFilter.cs (1)
48if (!File.Exists(patternsPath))
GraphAffectedProjects.cs (1)
128if (!File.Exists(solutionPath))
Program.cs (2)
278if (!File.Exists(slnxPath)) 440if (!File.Exists(slnxPath))
System.CommandLine (1)
ArgumentValidation.cs (1)
202else if (checkFile && !Directory.Exists(token.Value) && !File.Exists(token.Value))
System.ComponentModel.TypeConverter (1)
System\ComponentModel\LicFileLicenseProvider.cs (1)
85if (File.Exists(licenseFile))
System.Configuration.ConfigurationManager (11)
System\Configuration\AppSettingsSection.cs (1)
104if (!IO.File.Exists(sourceFileFullPath)) return;
System\Configuration\ClientConfigPaths.cs (1)
47if (!File.Exists(ApplicationUri))
System\Configuration\ConfigurationFileMap.cs (1)
30if (!File.Exists(machineConfigFilename))
System\Configuration\Internal\InternalConfigHost.cs (2)
227return !File.Exists(streamName) 253if (File.Exists(streamName))
System\Configuration\Internal\WriteFileContext.cs (4)
65if (File.Exists(filename)) 169File.Exists(target) && 188if (File.Exists(target)) 208if (!File.Exists(fileName))
System\Configuration\LocalFileSettingsProvider.cs (1)
330if (File.Exists(file))
System\Configuration\NameValueFileSectionHandler.cs (1)
43if (File.Exists(sourceFileFullPath))
System.Diagnostics.EventLog (1)
System\Diagnostics\EventLog.cs (1)
701if (machineName == "." && !File.Exists(dllPath))
System.Diagnostics.FileVersionInfo (1)
System\Diagnostics\FileVersionInfo.cs (1)
306if (!File.Exists(fileName))
System.Diagnostics.Process (6)
src\runtime\src\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (3)
154if (File.Exists(path)) 314if (File.Exists(mountInfoFilePath)) 384if (File.Exists(procCGroupFilePath))
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcMountInfo.cs (1)
18if (File.Exists(ProcMountInfoFilePath))
System\Diagnostics\ProcessUtils.Unix.cs (2)
155if (File.Exists(filename)) 163if (uri.IsFile && uri.Host == "" && File.Exists(uri.LocalPath))
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
225if (!File.Exists(path))
System.Drawing.Common (3)
System\Drawing\Icon.cs (1)
158if (!File.Exists(filePath))
System\Drawing\Image.cs (1)
88if (!File.Exists(filename))
System\Drawing\Text\PrivateFontCollection.cs (1)
53if (!File.Exists(filename))
System.Formats.Tar (2)
System\Formats\Tar\TarFile.cs (2)
436if (!File.Exists(sourceFileName)) 505if (!File.Exists(sourceFileName))
System.IO.Compression.ZipFile (2)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (1)
104if (overwrite && File.Exists(destinationFileName))
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
97if (overwrite && File.Exists(destinationFileName))
System.IO.FileSystem.DriveInfo (2)
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcMountInfo.cs (1)
18if (File.Exists(ProcMountInfoFilePath))
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
44if (File.Exists(Interop.procfs.ProcMountInfoFilePath))
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (1)
97return File.Exists(GetFullPath(path));
System.IO.MemoryMappedFiles (1)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (1)
125_ => File.Exists(path)
System.IO.Ports (3)
System\IO\Ports\SerialPort.Unix.cs (3)
56(File.Exists(entry.FullName + "/device/id") || 60(isTtyGS && (File.Exists(entry.FullName + "/dev")))) 63if (File.Exists(deviceName))
System.Net.Mail (1)
System\Net\Mail\SmtpClient.cs (1)
372if (!File.Exists(pathAndFilename))
System.Net.NetworkInformation (4)
System\Net\NetworkInformation\LinuxNetworkInterface.cs (2)
33if (File.Exists(NetworkFiles.Ipv4RouteFile)) 44if (File.Exists(NetworkFiles.Ipv6RouteFile))
System\Net\NetworkInformation\StringParsingHelpers.Addresses.cs (2)
87if (File.Exists(filePath)) // avoid an exception in most cases if path doesn't already exist 129if (File.Exists(smbConfFilePath)) // avoid an exception in most cases if path doesn't already exist
System.Net.Ping (2)
src\runtime\src\libraries\Common\src\System\Net\NetworkInformation\UnixCommandLinePing.cs (2)
32if (File.Exists(path)) 36if (File.Exists(pathv4v6))
System.Private.CoreLib (11)
Internal\Runtime\CompilerHelpers\ReachabilityInstrumentationSupport.cs (1)
26if (File.Exists(ReachabilityFileName)
src\runtime\src\libraries\Common\src\Interop\Linux\os-release\Interop.OSReleaseFile.cs (1)
19if (File.Exists(filename))
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcMountInfo.cs (1)
18if (File.Exists(ProcMountInfoFilePath))
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
44if (File.Exists(Interop.procfs.ProcMountInfoFilePath))
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (1)
82/// Unlike <see cref="File.Exists(string?)"/> it returns true for existing, non-regular files like pipes.
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\SharedMemoryManager.Unix.cs (1)
406if (File.Exists(sharedFilesPath))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (2)
291if (!File.Exists(normalizedPath)) 357if (!File.Exists(requestedAssemblyPath))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (2)
72if (File.Exists(path)) 79if (File.Exists(fileName))
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
353if (File.Exists(tzFilePath))
System.Private.Windows.Core.TestUtilities (1)
TempFile.cs (1)
66public void AssertExists() => Assert.True(File.Exists(Path));
System.Private.Xml (2)
System\Xml\Serialization\Compilation.cs (2)
240if ((string.IsNullOrEmpty(path) || !File.Exists(path)) && !string.IsNullOrEmpty(Assembly.GetEntryAssembly()?.Location)) 245if ((string.IsNullOrEmpty(path) || !File.Exists(path)) && !string.IsNullOrEmpty(AppContext.BaseDirectory))
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs (1)
46if (File.Exists(modulePath))
System.Speech (1)
Internal\SrgsCompiler\SRGSCompiler.cs (1)
121if (!File.Exists(cg._codebehind[i]))
System.Windows.Forms (3)
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
445return File.Exists(fileName);
System\Windows\Forms\Help\Help.cs (2)
259if (!File.Exists(localPath)) 282if (!File.Exists(localPath))
System.Windows.Forms.Design (1)
System\Drawing\BitmapSelector.cs (1)
50return File.Exists(newPath) ? newPath : originalPath;
testhost (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))
testhost.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))
testhost.x86 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))
TypeScriptApiCompat (1)
ExcludedPackageLoader.cs (1)
15if (!File.Exists(filePath))
vbc (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
455if (!File.Exists(processFilePath)) 556if (!File.Exists(serverInfo.processFilePath)) 848if (!File.Exists(FilePath))
src\roslyn\src\Compilers\Shared\RuntimeHostInfo.cs (1)
102if (File.Exists(filePath))
VBCSCompiler (13)
src\roslyn\src\Compilers\Server\VBCSCompiler\AnalyzerConsistencyChecker.cs (1)
88string? resolvedPath = FileUtilities.ResolveRelativePath(analyzerReference.FilePath, basePath: null, baseDirectory: baseDirectory, searchPaths: SpecializedCollections.EmptyEnumerable<string>(), fileExists: File.Exists);
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (8)
157if (!File.Exists(cachedAssemblyPath)) 160if (entryMutex is null && !File.Exists(cachedAssemblyPath)) 166if (!File.Exists(cachedAssemblyPath)) 205return !File.Exists(Path.Combine(entryDir, cachedFileName)); 269if (!File.Exists(keyPath)) 369if (sourcePath is not null && File.Exists(sourcePath)) 558if (File.Exists(lastUsedPath)) 586if (File.Exists(createdPath))
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (3)
455if (!File.Exists(processFilePath)) 556if (!File.Exists(serverInfo.processFilePath)) 848if (!File.Exists(FilePath))
src\roslyn\src\Compilers\Shared\RuntimeHostInfo.cs (1)
102if (File.Exists(filePath))
vstest.console (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))
vstest.console.arm64 (2)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (2)
86if (!File.Exists(vsAttachPath)) 108if (File.Exists(path))