458 references to FileSystems
Microsoft.Build (74)
BackEnd\BuildManager\BuildManager.cs (2)
3488if (inputCacheFiles.Any(f => !FileSystems.Default.FileExists(f))) 3490LogErrorAndShutdown(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("InputCacheFilesDoNotExist", string.Join(";", inputCacheFiles.Where(f => !FileSystems.Default.FileExists(f)))));
BackEnd\BuildManager\BuildParameters.cs (1)
1097if (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)
86if (!FileSystems.Default.FileExists(msbuildLocation))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
547if (!FileSystems.Default.DirectoryExists(path)) 816if (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, 1122FileSystems.Default,
BackEnd\Components\Scheduler\Scheduler.cs (1)
2754shouldWriteHeader = !FileSystems.Default.FileExists(_debugDumpStateFilePath);
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
154if (!FileSystems.Default.FileExists(planName))
BackEnd\Shared\BuildRequestConfiguration.cs (1)
1024if (FileSystems.Default.FileExists(cacheFile))
BackEnd\Shared\BuildResult.cs (1)
749if (FileSystems.Default.DirectoryExists(resultsDirectory))
BackEnd\Shared\TargetResult.cs (1)
320if (!FileSystems.Default.FileExists(cacheFile))
BuildCheck\Checks\UntrustedLocationCheck.cs (1)
98if (locationFromEnv != null && FileSystems.Default.DirectoryExists(locationFromEnv))
BuildCheck\Infrastructure\EditorConfig\EditorConfigParser.cs (1)
55return EditorConfigFile.Parse(FileSystems.Default.ReadFileAllText(editorConfigFilePath));
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)
80while (FileSystems.Default.FileExists(fullPath)) 172IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 176if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 182builder.Append(FileSystems.Default.ReadFileAllText(file));
Definition\ProjectItem.cs (1)
500Expander<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)
2627if (FileSystems.Default.FileOrDirectoryExists(rootedPath))
Evaluation\IntrinsicFunctions.cs (1)
738if (FileSystems.Default.FileExists(pathToAssembly))
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);
InprocTrackingNativeMethods.cs (1)
210if (!FileSystems.Default.FileExists(fileTrackerPath))
Instance\ProjectInstance.cs (3)
2346Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(this, this, FileSystems.Default, _loggingContext); 2364Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(this, this, FileSystems.Default, _loggingContext); 2373FileSystems.Default,
Instance\ProjectItemInstance.cs (1)
1445Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(null, null, new BuiltInMetadataTable(null, this), FileSystems.Default);
Logging\BinaryLogger\ProjectImportsCollector.cs (2)
222if (checkFileExistence && !FileSystems.Default.FileExists(filePath)) 268if (FileSystems.Default.FileExists(_archiveFilePath))
TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
Utilities\EngineFileUtilities.cs (1)
603return existenceCache.Value.GetOrAdd(directory, directory => FileSystems.Default.DirectoryExists(directory));
Microsoft.Build.Engine.UnitTests (167)
BackEnd\BatchingEngine_Tests.cs (1)
76FileSystems.Default,
BackEnd\TaskRegistry_Tests.cs (2)
2057FileSystems.Default); 2119FileSystems.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 (138)
54Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 65Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 76Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 106FileSystems.Default, 128Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 152Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 169Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 830Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, ig, itemMetadata, FileSystems.Default); 855FileSystems.Default, 1465Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1497Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1550Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1576Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1598Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1647Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1679Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1710Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1731Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1773Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1789Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1807Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1824Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1838Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1860Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1885Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1908Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1930Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1952Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2047Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2062Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2082Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2098Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2114Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2130Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2146Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2162Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2178Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2195Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2212Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2229Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2247Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2265Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2281Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2296Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2312Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2329Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2347Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2364Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2374FileSystems.Default, 2384FileSystems.Default, 2400Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2418Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2435Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2452Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2469Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2485Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2501Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2516Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2529Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2545Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2564Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2581Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2597Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2621Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2640Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2663Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2692Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2726Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2742Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2760Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2778Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2794Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2810Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2825Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2841Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2859Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2884Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2899Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2929var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2959var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2981var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2997var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3013var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3031var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3047var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3066var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3082var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3101var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3243var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3263var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3272var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3288var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3321var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3340var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3354var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3367var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3381var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3403var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3437Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3460Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3494Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3537Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3553Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3572Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3587Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3602Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3623Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3645Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3661Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3677}), FileSystems.Default); 3698Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3719Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3743Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3768Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3795Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3846Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3866Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3883Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3907Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3931Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3955Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3988Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, itemsByType, itemMetadata, FileSystems.Default); 4025Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4062Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4091Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4105Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4117Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4153Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4416Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4442Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4488var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4500var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4512var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4842var expander = new Expander<ProjectProperty, ProjectItem>(properties, FileSystems.Default); 4859var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(properties, FileSystems.Default); 5253FileSystems.Default, 5289var result = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default, loggingContext) 5362var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default);
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)
403_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, itemMetadata, FileSystems.Default); 444FileSystems.Default); 468FileSystems.Default); 500FileSystems.Default);
Microsoft.Build.Framework (25)
BuildEnvironmentHelper.cs (5)
213if (FileSystems.Default.FileExists(msBuildExecutableCandidate)) 269vsVersion != CurrentVisualStudioVersion || !FileSystems.Default.DirectoryExists(vsInstallDir)) 294.Where(i => i.Version.Major == v.Major && FileSystems.Default.DirectoryExists(i.Path)) 337if (!string.IsNullOrEmpty(msBuildExePath) && FileSystems.Default.FileExists(msBuildExePath)) 619var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
FileUtilities.cs (3)
91return !FileSystems.Default.FileExists(lowerCased); 143private static readonly IFileSystem DefaultFileSystem = FileSystems.Default; 939foreach (string dir in FileSystems.Default.EnumerateDirectories(directory))
FileUtilities_TempFiles.cs (2)
195FrameworkErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique"); 237if (FileSystems.Default.DirectoryExists(Path))
Utilities\FileMatcher.cs (1)
90public static FileMatcher Default = new FileMatcher(FileSystems.Default, null);
Utilities\FrameworkLocationHelper.cs (7)
980if (FileSystems.Default.DirectoryExists(combinedPath)) 1148if (FileSystems.Default.DirectoryExists(programFilesReferenceAssemblyDirectory)) 1443FileSystems.Default.DirectoryExists, 1453(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) && 1454!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll")))) 1489if (!string.IsNullOrEmpty(frameworkPath) && FileSystems.Default.DirectoryExists(frameworkPath)) 1591if (FileSystems.Default.DirectoryExists(referencePath))
Utilities\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));
Microsoft.Build.Framework.UnitTests (7)
FileMatcher_Tests.cs (7)
132var fileMatcherWithCache = new FileMatcher(FileSystems.Default, new ConcurrentDictionary<string, IReadOnlyList<string>>()); 2492private static FileMatcher loopBackFileMatcher = new FileMatcher(FileSystems.Default, GetFileSystemEntriesLoopBack); 2661return FileSystems.Default.EnumerateFiles(path, searchPattern, searchOption); 2666return FileSystems.Default.EnumerateDirectories(path, searchPattern, searchOption); 2671return FileSystems.Default.EnumerateFileSystemEntries(path, searchPattern, searchOption); 2685return FileSystems.Default.FileExists(path); 2690return FileSystems.Default.FileOrDirectoryExists(path);
Microsoft.Build.Tasks.Core (127)
AddToWin32Manifest.cs (1)
104if (!FileSystems.Default.FileExists(absolutePath))
Al.cs (1)
313if (String.IsNullOrEmpty(pathToTool) || !FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(pathToTool)))
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130ErrorUtilities.VerifyThrow(FileSystems.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (2)
100if (FileSystems.Default.FileExists(newLocation)) 939if (!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)
AssemblyFolder.cs (1)
69if (FileSystems.Default.DirectoryExists(folder))
AxTlbBaseReference.cs (2)
131if (!FileSystems.Default.FileExists(wrapperPath)) 153if (!FileSystems.Default.FileExists(wrapperInfo.path))
AxTlbBaseTask.cs (3)
128if ((String.IsNullOrEmpty(ToolPath) || !FileSystems.Default.DirectoryExists(ToolPath)) && 129(String.IsNullOrEmpty(SdkToolsPath) || !FileSystems.Default.DirectoryExists(SdkToolsPath))) 182if (FileSystems.Default.FileExists(KeyFile))
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)) 2094if (FileSystems.Default.FileExists(fileSource)) 2163if (FileSystems.Default.FileExists(fileSource))
CodeTaskFactory.cs (2)
647if (!FileSystems.Default.FileExists(referenceAssembly)) 789_sourceCode = FileSystems.Default.ReadFileAllText(resolvedPath);
ComReferenceInfo.cs (1)
149this.strippedTypeLibPath = ComReference.StripTypeLibNumberFromPath(path, FileSystems.Default.FileExists);
Copy.cs (2)
289if (!FileSystems.Default.DirectoryExists(destinationFolder)) 1065if (DestinationFolder != null && FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(DestinationFolder.ItemSpec)))
CreateManifestResourceName.cs (1)
197if (FileSystems.Default.FileExists(dependentPath))
DebugUtils.cs (4)
80while (FileSystems.Default.FileExists(fullPath)) 172IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 176if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 182builder.Append(FileSystems.Default.ReadFileAllText(file));
Delete.cs (1)
129if (FileSystems.Default.FileExists(filePath))
DependencyFile.cs (1)
65if (FileSystems.Default.FileExists(FileName))
Exec.cs (1)
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))
GenerateResource.cs (10)
1170if (!FileSystems.Default.FileExists(outputFile.ItemSpec)) 1208if (!FileSystems.Default.FileExists(outputFile.ItemSpec)) 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)) 2737if (FileSystems.Default.FileExists(outFileOrDir) 2759if (FileSystems.Default.FileExists(currentOutputFile)) 2847if (!FileSystems.Default.DirectoryExists(shorterPath)) 3073if (!FileSystems.Default.FileExists(name))
GenerateTrustInfo.cs (1)
53if (BaseManifest != null && FileSystems.Default.FileExists(BaseManifest.ItemSpec))
GetAssembliesMetadata.cs (1)
42if (FileSystems.Default.FileExists(assemblyPath))
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)
319if (FileSystems.Default.FileExists(path)) 336if (FileSystems.Default.FileExists(resolvedPath))
ManifestUtil\SecurityUtil.cs (7)
193if (FileSystems.Default.DirectoryExists(path)) 656if (!FileSystems.Default.FileExists(path)) 851if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 856if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 864if (NativeMethodsShared.IsWindows && (toolPath == null || !FileSystems.Default.FileExists(toolPath))) 868if (toolPath == null || !FileSystems.Default.FileExists(toolPath)) 872if (!FileSystems.Default.FileExists(toolPath))
ManifestUtil\TrustInfo.cs (1)
655if (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)
587if (!FileSystems.Default.FileExists(existingFileName)) 592var targetExists = FileSystems.Default.FileExists(newFileName); 933if (FileSystems.Default.DirectoryExists(s_gacPath)) 1065if (FileSystems.Default.DirectoryExists(path)) 1082if (FileSystems.Default.FileExists(path))
RedistList.cs (2)
308if (FileSystems.Default.DirectoryExists(redistDirectory)) 1092if (FileSystems.Default.FileExists(subsetFilePath))
RegisterAssembly.cs (2)
215if (!FileSystems.Default.FileExists(assemblyPath)) 243if ((!FileSystems.Default.FileExists(typeLibPath)) ||
RemoveDir.cs (1)
70if (FileSystems.Default.DirectoryExists(directoryPath))
ResGen.cs (5)
260if (FileSystems.Default.FileExists(outputFiles[i].ItemSpec)) 277if (!FileSystems.Default.FileExists(outputFile.ItemSpec)) 442if ((String.IsNullOrEmpty(ToolPath) || !FileSystems.Default.DirectoryExists(ToolPath)) && 443(String.IsNullOrEmpty(SdkToolsPath) || !FileSystems.Default.DirectoryExists(SdkToolsPath))) 510if (!FileSystems.Default.FileExists(pathToTool))
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))
ResolveKeySource.cs (1)
209if (!FileSystems.Default.FileExists(CertificateFile))
ResolveNativeReference.cs (1)
124if (String.IsNullOrEmpty(path) || !FileSystems.Default.FileExists(path))
ResourceHandling\MSBuildResXReader.cs (2)
270byte[] byteArray = FileSystems.Default.ReadFileAllBytes(fileName); 279byte[] byteArray = FileSystems.Default.ReadFileAllBytes(fileName);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (5)
476taskInfo.SourceCode = FileSystems.Default.ReadFileAllText(resolvedPath); 582if (FileSystems.Default.FileExists(reference)) 600.FirstOrDefault(p => FileSystems.Default.FileExists(Path.Combine(p, assemblyFileName))); 826if (deleteSourceCodeFile && sourceCodePath is not null && FileSystems.Default.FileExists(sourceCodePath)) 832if (!_compileForOutOfProcess && !string.IsNullOrEmpty(_assemblyPath) && FileSystems.Default.FileExists(_assemblyPath))
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
47return possibleLocations.Select(possibleLocation => possibleLocation()).FirstOrDefault(FileSystems.Default.FileExists);
SGen.cs (3)
310if (String.IsNullOrEmpty(pathToTool) || !FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(pathToTool))) 332if (string.IsNullOrEmpty(reference) || !FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(reference))) 421serializationAssemblyPathExists = FileSystems.Default.FileExists(SerializationAssemblyPath);
StateFileBase.cs (3)
45if (FileSystems.Default.FileExists(stateFile)) 83if (!string.IsNullOrEmpty(stateFile) && FileSystems.Default.FileExists(stateFile)) 140if (FileSystems.Default.FileExists(stateFile))
UnregisterAssembly.cs (2)
157if (FileSystems.Default.FileExists(assemblyPath)) 231if (FileSystems.Default.FileExists(typeLibPath))
Unzip.cs (1)
125if (!FileSystems.Default.FileExists(sourceFilePath))
XamlTaskFactory\TaskParser.cs (2)
143if (!FileSystems.Default.FileExists(contentOrFile)) 161if (FileSystems.Default.FileExists(maybeFullPath))
Microsoft.Build.UnitTests.Shared (10)
ObjectModelHelpers.cs (8)
578Assert.True(FileSystems.Default.FileExists(Path.Combine(TempProjectDir, fileRelativePath)), message); 877if (FileSystems.Default.DirectoryExists(dir)) 1052if (FileSystems.Default.FileExists(files[i])) 1671Assert.True(FileSystems.Default.DirectoryExists(rootDirectory), $"Directory {rootDirectory} does not exist"); 1688Assert.True(FileSystems.Default.DirectoryExists(directoryName)); 1691Assert.True(FileSystems.Default.FileExists(fullPath)); 1876if (FileSystems.Default.FileExists(path)) 1882if (FileSystems.Default.DirectoryExists(directory) && (Directory.GetFileSystemEntries(directory).Length == 0))
TestEnvironment.cs (2)
309Assert.True(!(createFolder ^ FileSystems.Default.DirectoryExists(folder.Path))); 762Assert.True(FileSystems.Default.FileExists(Path), $"A file expected as an output does not exist: {Path}");
Microsoft.Build.Utilities.Core (33)
DebugUtils.cs (4)
80while (FileSystems.Default.FileExists(fullPath)) 172IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 176if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 182builder.Append(FileSystems.Default.ReadFileAllText(file));
InprocTrackingNativeMethods.cs (1)
210if (!FileSystems.Default.FileExists(fileTrackerPath))
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)
534if (string.IsNullOrWhiteSpace(pathToTool) || (ToolPath == null && !FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(pathToTool)))) 555bool isExistingFile = FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(pathToTool)); 1431return FileSystems.Default.DirectoryExists(TaskEnvironment.GetAbsolutePath(path)); 1439.FirstOrDefault(fullPath => !string.IsNullOrEmpty(fullPath) && FileSystems.Default.FileExists(TaskEnvironment.GetAbsolutePath(fullPath))); 1722if (_temporaryBatchFile != null && FileSystems.Default.FileExists(_temporaryBatchFile))
TrackedDependencies\FileTracker.cs (3)
434if (FileSystems.Default.FileExists(trackerPath)) 534if (!FileSystems.Default.FileExists(trackerPath)) 580if (FileSystems.Default.FileExists(progfilesPath))
TrackedDependencies\FlatTrackingData.cs (1)
646if (!FileSystems.Default.DirectoryExists(markerDirectory))
TrackedDependencies\TrackedDependencies.cs (1)
45if (!FileMatcher.HasWildcards(directoryName) && FileSystems.Default.DirectoryExists(directoryName))
MSBuild (15)
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)
80while (FileSystems.Default.FileExists(fullPath)) 172IEnumerable<string> files = FileSystems.Default.EnumerateFiles(DebugDumpPath, "MSBuild*failure.txt"); 176if (FileSystems.Default.GetLastWriteTimeUtc(file) >= fromTimeUtc) 182builder.Append(FileSystems.Default.ReadFileAllText(file));
ProjectSchemaValidationHandler.cs (1)
49if (FileSystems.Default.FileExists(schemaFile))
TaskEngineAssemblyResolver.cs (1)
106if (FileSystems.Default.FileExists(_taskAssemblyFile))
XMake.cs (5)
399if (!FileSystems.Default.FileExists(path)) 3121if (FileSystems.Default.DirectoryExists(projectFile)) 3130InitializationException.VerifyThrow(FileSystems.Default.FileExists(projectFile), "ProjectNotFoundError", projectFile); 3970if (FileSystems.Default.FileExists(testFile)) 4138InitializationException.VerifyThrow(FileSystems.Default.FileExists(fileName), "SchemaNotFoundError", fileName);