458 references to Default
Microsoft.Build (73)
BackEnd\BuildManager\BuildManager.cs (2)
3484if (inputCacheFiles.Any(f => !FileSystems.Default.FileExists(f))) 3486LogErrorAndShutdown(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\CurrentHost.cs (2)
33if (FileSystems.Default.FileExists(dotnetExe)) 53if (FileSystems.Default.FileExists(dotnetExe))
BackEnd\Components\Communications\NodeLauncher.cs (1)
74if (!FileSystems.Default.FileExists(msbuildLocation))
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
509if (!FileSystems.Default.DirectoryExists(path)) 755if (FileSystems.Default.FileExists(appHostPath))
BackEnd\Components\Communications\RarNodeLauncher.cs (2)
62IEnumerable<string> pipeNames = FileSystems.Default.EnumerateFiles(NamedPipeRoot); 69return FileSystems.Default.FileExists(_pipeName);
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)
2706shouldWriteHeader = !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));
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);
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)
1435Expander<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 (173)
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 (144)
55Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 66Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 77Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 107FileSystems.Default, 129Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 153Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 170Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 831Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, ig, itemMetadata, FileSystems.Default); 856FileSystems.Default, 1466Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1498Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1551Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1577Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1599Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1648Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1680Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1711Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1732Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(lookup, lookup, itemMetadata, FileSystems.Default); 1774Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1790Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1808Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1825Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1839Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1861Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1886Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1909Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1931Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 1953Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2048Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2063Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2083Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2099Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2115Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2131Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2147Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2163Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2179Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2196Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2213Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2230Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2248Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2266Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2282Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2297Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2313Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2330Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2348Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2365Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2375FileSystems.Default, 2385FileSystems.Default, 2401Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2419Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2436Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2453Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2470Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2486Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2502Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2517Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2530Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2546Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2565Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2582Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2598Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2622Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2641Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2664Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2693Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2727Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2743Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2761Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2779Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2795Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2811Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2826Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2842Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2860Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2885Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2900Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2930var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2960var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2982var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 2998var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3014var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3032var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3048var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3067var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3083var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3102var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3115var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3127var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3138var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3151var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3162var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3174var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3185var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3198var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3209var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3222var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3244var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3264var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3273var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3289var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3322var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3341var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3355var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3368var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3382var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3404var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3438Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3461Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3495Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3538Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3554Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3573Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3588Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3603Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3624Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3678}), FileSystems.Default); 3699Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3769Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3796Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3847Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3867Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3884Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3908Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3932Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3956Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 3989Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, itemsByType, itemMetadata, FileSystems.Default); 4026Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4063Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4092Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4106Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4118Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new(pg, FileSystems.Default); 4154Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4417Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4443Expander<ProjectPropertyInstance, ProjectItemInstance> expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(pg, FileSystems.Default); 4489var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4501var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4513var expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(new PropertyDictionary<ProjectPropertyInstance>(), FileSystems.Default); 4843var expander = new Expander<ProjectProperty, ProjectItem>(properties, FileSystems.Default); 4860var 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)
404_expander = new Expander<ProjectPropertyInstance, ProjectItemInstance>(propertyBag, itemBag, itemMetadata, FileSystems.Default); 445FileSystems.Default); 469FileSystems.Default); 501FileSystems.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)
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.Tasks.Core (127)
AddToWin32Manifest.cs (1)
93if (string.IsNullOrEmpty(ApplicationManifest.ItemSpec) || !FileSystems.Default.FileExists(ApplicationManifest?.ItemSpec))
Al.cs (1)
313if (String.IsNullOrEmpty(pathToTool) || !FileSystems.Default.FileExists(pathToTool))
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130ErrorUtilities.VerifyThrow(FileSystems.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (2)
103if (FileSystems.Default.FileExists(newLocation)) 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)
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)) 2093if (FileSystems.Default.FileExists(fileSource)) 2162if (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)
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)
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)) 2739if (FileSystems.Default.FileExists(outFileOrDir) 2761if (FileSystems.Default.FileExists(currentOutputFile)) 2849if (!FileSystems.Default.DirectoryExists(shorterPath)) 3075if (!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)
314if (FileSystems.Default.FileExists(path)) 331if (FileSystems.Default.FileExists(resolvedPath))
ManifestUtil\SecurityUtil.cs (7)
180if (FileSystems.Default.DirectoryExists(path)) 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))
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)
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);
SGen.cs (3)
315if (String.IsNullOrEmpty(pathToTool) || !FileSystems.Default.FileExists(pathToTool)) 333if (!FileSystems.Default.FileExists(reference)) 422serializationAssemblyPathExists = 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)
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 (28)
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));
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); 1393return FileSystems.Default.DirectoryExists(path); 1401.FirstOrDefault(fullPath => !string.IsNullOrEmpty(fullPath) && FileSystems.Default.FileExists(fullPath)); 1684if (_temporaryBatchFile != null && FileSystems.Default.FileExists(_temporaryBatchFile))
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)) 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);