483 references to FileSystems
Microsoft.Build (95)
BackEnd\BuildManager\BuildManager.cs (2)
3407if (inputCacheFiles.Any(f => !FileSystems.Default.FileExists(f))) 3409LogErrorAndShutdown(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("InputCacheFilesDoNotExist", string.Join(";", inputCacheFiles.Where(f => !FileSystems.Default.FileExists(f)))));
BackEnd\BuildManager\BuildParameters.cs (1)
1106if (FileSystems.Default.FileExists(path))
BackEnd\BuildManager\EnvironmentVariableValidator.cs (1)
43if (FileSystems.Default.DirectoryExists(dotnetHostPath))
BackEnd\Components\Communications\DetouredNodeLauncher.cs (1)
64if (!FileSystems.Default.FileExists(launchData.MSBuildLocation))
BackEnd\Components\Communications\NodeLauncher.cs (1)
74if (!FileSystems.Default.FileExists(msbuildLocation))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
509if (!FileSystems.Default.DirectoryExists(path)) 736if (FileSystems.Default.FileExists(appHostPath))
BackEnd\Components\Communications\RarNodeLauncher.cs (2)
62IEnumerable<string> pipeNames = FileSystems.Default.EnumerateFiles(NamedPipeRoot); 69return FileSystems.Default.FileExists(_pipeName);
BackEnd\Components\FileAccesses\FileAccessManager.cs (1)
148_ = FileSystems.Default.FileExists(filePath);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (4)
75FileSystems.Default, 182FileSystems.Default, 218FileSystems.Default, 336FileSystems.Default,
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
351if (FileSystems.Default.FileExists(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
BackEnd\Components\RequestBuilder\IntrinsicTasks\PropertyGroupIntrinsicTask.cs (1)
71FileSystems.Default,
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
106_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(_lookup, _lookup, new StringMetadataTable(_metadata), FileSystems.Default, loggingContext);
BackEnd\Components\RequestBuilder\TargetEntry.cs (4)
184_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(baseLookup, baseLookup, FileSystems.Default, loggingContext); 359FileSystems.Default, 621FileSystems.Default, 713FileSystems.Default,
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
408FileSystems.Default, 1108FileSystems.Default,
BackEnd\Components\Scheduler\Scheduler.cs (1)
2707shouldWriteHeader = !FileSystems.Default.FileExists(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId));
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
154if (!FileSystems.Default.FileExists(planName))
BackEnd\Shared\BuildRequestConfiguration.cs (1)
1004if (FileSystems.Default.FileExists(cacheFile))
BackEnd\Shared\BuildResult.cs (1)
727if (FileSystems.Default.DirectoryExists(resultsDirectory))
BackEnd\Shared\TargetResult.cs (1)
320if (!FileSystems.Default.FileExists(cacheFile))
BuildCheck\Checks\UntrustedLocationCheck.cs (1)
84if (locationFromEnv != null && FileSystems.Default.DirectoryExists(locationFromEnv))
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (1)
55return EditorConfigFile.Parse(FileSystems.Default.ReadFileAllText(editorConfigFilePath));
BuildEnvironmentHelper.cs (5)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 279vsVersion != CurrentVisualStudioVersion || !FileSystems.Default.DirectoryExists(vsInstallDir)) 304.Where(i => i.Version.Major == v.Major && FileSystems.Default.DirectoryExists(i.Path)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
Construction\ProjectRootElement.cs (3)
1667ErrorUtilities.VerifyThrowInvalidOperation(FileSystems.Default.FileExists(path), "FileToReloadFromDoesNotExist", path); 1972if (!FileSystems.Default.FileExists(path)) 1997string contents = FileSystems.Default.ReadFileAllText(path);
Construction\Solution\SolutionFile.cs (2)
635if (!FileSystems.Default.FileExists(_solutionFile)) 671JsonDocument text = JsonDocument.Parse(FileSystems.Default.ReadFileAllText(solutionFilterFile), options);
DebugUtils.cs (4)
209while (FileSystems.Default.FileExists(fullPath)) 306IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 310if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 316builder.Append(FileSystems.Default.ReadFileAllText(file));
Definition\ProjectItem.cs (1)
505Expander<ProjectProperty, ProjectItem> expander = new Expander<ProjectProperty, ProjectItem>(null, null, new BuiltInMetadataTable(this), FileSystems.Default);
Definition\Toolset.cs (3)
862_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, FileSystems.Default, loggingContext); 900overrideDirectoryExists = FileSystems.Default.DirectoryExists(_overrideTasksPath); 949FileSystems.Default);
Definition\ToolsetConfigurationReader.cs (1)
275FileSystems.Default.FileExists(BuildEnvironmentHelper.Instance.CurrentMSBuildConfigurationFile))
Definition\ToolsetReader.cs (3)
191if (FileSystems.Default.DirectoryExists(xbuildToolsetsDir)) 446Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(initialProperties, FileSystems.Default); 564expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(initialProperties, FileSystems.Default);
Evaluation\Context\EvaluationContext.cs (1)
70FileSystem = fileSystem ?? new CachingFileSystemWrapper(FileSystems.Default);
Evaluation\Evaluator.cs (2)
1905if (FileSystems.Default.FileExists(dotnetExe)) 2260if (!FileSystems.Default.FileExists(importFileUnescaped))
Evaluation\Expander.cs (1)
2622if (FileSystems.Default.FileOrDirectoryExists(rootedPath))
Evaluation\IntrinsicFunctions.cs (1)
738if (FileSystems.Default.FileExists(pathToAssembly))
FileMatcher.cs (1)
90public static FileMatcher Default = new FileMatcher(FileSystems.Default, null);
FileSystem\MSBuildFileSystemBase.cs (12)
25public virtual TextReader ReadFile(string path) => FileSystems.Default.ReadFile(path); 30public virtual Stream GetFileStream(string path, FileMode mode, FileAccess access, FileShare share) => FileSystems.Default.GetFileStream(path, mode, access, share); 35public virtual string ReadFileAllText(string path) => FileSystems.Default.ReadFileAllText(path); 40public virtual byte[] ReadFileAllBytes(string path) => FileSystems.Default.ReadFileAllBytes(path); 46=> FileSystems.Default.EnumerateFiles(path, searchPattern, searchOption); 52=> FileSystems.Default.EnumerateDirectories(path, searchPattern, searchOption); 58=> FileSystems.Default.EnumerateFileSystemEntries(path, searchPattern, searchOption); 63public virtual FileAttributes GetAttributes(string path) => FileSystems.Default.GetAttributes(path); 68public virtual DateTime GetLastWriteTimeUtc(string path) => FileSystems.Default.GetLastWriteTimeUtc(path); 73public virtual bool DirectoryExists(string path) => FileSystems.Default.DirectoryExists(path); 78public virtual bool FileExists(string path) => FileSystems.Default.FileExists(path); 83public virtual bool FileOrDirectoryExists(string path) => FileSystems.Default.FileOrDirectoryExists(path);
FrameworkLocationHelper.cs (7)
960if (FileSystems.Default.DirectoryExists(combinedPath)) 1130if (FileSystems.Default.DirectoryExists(programFilesReferenceAssemblyDirectory)) 1427FileSystems.Default.DirectoryExists, 1437(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1438!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll")))) 1473if (!string.IsNullOrEmpty(frameworkPath) && FileSystems.Default.DirectoryExists(frameworkPath)) 1575if (FileSystems.Default.DirectoryExists(referencePath))
InprocTrackingNativeMethods.cs (1)
210if (!FileSystems.Default.FileExists(fileTrackerPath))
Instance\ProjectInstance.cs (3)
2330Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(this, this, FileSystems.Default, _loggingContext); 2348Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(this, this, FileSystems.Default, _loggingContext); 2357FileSystems.Default,
Instance\ProjectItemInstance.cs (1)
1432Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(null, null, new BuiltInMetadataTable(null, this), FileSystems.Default);
Logging\BinaryLogger\ProjectImportsCollector.cs (3)
67if (!FileSystems.Default.DirectoryExists(cacheDirectory)) 225if (checkFileExistence && !FileSystems.Default.FileExists(filePath)) 271if (FileSystems.Default.FileExists(_archiveFilePath))
TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
TaskFactoryUtilities.cs (7)
140if (!string.IsNullOrEmpty(assemblyPath) && FileSystems.Default.FileExists(assemblyPath)) 166Assembly assembly = Assembly.Load(FileSystems.Default.ReadFileAllBytes(assemblyPath)); 190if (!FileSystems.Default.FileExists(manifestPath)) 258if (FileSystems.Default.FileExists(path)) 260return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path)); 266if (FileSystems.Default.FileExists(path)) 268return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path));
Utilities\EngineFileUtilities.cs (1)
603return existenceCache.Value.GetOrAdd(directory, directory => FileSystems.Default.DirectoryExists(directory));
Microsoft.Build.Engine.OM.UnitTests (9)
BuildEnvironmentHelper.cs (5)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 279vsVersion != CurrentVisualStudioVersion || !FileSystems.Default.DirectoryExists(vsInstallDir)) 304.Where(i => i.Version.Major == v.Major && FileSystems.Default.DirectoryExists(i.Path)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
DebugUtils.cs (4)
209while (FileSystems.Default.FileExists(fullPath)) 306IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 310if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 316builder.Append(FileSystems.Default.ReadFileAllText(file));
Microsoft.Build.Engine.UnitTests (179)
BackEnd\BatchingEngine_Tests.cs (1)
76FileSystems.Default,
BackEnd\TaskRegistry_Tests.cs (2)
2058FileSystems.Default); 2120FileSystems.Default,
Evaluation\Evaluator_Tests.cs (3)
4485Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, FileSystems.Default); 4499FileSystems.Default, 4517FileSystems.Default,
Evaluation\Expander_Tests.cs (143)
48Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 59Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 70Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 100FileSystems.Default, 122Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 146Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 163Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 824Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, ig, itemMetadata, FileSystems.Default); 849FileSystems.Default, 1459Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1491Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1544Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1570Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1592Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1641Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1673Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1704Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1725Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1767Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1783Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1801Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1818Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1832Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1854Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1879Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1902Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1924Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1946Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2041Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2056Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2076Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2092Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2108Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2124Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2140Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2156Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2172Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2189Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2206Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2223Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2241Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2259Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2275Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2290Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2306Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2323Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2341Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2358Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2368FileSystems.Default, 2378FileSystems.Default, 2394Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2412Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2429Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2446Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2463Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2479Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2495Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2510Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2523Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2539Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2558Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2575Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2591Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2615Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2634Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2657Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2686Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2720Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2736Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2754Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2772Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2788Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2804Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2819Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2835Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2853Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2878Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2893Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2923var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2953var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2975var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2991var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3007var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3025var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3041var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3060var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3076var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3095var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3108var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3120var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3131var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3144var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3155var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3167var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3178var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3191var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3202var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3215var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3237var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3257var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3266var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3282var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3315var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3334var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3348var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3361var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3375var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3397var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3431Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3454Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3488Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3531Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3547Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3566Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3581Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3596Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3617Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3671}), FileSystems.Default); 3692Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3762Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3789Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3840Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3860Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3877Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3901Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3925Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3949Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3982Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, itemsByType, itemMetadata, FileSystems.Default); 4019Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4056Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4085Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4099Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4111Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4147Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4410Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4436Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4482var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4494var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4506var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4836var expander = new Expander<ProjectProperty, ProjectItem>(properties, FileSystems.Default); 4853var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(properties, FileSystems.Default); 5246FileSystems.Default, 5282var result = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default, loggingContext)
Evaluation\ItemSpec_Tests.cs (1)
95(IFileSystem)FileSystems.Default,
ExpressionTree_Tests.cs (18)
29Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 45Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 70Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 89Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 101Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), new ItemDictionary<ProjectItemInstance>(), FileSystems.Default, null); 118FileSystems.Default); 151Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, new ItemDictionary<ProjectItemInstance>(), FileSystems.Default, null); 189Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), itemBag, FileSystems.Default, null); 232Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 264Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 285Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 314Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, FileSystems.Default, null); 331Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), itemBag, FileSystems.Default, null); 341FileSystems.Default); 418Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, new ItemDictionary<ProjectItemInstance>(), FileSystems.Default, null); 450FileSystems.Default); 486FileSystems.Default); 505Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default);
ExpressionTreeExpression_Tests.cs (4)
404_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, itemMetadata, FileSystems.Default); 445FileSystems.Default); 469FileSystems.Default); 501FileSystems.Default);
FileMatcher_Tests.cs (7)
133var fileMatcherWithCache = new FileMatcher(FileSystems.Default, new ConcurrentDictionary<string, IReadOnlyList<string>>()); 2493private static FileMatcher loopBackFileMatcher = new FileMatcher(FileSystems.Default, GetFileSystemEntriesLoopBack); 2662return FileSystems.Default.EnumerateFiles(path, searchPattern, searchOption); 2667return FileSystems.Default.EnumerateDirectories(path, searchPattern, searchOption); 2672return FileSystems.Default.EnumerateFileSystemEntries(path, searchPattern, searchOption); 2686return FileSystems.Default.FileExists(path); 2691return FileSystems.Default.FileOrDirectoryExists(path);
Microsoft.Build.Framework (7)
FileUtilities.cs (3)
91return !FileSystems.Default.FileExists(lowerCased); 143private static readonly IFileSystem DefaultFileSystem = FileSystems.Default; 885foreach (string dir in FileSystems.Default.EnumerateDirectories(directory))
FileUtilities_TempFiles.cs (2)
186FrameworkErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique"); 228if (FileSystems.Default.DirectoryExists(Path))
ItemSpecModifiers.cs (2)
308if (FileSystems.Default.FileExists(unescapedItemSpec)) 324if (FileSystems.Default.FileExists(unescapedItemSpec))
Microsoft.Build.Tasks.Core (108)
AddToWin32Manifest.cs (1)
93if (string.IsNullOrEmpty(ApplicationManifest.ItemSpec) || !FileSystems.Default.FileExists(ApplicationManifest?.ItemSpec))
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130ErrorUtilities.VerifyThrow(FileSystems.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (1)
974if (!FileSystems.Default.FileExists(path))
AssemblyDependency\GenerateBindingRedirects.cs (1)
108var outputExists = FileSystems.Default.FileExists(OutputAppConfigFile.ItemSpec);
AssemblyDependency\ResolveAssemblyReference.cs (1)
3296(p, searchPattern) => FileSystems.Default.EnumerateDirectories(p, searchPattern)
BootstrapperUtil\BootstrapperBuilder.cs (13)
363if (!FileSystems.Default.FileExists(setupSourceFile)) 531if (FileSystems.Default.DirectoryExists(startDirectory)) 537if (FileSystems.Default.FileExists(resourceFilePath)) 601if (FileSystems.Default.DirectoryExists(packagePath)) 810bool fileExists = FileSystems.Default.FileExists(filePath); 811bool schemaExists = FileSystems.Default.FileExists(schemaPath); 938if (FileSystems.Default.FileExists(strLangManifestFilename)) 1453if (!FileSystems.Default.FileExists(packageFileSource.Value)) 1471if (!FileSystems.Default.FileExists(packageFileSource.Value)) 1524if (FileSystems.Default.FileExists(eulaAttribute.Value)) 1582if (!FileSystems.Default.DirectoryExists(strFolderPath)) 2093if (FileSystems.Default.FileExists(fileSource)) 2162if (FileSystems.Default.FileExists(fileSource))
BuildEnvironmentHelper.cs (5)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 279vsVersion != CurrentVisualStudioVersion || !FileSystems.Default.DirectoryExists(vsInstallDir)) 304.Where(i => i.Version.Major == v.Major && FileSystems.Default.DirectoryExists(i.Path)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
Copy.cs (2)
292if (!FileSystems.Default.DirectoryExists(destinationFolder)) 1056if (DestinationFolder != null && FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(DestinationFolder.ItemSpec)))
CreateManifestResourceName.cs (1)
193if (FileSystems.Default.FileExists(Path.Combine(Path.GetDirectoryName(fileName), conventionDependentUpon)))
DebugUtils.cs (4)
209while (FileSystems.Default.FileExists(fullPath)) 306IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 310if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 316builder.Append(FileSystems.Default.ReadFileAllText(file));
Delete.cs (1)
129if (FileSystems.Default.FileExists(filePath))
DependencyFile.cs (1)
65if (FileSystems.Default.FileExists(FileName))
Exec.cs (2)
509if (!FileSystems.Default.FileExists(systemCmd)) 534if (!FileSystems.Default.DirectoryExists(_workingDirectory))
FileIO\GetFileHash.cs (1)
93if (!FileSystems.Default.FileExists(filePath))
FileIO\ReadLinesFromFile.cs (1)
46if (FileSystems.Default.FileExists(filePath))
FileIO\VerifyFileHash.cs (1)
48if (!FileSystems.Default.FileExists(filePath))
FileMatcher.cs (1)
90public static FileMatcher Default = new FileMatcher(FileSystems.Default, null);
GenerateResource.cs (7)
1407if (!FileSystems.Default.FileExists(Sources[i].ItemSpec)) 1432if (nothingOutOfDate && FileSystems.Default.FileExists(Sources[0].ItemSpec)) 2524if (assemblyFile.ItemSpec != null && FileSystems.Default.FileExists(assemblyFile.ItemSpec)) 2675if (!FileSystems.Default.DirectoryExists(currentOutputDirectory)) 2739if (FileSystems.Default.FileExists(outFileOrDir) 2761if (FileSystems.Default.FileExists(currentOutputFile)) 2849if (!FileSystems.Default.DirectoryExists(shorterPath))
GetSDKReferenceFiles.cs (4)
927string cacheFile = FileSystems.Default.EnumerateFiles(_cacheFileDirectory, GetCacheFileName(sdkIdentity, sdkRoot, "*")).FirstOrDefault(); 1088DateTime referencesCacheFileLastWriteTimeUtc = FileSystems.Default.GetLastWriteTimeUtc(referencesCacheFile); 1099DateTime currentCodeLastWriteTime = FileSystems.Default.GetLastWriteTimeUtc(codeBase.LocalPath); 1100if (FileSystems.Default.FileExists(referencesCacheFile) && currentCodeLastWriteTime < referencesCacheFileLastWriteTimeUtc)
ManifestUtil\AssemblyIdentity.cs (6)
199if (!FileSystems.Default.FileExists(path)) 273if (!FileSystems.Default.FileExists(path)) 307if (!FileSystems.Default.FileExists(path)) 333if (!FileSystems.Default.FileExists(path)) 535if (FileSystems.Default.FileExists(path) && IsEqual(this, FromFile(path), specificVersion)) 542if (FileSystems.Default.FileExists(path) && IsEqual(this, FromManifest(path), specificVersion))
ManifestUtil\DeployManifest.cs (2)
150if (FileSystems.Default.FileExists(redistListFilePath)) 583if (FileSystems.Default.FileExists(manifestPath))
ManifestUtil\LauncherBuilder.cs (2)
83if (!FileSystems.Default.FileExists(LauncherPath)) 106if (!FileSystems.Default.DirectoryExists(strFolderPath))
ManifestUtil\Manifest.cs (2)
314if (FileSystems.Default.FileExists(path)) 331if (FileSystems.Default.FileExists(resolvedPath))
ManifestUtil\SecurityUtil.cs (6)
661if (!FileSystems.Default.FileExists(path)) 856if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 861if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 869if (NativeMethodsShared.IsWindows && (toolPath == null || !FileSystems.Default.FileExists(toolPath))) 873if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 877if (!FileSystems.Default.FileExists(toolPath))
ManifestUtil\TrustInfo.cs (1)
653if (FileSystems.Default.FileExists(path))
ManifestUtil\Util.cs (1)
268if (!FileSystems.Default.DirectoryExists(logPath))
Move.cs (6)
215if (FileSystems.Default.DirectoryExists(destinationFile)) 221if (FileSystems.Default.DirectoryExists(sourceFile)) 231if (!FileSystems.Default.FileExists(sourceFile)) 238if (OverwriteReadOnlyFiles && FileSystems.Default.FileExists(destinationFile)) 245if (!string.IsNullOrEmpty(destinationFolder) && !FileSystems.Default.DirectoryExists(destinationFolder)) 280if (FileSystems.Default.FileExists(destinationFile))
MSBuild.cs (1)
311if (FileSystems.Default.FileExists(projectPath) || (skipNonExistProjects == SkipNonExistentProjectsBehavior.Build))
NativeMethods.cs (5)
845if (!FileSystems.Default.FileExists(existingFileName)) 850var targetExists = FileSystems.Default.FileExists(newFileName); 1330if (FileSystems.Default.DirectoryExists(s_gacPath)) 1462if (FileSystems.Default.DirectoryExists(path)) 1479if (FileSystems.Default.FileExists(path))
RedistList.cs (2)
308if (FileSystems.Default.DirectoryExists(redistDirectory)) 1092if (FileSystems.Default.FileExists(subsetFilePath))
RemoveDir.cs (1)
70if (FileSystems.Default.DirectoryExists(directoryPath))
ResGenDependencies.cs (1)
232if (FileSystems.Default.FileExists(FileName))
ResolveCodeAnalysisRuleSet.cs (4)
87if (FileSystems.Default.FileExists(fullName)) 99if (FileSystems.Default.FileExists(fullName)) 112if (FileSystems.Default.FileExists(fullName)) 118else if (FileSystems.Default.FileExists(CodeAnalysisRuleSet))
ResourceHandling\MSBuildResXReader.cs (2)
270byte[] byteArray = FileSystems.Default.ReadFileAllBytes(fileName); 279byte[] byteArray = FileSystems.Default.ReadFileAllBytes(fileName);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (5)
465taskInfo.SourceCode = FileSystems.Default.ReadFileAllText(resolvedPath); 571if (FileSystems.Default.FileExists(reference)) 589.FirstOrDefault(p => FileSystems.Default.FileExists(Path.Combine(p, assemblyFileName))); 815if (deleteSourceCodeFile && sourceCodePath is not null && FileSystems.Default.FileExists(sourceCodePath)) 821if (!_compileForOutOfProcess && !string.IsNullOrEmpty(_assemblyPath) && FileSystems.Default.FileExists(_assemblyPath))
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
47return possibleLocations.Select(possibleLocation => possibleLocation()).FirstOrDefault(FileSystems.Default.FileExists);
StateFileBase.cs (3)
45if (FileSystems.Default.FileExists(stateFile)) 83if (!string.IsNullOrEmpty(stateFile) && FileSystems.Default.FileExists(stateFile)) 140if (FileSystems.Default.FileExists(stateFile))
TaskFactoryUtilities.cs (7)
140if (!string.IsNullOrEmpty(assemblyPath) && FileSystems.Default.FileExists(assemblyPath)) 166Assembly assembly = Assembly.Load(FileSystems.Default.ReadFileAllBytes(assemblyPath)); 190if (!FileSystems.Default.FileExists(manifestPath)) 258if (FileSystems.Default.FileExists(path)) 260return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path)); 266if (FileSystems.Default.FileExists(path)) 268return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path));
Unzip.cs (1)
125if (!FileSystems.Default.FileExists(sourceFilePath))
Microsoft.Build.UnitTests.Shared (10)
ObjectModelHelpers.cs (8)
579Assert.True(FileSystems.Default.FileExists(Path.Combine(TempProjectDir, fileRelativePath)), message); 874if (FileSystems.Default.DirectoryExists(dir)) 1049if (FileSystems.Default.FileExists(files[i])) 1668Assert.True(FileSystems.Default.DirectoryExists(rootDirectory), $"Directory {rootDirectory} does not exist"); 1685Assert.True(FileSystems.Default.DirectoryExists(directoryName)); 1688Assert.True(FileSystems.Default.FileExists(fullPath)); 1873if (FileSystems.Default.FileExists(path)) 1879if (FileSystems.Default.DirectoryExists(directory) && (Directory.GetFileSystemEntries(directory).Length == 0))
TestEnvironment.cs (2)
309Assert.True(!(createFolder ^ FileSystems.Default.DirectoryExists(folder.Path))); 753Assert.True(FileSystems.Default.FileExists(Path), $"A file expected as an output does not exist: {Path}");
Microsoft.Build.Utilities.Core (41)
BuildEnvironmentHelper.cs (5)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 279vsVersion != CurrentVisualStudioVersion || !FileSystems.Default.DirectoryExists(vsInstallDir)) 304.Where(i => i.Version.Major == v.Major && FileSystems.Default.DirectoryExists(i.Path)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
DebugUtils.cs (4)
209while (FileSystems.Default.FileExists(fullPath)) 306IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 310if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 316builder.Append(FileSystems.Default.ReadFileAllText(file));
FileMatcher.cs (1)
90public static FileMatcher Default = new FileMatcher(FileSystems.Default, null);
FrameworkLocationHelper.cs (7)
960if (FileSystems.Default.DirectoryExists(combinedPath)) 1130if (FileSystems.Default.DirectoryExists(programFilesReferenceAssemblyDirectory)) 1427FileSystems.Default.DirectoryExists, 1437(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1438!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll")))) 1473if (!string.IsNullOrEmpty(frameworkPath) && FileSystems.Default.DirectoryExists(frameworkPath)) 1575if (FileSystems.Default.DirectoryExists(referencePath))
PlatformManifest.cs (1)
97if (FileSystems.Default.FileExists(platformManifestPath))
SDKManifest.cs (1)
316if (FileSystems.Default.FileExists(sdkManifestPath))
ToolLocationHelper.cs (16)
852if (FileSystems.Default.DirectoryExists(propsFileLocation)) 1041if (!FileSystems.Default.DirectoryExists(winmdLocation)) 1139if (FileSystems.Default.DirectoryExists(contractPath)) 1503if (!FileSystems.Default.FileExists(fullPath)) 1766if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll"))) 1840if (legacyMsCorlib20Path != null && FileSystems.Default.FileExists(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll"))) 1857if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll"))) 2336if (FileSystems.Default.DirectoryExists(path)) 2632bool platformSDKManifestExists = FileSystems.Default.FileExists(platformSDKManifest); 2904if (FileSystems.Default.DirectoryExists(localAppdataFolder)) 3119if (!FileSystems.Default.FileExists(redistFilePath)) 3204if (!FileSystems.Default.DirectoryExists(pathToReturn)) 3210else if (!string.IsNullOrEmpty(redirectPath) && FileSystems.Default.DirectoryExists(redirectPath)) 3815if (FileSystems.Default.DirectoryExists(dotNetFx20Path)) 3967if (FileSystems.Default.DirectoryExists(dotNextFx30RefPath)) 3974if (FileSystems.Default.DirectoryExists(dotNextFx35RefPath))
ToolTask.cs (5)
532if (string.IsNullOrWhiteSpace(pathToTool) || (ToolPath == null && !FileSystems.Default.FileExists(pathToTool))) 553bool isExistingFile = FileSystems.Default.FileExists(pathToTool); 1341return FileSystems.Default.DirectoryExists(path); 1349.FirstOrDefault(fullPath => !string.IsNullOrEmpty(fullPath) && FileSystems.Default.FileExists(fullPath)); 1632if (_temporaryBatchFile != null && FileSystems.Default.FileExists(_temporaryBatchFile))
TrackedDependencies\TrackedDependencies.cs (1)
45if (!FileMatcher.HasWildcards(directoryName) && FileSystems.Default.DirectoryExists(directoryName))
MSBuild (34)
BuildEnvironmentHelper.cs (5)
223if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 279vsVersion != CurrentVisualStudioVersion || !FileSystems.Default.DirectoryExists(vsInstallDir)) 304.Where(i => i.Version.Major == v.Major && FileSystems.Default.DirectoryExists(i.Path)) 347if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 631var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
CommandLine\CommandLineParser.cs (4)
337else if (!FileSystems.Default.FileExists(responseFile)) 555if (FileSystems.Default.DirectoryExists(projectFile)) 562InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 665if (FileSystems.Default.FileExists(autoResponseFile))
DebugUtils.cs (4)
209while (FileSystems.Default.FileExists(fullPath)) 306IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 310if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 316builder.Append(FileSystems.Default.ReadFileAllText(file));
FrameworkLocationHelper.cs (7)
960if (FileSystems.Default.DirectoryExists(combinedPath)) 1130if (FileSystems.Default.DirectoryExists(programFilesReferenceAssemblyDirectory)) 1427FileSystems.Default.DirectoryExists, 1437(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1438!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll")))) 1473if (!string.IsNullOrEmpty(frameworkPath) && FileSystems.Default.DirectoryExists(frameworkPath)) 1575if (FileSystems.Default.DirectoryExists(referencePath))
ProjectSchemaValidationHandler.cs (1)
49if (FileSystems.Default.FileExists(schemaFile))
TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
TaskFactoryUtilities.cs (7)
140if (!string.IsNullOrEmpty(assemblyPath) && FileSystems.Default.FileExists(assemblyPath)) 166Assembly assembly = Assembly.Load(FileSystems.Default.ReadFileAllBytes(assemblyPath)); 190if (!FileSystems.Default.FileExists(manifestPath)) 258if (FileSystems.Default.FileExists(path)) 260return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path)); 266if (FileSystems.Default.FileExists(path)) 268return Assembly.Load(FileSystems.Default.ReadFileAllBytes(path));
XMake.cs (5)
399if (!FileSystems.Default.FileExists(path)) 3108if (FileSystems.Default.DirectoryExists(projectFile)) 3117InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 3957if (FileSystems.Default.FileExists(testFile)) 4115InitializationException.VerifyThrow(FileSystems.Default.FileExists(fileName), "SchemaNotFoundError", fileName);