1836 references to FullName
aspire (178)
Caching\DiskCache.cs (12)
24_cacheDirectory = new DirectoryInfo(Path.Combine(executionContext.CacheDirectory.FullName, "nuget-search")); 33_logger.LogDebug(ex, "Failed to create cache directory {CacheDirectory}", _cacheDirectory.FullName); 94_logger.LogDebug(ex, "Failed to create cache directory {CacheDirectory}", _cacheDirectory.FullName); 106var fullPath = Path.Combine(_cacheDirectory.FullName, fileName); 145_logger.LogDebug(ex, "Failed to delete cache file {CacheFile}", file.FullName); 152_logger.LogDebug(ex, "Failed to clear disk cache at {CacheDirectory}", _cacheDirectory.FullName); 216valid = file.FullName; 273_logger.LogDebug("Deleted expired cache file: {CacheFile}", file.FullName); 277_logger.LogDebug("Deleted old cache file during global cleanup: {CacheFile}", file.FullName); 281_logger.LogDebug("Deleted invalid cache file: {CacheFile}", file.FullName); 285_logger.LogDebug("Deleted cache file: {CacheFile}", file.FullName); 290_logger.LogDebug(ex, "Failed to delete cache file {CacheFile}", file.FullName);
Commands\ExtensionInternalCommand.cs (1)
48var jsonContent = JsonSerializer.Serialize(files.Select(f => f.FullName).ToList(), BackchannelJsonSerializerContext.Default.ListString);
Commands\InitCommand.cs (6)
342var finalAppHostDir = Path.Combine(initContext.SolutionDirectory.FullName, appHostProjectDir.Name); 343var finalServiceDefaultsDir = Path.Combine(initContext.SolutionDirectory.FullName, serviceDefaultsProjectDir.Name); 345FileSystemHelper.CopyDirectory(appHostProjectDir.FullName, finalAppHostDir); 346FileSystemHelper.CopyDirectory(serviceDefaultsProjectDir.FullName, finalServiceDefaultsDir); 707public string ExpectedAppHostDirectory => Path.Combine(SolutionDirectory.FullName, $"{SolutionName}.AppHost"); 712public string ExpectedServiceDefaultsDirectory => Path.Combine(SolutionDirectory.FullName, $"{SolutionName}.ServiceDefaults");
Commands\RunCommand.cs (7)
97await extensionInteractionService.StartDebugSessionAsync(ExecutionContext.WorkingDirectory.FullName, passedAppHostProjectFile?.FullName, startDebugSession); 207var runJsonFilePath = effectiveAppHostFile.FullName[..^2] + "run.json"; 264var appHostRelativePath = Path.GetRelativePath(ExecutionContext.WorkingDirectory.FullName, effectiveAppHostFile.FullName); 274topGrid.AddRow(new Align(new Markup($"[bold green]{logsLocalizedString}[/]:"), HorizontalAlignment.Right), new Text(logFile.FullName)); 430using var streamWriter = new StreamWriter(logFile.FullName, append: true)
Configuration\ConfigurationService.cs (4)
86return globalSettingsFile.FullName; 101var settingsFilePath = ConfigurationHelper.BuildPathToSettingsJsonFile(searchDirectory.FullName); 112return ConfigurationHelper.BuildPathToSettingsJsonFile(executionContext.WorkingDirectory.FullName); 121await LoadConfigurationFromFileAsync(globalSettingsFile.FullName, allConfig, cancellationToken);
DotNet\DotNetCliRunner.cs (31)
183cliArgsList.Add(projectFile.FullName); 253false => [watchOrRunCommand, nonInteractiveSwitch, verboseSwitch, noBuildSwitch, noProfileSwitch, "--project", projectFile.FullName, "--", .. args], 254true => ["run", noProfileSwitch, "--file", projectFile.FullName, "--", .. args] 504WorkingDirectory = workingDirectory.FullName, 558projectFile.FullName, 733string[] cliArgs = ["build", projectFilePath.FullName]; 763cliArgsList.AddRange(["package", "--file", projectFilePath.FullName]); 769cliArgsList.AddRange([projectFilePath.FullName, "package"]); 788logger.LogInformation("Adding package {PackageName} with version {PackageVersion} to project {ProjectFilePath}", packageName, packageVersion, projectFilePath.FullName); 801logger.LogError("Failed to add package {PackageName} with version {PackageVersion} to project {ProjectFilePath}. See debug logs for more details.", packageName, packageVersion, projectFilePath.FullName); 805logger.LogInformation("Package {PackageName} with version {PackageVersion} added to project {ProjectFilePath}", packageName, packageVersion, projectFilePath.FullName); 815string[] cliArgs = ["sln", solutionFile.FullName, "add", projectFile.FullName]; 817logger.LogInformation("Adding project {ProjectFilePath} to solution {SolutionFilePath}", projectFile.FullName, solutionFile.FullName); 830logger.LogError("Failed to add project {ProjectFilePath} to solution {SolutionFilePath}. See debug logs for more details.", projectFile.FullName, solutionFile.FullName); 834logger.LogInformation("Project {ProjectFilePath} added to solution {SolutionFilePath}", projectFile.FullName, solutionFile.FullName); 877: Path.Combine(workingDirectory.FullName, configPath); 966cliArgs.Add(nugetConfigFile.FullName); 1084string[] cliArgs = ["sln", solutionFile.FullName, "list"]; 1138: Path.Combine(solutionFile.Directory!.FullName, line); 1150string[] cliArgs = ["add", projectFile.FullName, "reference", referencedProject.FullName]; 1152logger.LogInformation("Adding project reference from {ProjectFile} to {ReferencedProject}", projectFile.FullName, referencedProject.FullName); 1165logger.LogError("Failed to add project reference from {ProjectFile} to {ReferencedProject}. See debug logs for more details.", projectFile.FullName, referencedProject.FullName); 1169logger.LogInformation("Project reference added from {ProjectFile} to {ReferencedProject}", projectFile.FullName, referencedProject.FullName);
NuGet\NuGetPackageCache.cs (2)
36var key = $"TemplatePackages-{workingDirectory.FullName}-{prerelease}-{nuGetConfigHashSuffix}"; 56var key = $"CliPackages-{workingDirectory.FullName}-{prerelease}-{nuGetConfigHashSuffix}";
Packaging\NuGetConfigMerger.cs (4)
68var targetPath = Path.Combine(targetDirectory.FullName, "NuGet.config"); 77proposedDocument.Load(tmpConfig.ConfigFile.FullName); 92File.Copy(tmpConfig.ConfigFile.FullName, targetPath, overwrite: true); 934throw new InvalidOperationException($"Multiple NuGet.config files found in '{directory.FullName}' differing only by case.");
Packaging\PackagingService.cs (1)
46new PackageMapping("Aspire*", prHive.FullName),
Projects\FallbackProjectParser.cs (5)
32_logger.LogDebug("Parsing project file '{ProjectFile}' using fallback XML parser", projectFile.FullName); 34var doc = XDocument.Load(projectFile.FullName); 39throw new InvalidOperationException($"Invalid project file format: {projectFile.FullName}"); 94_logger.LogError(ex, "Failed to parse project file '{ProjectFile}' using fallback XML parser", projectFile.FullName); 95throw new ProjectUpdaterException($"Failed to parse project file '{projectFile.FullName}' using fallback XML parser: {ex.Message}", ex);
Projects\ProjectLocator.cs (60)
40logger.LogDebug("Searching for project files in {SearchDirectory}", searchDirectory.FullName); 51logger.LogDebug("Found {ProjectFileCount} project files in {SearchDirectory}", projectFiles.Length, searchDirectory.FullName); 61logger.LogDebug("Checking project file {ProjectFile}", projectFile.FullName); 66logger.LogDebug("Found AppHost project file {ProjectFile} in {SearchDirectory}", projectFile.FullName, searchDirectory.FullName); 67var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName); 76var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName); 82logger.LogTrace("Project file {ProjectFile} in {SearchDirectory} is not an Aspire host", projectFile.FullName, searchDirectory.FullName); 89logger.LogDebug("Searching for single-file apphosts in {SearchDirectory}", searchDirectory.FullName); 91logger.LogDebug("Found {CandidateFileCount} single-file apphost candidates in {SearchDirectory}", candidateAppHostFiles.Length, searchDirectory.FullName); 95logger.LogDebug("Checking single-file apphost candidate {CandidateFile}", candidateFile.FullName); 99logger.LogDebug("Found single-file apphost candidate {CandidateFile} in {SearchDirectory}", candidateFile.FullName, searchDirectory.FullName); 100var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName); 109logger.LogTrace("Single-file candidate {CandidateFile} in {SearchDirectory} is not a valid apphost", candidateFile.FullName, searchDirectory.FullName); 120appHostProjects.Sort((x, y) => x.FullName.CompareTo(y.FullName)); 177var settingsFile = new FileInfo(ConfigurationHelper.BuildPathToSettingsJsonFile(searchDirectory.FullName)); 187var qualifiedAppHostPath = Path.IsPathRooted(appHostPath) ? appHostPath : Path.Combine(settingsFile.Directory!.FullName, appHostPath); 197interactionService.DisplayMessage("warning", string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath)); 221if (Directory.Exists(projectFile.FullName)) 223logger.LogDebug("Provided path {Path} is a directory, searching for project files recursively", projectFile.FullName); 224var directory = new DirectoryInfo(projectFile.FullName); 239logger.LogDebug("Found {ProjectFileCount} project files in {Directory}", allProjectFiles.Length, directory.FullName); 253logger.LogDebug("Checking project file {ProjectFile}", candidateProject.FullName); 258logger.LogDebug("Found AppHost project file {ProjectFile}", candidateProject.FullName); 259var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateProject.FullName); 276logger.LogDebug("Checking single-file apphost candidate {CandidateFile}", candidateFile.FullName); 280logger.LogDebug("Found valid single-file apphost {AppHostFile}", candidateFile.FullName); 281var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName); 292foundProjects.Sort((x, y) => x.FullName.CompareTo(y.FullName)); 301logger.LogError("No AppHost project files found in directory {Directory}", directory.FullName); 306logger.LogDebug("Found single AppHost project file {ProjectFile} in directory {Directory}", appHostProjects[0].FullName, directory.FullName); 311logger.LogDebug("Multiple AppHost project files found in directory {Directory}, prompting user to select", directory.FullName); 315file => $"{file.Name} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, file.FullName)})", 324logger.LogError("Project file {ProjectFile} does not exist.", projectFile.FullName); 335logger.LogDebug("Using single-file apphost {ProjectFile}", projectFile.FullName); 351logger.LogDebug("Using project file {ProjectFile}", projectFile.FullName); 393projectFile => $"{projectFile.Name} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName)})", 404var settingsFilePath = ConfigurationHelper.BuildPathToSettingsJsonFile(executionContext.WorkingDirectory.FullName); 407logger.LogDebug("Creating settings file at {SettingsFilePath}", settingsFile.FullName); 409var relativePathToProjectFile = Path.GetRelativePath(settingsFile.Directory!.FullName, projectFile.FullName).Replace(Path.DirectorySeparatorChar, '/'); 414var relativeSettingsFilePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, settingsFile.FullName).Replace(Path.DirectorySeparatorChar, '/'); 446logger.LogDebug("Checking project file {ProjectFile} for OutputType", projectFile.FullName); 465logger.LogDebug("Found executable project file {ProjectFile} with OutputType {OutputType}", projectFile.FullName, outputType); 477executableProjects.Sort((x, y) => x.FullName.CompareTo(y.FullName));
Projects\ProjectUpdater.cs (29)
30logger.LogDebug("Fetching '{AppHostPath}' items and properties.", projectFile.FullName); 36logger.LogInformation("No updates required for project: {ProjectFile}", projectFile.FullName); 46.GroupBy(step => step.ProjectFile.FullName) 88var fallbackNuGetConfigDirectory = executionContext.WorkingDirectory.FullName; 175var cacheKey = $"{ItemsAndPropertiesCacheKeyPrefix}_{projectFile.FullName}_{itemsKey}_{propertiesKey}"; 184throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.FailedFetchItemsAndPropertiesFormat, projectFile.FullName)); 205logger.LogWarning("Falling back to XML parsing for '{ProjectFile}'. Reason: {Message}", projectFile.FullName, ex.Message); 219return string.Equals(projectFile.FullName, context.AppHostProjectFile.FullName, StringComparison.OrdinalIgnoreCase); 227var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken)); 248logger.LogDebug("Analyzing App Host SDK for: {AppHostFile}", context.AppHostProjectFile.FullName); 294projectDocument.Load(projectFile.FullName); 299throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindRootProjectElementFormat, projectFile.FullName)); 305throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindSdkElementFormat, projectFile.FullName)); 310projectDocument.Save(projectFile.FullName); 317var fileContent = await File.ReadAllTextAsync(projectFile.FullName); 325"Could not find '#:sdk Aspire.AppHost.Sdk@<version>' directive in single-file AppHost: {0}", projectFile.FullName)); 332await File.WriteAllTextAsync(projectFile.FullName, updatedContent); 340if (!context.VisitedProjects.Add(projectFile.FullName)) 363context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken))); 417var directoryPackagesPropsPath = Path.Combine(current.FullName, "Directory.Packages.props"); 480doc.Load(directoryPackagesPropsFile.FullName); 524logger.LogInformation(ex, "Ignoring parsing error in Directory.Packages.props '{DirectoryPackagesPropsFile}' for project '{ProjectFile}'", directoryPackagesPropsFile.FullName, projectFile.FullName); 565logger.LogWarning(ex, "Exception while resolving MSBuild property '{PropertyName}' for project '{ProjectFile}'", propertyName, projectFile.FullName); 586doc.Load(directoryPackagesPropsFile.FullName); 591throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName)); 595doc.Save(directoryPackagesPropsFile.FullName); 612throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName));
Projects\SolutionLocator.cs (6)
19logger.LogDebug("Searching for solution files starting from {StartDirectory}", startDirectory.FullName); 25logger.LogDebug("No solution files found in {Directory} or subdirectories", startDirectory.FullName); 29logger.LogDebug("Found {Count} solution file(s) in {Directory}", solutionFiles.Count, startDirectory.FullName); 42solutionFile => $"{solutionFile.Name} ({Path.GetRelativePath(startDirectory.FullName, solutionFile.FullName)})", 86.OrderBy(f => f.Directory?.FullName.Count(c => c == Path.DirectorySeparatorChar) ?? 0)
Templating\DotNetTemplateFactory.cs (2)
255executionContext.WorkingDirectory.FullName, 480var normalizedWorkingPath = workingDir.FullName;
Utils\AppHostHelper.cs (4)
56var relativePath = Path.GetRelativePath(workingDirectory.FullName, projectFile.FullName); 69var relativePath = Path.GetRelativePath(workingDirectory.FullName, projectFile.FullName);
Utils\ConfigurationHelper.cs (4)
19var settingsFilePath = BuildPathToSettingsJsonFile(currentDirectory.FullName); 31if (File.Exists(globalSettingsFile.FullName)) 33configuration.AddJsonFile(globalSettingsFile.FullName, optional: true); 39configuration.AddJsonFile(localSettingsFile.FullName, optional: true);
Aspire.Cli.Tests (515)
Caching\DiskCacheTests.cs (4)
19var hives = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "hives")); 20var cacheDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache")); 71var diskPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache", "nuget-search"); 117var diskPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache", "nuget-search");
Commands\ConfigCommandTests.cs (5)
70var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json"); 93var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json"); 118var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json"); 152var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json"); 272var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
Commands\InitCommandTests.cs (5)
66var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 67File.WriteAllText(solutionFile.FullName, "Fake solution file"); 121var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 122File.WriteAllText(solutionFile.FullName, "Fake solution file"); 250Assert.Equal(workspace.WorkspaceRoot.FullName, Path.GetFullPath(outputPath));
Commands\RunCommandTests.cs (17)
426var appHostDirectoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "src", "MyApp.AppHost"); 428var appHostProjectPath = Path.Combine(appHostDirectory.FullName, "MyApp.AppHost.csproj"); 430File.WriteAllText(appHostProjectFile.FullName, "<Project></Project>"); 772var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 773await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 828var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 829await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 880var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 881await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 936var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 937await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 987var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 988await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 1039var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1040await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 1091var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1092await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
DotNet\DotNetCliRunnerTests.cs (67)
26var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache")); 34var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 35await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 83var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 84await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 121var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 122await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 169var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 170await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 216var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 217await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 266var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 267await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 362var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 363await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 410var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 411await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 460var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 461await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 515var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 516await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 553args: ["run", "--project", projectFile.FullName], 570var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 571await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 599Assert.Contains(appHostFile.FullName, args); 607var filePathIndex = Array.IndexOf(args, appHostFile.FullName); 634var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 635await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 659Assert.Contains(projectFile.FullName, args); 668var projectIndex = Array.IndexOf(args, projectFile.FullName); 703var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 704await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 728Assert.Contains(projectFile.FullName, args); 736var projectIndex = Array.IndexOf(args, projectFile.FullName); 776var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 777await File.WriteAllTextAsync(solutionFile.FullName, "Not a real solution file."); 781var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj")); 782await File.WriteAllTextAsync(project1File.FullName, "Not a real project file."); 785var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj")); 786await File.WriteAllTextAsync(project2File.FullName, "Not a real project file."); 832var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 833await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 835var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj")); 836await File.WriteAllTextAsync(referencedProject.FullName, "Not a real project file."); 858Assert.Contains(projectFile.FullName, args); 860Assert.Contains(referencedProject.FullName, args); 874var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 875await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 907arg => Assert.Equal(appHostFile.FullName, arg), 932var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 933await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 964arg => Assert.Equal(appHostFile.FullName, arg), 989var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 990await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1043var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 1044await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1081arg => Assert.Equal(appHostFile.FullName, arg), 1106var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1107await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1139arg => Assert.Equal(projectFile.FullName, arg), 1164var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1165await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1196arg => Assert.Equal(projectFile.FullName, arg), 1221var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 1222await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1266var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1267await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
NuGet\NuGetPackagePrefetcherTests.cs (1)
17var cacheDir = new DirectoryInfo(Path.Combine(workingDir.FullName, ".aspire", "cache"));
Packaging\NuGetConfigMergerSnapshotTests.cs (16)
46var path = Path.Combine(dir.FullName, "NuGet.config"); 64var cacheDir = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache")); 86var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 92var hivePath = Path.Combine(hivesDir.FullName, channelName); 113var cacheDir2 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache")); 148var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 154var hivePath = Path.Combine(hivesDir.FullName, channelName); 175var cacheDir3 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache")); 209var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 215var hivePath = Path.Combine(hivesDir.FullName, channelName); 236var cacheDir4 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache")); 268var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 274var hivePath = Path.Combine(hivesDir.FullName, channelName); 295var cacheDir5 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache")); 332var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 338var hivePath = Path.Combine(hivesDir.FullName, channelName);
Packaging\NuGetConfigMergerTests.cs (19)
23var path = Path.Combine(dir.FullName, "NuGet.config"); 65var targetConfigPath = Path.Combine(root.FullName, "NuGet.config"); 69var expected = await File.ReadAllTextAsync(tempConfig.ConfigFile.FullName); 89var targetConfigPath = Path.Combine(root.FullName, "NuGet.config"); 133var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 172var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 212var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 322var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 372var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 441var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 507var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config")); 580var targetConfigPath = Path.Combine(root.FullName, "NuGet.config"); 582Assert.Equal(targetConfigPath, callbackTargetFile.FullName); 610var targetConfigPath = Path.Combine(root.FullName, "NuGet.config"); 660var targetConfigPath = Path.Combine(root.FullName, "NuGet.config"); 662Assert.Equal(targetConfigPath, callbackTargetFile.FullName); 682var originalContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "NuGet.config")); 703var targetConfigPath = Path.Combine(root.FullName, "NuGet.config"); 725var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
Packaging\PackagingServiceTests.cs (9)
45var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives")); 46var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache")); 80var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives")); 81var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache")); 124var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives")); 125var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache")); 158var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives")); 159var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache")); 215var nugetConfigPath = Path.Combine(tempDir.FullName, "NuGet.config");
Packaging\TemporaryNuGetConfigTests.cs (3)
26var configContent = await File.ReadAllTextAsync(tempConfig.ConfigFile.FullName); 65var configContent = await File.ReadAllTextAsync(tempConfig.ConfigFile.FullName); 96var configContent = await File.ReadAllTextAsync(tempConfig.ConfigFile.FullName);
Projects\ProjectLocatorTests.cs (182)
25var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache")); 36var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 59var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 60await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 63var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj")); 64await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 67var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 72appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName) 84Assert.Equal(targetAppHostProjectFile.FullName, foundAppHost?.FullName); 98var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 99await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 102var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj")); 103await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 106var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 111appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName) 123Assert.Equal(targetAppHostProjectFile.FullName, foundAppHost?.FullName); 134var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj")); 135await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost project"); 139var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 150if (projectFile.FullName == realAppHostProjectFile.FullName) 168Assert.Equal(realAppHostProjectFile.FullName, foundAppHost?.FullName); 177var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj")); 178await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file."); 180var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj")); 181await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file."); 191Assert.Equal(projectFile1.FullName, selectedProjectFile!.FullName); 200var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 201await File.WriteAllTextAsync(appHostProject.FullName, "Not a real apphost project."); 203var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj")); 204await File.WriteAllTextAsync(webProject.FullName, "Not a real web project."); 208if (projectFile.FullName == appHostProject.FullName) 224Assert.Equal(appHostProject.FullName, foundAppHost?.FullName); 252var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 253await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 271var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 272await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 282Assert.Equal(projectFile.FullName, returnedProjectFile!.FullName); 293var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 294await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real project file."); 305var globalSettingsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.global.json"); 316var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json")); 319var settingsJson = await File.ReadAllTextAsync(settingsFile.FullName); 334var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 336appHostFile.FullName, 350var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 353Assert.Equal(appHostFile.FullName, foundFiles[0].FullName); 362var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs")); 364appHostFile.FullName, 378var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 381Assert.Equal(appHostFile.FullName, foundFiles[0].FullName); 392var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs")); 394appHostFile.FullName, 402var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj")); 403await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 407var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs")); 409validAppHostFile.FullName, 424var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 431var foundPaths = foundFiles.Select(f => f.FullName).ToHashSet(); 432Assert.Contains(validAppHostFile.FullName, foundPaths); 433Assert.Contains(csprojFile.FullName, foundPaths); 434Assert.DoesNotContain(appHostFile.FullName, foundPaths); 443var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 444await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting; 454var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 467var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj")); 468await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 472var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs")); 474appHostFile.FullName, 485if (projectFile.FullName == csprojFile.FullName) 499var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 503Assert.True(foundFiles[0].FullName.CompareTo(foundFiles[1].FullName) < 0); 505var foundPaths = foundFiles.Select(f => f.FullName).ToHashSet(); 506Assert.Contains(csprojFile.FullName, foundPaths); 507Assert.Contains(appHostFile.FullName, foundPaths); 515var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 517appHostFile.FullName, 533Assert.Equal(appHostFile.FullName, result!.FullName); 543var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 544await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting; 568var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 570appHostFile.FullName, 579var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj")); 580await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 602var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt")); 603await File.WriteAllTextAsync(txtFile.FullName, "Some text file"); 626var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 627await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 631var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs")); 633appHostFile.FullName, 644if (projectFile.FullName == csprojFile.FullName) 664Assert.True(result.FullName == csprojFile.FullName || result.FullName == appHostFile.FullName); 736var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 738appHostFile.FullName, 754var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 766var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 768appHostFile.FullName, 797var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj")); 798await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 803if (file.FullName == projectFile.FullName) 816var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 819Assert.Equal(projectFile.FullName, returnedProjectFile!.FullName); 838var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 856var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj")); 857await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file."); 858var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj")); 859await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file."); 865if (file.FullName == projectFile1.FullName || file.FullName == projectFile2.FullName) 878var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 883Assert.Equal(projectFile1.FullName, returnedProjectFile!.FullName); 894var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs")); 896appHostFile.FullName, 912var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 915Assert.Equal(appHostFile.FullName, returnedProjectFile!.FullName); 926var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs")); 928appHostFile.FullName, 945var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 964var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj")); 965await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 970if (file.FullName == projectFile.FullName) 983var directoryAsFileInfo = new FileInfo(topDirectory.FullName); 986Assert.Equal(projectFile.FullName, returnedProjectFile!.FullName); 998var exeProjectFile = new FileInfo(Path.Combine(exeProjectDir.FullName, "ExeProject.csproj")); 999await File.WriteAllTextAsync(exeProjectFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Exe</OutputType></PropertyGroup></Project>"); 1003var libProjectFile = new FileInfo(Path.Combine(libProjectDir.FullName, "LibProject.csproj")); 1004await File.WriteAllTextAsync(libProjectFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Library</OutputType></PropertyGroup></Project>"); 1010var outputType = projectFile.FullName == exeProjectFile.FullName ? "Exe" : "Library"; 1024var executableProjects = await projectLocator.FindExecutableProjectsAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 1027Assert.Equal(exeProjectFile.FullName, executableProjects[0].FullName); 1039var winExeProjectFile = new FileInfo(Path.Combine(winExeProjectDir.FullName, "WinExeProject.csproj")); 1040await File.WriteAllTextAsync(winExeProjectFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>WinExe</OutputType></PropertyGroup></Project>"); 1059var executableProjects = await projectLocator.FindExecutableProjectsAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 1062Assert.Equal(winExeProjectFile.FullName, executableProjects[0].FullName); 1074var lib1File = new FileInfo(Path.Combine(lib1Dir.FullName, "Lib1.csproj")); 1075await File.WriteAllTextAsync(lib1File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Library</OutputType></PropertyGroup></Project>"); 1078var lib2File = new FileInfo(Path.Combine(lib2Dir.FullName, "Lib2.csproj")); 1079await File.WriteAllTextAsync(lib2File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Library</OutputType></PropertyGroup></Project>"); 1098var executableProjects = await projectLocator.FindExecutableProjectsAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 1116var executableProjects = await projectLocator.FindExecutableProjectsAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 1130var exe1File = new FileInfo(Path.Combine(exe1Dir.FullName, "Exe1.csproj")); 1131await File.WriteAllTextAsync(exe1File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Exe</OutputType></PropertyGroup></Project>"); 1134var exe2File = new FileInfo(Path.Combine(exe2Dir.FullName, "Exe2.csproj")); 1135await File.WriteAllTextAsync(exe2File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Exe</OutputType></PropertyGroup></Project>"); 1138var winExeFile = new FileInfo(Path.Combine(winExeDir.FullName, "WinExe.csproj")); 1139await File.WriteAllTextAsync(winExeFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>WinExe</OutputType></PropertyGroup></Project>"); 1165var executableProjects = await projectLocator.FindExecutableProjectsAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None); 1168Assert.Contains(executableProjects, p => p.FullName == exe1File.FullName); 1169Assert.Contains(executableProjects, p => p.FullName == exe2File.FullName); 1170Assert.Contains(executableProjects, p => p.FullName == winExeFile.FullName);
Projects\ProjectUpdaterTests.cs (139)
29var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 32var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 35var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 38appHostProjectFile.FullName, 72if (projectFile.FullName == appHostProjectFile.FullName) 77itemsAndProperties.WithProjectReference(webAppProjectFile.FullName); 79else if (projectFile.FullName == webAppProjectFile.FullName) 82itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName); 84else if (projectFile.FullName == serviceDefaultsProjectFile.FullName) 139var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 142var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 145var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 148appHostProjectFile.FullName, 183if (projectFile.FullName == appHostProjectFile.FullName) 188itemsAndProperties.WithProjectReference(webAppProjectFile.FullName); 190else if (projectFile.FullName == webAppProjectFile.FullName) 193itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName); 195else if (projectFile.FullName == serviceDefaultsProjectFile.FullName) 249Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName); 256Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName); 263Assert.Equal(webAppProjectFile.FullName, item.ProjectFile.FullName); 276var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 279var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 282var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 285appHostProjectFile.FullName, 327if (projectFile.FullName == appHostProjectFile.FullName) 333itemsAndProperties.WithProjectReference(webAppProjectFile.FullName); 335else if (projectFile.FullName == webAppProjectFile.FullName) 338itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName); 340else if (projectFile.FullName == serviceDefaultsProjectFile.FullName) 394Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName); 401Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName); 408Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName); 415Assert.Equal(webAppProjectFile.FullName, item.ProjectFile.FullName); 432var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj")); 435var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj")); 438var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj")); 441var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj")); 444appHostProjectFile.FullName, 476if (projectFile.FullName == appHostProjectFile.FullName) 481itemsAndProperties.WithProjectReference(projectAFile.FullName); 482itemsAndProperties.WithProjectReference(projectBFile.FullName); 484else if (projectFile.FullName == projectAFile.FullName) 489itemsAndProperties.WithProjectReference(sharedProjectFile.FullName); 491else if (projectFile.FullName == projectBFile.FullName) 496itemsAndProperties.WithProjectReference(sharedProjectFile.FullName); 498else if (projectFile.FullName == sharedProjectFile.FullName) 505throw new InvalidOperationException($"Unexpected project file: {projectFile.FullName}"); 545var sharedProjectUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == sharedProjectFile.FullName).ToList(); 553var appHostUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == appHostProjectFile.FullName).ToList(); 565var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 568var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 570var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 574appHostProjectFile.FullName, 583serviceDefaultsProjectFile.FullName, 597directoryPackagesPropsFile.FullName, 637if (projectFile.FullName == appHostProjectFile.FullName) 640itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName); 642else if (projectFile.FullName == serviceDefaultsProjectFile.FullName) 688var updatedContent = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName); 701var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 703var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 707appHostProjectFile.FullName, 719directoryPackagesPropsFile.FullName, 793var updatedContent = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName); 803var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 805var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 809appHostProjectFile.FullName, 821directoryPackagesPropsFile.FullName, 896var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName); 906var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache")); 936var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 938var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 942appHostProjectFile.FullName, 954directoryPackagesPropsFile.FullName, 1039var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName); 1049var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1051var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1055appHostProjectFile.FullName, 1068directoryPackagesPropsFile.FullName, 1162var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName); 1173var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1175var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1179appHostProjectFile.FullName, 1191directoryPackagesPropsFile.FullName, 1287var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1289var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1293appHostProjectFile.FullName, 1305directoryPackagesPropsFile.FullName, 1398var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1402appHostProjectFile.FullName, 1436if (projectFile.FullName == appHostProjectFile.FullName) 1492var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1494var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1498appHostProjectFile.FullName, 1510directoryPackagesPropsFile.FullName, 1544if (projectFile.FullName == appHostProjectFile.FullName) 1594var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1598appHostProjectFile.FullName, 1628if (projectFile.FullName == appHostProjectFile.FullName) 1673var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1676appHostProjectFile.FullName, 1707if (projectFile.FullName == appHostProjectFile.FullName) 1755var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 1759appHostFile.FullName, 1827var updatedContent = await File.ReadAllTextAsync(appHostFile.FullName); 1838var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 1842appHostFile.FullName, 1910var updatedContent = await File.ReadAllTextAsync(appHostFile.FullName); 1920var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1923appHostProjectFile.FullName,
Templating\DotNetTemplateFactoryTests.cs (17)
54var path = Path.Combine(dir.FullName, "NuGet.config"); 79var nugetConfigPath = Path.Combine(workingDir.FullName, "NuGet.config"); 111var nugetConfigPath = Path.Combine(workingDir.FullName, "NuGet.config"); 124var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject")); 149var parentConfigPath = Path.Combine(workingDir.FullName, "NuGet.config"); 155var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config"); 168var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject")); 191var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config"); 205var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject")); 218var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config"); 222var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config"); 235var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject")); 244var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config"); 245var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config"); 256var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject")); 265var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config"); 266var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
Utils\CliTestHelper.cs (4)
60var globalSettingsFilePath = Path.Combine(options.WorkingDirectory.FullName, ".aspire", "settings.global.json"); 132var hivesDirectory = new DirectoryInfo(Path.Combine(WorkingDirectory.FullName, ".aspire", "hives")); 133var cacheDirectory = new DirectoryInfo(Path.Combine(WorkingDirectory.FullName, ".aspire", "cache")); 196var globalSettingsFilePath = Path.Combine(workingDirectory.FullName, ".aspire", "settings.global.json");
Utils\FileSystemHelperTests.cs (24)
16var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); 19File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "content1"); 20File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "content2"); 21File.WriteAllText(Path.Combine(sourceDir.FullName, "file3.cs"), "using System;"); 24FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); 43var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); 49File.WriteAllText(Path.Combine(sourceDir.FullName, "root.txt"), "root content"); 50File.WriteAllText(Path.Combine(subDir1.FullName, "level1.txt"), "level 1 content"); 51File.WriteAllText(Path.Combine(subDir2.FullName, "level2.txt"), "level 2 content"); 54FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); 75var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "empty_destination"); 78FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); 91var nonExistentSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nonexistent"); 92var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); 104var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); 120FileSystemHelper.CopyDirectory(sourceDir.FullName, null!)); 128var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); 144FileSystemHelper.CopyDirectory(sourceDir.FullName, string.Empty)); 153var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); 156var binaryFilePath = Path.Combine(sourceDir.FullName, "binary.dat"); 162FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir); 178var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination"); 185File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}"); 189FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);
Utils\TemporaryRepo.cs (3)
19outputHelper.WriteLine($"Initializing git repository at: {repoDirectory.FullName}"); 27WorkingDirectory = repoDirectory.FullName, 62outputHelper.WriteLine($"Temporary workspace created at: {repoDirectory.FullName}");
Aspire.Dashboard.Tests (6)
Integration\StartupTests.cs (3)
166.AddInMemoryCollection(new Dictionary<string, string?> { [dashboardFileConfigDirectoryNameKey] = fileConfigDirectory.FullName }) 201.AddInMemoryCollection(new Dictionary<string, string?> { [DashboardConfigNames.DashboardFileConfigDirectoryName.ConfigKey] = fileConfigDirectory.FullName }) 898var browserTokenConfigFile = Path.Combine(fileConfigDirectory.FullName, DashboardConfigNames.DashboardFrontendBrowserTokenName.EnvVarName);
tests\Shared\Playwright\PlaywrightProvider.cs (1)
55var probePath = Path.Combine(repoRoot.FullName, "artifacts", "bin", "playwright-deps");
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.EndToEnd.Tests (6)
IntegrationServicesFixture.cs (1)
56_testProjectPath = Path.Combine(BuildEnvironment.RepoRoot.FullName, "tests", "testproject");
tests\Shared\Playwright\PlaywrightProvider.cs (1)
55var probePath = Path.Combine(repoRoot.FullName, "artifacts", "bin", "playwright-deps");
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
84var sdkFromArtifactsPath = Path.Combine(RepoRoot!.FullName, "artifacts", "bin", sdkDirName); 116BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Debug", "Shipping");
Aspire.Hosting (6)
Dcp\DcpExecutor.cs (1)
1588FileInfo filePath => filePath.FullName,
Dcp\Locations.cs (1)
18_basePath ??= Directory.CreateTempSubdirectory("aspire.").FullName;
Publishing\ManifestPublisher.cs (2)
46if (!Directory.Exists(parentDirectory!.FullName)) 49Directory.CreateDirectory(parentDirectory.FullName);
Publishing\ManifestPublishingContext.cs (1)
361FileInfo fileValue => GetManifestRelativePath(fileValue.FullName),
Publishing\ResourceContainerImageBuilder.cs (1)
444FileInfo filePath => filePath.FullName,
Aspire.Hosting.Azure (4)
AzureBicepResource.cs (1)
100? Path.Combine(directory ?? Directory.CreateTempSubdirectory("aspire").FullName, $"{Name.ToLowerInvariant()}.module.bicep")
AzureProvisioningResource.cs (1)
83var generationPath = Directory.CreateTempSubdirectory("aspire").FullName;
AzurePublishingContext.cs (2)
160var modulePath = Path.Combine(moduleDirectory.FullName, $"{resource.Name}.bicep"); 345var modulePath = Path.Combine(moduleDirectory.FullName, $"{resource.Name}.bicep");
Aspire.Hosting.Azure.Tests (27)
AzureAppServiceTests.cs (2)
192File.WriteAllText(Path.Combine(directory.FullName, "Dockerfile"), ""); 194builder.AddDockerfile("api", directory.FullName)
AzureContainerAppsTests.cs (2)
63File.WriteAllText(Path.Combine(directory.FullName, "Dockerfile"), ""); 65builder.AddDockerfile("api", directory.FullName);
AzureDeployerTests.cs (4)
33output.WriteLine($"Temp directory: {tempDir.FullName}"); 34using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName, isDeploy: true); 45var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep"); 47var envBicepPath = Path.Combine(tempDir.FullName, "env", "env.bicep");
AzureEnvironmentResourceTests.cs (14)
21output.WriteLine($"Temp directory: {tempDir.FullName}"); 22using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName); 34var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep"); 38var envBicepPath = Path.Combine(tempDir.FullName, "env", "env.bicep"); 53output.WriteLine($"Temp directory: {tempDir.FullName}"); 54using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName); 71var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep"); 85output.WriteLine($"Temp directory: {tempDir.FullName}"); 88outputPath: tempDir.FullName); 123var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep"); 134output.WriteLine($"Temp directory: {tempDir.FullName}"); 137outputPath: tempDir.FullName); 172var mainBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "main.bicep")); 173var storageBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "storage", "storage.bicep"));
AzureManifestUtils.cs (1)
30string manifestDir = Directory.CreateTempSubdirectory(resource.Name).FullName;
AzureResourceOptionsTests.cs (4)
23var outputPath = Path.Combine(tempDir.FullName, "aspire-manifest.json"); 42var sbBicep = await File.ReadAllTextAsync(Path.Combine(tempDir.FullName, "sb.module.bicep")); 44var sqlBicep = await File.ReadAllTextAsync(Path.Combine(tempDir.FullName, "sql-server.module.bicep")); 59output.WriteLine($"Failed to delete {tempDir.FullName} : {ex.Message}. Ignoring.");
Aspire.Hosting.Containers.Tests (3)
WithDockerfileTests.cs (3)
868var manifestPath = Path.Combine(tempDir.FullName, "manifest.json"); 877.WithDockerfileFactory(tempDir.FullName, context => dockerfileContent); 883var dockerfilePath = Path.Combine(tempDir.FullName, "testcontainer.Dockerfile");
Aspire.Hosting.Docker.Tests (6)
DockerComposeTests.cs (6)
41output.WriteLine($"Temp directory: {tempDir.FullName}"); 42using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName); 54var composeFile = Path.Combine(tempDir.FullName, "docker-compose.yaml"); 64output.WriteLine($"Temp directory: {tempDir.FullName}"); 65using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName); 79var composeFile = Path.Combine(tempDir.FullName, "docker-compose.yaml");
Aspire.Hosting.Kubernetes.Tests (5)
KubernetesEnvironmentResourceTests.cs (5)
16output.WriteLine($"Temp directory: {tempDir.FullName}"); 17using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName); 27var chartYaml = Path.Combine(tempDir.FullName, "Chart.yaml"); 28var valuesYaml = Path.Combine(tempDir.FullName, "values.yaml"); 29var deploymentYaml = Path.Combine(tempDir.FullName, "templates", "service", "deployment.yaml");
Aspire.Hosting.MySql.Tests (1)
MySqlFunctionalTests.cs (1)
149bindMountPath = Directory.CreateTempSubdirectory().FullName;
Aspire.Hosting.Nats.Tests (1)
NatsFunctionalTests.cs (1)
175bindMountPath = Directory.CreateTempSubdirectory().FullName;
Aspire.Hosting.NodeJs.Tests (1)
NodeAppFixture.cs (1)
74var tempDir = Directory.CreateTempSubdirectory("aspire-nodejs-tests").FullName;
Aspire.Hosting.Oracle.Tests (3)
OracleFunctionalTests.cs (3)
114bindMountPath = Directory.CreateTempSubdirectory().FullName; 263var bindMountPath = Directory.CreateTempSubdirectory().FullName; 361var initFilesPath = Directory.CreateTempSubdirectory().FullName;
Aspire.Hosting.RabbitMQ.Tests (1)
RabbitMQFunctionalTests.cs (1)
122bindMountPath = Directory.CreateTempSubdirectory().FullName;
Aspire.Hosting.Redis.Tests (1)
RedisFunctionalTests.cs (1)
461bindMountPath = Directory.CreateTempSubdirectory().FullName;
Aspire.Hosting.Testing (2)
DistributedApplicationFactory.cs (2)
346var launchSettingsFilePath = projectFileInfo.FullName switch 349_ => Path.Combine(projectFileInfo.FullName, "Properties", "launchSettings.json")
Aspire.Hosting.Testing.Tests (2)
tests\Aspire.Hosting.Tests\Utils\MSBuildUtils.cs (1)
15directory = Directory.GetParent(directory)!.FullName;
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
32builder.Configuration["Aspire:Store:Path"] = path ?? Directory.CreateTempSubdirectory().FullName;
Aspire.Hosting.Tests (5)
Schema\SchemaTests.cs (2)
111var tempContextPath = Directory.CreateTempSubdirectory().FullName; 220string manifestDir = Directory.CreateTempSubdirectory(testCaseName).FullName;
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
32builder.Configuration["Aspire:Store:Path"] = path ?? Directory.CreateTempSubdirectory().FullName;
tests\Shared\TempDirectory.cs (1)
6public string Path { get; } = Directory.CreateTempSubdirectory(".aspire-tests").FullName;
Utils\MSBuildUtils.cs (1)
15directory = Directory.GetParent(directory)!.FullName;
Aspire.Templates.Tests (5)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
55var probePath = Path.Combine(repoRoot.FullName, "artifacts", "bin", "playwright-deps");
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
84var sdkFromArtifactsPath = Path.Combine(RepoRoot!.FullName, "artifacts", "bin", sdkDirName); 116BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Debug", "Shipping");
BuildValidator (5)
LocalReferenceResolver.cs (2)
68logger.LogInformation($"Searching {directory.FullName}"); 81locations.Add(fileInfo.FullName);
Program.cs (3)
146logger.LogInformation($@"""{artifactsDir.FullName}"""); 326logger.LogError($"Could not find pdb for {originalBinary.FullName}"); 330using var _ = logger.BeginScope($"Verifying {originalBinary.FullName} with pdb {pdbPath ?? "[embedded]"}");
CodeStyleConfigFileGenerator (2)
Program.cs (2)
91var configFilePath = Path.Combine(directory.FullName, configFileName); 205var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
containerize.UnitTests (6)
ParserTests.cs (6)
18publishDir.FullName, 61publishDir.FullName, 97publishDir.FullName, 129publishDir.FullName, 173publishDir.FullName, 218publishDir.FullName,
dotnet (33)
CommandFactory\CommandResolution\DotnetToolsCommandResolver.cs (1)
45dll.FullName,
Commands\Clean\FileBasedAppArtifacts\CleanFileBasedAppArtifactsCommand.cs (5)
28Reporter.Verbose.WriteLine($"Would remove folder: {folder.FullName}"); 36Reporter.Verbose.WriteLine($"Removed folder: {folder.FullName}"); 67Reporter.Error.WriteLine(string.Format(CliCommandStrings.CleanFileBasedAppArtifactsDirectoryNotFound, directory.FullName).Yellow()); 71Reporter.Output.WriteLine(CliCommandStrings.CleanFileBasedAppArtifactsScanning, directory.FullName); 174Reporter.Verbose.WriteLine($"Cannot access artifacts metadata file '{metadataFile?.FullName}': {ex}");
Commands\New\NewCommandParser.cs (3)
155builtIns.Add((typeof(MSBuildEvaluator), new MSBuildEvaluator(outputDirectory: outputPath?.FullName, projectPath: projectPath?.FullName))); 178outputPath: outputPath?.FullName,
Commands\Package\Add\PackageAddCommand.cs (1)
36projectFilePath = MsbuildProject.GetProjectFileFromDirectory(fileOrDirectory).FullName;
Commands\Package\Remove\PackageRemoveCommand.cs (1)
36projectFilePath = MsbuildProject.GetProjectFileFromDirectory(fileOrDirectory).FullName;
Commands\Project\Convert\ProjectConvertCommand.cs (1)
16private readonly string? _outputDirectory = parseResult.GetValue(SharedOptions.OutputOption)?.FullName;
Commands\Reference\Remove\ReferenceRemoveCommand.cs (1)
46MsbuildProject.GetProjectFileFromDirectory(fullPath).FullName
Commands\Run\RunCommand.cs (1)
882currentDir = Directory.GetParent(currentDir)?.FullName;
Commands\Run\VirtualProjectBuildingCommand.cs (14)
728string implicitBuildFilePath = Path.Join(directory.FullName, implicitBuildFile.Name); 753Reporter.Verbose.WriteLine("Building because cache file does not exist: " + successCacheFile.FullName); 760Reporter.Verbose.WriteLine("Building because start cache file does not exist: " + startCacheFile.FullName); 768Reporter.Verbose.WriteLine("Building because start cache file is newer than success cache file (previous build likely failed): " + startCacheFile.FullName); 773var previousCacheEntry = DeserializeCacheEntry(successCacheFile.FullName); 778Reporter.Verbose.WriteLine("Building because previous cache entry could not be deserialized: " + successCacheFile.FullName); 791Building because previous SDK version ({previousCacheEntry.SdkVersion}) does not match current ({cacheEntry.SdkVersion}): {successCacheFile.FullName} 800Building because previous runtime version ({previousCacheEntry.RuntimeVersion}) does not match current ({cacheEntry.RuntimeVersion}): {successCacheFile.FullName} 810Building because previous global properties count ({previousCacheEntry.GlobalProperties.Count}) does not match current count ({cacheEntry.GlobalProperties.Count}): {successCacheFile.FullName} 821Building because previous global property "{key}" ({otherValue}) does not match current ({value}): {successCacheFile.FullName} 832Reporter.Verbose.WriteLine("Building because entry point file is missing: " + entryPointFile.FullName); 840Reporter.Verbose.WriteLine("Compiling because entry point file is modified: " + entryPointFile.FullName); 850Reporter.Verbose.WriteLine("Building because implicit build file is missing or modified: " + implicitBuildFileInfo.FullName); 1879var fullFilePath = MsbuildProject.GetProjectFileFromDirectory(resolvedProjectPath).FullName;
Commands\Solution\Add\SolutionAddCommand.cs (1)
64return Directory.Exists(fullPath) ? MsbuildProject.GetProjectFileFromDirectory(fullPath).FullName : fullPath;
Commands\Solution\Remove\SolutionRemoveCommand.cs (1)
43? MsbuildProject.GetProjectFileFromDirectory(p).FullName
MsbuildProject.cs (2)
71var project = TryOpenProject(projects, projectFile.FullName); 74throw new GracefulException(CliStrings.FoundInvalidProject, projectFile.FullName);
ReleasePropertyProjectLocator.cs (1)
130return TryGetProjectInstance(MsbuildProject.GetProjectFileFromDirectory(arg).FullName, globalProps);
dotnet.Tests (38)
CommandTests\Pack\PackTests.cs (7)
48.Execute("-o", outputDir.FullName) 73var informationalVersion = PeReaderUtils.GetAssemblyAttributeValue(output.FullName, "AssemblyInformationalVersionAttribute"); 102ZipFile.Open(outputPackage.FullName, ZipArchiveMode.Read) 126ZipFile.Open(outputPackage.FullName, ZipArchiveMode.Read) 136ZipFile.Open(symbolsPackage.FullName, ZipArchiveMode.Read) 217var outputPackage = new FileInfo(Path.Combine(outputDir.FullName, "TestLibraryWithConfiguration.1.0.0.nupkg")); 219var zip = ZipFile.Open(outputPackage.FullName, ZipArchiveMode.Read);
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (4)
124var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); 139var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); 229var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); 258.Execute(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll"))
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (3)
164.WithWorkingDirectory(Directory.GetParent(testInstance.Path).FullName) 181.WithWorkingDirectory(Directory.GetParent(testInstance.Path).FullName) 198.WithWorkingDirectory(Directory.GetParent(testInstance.Path).FullName)
CommandTests\Run\RunFileTests.cs (10)
1673var programFile = Path.Join(subDir.FullName, "Program.cs"); 1679var publishDir = Path.Join(subDir.FullName, "artifacts"); 1729new DotnetCommand(Log, "tool", "exec", "MyFileBasedTool", "--yes", "--add-source", packageDir.FullName) 2398Log.WriteLine($"Skipping code generation because file does not exist: {nonGeneratedFile.FullName}"); 2403var existingText = codeFilePath.Exists ? File.ReadAllText(codeFilePath.FullName) : string.Empty; 2407Log.WriteLine($"{codeFilePath.FullName} needs to be updated:"); 2411throw new InvalidOperationException($"Not updating file in CI: {codeFilePath.FullName}"); 2415File.WriteAllText(codeFilePath.FullName, newText); 2416throw new InvalidOperationException($"File outdated, commit the changes: {codeFilePath.FullName}"); 3644.ToDictionary(f => f.Name, f => File.ReadAllText(f.FullName));
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromDll.cs (1)
34var outputDll = Path.Combine(buildCommand.GetOutputDirectory(configuration: configuration).FullName, $"{testAppName}.dll");
CommandTests\Test\GivenDotnetTestContainsEnvironmentVariables.cs (1)
75var outputDll = Path.Combine(buildCommand.GetOutputDirectory(configuration: configuration).FullName, $"{TestAppName}.dll");
CommandTests\VSTest\VSTestTests.cs (1)
34var outputDll = Path.Combine(buildCommand.GetOutputDirectory(configuration: configuration).FullName, $"{testAppName}.dll");
CommandTests\Workload\Install\WorkloadGarbageCollectionTests.cs (2)
325Directory.CreateDirectory(Path.GetDirectoryName(packRecordPath.FullName)); 327File.WriteAllText(packRecordPath.FullName, packRecordContents);
GivenThatICareAboutVBApps.cs (1)
50publishCommand.GetOutputDirectory(configuration: configuration).FullName,
GivenThatWeWantToBeBackwardsCompatibleWith1xProjects.cs (1)
32var outputDll = Path.Combine(buildCommand.GetOutputDirectory(target, configuration).FullName, $"{testAppName}.dll");
PackagedCommandTests.cs (6)
195.WithWorkingDirectory(toolWithRandPkgNameDir.FullName) 196.Execute("pack", "-o", pkgsDir.FullName, "/p:version=1.0.0") 200.WithWorkingDirectory(appWithDepOnToolDir.FullName) 201.Execute("restore", "--source", pkgsDir.FullName) 205.WithWorkingDirectory(appWithDepOnToolDir.FullName) 258var p = ProjectRootElement.Open(project.FullName, new ProjectCollection(), true);
ShellShimTests\ShellShimRepositoryTests.cs (1)
512return new FilePath(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll"));
dotnet-dev-certs (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
dotnet-format (2)
Utilities\EditorConfigFinder.cs (2)
30editorConfigPaths.Add(files[index].FullName); 41editorConfigPaths.Add(files[0].FullName);
dotnet-format.UnitTests (1)
CodeFormatterTests.cs (1)
762DirectoryCopy(subdir.FullName, tempPath, copySubDirs);
dotnet-MsiInstallation.Tests (5)
Framework\VirtualMachine.cs (5)
473sb.AppendLine($"{Path.GetRelativePath(relativeTo, file.FullName)}:{file.LastWriteTimeUtc.Ticks}-{file.Length}"); 478sb.AppendLine(subDir.FullName); 492if (dirInfo.Root.FullName.Substring(1) != @":\") 497string driveLetter = dirInfo.Root.FullName.Substring(0, 1); 499string pathUnderDrive = dirInfo.FullName.Substring(3);
dotnet-openapi (2)
Commands\BaseCommand.cs (2)
128projectFile.FullName, 225WorkingDirectory = projectFile.Directory.FullName,
dotnet-svcutil.xmlserializer (3)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (3)
115throw new ToolInputException(SR.Format(SR.ErrInputFileNotAssemblyOrMetadata, fileInfo.FullName, path)); 135assembly = LoadAssembly(fileInfo.FullName); 171throw new ToolInputException(SR.Format(SR.ErrDirectoryNotFound, dirInfo.FullName));
dotnet-svcutil-lib (33)
Bootstrapper\SvcutilBootstrapper.cs (1)
99var projectFullPath = Path.Combine(this.Options.BootstrapPath.FullName, nameof(SvcutilBootstrapper), SvcutilBootstrapper.ProjectName);
CodeSerializer.cs (2)
32_outputFilePath = OutputPathHelper.BuildFilePath(s_defaultFileName, options.OutputDir.FullName, outputFilename, extension, CommandProcessorOptions.Switches.OutputFile.Name); 133string fileName = options.OutputFile?.FullName;
CommandProcessorOptions.cs (10)
216await ProcessOutputFileOptionAsync(this.OutputDir.FullName, cancellationToken); 390Path.GetDirectoryName(this.OutputFile.FullName) : Path.GetDirectoryName(Path.Combine(Directory.GetCurrentDirectory(), this.OutputFile.OriginalPath())); 651if (this.Project != null && PathHelper.GetRelativePath(this.OutputDir.FullName, new DirectoryInfo(this.Project.DirectoryPath), out var relPath)) 698var projectFullPath = Path.Combine(this.BootstrapPath.FullName, "TFMResolver", "TFMResolver.csproj"); 736var inputFiles = Metadata.MetadataFileNameManager.ResolveFiles(metadataUri.LocalPath).Select(f => f.FullName); 836string projFolder = Path.Combine(this.BootstrapPath.FullName, nameof(SvcutilBootstrapper)); 841assembly = Assembly.LoadFrom(assemblyFile.FullName); 1008if (!Directory.Exists(this.BootstrapPath.FullName)) 1010Directory.CreateDirectory(this.BootstrapPath.FullName); 1014await RuntimeEnvironmentHelper.TryCopyingConfigFiles(workingDirectory, this.BootstrapPath.FullName, logger, cancellationToken).ConfigureAwait(false);
Metadata\MetadataDocumentLoader.cs (4)
107this.metadataSourceFiles.AddRange(fileInfoList.Select(fi => new Uri(fi.FullName, UriKind.Absolute))); 148this.metadataSourceFiles.AddRange(fileInfoList.Select(fi => new Uri(fi.FullName, UriKind.Absolute))); 219if (!IsUriProcessed(fileInfo.FullName)) 223await LoadFromStreamAsync(fileStream, fileInfo.FullName, fileInfo.DirectoryName, cancellationToken).ConfigureAwait(false);
Metadata\MetadataDocumentSaver.cs (1)
143var missingRefs = files.Where(file => !this.MetadataFiles.Any(metaFile => MetadataFileNameManager.UriEqual(file.FullName, metaFile.SourceUri)));
Metadata\MetadataFileNameManager.cs (1)
248throw new DirectoryNotFoundException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrDirectoryNotFoundFormat, dirInfo.FullName));
Shared\MSBuildProj.cs (4)
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName; 797var assetsFile = new FileInfo(Path.Combine(this.DirectoryPath, "obj", "project.assets.json")).FullName; 1006.Where(f => PathHelper.GetFolderName(Path.GetDirectoryName(f)) == this.TargetFramework || Directory.GetParent(Directory.GetParent(f).FullName).Name == this.TargetFramework) 1010depsFile = depsFiles.FirstOrDefault()?.FullName;
Shared\Options\ApplicationOptions.cs (1)
140jsonText = File.ReadAllText(fileInfo.FullName);
Shared\Options\UpdateOptions.cs (2)
109this.OutputFile = new FileInfo(Path.Combine(optionsFileDirectory.FullName, this.OutputFile.OriginalPath())); 117if (!input.IsAbsoluteUri && PathHelper.IsFile(input, optionsFileDirectory.FullName, out var fileUri))
Shared\Utilities\PathHelper.cs (4)
85filePath = Path.Combine(directory.FullName, relPath); 114var parentSegments = Path.GetFullPath(parentPath.FullName).Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries); 178var directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName)); 198directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName + nextIndex));
Tool.cs (3)
145if (!File.Exists(options.OutputFile.FullName)) 268PathHelper.IsUnderDirectory(options.OutputFile.FullName, new DirectoryInfo(options.Project.DirectoryPath), out var filePath, out var relPath); 314var paramsFile = Path.Combine(options.OutputDir.FullName, CommandProcessorOptions.SvcutilParamsFileName);
dotnet-svcutil-lib.Tests (3)
FileUtil.cs (1)
35CopyDirectory(subdir.FullName, temppath);
FixupUtil.cs (1)
56var resultPathReplacement = Directory.GetParent(resultsPath).FullName;
TestInit.cs (1)
539vstestDir = new DirectoryInfo(Path.Combine(g_RepositoryRoot, "src", "dotnet-svcutil", "lib", "tests")).FullName;
dotnet-watch (2)
FileWatcher\PollingDirectoryWatcher.cs (1)
166filePath = entity.FullName;
PathUtilities.cs (1)
15return Directory.CreateTempSubdirectory().FullName;
dotnet-watch.Tests (1)
CommandLine\LaunchSettingsTests.cs (1)
136workingDirectory: Path.GetFullPath(directoryInfo.Parent.FullName));
EndToEnd.Tests (4)
GivenUsingDefaultRuntimeFrameworkVersions.cs (2)
29var projectFile = new DirectoryInfo(testProject.TestRoot).GetFiles("*.csproj").First().FullName; 59var resolvedVersionsFile = File.ReadAllLines(Path.Combine(binDirectory.FullName, outputFile));
ValidateInsertedManifests.cs (2)
23string manifestFile = new FileInfo(Path.Combine(manifestDir.FullName, "WorkloadManifest.json")).FullName;
FilesWebSite (1)
Controllers\DownloadFilesController.cs (1)
61return PhysicalFile(fileInfo.FullName, "text/plain");
GenerateDocumentationAndConfigFiles (10)
Program.cs (10)
260var fileWithPath = Path.Combine(directory.FullName, propsFileName); 269fileWithPath = Path.Combine(directory.FullName, propsFileToDisableNetAnalyzersInNuGetPackageName); 341var fileWithPath = Path.Combine(directory.FullName, analyzerDocumentationFileName); 436var fileWithPath = Path.Combine(directory.FullName, tempAnalyzerSarifFileName); 530Validate(Path.Combine(directory.FullName, analyzerSarifFileName), File.ReadAllText(fileWithPath), fileNamesWithValidationFailures); 566var fileWithPath = Path.Combine(directory.FullName, "RulesMissingDocumentation.md"); 902var rulesetFilePath = Path.Combine(directory.FullName, rulesetFileName); 967var editorconfigFilePath = Path.Combine(directory.FullName, ".editorconfig"); 1185var configFilePath = Path.Combine(directory.FullName, fileName.ToLowerInvariant()); 1397var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
GenerateRulesMissingDocumentation (1)
Program.cs (1)
41var fileWithPath = Path.Combine(directory.FullName, rulesMissingDocumentationFileName);
HelixTasks (7)
CreateLocalHelixTestLayout.cs (6)
29if (Directory.Exists(destination.FullName)) 31Directory.Delete(destination.FullName, true); 42if (source.FullName.ToLower() == target.FullName.ToLower()) 47if (Directory.Exists(target.FullName) == false) 49Directory.CreateDirectory(target.FullName);
TarGzFileCreateFromDirectory.cs (1)
120var parentDirectory = Directory.GetParent(SourceDirectory)?.Parent?.FullName;
IIS.FunctionalTests (14)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (4)
215file.CopyTo(Path.Combine(toInfo.FullName, file.Name)); 250imageAttribute.Value = imageAttribute.Value.Replace(sourceDirectory.FullName, destinationDirectory.FullName); 265var destFileName = Path.Combine(target.FullName, fileInfo.Name);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (7)
83if (directoryInfo.FullName != target.FullName) 88logger?.LogDebug($"Processing {target.FullName}"); 92var destFileName = Path.Combine(target.FullName, fileInfo.Name); 267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>"); 272.SetAttributeValue("physicalPath", rootApplicationDirectory.FullName); 276return rootApplicationDirectory.FullName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
40return Task.FromResult(new PublishedApplication(target.FullName, logger));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (2)
129_publishedApplication = new PublishedApplication(destination.FullName, Logger); 134.SetAttributeValue("physicalPath", destination.FullName);
IIS.LongTests (8)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (7)
83if (directoryInfo.FullName != target.FullName) 88logger?.LogDebug($"Processing {target.FullName}"); 92var destFileName = Path.Combine(target.FullName, fileInfo.Name); 267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>"); 272.SetAttributeValue("physicalPath", rootApplicationDirectory.FullName); 276return rootApplicationDirectory.FullName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
40return Task.FromResult(new PublishedApplication(target.FullName, logger));
IIS.NewHandler.FunctionalTests (8)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (7)
83if (directoryInfo.FullName != target.FullName) 88logger?.LogDebug($"Processing {target.FullName}"); 92var destFileName = Path.Combine(target.FullName, fileInfo.Name); 267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>"); 272.SetAttributeValue("physicalPath", rootApplicationDirectory.FullName); 276return rootApplicationDirectory.FullName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
40return Task.FromResult(new PublishedApplication(target.FullName, logger));
IIS.NewShim.FunctionalTests (8)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (7)
83if (directoryInfo.FullName != target.FullName) 88logger?.LogDebug($"Processing {target.FullName}"); 92var destFileName = Path.Combine(target.FullName, fileInfo.Name); 267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>"); 272.SetAttributeValue("physicalPath", rootApplicationDirectory.FullName); 276return rootApplicationDirectory.FullName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
40return Task.FromResult(new PublishedApplication(target.FullName, logger));
IIS.ShadowCopy.Tests (12)
ShadowCopyTests.cs (4)
65if (!tempDirectoryPath.Equals(dirInfo.FullName)) 127dllPath = file.FullName; 355DirectoryPath = directoryInfo.FullName; 428DirectoryCopy(subdir.FullName, tempPath, copySubDirs);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (7)
83if (directoryInfo.FullName != target.FullName) 88logger?.LogDebug($"Processing {target.FullName}"); 92var destFileName = Path.Combine(target.FullName, fileInfo.Name); 267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>"); 272.SetAttributeValue("physicalPath", rootApplicationDirectory.FullName); 276return rootApplicationDirectory.FullName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
40return Task.FromResult(new PublishedApplication(target.FullName, logger));
IISExpress.FunctionalTests (14)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (4)
215file.CopyTo(Path.Combine(toInfo.FullName, file.Name)); 250imageAttribute.Value = imageAttribute.Value.Replace(sourceDirectory.FullName, destinationDirectory.FullName); 265var destFileName = Path.Combine(target.FullName, fileInfo.Name);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (7)
83if (directoryInfo.FullName != target.FullName) 88logger?.LogDebug($"Processing {target.FullName}"); 92var destFileName = Path.Combine(target.FullName, fileInfo.Name); 267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>"); 272.SetAttributeValue("physicalPath", rootApplicationDirectory.FullName); 276return rootApplicationDirectory.FullName;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
40return Task.FromResult(new PublishedApplication(target.FullName, logger));
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (2)
129_publishedApplication = new PublishedApplication(destination.FullName, Logger); 134.SetAttributeValue("physicalPath", destination.FullName);
illink (4)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (11)
UserJwtsTestFixture.cs (7)
65Directory.CreateDirectory(Path.Combine(projectPath.FullName, "Properties")); 74Path.Combine(projectPath.FullName, "TestProject.csproj"), 77File.WriteAllText(Path.Combine(projectPath.FullName, "Properties", "launchSettings.json"), 81Path.Combine(projectPath.FullName, "appsettings.Development.json"), 85Path.Combine(projectPath.FullName, "appsettings.Local.json"), 101_disposables.Push(() => TryDelete(projectPath.FullName)); 103return projectPath.FullName;
UserJwtsTests.cs (4)
709Directory.SetCurrentDirectory(path.FullName); 735Directory.SetCurrentDirectory(path.FullName); 760Directory.SetCurrentDirectory(path.FullName); 785Directory.SetCurrentDirectory(path.FullName);
Microsoft.AspNetCore.DataProtection (13)
Internal\ContainerUtils.cs (2)
65var fs_file = new DirectoryInfo(fields[1].TrimEnd(Path.DirectorySeparatorChar)).FullName; 70if (fs_file.Equals(dir.FullName.TrimEnd(Path.DirectorySeparatorChar), StringComparison.Ordinal))
Internal\KeyManagementOptionsPostSetup.cs (1)
75logger.UsingReadOnlyKeyConfiguration(keyDirectory.FullName);
KeyManagement\XmlKeyManager.cs (3)
654_logger.UsingAzureAsKeyRepository(azureWebSitesKeysFolder.FullName); 680_logger.UsingProfileAsKeyRepositoryWithDPAPI(localAppDataKeysFolder.FullName); 684_logger.UsingProfileAsKeyRepository(localAppDataKeysFolder.FullName);
Repositories\FileSystemXmlRepository.cs (7)
40_logger.UsingEphemeralFileSystemLocationInContainer(Directory.FullName); 87yield return ReadElementFromFile(fileSystemInfo.FullName); 140var tempFilename = Path.Combine(Directory.FullName, Guid.NewGuid().ToString() + ".tmp"); 141var finalFilename = Path.Combine(Directory.FullName, filename + ".xml"); 188var fullPath = fileSystemInfo.FullName; 202_logger.DeletingFile(fileSystemInfo.FullName); 210_logger.FailedToDeleteFile(fileSystemInfo.FullName, ex);
Microsoft.AspNetCore.DataProtection.Extensions.Tests (6)
DataProtectionProviderTests.cs (6)
41string fileText = File.ReadAllText(allFiles[0].FullName); 76var fileText = File.ReadAllText(file.FullName); 110string fileText = File.ReadAllText(allFiles[0].FullName); 156string fileText = File.ReadAllText(allFiles[0].FullName); 236string fileText = File.ReadAllText(allFiles[0].FullName); 307string fileText = File.ReadAllText(allFiles[0].FullName);
Microsoft.AspNetCore.DataProtection.Tests (15)
Internal\KeyManagementOptionsPostSetupTest.cs (3)
16private static readonly string keyDir = new DirectoryInfo("/testpath").FullName; 165Assert.Equal(keyDir, repository.Directory.FullName); 184Assert.NotEqual(keyDir, (repository as FileSystemXmlRepository)?.Directory.FullName);
Repositories\FileSystemXmlRepositoryTests.cs (10)
21var expectedDir = new DirectoryInfo(Path.Combine(baseDir, "DataProtection-Keys")).FullName; 27Assert.Equal(expectedDir, defaultDirInfo.FullName); 82var parsedElement = XElement.Parse(File.ReadAllText(fileInfo.FullName)); 116var parsedElement = XElement.Parse(File.ReadAllText(fileInfo.FullName)); 205var filePath1 = Path.Combine(dirInfo.FullName, "friendly1.xml"); 206var filePath2 = Path.Combine(dirInfo.FullName, "friendly2.xml"); 207var filePath3 = Path.Combine(dirInfo.FullName, "friendly3.xml"); 222fileLock2 = new FileStream(Path.Combine(dirInfo.FullName, "friendly2.xml"), FileMode.Open, FileAccess.ReadWrite, FileShare.None); 255var filePath = Path.Combine(dirInfo.FullName, "friendly1.xml"); 290Assert.Contains(Resources.FormatFileSystem_EphemeralKeysLocationInContainer(dirInfo.FullName), loggerFactory.ToString());
ServiceCollectionTests.cs (2)
74var keyDir = new DirectoryInfo("/testpath").FullName; 97Assert.Equal(keyDir, repository.Directory.FullName);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
Microsoft.AspNetCore.FunctionalTests (2)
WebHostFunctionalTests.cs (2)
242var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "DefaultBuilder.slnf")); 245return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "testassets"));
Microsoft.AspNetCore.Identity.Test (2)
IdentityUIScriptsTest.cs (2)
175var solutionPath = Directory.EnumerateFiles(directoryInfo.FullName, "*.sln").FirstOrDefault(); 178return directoryInfo.FullName;
Microsoft.AspNetCore.InternalTesting (3)
TestPathUtilities.cs (3)
19var projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, $"{solution}.slnf")); 25projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "AspNetCore.slnx")); 29directoryInfo = new DirectoryInfo(Path.Combine(directoryInfo.FullName, "src"));
Microsoft.AspNetCore.Mvc.Testing (2)
WebApplicationFactory.cs (2)
530depsFile.FullName, 531Path.GetFileName(depsFile.FullName)));
Microsoft.AspNetCore.Server.IntegrationTesting (6)
ApplicationPublisher.cs (2)
31+ $" --output \"{publishDirectory.FullName}\"" 99return Task.FromResult(new PublishedApplication(publishDirectory.FullName, logger));
CachingApplicationPublisher.cs (3)
56return target.FullName; 66logger.LogDebug($"Processing {target.FullName}"); 70var destFileName = Path.Combine(target.FullName, fileInfo.Name);
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
298DirectoryCopy(subdir.FullName, temppath, copySubDirs);
Microsoft.AspNetCore.Server.Kestrel.Core (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
Microsoft.AspNetCore.Server.Kestrel.Tests (5)
KestrelConfigurationLoaderTests.cs (5)
803tempDir = Directory.CreateTempSubdirectory().FullName; 1208var tempDir = Directory.CreateTempSubdirectory().FullName; 1222var oldCertPath = Path.Combine(oldDir.FullName, "tls.key"); 1223var newCertPath = Path.Combine(newDir.FullName, "tls.key"); 1246new KeyValuePair<string, string>("Endpoints:End1:Certificate:Path", fileLink.FullName),
Microsoft.AspNetCore.TestHost (2)
WebHostBuilderExtensions.cs (2)
196var solutionPath = Directory.EnumerateFiles(directoryInfo.FullName, solutionName).FirstOrDefault(); 199builder.UseContentRoot(Path.GetFullPath(Path.Combine(directoryInfo.FullName, solutionRelativePath)));
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
644options.StartInfo.WorkingDirectory = tmpDir.FullName;
Microsoft.Build.BuildCheck.UnitTests (2)
EndToEndTests.cs (1)
984string checksPackagesPath = Path.Combine(Directory.GetParent(AssemblyLocation)?.Parent?.FullName ?? string.Empty, "CustomChecks");
TestAssemblyInfo.cs (1)
149currentFolder = Directory.GetParent(currentFolder)?.FullName;
Microsoft.Build.CommandLine.UnitTests (3)
TestAssemblyInfo.cs (1)
149currentFolder = Directory.GetParent(currentFolder)?.FullName;
XMake_Tests.cs (2)
2031string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName; 2054string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName;
Microsoft.Build.Engine.OM.UnitTests (8)
BuildEnvironmentHelper.cs (2)
586=> currentToolsDirectory.Parent?.FullName, 599MSBuildToolsDirectoryRoot = currentToolsDirectory.Parent?.FullName;
FileUtilities.cs (1)
1321return parent?.FullName ?? path;
TempFileUtilities.cs (1)
216CopyDirectory(subdirInfo.FullName, destDir);
TestAssemblyInfo.cs (1)
149currentFolder = Directory.GetParent(currentFolder)?.FullName;
TransientIO.cs (3)
60public string RootFolder => EnsureTempRoot().FullName; 114if (this.root != null && Directory.Exists(this.root.FullName)) 118FileUtilities.DeleteDirectoryNoThrow(this.root.FullName, true);
Microsoft.Build.Engine.UnitTests (8)
BackEnd\SdkResolverLoader_Tests.cs (6)
65var f1 = Path.Combine(d1.FullName, "Resolver1.dll"); 68var f2 = Path.Combine(d1.FullName, "Dependency.dll"); 69var f3 = Path.Combine(d1.FullName, "InvalidName.dll"); 70var f4 = Path.Combine(d1.FullName, "NoResolver.txt"); 97var wrongResolverDll = Path.Combine(testFolder.FullName, "MyTestResolver.dll"); 98var resolverManifest = Path.Combine(testFolder.FullName, "MyTestResolver.xml");
Evaluation\ProjectSdkImplicitImport_Tests.cs (1)
192string testSdkDirectory = Directory.CreateDirectory(Path.Combine(_testSdkRoot, sdkName, "Sdk")).FullName;
TestAssemblyInfo.cs (1)
149currentFolder = Directory.GetParent(currentFolder)?.FullName;
Microsoft.Build.Framework.UnitTests (1)
TestAssemblyInfo.cs (1)
149currentFolder = Directory.GetParent(currentFolder)?.FullName;
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
325Utilities.DeleteNoThrow(desiredPdbInfo.FullName); 329File.Move(actualPdbInfo.FullName, desiredLocation);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
325Utilities.DeleteNoThrow(desiredPdbInfo.FullName); 329File.Move(actualPdbInfo.FullName, desiredLocation);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
DotNetSdkTests.cs (2)
579foundConfigs.Add(editorConfigs[0].FullName); 585foundConfigs.Add(globalConfigs[0].FullName);
Microsoft.Build.Tasks.Core (45)
BuildEnvironmentHelper.cs (2)
586=> currentToolsDirectory.Parent?.FullName, 599MSBuildToolsDirectoryRoot = currentToolsDirectory.Parent?.FullName;
DownloadFile.cs (7)
180var destinationFile = new FileInfo(Path.Combine(destinationDirectory.FullName, filename)); 185Log.LogMessageFromResources(MessageImportance.Normal, "DownloadFile.DidNotDownloadBecauseOfFileMatch", SourceUrl, destinationFile.FullName, nameof(SkipUnchangedFiles), "true"); 187DownloadedFile = new TaskItem(destinationFile.FullName); 193Log.LogErrorFromResources("DownloadFile.Downloading", SourceUrl, destinationFile.FullName, response.Content.Headers.ContentLength); 201using (var target = new FileStream(destinationFile.FullName, FileMode.Create, FileAccess.Write, FileShare.None)) 203Log.LogMessageFromResources(MessageImportance.High, "DownloadFile.Downloading", SourceUrl, destinationFile.FullName, response.Content.Headers.ContentLength); 215DownloadedFile = new TaskItem(destinationFile.FullName);
FileMatcher.cs (1)
840if (linkTarget is not null && recursionState.BaseDirectory.Contains(linkTarget.FullName))
FileUtilities.cs (1)
1321return parent?.FullName ?? path;
TempFileUtilities.cs (1)
216CopyDirectory(subdirInfo.FullName, destDir);
Unzip.cs (15)
163string fullDestinationDirectoryPath = Path.GetFullPath(FileUtilities.EnsureTrailingSlash(destinationDirectory.FullName)); 173string fullDestinationPath = Path.GetFullPath(Path.Combine(destinationDirectory.FullName, zipArchiveEntry.FullName)); 180if (Path.GetFileName(destinationPath.FullName).Length == 0) 183Directory.CreateDirectory(destinationPath.FullName); 187if (!destinationPath.FullName.StartsWith(destinationDirectory.FullName, StringComparison.OrdinalIgnoreCase)) 191Log.LogErrorFromResources("Unzip.ErrorExtractingResultsInFilesOutsideDestination", destinationPath.FullName, destinationDirectory.FullName); 197Log.LogMessageFromResources(MessageImportance.Low, "Unzip.DidNotUnzipBecauseOfFileMatch", zipArchiveEntry.FullName, destinationPath.FullName, nameof(SkipUnchangedFiles), "true"); 202Log.LogErrorFromResources("Unzip.FileComment", zipArchiveEntry.FullName, destinationPath.FullName); 224string lockedFileMessage = LockCheck.GetLockedFileMessage(destinationPath.FullName); 225Log.LogErrorWithCodeFromResources("Unzip.ErrorCouldNotMakeFileWriteable", zipArchiveEntry.FullName, destinationPath.FullName, e.Message, lockedFileMessage); 232Log.LogMessageFromResources(MessageImportance.Normal, "Unzip.FileComment", zipArchiveEntry.FullName, destinationPath.FullName); 259using (Stream destination = File.Open(destinationPath.FullName, FileMode.Create, FileAccess.Write, FileShare.None)) 275Log.LogErrorWithCodeFromResources("Unzip.ErrorCouldNotExtractFile", zipArchiveEntry.FullName, destinationPath.FullName, e.Message);
ZipDirectory.cs (18)
66Log.LogErrorWithCodeFromResources("ZipDirectory.ErrorDirectoryDoesNotExist", sourceDirectory.FullName); 80Log.LogErrorWithCodeFromResources("ZipDirectory.ErrorFileExists", destinationFile.FullName); 87File.Delete(destinationFile.FullName); 91string lockedFileMessage = LockCheck.GetLockedFileMessage(destinationFile.FullName); 92Log.LogErrorWithCodeFromResources("ZipDirectory.ErrorFailed", sourceDirectory.FullName, destinationFile.FullName, e.Message, lockedFileMessage); 102Log.LogErrorFromResources("ZipDirectory.Comment", sourceDirectory.FullName, destinationFile.FullName); 106Log.LogMessageFromResources(MessageImportance.High, "ZipDirectory.Comment", sourceDirectory.FullName, destinationFile.FullName); 109ZipFile.CreateFromDirectory(sourceDirectory.FullName, destinationFile.FullName); 113ZipFile.CreateFromDirectory(sourceDirectory.FullName, destinationFile.FullName, compressionLevel.Value, includeBaseDirectory: false); 129ZipFile.CreateFromDirectory(sourceDirectory.FullName, destinationFile.FullName); 135Log.LogErrorWithCodeFromResources("ZipDirectory.ErrorFailed", sourceDirectory.FullName, destinationFile.FullName, e.Message, string.Empty);
Microsoft.Build.Tasks.UnitTests (19)
ConvertToAbsolutePath_Tests.cs (3)
44Assert.EndsWith(testFile.FullName, t.AbsolutePaths[0].ItemSpec); 76Assert.EndsWith(testFile.FullName, t.AbsolutePaths[0].ItemSpec); 106Assert.Equal(testFile.FullName, t.AbsolutePaths[0].ItemSpec);
DownloadFile_Tests.cs (9)
79file.Exists.ShouldBeTrue(file.FullName); 81File.ReadAllText(file.FullName).ShouldBe("Success!"); 83downloadFile.DownloadedFile.ItemSpec.ShouldBe(file.FullName); 124file.Exists.ShouldBeTrue(file.FullName); 126File.ReadAllText(file.FullName).ShouldBe("Success!"); 128downloadFile.DownloadedFile.ItemSpec.ShouldBe(file.FullName); 158file.Exists.ShouldBeTrue(file.FullName); 160File.ReadAllText(file.FullName).ShouldBe("Success!"); 162downloadFile.DownloadedFile.ItemSpec.ShouldBe(file.FullName);
FileStateTests.cs (3)
84Assert.Equal(info.FullName, state.Name); 213Assert.Equal(info.FullName, state.Name); 214string originalName = info.FullName;
FindUnderPath_Tests.cs (1)
110Assert.Equal(testFile.FullName, t.InPath[0].ItemSpec);
PortableTasks_Tests.cs (2)
59File.Copy(file.FullName, Path.Combine(folder, file.Name)); 60_outputHelper.WriteLine($"Copied {file.FullName} to {Path.Combine(folder, file.Name)}");
TestAssemblyInfo.cs (1)
149currentFolder = Directory.GetParent(currentFolder)?.FullName;
Microsoft.Build.UnitTests.Shared (2)
TestEnvironment.cs (2)
546string contents = File.ReadAllText(file.FullName); 549FileUtilities.DeleteNoThrow(file.FullName);
Microsoft.Build.Utilities.Core (21)
BuildEnvironmentHelper.cs (2)
586=> currentToolsDirectory.Parent?.FullName, 599MSBuildToolsDirectoryRoot = currentToolsDirectory.Parent?.FullName;
FileMatcher.cs (1)
840if (linkTarget is not null && recursionState.BaseDirectory.Contains(linkTarget.FullName))
FileUtilities.cs (1)
1321return parent?.FullName ?? path;
FrameworkLocationHelper.cs (1)
1062fixedPath = fixedPathInfo.FullName;
TempFileUtilities.cs (1)
216CopyDirectory(subdirInfo.FullName, destDir);
ToolLocationHelper.cs (15)
2526ErrorUtilities.DebugTraceMessage("GatherExtensionSDKs", "Found ExtensionsSDK folder '{0}'. ", extensionSdksDirectory.FullName); 2529ErrorUtilities.DebugTraceMessage("GatherExtensionSDKs", "Found '{0}' sdkName directories under '{1}'", sdkNameDirectories.Length, extensionSdksDirectory.FullName); 2535ErrorUtilities.DebugTraceMessage("GatherExtensionSDKs", "Found '{0}' sdkVersion directories under '{1}'", sdkVersionDirectories.Length, sdkNameFolders.FullName); 2541ErrorUtilities.DebugTraceMessage("GatherExtensionSDKs", "Parsed sdk version folder '{0}' under '{1}'", sdkVersionDirectory.Name, sdkVersionDirectory.FullName); 2552string pathToSDKManifest = Path.Combine(sdkVersionDirectory.FullName, "SDKManifest.xml"); 2555targetPlatformSDK.ExtensionSDKs.Add(SDKKey, FileUtilities.EnsureTrailingSlash(sdkVersionDirectory.FullName)); 2564ErrorUtilities.DebugTraceMessage("GatherExtensionSDKs", "SDKKey '{0}' was already found, not adding sdk under '{1}'", SDKKey, sdkVersionDirectory.FullName); 2569ErrorUtilities.DebugTraceMessage("GatherExtensionSDKs", "Failed to parse sdk version folder '{0}' under '{1}'", sdkVersionDirectory.Name, sdkVersionDirectory.FullName); 2627string platformSDKDirectory = Path.Combine(rootPathWithIdentifier.FullName, version); 3039ErrorUtilities.DebugTraceMessage("GatherPlatformsForSdk", "Found '{0}' platform version directories under '{1}'", platformVersions.Length, platformIdentifier.FullName); 3055string pathToPlatformManifest = Path.Combine(platformVersion.FullName, "Platform.xml"); 3058sdk.Platforms.Add(sdkKey, FileUtilities.EnsureTrailingSlash(platformVersion.FullName)); 3067ErrorUtilities.DebugTraceMessage("GatherPlatformsForSdk", "SDKKey '{0}' was already found, not adding platform under '{1}'", sdkKey, platformVersion.FullName); 3072ErrorUtilities.DebugTraceMessage("GatherPlatformsForSdk", "Failed to parse platform version folder '{0}' under '{1}'", platformVersion.Name, platformVersion.FullName); 3198pathToReturn = Directory.GetParent(pathToReturn).FullName;
Microsoft.Build.Utilities.UnitTests (2)
TestAssemblyInfo.cs (1)
149currentFolder = Directory.GetParent(currentFolder)?.FullName;
ToolTask_Tests.cs (1)
664string directoryNamedSameAsTool = Directory.CreateDirectory(Path.Combine(tempDirectory, toolName)).FullName;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
8412csc = CreateCSharpCompiler(null, Directory.GetParent(baseDir).FullName, new[] { source, "/preferreduilang:en" }); 8440csc = CreateCSharpCompiler(null, Directory.GetParent(baseDir).FullName, new[] { source, "/preferreduilang:en", "/fullpaths" });
Microsoft.CodeAnalysis.Features (9)
MetadataAsSource\MetadataAsSourceFileService.cs (1)
137TryDeleteFolderWhichContainsReadOnlyFiles(directoryInfo.FullName);
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (8)
183Path.Combine(_cacheDirectoryInfo.FullName, ConvertToFileName(_source) + ".txt")); 344var tempFilePath = Path.Combine(_cacheDirectoryInfo.FullName, guidString + ".tmp"); 366_service._ioService.Replace(tempFilePath, databaseFileInfo.FullName, destinationBackupFileName: null, ignoreMetadataErrors: true); 372_service._ioService.Move(tempFilePath, databaseFileInfo.FullName); 386=> new(Path.ChangeExtension(databaseFileInfo.FullName, ".bin")); 427getDatabaseBytes: () => isBinary ? _service._ioService.ReadAllBytes(databaseFileInfo.FullName) : databaseBytes, 442return (_service._ioService.ReadAllBytes(databaseBinaryFileInfo.FullName), isBinary: true); 449return (_service._ioService.ReadAllBytes(databaseFileInfo.FullName), isBinary: false);
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\LanguageServerWorkspaceFactory.cs (1)
44.Select(f => f.FullName)
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
34s_gacDirectory = Directory.GetParent(Path.GetDirectoryName(systemAssemblyFile)).Parent.FullName;
Microsoft.CodeAnalysis.Workspaces (1)
Rename\ConflictEngine\MutableConflictResolution.cs (1)
104var directory = Directory.GetParent(document.FilePath)?.FullName;
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
159s_monoMSBuildDirectory = versionDirectory.EnumerateDirectories().SingleOrDefault(d => string.Equals(d.Name, "bin", StringComparison.OrdinalIgnoreCase))?.FullName;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
159s_monoMSBuildDirectory = versionDirectory.EnumerateDirectories().SingleOrDefault(d => string.Equals(d.Name, "bin", StringComparison.OrdinalIgnoreCase))?.FullName;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
NewlyCreatedProjectsFromDotNetNew.cs (1)
52?.Parent?.Parent?.Parent?.Parent?.Parent?.FullName;
Utilities\DotNetSdkMSBuildInstalled.cs (1)
31?.Parent?.Parent?.Parent?.Parent?.Parent?.FullName;
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
57OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput");
Microsoft.DotNet.ApiDiff (1)
FileOutputDiffGenerator.cs (1)
181foreach (string line in File.ReadLines(file.FullName))
Microsoft.DotNet.ApiDiff.Tests (10)
Diff.Attribute.Tests.cs (2)
743throw new FileNotFoundException($"{file.FullName} file not found."); 745string[] attributesToExclude = File.ReadAllLines(file.FullName);
Diff.Disk.Tests.cs (8)
276inputFolderPath.FullName, 282outputFolderPath.FullName, 288VerifyDiskWrite(outputFolderPath.FullName, DefaultTableOfContentsTitle, ExpectedEmptyTableOfContents, []); 430inputFolderPath.FullName, 436outputFolderPath.FullName, 442string tableOfContentsMarkdownFilePath = Path.Join(outputFolderPath.FullName, $"{DefaultTableOfContentsTitle}.md"); 447string myAssemblyMarkdownFilePath = Path.Join(outputFolderPath.FullName, $"{DefaultTableOfContentsTitle}_{DefaultAssemblyName}.md"); 552await File.WriteAllLinesAsync(file.FullName, list);
Microsoft.DotNet.ApiDiff.Tool (3)
Program.cs (3)
159string assembliesToExclude = string.Join(", ", diffConfig.FilesWithAssembliesToExclude?.Select(a => a.FullName) ?? []); 160string attributesToExclude = string.Join(", ", diffConfig.FilesWithAttributesToExclude?.Select(a => a.FullName) ?? []); 161string apisToExclude = string.Join(", ", diffConfig.FilesWithApisToExclude?.Select(a => a.FullName) ?? []);
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
39.Select(packageIndexFileInfo => $"{packageIndexFileInfo.FullName}:{packageIndexFileInfo.Length}:{packageIndexFileInfo.LastWriteTimeUtc.Ticks}"));
Microsoft.DotNet.Cli.Utils (3)
PathUtility.cs (3)
138var path1 = EnsureTrailingSlash(directory.FullName); 140var path2 = childItem.FullName; 408var filePath = Path.Combine(directory.FullName, relativeFilePath);
Microsoft.DotNet.Configurer (1)
CliFolderPathCalculator.cs (1)
18Path.Combine(new DirectoryInfo(AppContext.BaseDirectory).Parent?.FullName ?? string.Empty, "NuGetFallbackFolder");
Microsoft.DotNet.Helix.JobSender (11)
Payloads\ArchivePayload.cs (6)
29Archive.FullName)); 33var alreadyUploadedFile = new FileInfo($"{Archive.FullName}.payload"); 36log?.Invoke($"Using previously uploaded payload for {Archive.FullName}"); 37return File.ReadAllText(alreadyUploadedFile.FullName); 40using (var stream = File.OpenRead(Archive.FullName)) 43File.WriteAllText(alreadyUploadedFile.FullName, zipUri.AbsoluteUri);
Payloads\DirectoryPayload.cs (5)
28public string NormalizedDirectoryPath => s_helpers.RemoveTrailingSlash(DirectoryInfo.FullName); 47return File.ReadAllText(alreadyUploadedFile.FullName); 58file.FullName.Substring(basePath.Length + 1); // +1 prevents it from including the leading backslash 66zip.CreateEntryFromFile(file.FullName, zipEntryName); 72File.WriteAllText(alreadyUploadedFile.FullName, zipUri.AbsoluteUri);
Microsoft.DotNet.Helix.Sdk (7)
CommandPayload.cs (3)
53var scriptFile = new FileInfo(Path.Combine(Directory.FullName, name)); 55File.WriteAllText(scriptFile.FullName, contents.ToString(), s_utf8NoBom); 63directory = Directory.FullName;
DownloadFromResultsContainer.cs (4)
52using (FileStream stream = File.Open(Path.Combine(directory.FullName, MetadataFile), FileMode.Create, FileAccess.Write)) 60await Task.WhenAll(WorkItems.Select(wi => DownloadFilesForWorkItem(wi, directory.FullName, _cancellationSource.Token))); 80string destinationFile = Path.Combine(destinationDir.FullName, file); 84Directory.CreateDirectory(Path.Combine(destinationDir.FullName, Path.GetDirectoryName(file)));
Microsoft.DotNet.Internal.SymbolHelper (2)
SymbolUploadHelper.cs (2)
269string packageExtractDir = packageDirInfo.FullName; 326logger.Information("Cleaning up temporary directory {0}", packageDirInfo.FullName);
Microsoft.DotNet.InternalAbstractions (3)
DirectoryPath.cs (2)
55return new DirectoryPath(parentDirectory.FullName); 68return new DirectoryPath(parentDirectory.FullName);
PathUtilities.cs (1)
15return Directory.CreateTempSubdirectory().FullName;
Microsoft.DotNet.MSBuildSdkResolver.Tests (3)
GivenAnMSBuildSdkResolver.cs (3)
603new sdkResolver::Microsoft.DotNet.DotNetSdkResolver.VSSettings(environment.VSSettingsFile?.FullName, environment.DisallowPrereleaseByDefault), null, null); 660: new VSSettings(VSSettingsFile?.FullName, DisallowPrereleaseByDefault)); 874File.WriteAllText(VSSettingsFile.FullName, $"UsePreviews={!disallowPreviews}");
Microsoft.DotNet.Open.Api.Tools.Tests (2)
OpenApiAddFileTests.cs (2)
95projXml.Load(csproj.FullName); 120projXml.Load(csproj.FullName);
Microsoft.DotNet.SwaggerGenerator.CmdLine (2)
Program.cs (2)
104string fullPath = Path.Combine(outputDirectory.FullName, path); 107File.WriteAllText(file.FullName, contents);
Microsoft.DotNet.SwaggerGenerator.MSBuild (4)
GenerateSwaggerCode.cs (4)
82string fullPath = Path.Combine(outputDirectory.FullName, path); 85Log.LogMessage(MessageImportance.Normal, $"Writing file '{file.FullName}'"); 86File.WriteAllText(file.FullName, contents); 87generatedFiles.Add(new TaskItem(file.FullName));
Microsoft.Extensions.AI.Evaluation.Console (4)
Commands\CleanCacheCommand.cs (1)
25string storageRootPath = storageRootDir.FullName;
Commands\CleanResultsCommand.cs (1)
30string storageRootPath = storageRootDir.FullName;
Commands\ReportCommand.cs (2)
35string storageRootPath = storageRootDir.FullName; 79string outputFilePath = outputFile.FullName;
Microsoft.Extensions.AI.Evaluation.Reporting (4)
Storage\DiskBasedResultStore.cs (4)
76string.Format(CultureInfo.CurrentCulture, DeserializationFailedMessage, resultFile.FullName)) 97var resultFile = new FileInfo(Path.Combine(resultDir.FullName, $"{result.IterationName}.json")); 296var scenarioDir = new DirectoryInfo(Path.Combine(executionDir.FullName, scenarioName)); 332var resultFile = new FileInfo(Path.Combine(scenarioDir.FullName, $"{iterationName}.json"));
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\WellKnownPaths.cs (1)
60directory = Directory.GetParent(directory)?.FullName;
Microsoft.Extensions.ApiDescription.Tool.Tests (36)
GetDocumentTests.cs (36)
34"--output", outputPath.FullName, 35"--file-list", Path.Combine(outputPath.FullName, "file-list.cache") 39using var stream = new MemoryStream(File.ReadAllBytes(Path.Combine(outputPath.FullName, "Sample.json"))); 60"--output", outputPath.FullName, 61"--file-list", Path.Combine(outputPath.FullName, "file-list.cache"), 66using var stream = new MemoryStream(File.ReadAllBytes(Path.Combine(outputPath.FullName, "Sample.json"))); 86"--output", outputPath.FullName, 87"--file-list", Path.Combine(outputPath.FullName, "file-list.cache"), 93using var stream = new MemoryStream(File.ReadAllBytes(Path.Combine(outputPath.FullName, "Sample.json"))); 113"--output", outputPath.FullName, 114"--file-list", Path.Combine(outputPath.FullName, "file-list.cache"), 119var expectedDocumentPath = Path.Combine(outputPath.FullName, "Sample_internal.json"); 122var documentNames = Directory.GetFiles(outputPath.FullName).Where(documentName => documentName.EndsWith(".json", StringComparison.Ordinal)).ToList(); 126using var stream = new MemoryStream(File.ReadAllBytes(Path.Combine(outputPath.FullName, "Sample_internal.json"))); 147"--output", outputPath.FullName, 148"--file-list", Path.Combine(outputPath.FullName, "file-list.cache"), 154Assert.False(File.Exists(Path.Combine(outputPath.FullName, "Sample.json"))); 155Assert.False(File.Exists(Path.Combine(outputPath.FullName, "Sample_internal.json"))); 156Assert.False(File.Exists(Path.Combine(outputPath.FullName, "Sample_invalid.json"))); 176"--output", outputPath.FullName, 177"--file-list", Path.Combine(outputPath.FullName, "file-list.cache"), 182Assert.True(File.Exists(Path.Combine(outputPath.FullName, $"{fileName}.json"))); 183Assert.True(File.Exists(Path.Combine(outputPath.FullName, $"{fileName}_internal.json"))); 184Assert.False(File.Exists(Path.Combine(outputPath.FullName, "Sample.json"))); 185Assert.False(File.Exists(Path.Combine(outputPath.FullName, "Sample_internal.json"))); 203"--output", outputPath.FullName, 204"--file-list", Path.Combine(outputPath.FullName, "file-list.cache"), 211Assert.False(File.Exists(Path.Combine(outputPath.FullName, $"{fileName}.json"))); 212Assert.False(File.Exists(Path.Combine(outputPath.FullName, "Sample.json"))); 213Assert.False(File.Exists(Path.Combine(outputPath.FullName, "Sample_internal.json"))); 229"--output", outputPath.FullName, 230"--file-list", Path.Combine(outputPath.FullName, "file-list.cache"), 235Assert.False(File.Exists(Path.Combine(outputPath.FullName, ".json"))); 236Assert.False(File.Exists(Path.Combine(outputPath.FullName, "_internal.json"))); 237Assert.True(File.Exists(Path.Combine(outputPath.FullName, "Sample.json"))); 238Assert.True(File.Exists(Path.Combine(outputPath.FullName, "Sample_internal.json")));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (7)
Linux\Resources\HardcodedValueFileSystem.cs (7)
27_fileContent = fileContent.ToDictionary(static x => x.Key.FullName, static y => y.Value, StringComparer.OrdinalIgnoreCase); 33return _fileContent.ContainsKey(fileInfo.FullName); 47if (_fileContent.Count == 0 || !_fileContent.TryGetValue(file.FullName, out var content)) 61if (_fileContent.Count == 0 || !_fileContent.TryGetValue(file.FullName, out var content)) 75if (_fileContent.Count != 0 && _fileContent.TryGetValue(file.FullName, out var content)) 92_fileContent[file.FullName] = value; 97bool flag = !_fileContent.TryGetValue(file.FullName, out var content);
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalDirectoryInfo.cs (1)
46public string PhysicalPath => _info.FullName;
PhysicalFileInfo.cs (1)
32public string PhysicalPath => _info.FullName;
Microsoft.Extensions.FileSystemGlobbing (6)
Abstractions\DirectoryInfoWrapper.cs (5)
77new DirectoryInfo(Path.Combine(_directoryInfo.FullName, name)), 96$"More than one sub directories are found under {_directoryInfo.FullName} with name {name}."); 103=> new FileInfoWrapper(new FileInfo(Path.Combine(_directoryInfo.FullName, name))); 112/// Equals the value of <seealso cref="System.IO.FileSystemInfo.FullName" />. 114public override string FullName => _directoryInfo.FullName;
Abstractions\FileInfoWrapper.cs (1)
41public override string FullName => _fileInfo.FullName;
Microsoft.Extensions.SecretManager.Tools.Tests (6)
TemporaryFileProvider.cs (1)
14Root = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), "tmpfiles", Guid.NewGuid().ToString())).FullName;
UserSecretsTestFixture.cs (5)
69Path.Combine(projectPath.FullName, "TestProject.csproj"), 74return projectPath.FullName; 81File.WriteAllText(Path.Join(directory.FullName, "app.cs"), $""" 88return directory.FullName; 103_disposables.Push(() => TryDelete(dir.FullName));
Microsoft.Maui.Resizetizer (10)
AndroidAdaptiveIconGenerator.cs (3)
66 var dir = Path.Combine(fullIntermediateOutputPath.FullName, dpi.Path); 110 var dir = Path.Combine(fullIntermediateOutputPath.FullName, dpi.Path); 143 var dir = Path.Combine(fullIntermediateOutputPath.FullName, "mipmap-anydpi-v26");
ResizeImageInfo.cs (6)
83 throw new FileNotFoundException("Unable to find background file: " + fileInfo.FullName, fileInfo.FullName); 85 info.Filename = fileInfo.FullName; 122 throw new FileNotFoundException("Unable to find foreground file: " + fgFileInfo.FullName, fgFileInfo.FullName); 124 info.ForegroundFilename = fgFileInfo.FullName;
Resizer.cs (1)
53 destination = Path.Combine(fullIntermediateOutputPath.FullName, destination);
Microsoft.ML.AutoML (4)
Experiment\ModelContainer.cs (2)
27using (var fs = File.Create(fileInfo.FullName)) 43using (var stream = new FileStream(_fileInfo.FullName, FileMode.Open, FileAccess.Read, FileShare.Read))
Experiment\Runners\RunnerUtil.cs (1)
58new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}_{foldNum}.zip"));
Experiment\Runners\TrainValidateRunner.cs (1)
66new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}.zip"));
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
237DatasetUtil).Assembly.Location).Directory.FullName, relativePath);
Microsoft.ML.Core.Tests (5)
UnitTests\FileSource.cs (5)
30var dirName = Directory.CreateDirectory("MultiFileSourceUnitTest").FullName; 55var dataDir = Directory.CreateDirectory("MultiFileSourceUnitTest/Data").FullName; 63var dataFolderDir = Directory.CreateDirectory("MultiFileSourceUnitTest/DataFolder").FullName; 64var subFolder1Dir = Directory.CreateDirectory("MultiFileSourceUnitTest/DataFolder/SubFolder1").FullName; 65var subFolder2Dir = Directory.CreateDirectory("MultiFileSourceUnitTest/DataFolder/SubFolder2").FullName;
Microsoft.ML.IntegrationTests (1)
IntegrationTestBaseClass.cs (1)
49OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput");
Microsoft.ML.PerformanceTests (3)
Harness\ProjectGenerator.cs (2)
57<ProjectReference Include=""{GetProjectFilePath(buildPartition.RepresentativeBenchmarkCase.Descriptor.Type, logger).FullName}"" /> 70return string.Join(Environment.NewLine, File.ReadAllLines(csproj.FullName).Where(line => line.Contains("<NativeAssemblyReference")));
ImageClassificationBench.cs (1)
211string assemblyFolderPath = dataRoot.Directory.FullName;
Microsoft.ML.Samples (4)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
312string assemblyFolderPath = _dataRoot.Directory.FullName;
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
353string assemblyFolderPath = _dataRoot.Directory.FullName;
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
309string assemblyFolderPath = _dataRoot.Directory.FullName;
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
330string assemblyFolderPath = _dataRoot.Directory.FullName;
Microsoft.ML.Samples.GPU (4)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
312string assemblyFolderPath = _dataRoot.Directory.FullName;
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
353string assemblyFolderPath = _dataRoot.Directory.FullName;
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
309string assemblyFolderPath = _dataRoot.Directory.FullName;
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
330string assemblyFolderPath = _dataRoot.Directory.FullName;
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
29directory = Directory.GetParent(directory).FullName;
Microsoft.ML.SearchSpace.Tests (2)
TestBase.cs (2)
41return Path.Combine(testDataDir.FullName, fileName).Replace(cwd, "."); 53return Path.Combine(testDataDir.FullName, folderName).Replace(cwd, ".");
Microsoft.ML.TestFramework (7)
BaseTestClass.cs (1)
57OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput");
CopyAction.cs (6)
31file.CopyTo(destFile.FullName, true); 34file.CopyTo(destFile.FullName, true); 46var deploymentDirectory = testDirectory.Parent.FullName; 53CopyAll(dir.FullName, testDirectory.FullName); 54CopyAll(Path.Combine(deploymentDirectory, "AutoLoad"), testDirectory.FullName);
Microsoft.ML.TestFrameworkCommon (1)
TestCommon.cs (1)
78directory = Directory.GetParent(directory).FullName;
Microsoft.NET.Build.Tests (145)
AppHostTests.cs (9)
71new RunExeCommand(Log, Path.Combine(outputDirectory.FullName, hostExecutable)) 106var appHostFullPath = Path.Combine(outputDirectory.FullName, hostExecutable); 117var buildProjDir = Path.Combine(outputDirectory.FullName, "../.."); 157var appHostFullPath = Path.Combine(outputDirectory.FullName, testAssetName); 220var apphostPath = Path.Combine(buildCommand.GetOutputDirectory().FullName, "HelloWorld.exe"); 261string apphostPath = Path.Combine(outputDirectory.FullName, $"{testProject.Name}.exe"); 302ReadOnlySpan<byte> appBytes = File.ReadAllBytes(Path.Combine(outputDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}")); 343string apphostPath = Path.Combine(outputDirectory.FullName, testProject.Name + ".exe"); 425var intermediateDirectory = buildCommand.GetIntermediateDirectory().FullName;
ArtifactsOutputPathTests.cs (1)
601new RunExeCommand(Log, binary.FullName)
AspNetCoreOnFullFramework.cs (1)
82string outputPath = buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName;
COMReferenceTests.cs (1)
59var runCommand = new RunExeCommand(Log, outputDirectory.File("UseComReferences.exe").FullName);
DepsFileSkipTests.cs (2)
134runtimeIdentifier: testProject.RuntimeIdentifier).FullName; 174runtimeIdentifier: testProject.RuntimeIdentifier).FullName;
GenerateResourceTests.cs (1)
64var runCommand = new RunExeCommand(Log, Path.Combine(outputDirectory.FullName, "HelloWorld.exe"));
GivenFrameworkReferences.cs (9)
58string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 113string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 149string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 179string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 372string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 719string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 754testProject.PackageReferences.Add(new TestPackageReference(referencedPackage.Name, "1.0.0", nupkgFolder.FullName)); 772string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 1136var resolvedVersions = ResolvedVersionInfo.ParseFrom(Path.Combine(outputDirectory.FullName, "resolvedversions.txt"));
GivenThatAProjectHasntBeenRestored.cs (1)
35var assetsFile = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "project.assets.json");
GivenThatWeWantAllResourcesInSatellite.cs (2)
78command = new RunExeCommand(log, Path.Combine(outputDirectory.FullName, "AllResourcesInSatellite.exe")); 86command = new DotnetCommand(log, Path.Combine(outputDirectory.FullName, "AllResourcesInSatellite.dll"));
GivenThatWeWantBuildsToBeIncremental.cs (4)
23var outputDirectory = buildCommand.GetOutputDirectory(targetFramework).FullName; 46var outputDirectory = buildCommand.GetOutputDirectory(targetFramework).FullName; 47var baseIntermediateOutputDirectory = buildCommand.GetBaseIntermediateDirectory().FullName; 48var intermediateDirectory = buildCommand.GetIntermediateDirectory(targetFramework).FullName;
GivenThatWeWantDiagnosticsWhenAssetsFileCannotBeRead.cs (3)
19var assetsFile = Path.Combine(build.GetBaseIntermediateDirectory().FullName, "project.assets.json"); 32var assetsFile = Path.Combine(build.GetBaseIntermediateDirectory().FullName, "project.assets.json"); 42var assetsFile = Path.Combine(build.GetBaseIntermediateDirectory().FullName, "project.assets.json");
GivenThatWeWantMSBuildToRespectCustomCulture.cs (1)
24var outputDirectory = buildCommand.GetOutputDirectory().FullName;
GivenThatWeWantRuntimeConfigInBuiltProjectOutputGroup.cs (4)
37var (_, metadata) = command.GetValuesWithMetadata().Single(i => i.value == runtimeConfigFile.FullName); 40metadata.Should().Contain(KeyValuePair.Create("FinalOutputPath", runtimeConfigFile.FullName)); 63var configFile = Path.Combine(buildCommand.GetOutputDirectory(configuration: "Release", runtimeIdentifier: testProject.RuntimeIdentifier).FullName, testProject.Name + ".runtimeconfig.json"); 124var configFile = Path.Combine(buildCommand.GetOutputDirectory(configuration: "Release", runtimeIdentifier: testProject.RuntimeIdentifier).FullName, testProject.Name + ".runtimeconfig.json");
GivenThatWeWantSatelliteAssembliesHaveassemblyVersion.cs (2)
41_mainAssemblyPath = Path.Combine(outputDirectory.FullName, "AllResourcesInSatellite.dll"); 42_satelliteAssemblyPath = Path.Combine(outputDirectory.FullName, "en", "AllResourcesInSatellite.resources.dll");
GivenThatWeWantToBuildAComServerLibrary.cs (1)
39string runtimeConfigFile = Path.Combine(outputDirectory.FullName, "ComServer.runtimeconfig.json");
GivenThatWeWantToBuildACppCliProject.cs (1)
38new DirectoryInfo(Path.Combine(testAsset.TestRoot, "CSConsoleApp", "bin")).GetDirectories().Single().FullName,
GivenThatWeWantToBuildADesktopExe.cs (9)
70var ret = findAssembly(folder.FullName, file); 79if (Path.GetFileName(f.FullName).Equals(file, StringComparison.OrdinalIgnoreCase)) 81return f.FullName; 223var exe = Path.Combine(buildCommand.GetOutputDirectory("net46").FullName, "DesktopMinusRid.exe"); 323var exe = Path.Combine(directory.FullName, "DesktopMinusRid.exe"); 764XElement root = XElement.Load(outputDirectory.GetFiles("DesktopNeedsBindingRedirects.exe.config").Single().FullName); 797DateTime firstBuildWriteTime = File.GetLastWriteTimeUtc(outputfile.FullName); 804DateTime secondBuildBuildWriteTime = File.GetLastWriteTimeUtc(outputfile.FullName); 885return XElement.Load(outputDirectory.GetFiles("DesktopNeedsBindingRedirects.exe.config").Single().FullName);
GivenThatWeWantToBuildADesktopLibrary.cs (6)
123using (var depsJsonFileStream = File.OpenRead(Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, exeName + ".deps.json"))) 160using (var depsJsonFileStream = File.OpenRead(Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework).FullName, $"{testProject.Name}.deps.json"))) 189using (var depsJsonFileStream = File.OpenRead(Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework).FullName, $"{testProject.Name}.deps.json"))) 326using (var depsJsonFileStream = File.OpenRead(Path.Combine(buildCommand.GetOutputDirectory("net46").FullName, "Library.deps.json"))) 511return new FileInfo(Path.Combine(outputDirectory.FullName, referencedProject.Name + ".dll")).FullName;
GivenThatWeWantToBuildALibrary.cs (5)
548var runCommand = new RunExeCommand(Log, Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, $"{testProj.Name}.exe")); 771var assetsFilePath = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "project.assets.json"); 892string runtimeConfigFile = Path.Combine(outputDirectory.FullName, runtimeConfigName); 936string runtimeConfigFile = Path.Combine(outputDirectory.FullName, runtimeConfigName); 1003string runtimeConfigFile = Path.Combine(outputDirectory.FullName, runtimeConfigName);
GivenThatWeWantToBuildAnAppWithLibrariesAndRid.cs (2)
51string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable); 117new DotnetCommand(Log, Path.Combine(outputDirectory.FullName, "App.dll"))
GivenThatWeWantToBuildAnAppWithLibrary.cs (5)
59new DotnetCommand(Log, Path.Combine(outputDirectory.FullName, "TestApp.dll")) 66var appInfo = FileVersionInfo.GetVersionInfo(Path.Combine(outputDirectory.FullName, "TestApp.dll")); 74var libInfo = FileVersionInfo.GetVersionInfo(Path.Combine(outputDirectory.FullName, "TestLibrary.dll")); 98var commandResult = new DotnetCommand(Log, Path.Combine(outputDir.FullName, "TestApp.dll")) 118var cultureDir = new DirectoryInfo(Path.Combine(outputDir.FullName, culture));
GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs (1)
170new DotnetCommand(Log, Path.Combine(outputDirectory.FullName, "1.dll"))
GivenThatWeWantToBuildAnAppWithSharedProject.cs (1)
25string intermediateOutputPath = Path.Combine(command.GetBaseIntermediateDirectory().FullName, "Debug", ToolsetInfo.CurrentTargetFramework);
GivenThatWeWantToBuildAnAppWithTransitiveNonSdkProjectRefs.cs (2)
181new DotnetCommand(Log, Path.Combine(outputDirectory.FullName, "TestApp.dll")) 190return outputDirectory.FullName;
GivenThatWeWantToBuildAnAppWithTransitiveProjectRefs.cs (1)
48new DotnetCommand(Log, Path.Combine(outputDirectory.FullName, "TestApp.dll"))
GivenThatWeWantToBuildANetCoreApp.cs (12)
154string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json"); 166string devruntimeConfigContents = File.ReadAllText(Path.Combine(outputDirectory.FullName, runtimeconfigDevFileName)); 363string outputFolder = buildCommand.GetOutputDirectory(project.TargetFrameworks, runtimeIdentifier: runtimeIdentifier ?? "").FullName; 393buildCommand.GetOutputDirectory(targetFramework).FullName, 421buildCommand.GetOutputDirectory(targetFramework).FullName, 485string outputFolder = buildCommand.GetOutputDirectory(project.TargetFrameworks).FullName; 524string outputFolder = buildCommand.GetOutputDirectory(project.TargetFrameworks, runtimeIdentifier: runtimeIdentifier).FullName; 650string intermediateFolderWithConfiguration = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "Debug"); 868var outputPath = buildCommand.GetOutputDirectory(targetFramework: TFM, runtimeIdentifier: runtimeIdentifier).FullName; 927var outputPath = buildCommand.GetOutputDirectory(targetFramework: ToolsetInfo.CurrentTargetFramework).FullName; 939buildCommand.GetIntermediateDirectory(targetFramework: ToolsetInfo.CurrentTargetFramework).FullName, 1129var runCommand = new RunExeCommand(Log, Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework).FullName, $"{testProj.Name}{EnvironmentInfo.ExecutableExtension}"));
GivenThatWeWantToBuildAppsWithFrameworkRefs.cs (1)
44new RunExeCommand(Log, Path.Combine(outputDirectory.FullName, "EntityFrameworkApp.exe"))
GivenThatWeWantToBuildASelfContainedApp.cs (5)
52string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable); 141string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable); 517buildCommand.GetOutputDirectory(tfm, runtimeIdentifier: EnvironmentInfo.GetCompatibleRid(tfm)).FullName, 588string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable); 631string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
GivenThatWeWantToBuildAWindowsRuntimeComponent.cs (1)
191var exePath = Path.Combine(buildCommand.GetOutputDirectory(consoleApp.TargetFrameworks).FullName, consoleApp.Name + ".exe");
GivenThatWeWantToControlGeneratedAssemblyInfo.cs (18)
79var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework, "Release").FullName, "HelloWorld.dll"); 258var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll"); 286var assemblyPath = Path.Combine(incrementalBuildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll"); 309var assemblyPath = Path.Combine(firstBuildCommand.GetOutputDirectory(targetFramework).FullName, "TestLibrary.dll"); 359var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll"); 394var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll"); 453var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework).FullName, "HelloWorld.dll"); 507var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll"); 553var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll"); 579var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll"); 606var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll"); 632var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll"); 660var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll"); 698var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".dll"); 744var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(testTestProject.TargetFrameworks).FullName, testTestProject.Name + ".dll"); 776var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".dll"); 803var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, testProject.Name + ".dll"); 860var exePath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".dll");
GivenThatWeWantToCopyPPFileToOutput.cs (1)
36var outputPath = buildCommand.GetOutputDirectory().FullName;
GivenThatWeWantToGenerateGlobalUsings_BlazorWasm.cs (1)
31File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be(
GivenThatWeWantToGenerateGlobalUsings_DotNet.cs (6)
31File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be( 83File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be( 127File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be( 173File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be( 211File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be( 243File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be(
GivenThatWeWantToGenerateGlobalUsings_WebApp.cs (1)
32File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be(
GivenThatWeWantToGenerateGlobalUsings_Worker.cs (1)
31File.ReadAllText(Path.Combine(outputDirectory.FullName, globalUsingsFileName)).Should().Be(
GivenThatWeWantToIncludeItemsOutsideTheProjectFolder.cs (1)
39string intermediateOutputPath = Path.Combine(command.GetBaseIntermediateDirectory().FullName, "Debug", "netstandard2.0");
GivenThatWeWantToPreserveCompilationContextForBuild.cs (1)
65using (var depsJsonFileStream = File.OpenRead(Path.Combine(outputDirectory.FullName, $"{testProject.Name}.deps.json")))
GivenThatWeWantToReferenceAnAssembly.cs (1)
919return Path.Combine(outputDirectory.FullName, testProject.Name + ".dll");
GivenThatWeWantToResolveConflicts.cs (3)
134runtimeIdentifier: testProject.RuntimeIdentifier).FullName; 301var assetsFilePath = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "project.assets.json"); 479var assetsFilePath = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "project.assets.json");
GivenThatWeWantToTargetNet471.cs (1)
480var exePath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".exe");
GivenThatWeWantToUseContentFiles.cs (2)
51string outputDir = cmd.GetOutputDirectory(targetFramework).FullName; 52string intmediateDir = cmd.GetIntermediateDirectory(targetFramework).FullName;
GivenThatWeWantToUseVB.cs (1)
90File.Delete(outputDirectory.File("VBRuntimeValues.txt").FullName);
GivenThatWeWantToVerifyNuGetReferenceCompat.cs (1)
210var referencedDll = buildCommand.GetOutputDirectory().File("net462_net472_pkg.dll").FullName;
GivenWeWantToRequireWindowsForDesktopApps.cs (1)
247var runtimeconfigjson = File.ReadAllText(outputDir.File(ProjectName + ".runtimeconfig.json").FullName);
ImplicitAspNetVersions.cs (1)
225Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "project.assets.json"),
MetadataUpdaterSupportTest.cs (2)
28var runtimeConfigPath = Path.Combine(outputDirectory.FullName, "HelloWorld.runtimeconfig.json"); 52var runtimeConfigPath = Path.Combine(outputDirectory.FullName, "HelloWorld.runtimeconfig.json");
NonCopyLocalProjectReferenceTests.cs (1)
51using var stream = File.OpenRead(outputDirectory.File("MainProject.deps.json").FullName);
ReferenceExeTests.cs (2)
126outputDirectory = publishCommand.GetOutputDirectory(MainProject.TargetFrameworks, runtimeIdentifier: MainProject.RuntimeIdentifier).FullName; 134outputDirectory = buildCommand.GetOutputDirectory(MainProject.TargetFrameworks, runtimeIdentifier: MainProject.RuntimeIdentifier).FullName;
RoslynBuildTaskTests.cs (1)
155var runCommand = new RunExeCommand(Log, outputFile.FullName);
SourceLinkTests.cs (4)
203var sourceLinkFilePath = Path.Combine(intermediateDir.FullName, "SourceLinkTestApp.sourcelink.json"); 209ValidatePdb(Path.Combine(intermediateDir.FullName, "SourceLinkTestApp.pdb"), expectedEmbeddedSources: true); 214using var nupkg = ZipFile.OpenRead(Path.Combine(binDir.FullName, "SourceLinkTestApp.1.0.0.nupkg")); 289ValidatePdb(Path.Combine(intermediateDir.FullName, "SourceLinkTestApp.pdb"), expectedEmbeddedSources: false);
Microsoft.NET.Publish.Tests (115)
GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs (5)
52var depsFilePath = Path.Combine(publishDirectory.FullName, $"{testProject.Name}.deps.json"); 135publishFolderChanges(publishDirectory.FullName); 142var exePath = Path.Combine(publishDirectory.FullName, testProject.Name + ".dll"); 160return (coreDir, publishDirectory.FullName, immutableDir); 232var depsFilePath = Path.Combine(outputDirectory.FullName, $"{testProject.Name}.deps.json");
GivenThatWeWantToPreserveCompilationContext.cs (3)
75var refsDirectory = new DirectoryInfo(Path.Combine(publishDirectory.FullName, "refs")); 90using (var depsJsonFileStream = File.OpenRead(Path.Combine(publishDirectory.FullName, "TestApp.deps.json"))) 211var refsDirectory = new DirectoryInfo(Path.Combine(publishDirectory.FullName, "refs"));
GivenThatWeWantToPublishACppCliProject.cs (1)
27new DirectoryInfo(Path.Combine(testAsset.TestRoot, "CSConsoleApp", "bin")).GetDirectories().Single().FullName,
GivenThatWeWantToPublishAFrameworkDependentApp.cs (1)
85new RunExeCommand(Log, Path.Combine(publishDirectory.FullName, appHostName))
GivenThatWeWantToPublishAHelloWorldProject.cs (8)
55new DotnetCommand(Log, Path.Combine(publishDirectory.FullName, "HelloWorld.dll")) 121string selfContainedExecutableFullPath = Path.Combine(publishDirectory.FullName, selfContainedExecutable); 326using (var depsJsonFileStream = File.OpenRead(Path.Combine(publishDirectory.FullName, $"{testProject.Name}.deps.json"))) 344string selfContainedExecutableFullPath = Path.Combine(publishDirectory.FullName, selfContainedExecutable); 365.OnlyHaveRuntimeAssembliesWhichAreInFolder(rid, publishDirectory.FullName) 367.OnlyHaveNativeAssembliesWhichAreInFolder(rid, publishDirectory.FullName, testProject.Name); 386runCommand = new DotnetCommand(Log, Path.Combine(publishDirectory.FullName, $"{testProject.Name}.dll")); 1151var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework).FullName;
GivenThatWeWantToPublishAnAotApp.cs (16)
58var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 102var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 147var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, configuration: projectConfiguration, runtimeIdentifier: rid).FullName; 199var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, configuration: projectConfiguration, runtimeIdentifier: rid).FullName; 242var outputDirectory = buildCommand.GetOutputDirectory(targetFramework, runtimeIdentifier: rid).FullName; 293var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 337var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 367var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 413var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 446var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 593var outputDirectory = buildCommand.GetOutputDirectory(targetFramework).FullName; 743var publishedExe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}"); 838var publishedExe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}"); 871var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 924var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 964string outputDirectory = buildCommand.GetOutputDirectory(targetFramework: targetFramework).FullName;
GivenThatWeWantToPublishAnAppWithLibrariesAndRid.cs (2)
51new RunExeCommand(Log, Path.Combine(publishDirectory.FullName, selfContainedExecutable)) 81new DotnetCommand(Log, Path.Combine(publishDirectory.FullName, "App.dll"))
GivenThatWeWantToPublishAProjectWithAllFeatures.cs (2)
33using (var depsJsonFileStream = File.OpenRead(Path.Combine(publishDirectory.FullName, "TestApp.deps.json"))) 54var runtimeConfigJsonContents = File.ReadAllText(Path.Combine(publishDirectory.FullName, "TestApp.runtimeconfig.json"));
GivenThatWeWantToPublishAProjectWithDependencies.cs (3)
140var runtimeConfig = ReadJson(Path.Combine(publishDirectory.FullName, $"{project}.runtimeconfig.json")); 142var depsJson = ReadJson(Path.Combine(publishDirectory.FullName, $"{project}.deps.json")); 253var publishedLibPath = Path.Combine(libPublishCommand.GetOutputDirectory("netstandard1.0").FullName, "NetStdLib.dll");
GivenThatWeWantToPublishASelfContainedApp.cs (1)
99runtimeIdentifier: runtimeIdentifier).FullName;
GivenThatWeWantToPublishASingleFileApp.cs (13)
105var singleFilePath = Path.Combine(GetPublishDirectory(cmd).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 327var publishDir = GetPublishDirectory(publishCommand, targetFramework: ToolsetInfo.CurrentTargetFramework).FullName; 445var mainProjectDll = Path.Combine(intermediateDirectory.FullName, $"{TestProjectName}.dll"); 522var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand).FullName, SingleFile); 568GetPublishDirectory(publishCommand).FullName, 583var appHostPath = Path.Combine(GetPublishDirectory(publishCommand).FullName, SingleFile); 607var appHostPath = Path.Combine(GetPublishDirectory(publishCommand).FullName, SingleFile); 826var publishDir = GetPublishDirectory(publishCommand, targetFramework).FullName; 870string singleFilePath = Path.Combine(publishDir.FullName, $"{testProject.Name}.exe"); 960var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 991var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 1025var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}"); 1168var publishDir = GetPublishDirectory(publishCommand, targetFramework, runtimeIdentifier: rid).FullName;
GivenThatWeWantToPublishAWebApp.cs (1)
101new RunExeCommand(Log, Path.Combine(output.FullName, $"{testProject.Name}{Constants.ExeSuffix}"))
GivenThatWeWantToPublishIncrementally.cs (5)
36var publishDir = publishCommand.GetOutputDirectory(runtimeIdentifier: "win-x86").FullName; 76var publishDir = publishCommand.GetOutputDirectory(runtimeIdentifier: "win-x86").FullName; 121var publishDir = publishCommand.GetOutputDirectory(runtimeIdentifier: "win-x86").FullName; 160var publishDir = publishCommand.GetOutputDirectory(runtimeIdentifier: "win-x86").FullName; 317var publishDir = publishCommand.GetOutputDirectory(targetFramework, runtimeIdentifier: rid).FullName;
GivenThatWeWantToPublishReadyToRun.cs (7)
50DoesImageHaveR2RInfo(Path.Combine(publishDirectory.FullName, $"{projectName}.dll")).Should().BeFalse(); 51DoesImageHaveR2RInfo(Path.Combine(publishDirectory.FullName, "ClassLib.dll")).Should().BeFalse(); 81var mainProjectDll = Path.Combine(publishDirectory.FullName, $"{projectName}.dll"); 82var classLibDll = Path.Combine(publishDirectory.FullName, $"ClassLib.dll"); 388var mainProjectDll = Path.Combine(publishDirectory.FullName, $"{projectName}.dll"); 389var classLibDll = Path.Combine(publishDirectory.FullName, $"ClassLib.dll"); 419Log.WriteLine($"{publishDirectory.FullName} {s}");
GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs (1)
276var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, configuration: "Debug", runtimeIdentifier: "win-x64").FullName;
GivenThatWeWantToRunILLink.cs (40)
48var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 49var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 87var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 88var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 132var exe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}"); 283var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 309var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 348var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 384var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 408var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 438var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 473var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 497var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 527var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 567var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 817var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 818var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1047string outputDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1130var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1187var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1221var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1245var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1278var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1279var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1315var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1316var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1353var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1354var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1407var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1408var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1445var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1446var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1482var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1483var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1512var publishDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1513var intermediateDirectory = publishCommand.GetIntermediateDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 1784var outputDirectory = buildCommand.GetOutputDirectory(targetFramework, runtimeIdentifier: rid).FullName; 1818var outputDirectory = buildCommand.GetOutputDirectory(targetFramework, runtimeIdentifier: rid).FullName; 2353string[] runtimeAssemblies = Directory.GetFiles(publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName, "*.dll"); 2359Assembly assembly = mlc.LoadFromAssemblyPath(Path.Combine(publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName, "System.Private.CoreLib.dll"));
GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs (1)
319.WithWorkingDirectory(Directory.GetParent(testAsset.Path).FullName) // code under test looks in CWD, ensure coverage outside this scenario
PublishItemsOutputGroupTests.cs (1)
110var publishDir = new DirectoryInfo(Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, "win-x86", "publish"));
PublishWebApp.cs (1)
51FileName = Path.Combine(publishDirectory.FullName, testProject.Name + EnvironmentInfo.ExecutableExtension)
RuntimeIdentifiersTests.cs (3)
64string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable); 106string selfContainedExecutableFullPath = Path.Combine(buildCommand.GetOutputDirectory(runtimeIdentifier: runtimeIdentifier).FullName, selfContainedExecutable); 173string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (8)
BlazorLegacyIntegrationTest50.cs (1)
42var content = File.ReadAllText(fileInfo.FullName);
BlazorLegacyIntegrationTest60.cs (1)
92publishOutputDirectory.FullName,
WasmCompressionTests.cs (2)
34var blazorHostedPublishDirectory = publishCommand.GetOutputDirectory().FullName; 87var publishDirectory = publishCommand.GetOutputDirectory(DefaultTfm).FullName;
WasmJsModulesIntegrationTests.cs (3)
44var contents = JsonSerializer.Deserialize<JsonDocument>(BootJsonDataLoader.GetJsonContent(blazorBootJson.FullName)); 89var contents = JsonSerializer.Deserialize<JsonDocument>(BootJsonDataLoader.GetJsonContent(blazorBootJson.FullName)); 133var contents = JsonSerializer.Deserialize<JsonDocument>(BootJsonDataLoader.GetJsonContent(blazorBootJson.FullName));
WasmPublishIntegrationTest.cs (1)
1669return new DirectoryInfo(Path.Combine(baseDirectory.FullName, "publish"));
Microsoft.NET.Sdk.Publish.Tasks (2)
MsDeploy\CommonUtility.cs (1)
1389log.LogMessage(Framework.MessageImportance.Normal, string.Format(CultureInfo.CurrentCulture, Resources.BUILDTASK_RemoveEmptyDirectories_Deleting, dirinfo.FullName));
WebConfigTelemetry.cs (1)
82solutionDirectory = Directory.GetParent(solutionDirectory)?.FullName;
Microsoft.NET.Sdk.Razor.Tests (8)
ApplicationPartDiscoveryIntegrationTest.cs (1)
41string intermediateOutputPath = Path.Combine(build.GetBaseIntermediateDirectory().FullName, "Debug", DefaultTfm);
BuildIncrementalismTest.cs (1)
120string intermediateOutputPath = Path.Combine(build.GetBaseIntermediateDirectory().FullName, "Debug", DefaultTfm);
MvcBuildIntegrationTest21NetFx.cs (1)
109var dependencyContext = ReadDependencyContext(depsFile.FullName);
MvcBuildIntegrationTest50.cs (1)
61string outputPath = build.GetOutputDirectory(TargetFramework).FullName;
MvcBuildIntegrationTestLegacy.cs (1)
116var dependencyContext = ReadDependencyContext(depsFile.FullName);
PackIntegrationTest.cs (1)
52Path.Combine(build.GetPackageDirectory().FullName, "ClassLibrary.1.0.0.nupkg"),
PublishIntegrationTest.cs (2)
21var outputPath = new BuildCommand(projectDirectory).GetOutputDirectory().FullName; 22var publishOutputPath = publish.GetOutputDirectory(DefaultTfm, "Debug").FullName;
Microsoft.NET.Sdk.StaticWebAssets.Tests (24)
StaticWebAssetEndpointsIntegrationTest.cs (5)
30File.WriteAllText(Path.Combine(dir.FullName, "app.js"), "console.log('hello world!');"); 180File.WriteAllText(Path.Combine(dir.FullName, "app.js"), "console.log('hello world!');"); 201file.Length.Should().Be(length, $"because {endpoint.Route} {file.FullName}"); 310File.WriteAllText(Path.Combine(dir.FullName, "app.js"), "console.log('hello world!');"); 311File.WriteAllText(Path.Combine(dir.FullName, "app.publish.js"), "console.log('publish hello world!');");
StaticWebAssetsCrossTargetingTests.cs (2)
42File.WriteAllText(Path.Combine(wwwroot.FullName, "test.js"), "console.log('hello')"); 86File.WriteAllText(Path.Combine(wwwroot.FullName, "test.js"), "console.log('hello')");
StaticWebAssetsDesignTimeTest.cs (7)
43var inputFilePath = Path.Combine(build.GetIntermediateDirectory().FullName, "StaticWebAssetsUTDCInput.txt"); 51var outputFilePath = Path.Combine(build.GetIntermediateDirectory().FullName, "StaticWebAssetsUTDCOutput.txt"); 79var inputFilePath = Path.Combine(build.GetIntermediateDirectory().FullName, "StaticWebAssetsUTDCInput.txt"); 83inputFiles.Should().Contain(Path.Combine(build.GetIntermediateDirectory().FullName, "staticwebassets.removed.txt")); 86var outputFilePath = Path.Combine(build.GetIntermediateDirectory().FullName, "StaticWebAssetsUTDCOutput.txt"); 113var inputFilePath = Path.Combine(build.GetIntermediateDirectory().FullName, "StaticWebAssetsUTDCInput.txt"); 119var outputFilePath = Path.Combine(build.GetIntermediateDirectory().FullName, "StaticWebAssetsUTDCOutput.txt");
StaticWebAssetsPackIntegrationTest.cs (10)
54Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 83Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryNoStaticAssets.1.0.0.nupkg"), 149Path.Combine(pack2.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 180Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 1498Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 1523Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 1556Path.Combine(build.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 1586Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 1687Path.Combine(buildCommand.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"), 1718Path.Combine(buildCommand.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
Microsoft.NET.Sdk.Web.Tests (2)
PublishTests.cs (2)
37string outputDirectory = publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName; 100string outputDirectory = publishCommand.GetIntermediateDirectory(targetFramework, runtimeIdentifier: ucrRid).FullName;
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (1)
WorkloadSdkResolver.cs (1)
96dotnetRoot = Directory.GetParent(sdkDirectory)?.Parent?.FullName;
Microsoft.NET.TestFramework (51)
Assertions\DirectoryInfoAssertions.cs (20)
19_dirInfo.Exists.Should().BeTrue($"Expected directory {_dirInfo.FullName} to exist, but it does not."); 25_dirInfo.Exists.Should().BeFalse($"Expected directory {_dirInfo.FullName} to not exist, but it does."); 31var file = _dirInfo.EnumerateFiles(expectedFile, SearchOption.TopDirectoryOnly).SingleOrDefault() ?? new FileInfo(Path.Combine(_dirInfo.FullName, expectedFile)); 32file.Should().Exist($"Expected File {expectedFile} cannot be found in directory {_dirInfo.FullName}."); 38var file = _dirInfo.EnumerateFiles(expectedFile, SearchOption.TopDirectoryOnly).SingleOrDefault() ?? new FileInfo(Path.Combine(_dirInfo.FullName, expectedFile)); 39file.Should().NotExist($"File {expectedFile} should not be found in directory {_dirInfo.FullName}."); 61matchingFileExists.Should().BeTrue($"Expected directory {_dirInfo.FullName} to contain files matching {expectedFilesSearchPattern}, but no matching file exists."); 79matchingFileCount.Should().Be(0, $"Found {matchingFileCount} files that should not exist in directory {_dirInfo.FullName}. No file matching {expectedFilesSearchPattern} should exist."); 87dir.Exists.Should().BeTrue($"Expected directory {expectedDir} cannot be found inside directory {_dirInfo.FullName}."); 95.Select(f => f.FullName.Substring(_dirInfo.FullName.Length + 1) // make relative to _dirInfo 102missingFiles.Should().BeEmpty($"Following files cannot be found inside directory {_dirInfo.FullName} {nl} {string.Join(nl, missingFiles)}"); 103extraFiles.Should().BeEmpty($"Following extra files are found inside directory {_dirInfo.FullName} {nl} {string.Join(nl, extraFiles)}"); 110_dirInfo.EnumerateFileSystemInfos().Any().Should().BeFalse($"The directory {_dirInfo.FullName} is not empty."); 117_dirInfo.EnumerateFileSystemInfos().Any().Should().BeTrue($"The directory {_dirInfo.FullName} is empty."); 124_dirInfo.Exists.Should().BeFalse($"Expected directory {_dirInfo.FullName} to not exist, but it does."); 138subDirectories.Any().Should().BeFalse($"Directory {_dirInfo.FullName} should not have any sub directories."); 143.Select(f => f.FullName.Substring(_dirInfo.FullName.Length + 1) // make relative to _dirInfo 149errorSubDirectories.Should().BeEmpty($"The following subdirectories should not be found inside directory {_dirInfo.FullName} {nl} {string.Join(nl, errorSubDirectories)}");
Assertions\DirectoryInfoExtensions.cs (2)
15return new DirectoryInfo(Path.Combine(dir.FullName, name)); 20return new FileInfo(Path.Combine(dir.FullName, name));
Assertions\FileInfoAssertions.cs (10)
23_fileInfo.Exists.Should().BeTrue($"Expected File {_fileInfo.FullName} to exist, but it does not."); 29_fileInfo.Exists.Should().BeFalse($"Expected File {_fileInfo.FullName} to not exist, but it does."); 42var actualSha256 = algorithm.ComputeHash(File.ReadAllBytes(_fileInfo.FullName)); 45actualSha256Base64.Should().Be(expectedSha, $"File {_fileInfo.FullName} did not have SHA matching {expectedSha}. Found {actualSha256Base64}."); 51var actualContent = File.ReadAllText(_fileInfo.FullName); 52actualContent.Should().Contain(expectedContent, $"File {_fileInfo.FullName} did not have content: {expectedContent}."); 63var actualContent = File.ReadAllText(_fileInfo.FullName); 64actualContent.Should().MatchRegex(pattern, $"File {_fileInfo.FullName} did not match pattern: {pattern}."); 70var actualContent = File.ReadAllText(_fileInfo.FullName); 71actualContent.Should().NotContain(expectedContent, $"File {_fileInfo.FullName} had content: {expectedContent}.");
Assertions\FileInfoExtensions.cs (1)
30return File.ReadAllText(subject.FullName);
Assertions\FileInfoExtensions.FileInfoNuGetLock.cs (1)
23fileInfo.FullName,
Commands\ComposeStoreCommand.cs (1)
30return Path.Combine(GetOutputDirectory().FullName, $"{appName}.dll");
Commands\GetValuesCommand.cs (3)
63Directory.CreateDirectory(GetBaseIntermediateDirectory().FullName); 65GetBaseIntermediateDirectory().FullName, 154string fullFileName = Path.Combine(outputDirectory.FullName, outputFilename);
Commands\PackCommand.cs (2)
25return Path.Combine(GetBaseIntermediateDirectory().FullName, configuration, $"{packageId}.{packageVersion}.nuspec"); 35return Path.Combine(GetPackageDirectory(configuration).FullName, $"{packageId}.{packageVersion}.nupkg");
Commands\PublishCommand.cs (2)
37return new DirectoryInfo(Path.Combine(baseDirectory.FullName, PublishSubfolderName)); 42return Path.Combine(GetOutputDirectory(targetFramework).FullName, $"{appName}.dll");
ProjectConstruction\TestProject.cs (3)
376propertyGroup?.Add(new XElement(ns + "CustomAfterDirectoryBuildTargets", $"$(CustomAfterDirectoryBuildTargets);{customAfterDirectoryBuildTargetsPath.FullName}")); 377propertyGroup?.Add(new XElement(ns + "CustomAfterMicrosoftCommonCrossTargetingTargets", $"$(CustomAfterMicrosoftCommonCrossTargetingTargets);{customAfterDirectoryBuildTargetsPath.FullName}")); 404customAfterDirectoryBuildTargets.Save(customAfterDirectoryBuildTargetsPath.FullName);
TestContext.cs (3)
110return lastWrittenSdk.GetFiles("RuntimeIdentifierGraph.json").Single().FullName; 310directory = Directory.GetParent(directory)?.FullName; 348currentPath = parent.FullName;
ToolsetInfo.cs (1)
146msbuildRoot = Directory.GetParent(msbuildBinPath)?.Parent?.FullName;
Utilities\MachOSignature.cs (1)
24return new RunExeCommand(log, codesignPath, "-v", file.FullName)
Utilities\TestPathUtility.cs (1)
21return Path.Combine(linkTarget.FullName, path[tmpPath.Length..]);
Microsoft.NET.ToolPack.Tests (5)
GivenThatWeWantToPackAToolProjectWithPackagedShim.cs (5)
186string windowShimPath = Path.Combine(outputDirectory.FullName, $"shims/{targetFramework}/win-x64/{_customToolCommandName}.exe"); 188string osxShimPath = Path.Combine(outputDirectory.FullName, $"shims/{targetFramework}/{ToolsetInfo.LatestMacRuntimeIdentifier}-x64/{_customToolCommandName}"); 215string windowShimPath = Path.Combine(outputDirectory.FullName, $"shims/netcoreapp2.1/win-x64/{_customToolCommandName}.exe"); 217string osxShimPath = Path.Combine(outputDirectory.FullName, $"shims/netcoreapp2.1/{ToolsetInfo.LatestMacRuntimeIdentifier}-x64/{_customToolCommandName}"); 241string windowShimPath = Path.Combine(outputDirectory.FullName, $"shims/{targetFramework}.1/win-x64/{_customToolCommandName}.exe");
Microsoft.TemplateEngine.Cli (2)
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (2)
67currentDirectory = Directory.GetParent(currentDirectory)?.FullName; 240directory = Path.GetPathRoot(directory) != directory ? Directory.GetParent(directory)?.FullName : null;
Microsoft.VisualBasic.Core (6)
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
392m_sFullPath = (New FileInfo(sPath)).FullName
Microsoft\VisualBasic\FileIO\FileSystem.vb (2)
1498Return DInfo.GetFiles(IO.Path.GetFileName(FullPath))(0).FullName 1502Return DInfo.GetDirectories(IO.Path.GetFileName(FullPath))(0).FullName
Microsoft\VisualBasic\FileSystem.vb (3)
405FileName = file.FullName 1323Result = (New FileInfo(sPath)).FullName 1392FileName = (New FileInfo(FileName)).FullName
Microsoft.VisualBasic.Tests (3)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (3)
350Assert.Equal(info.FullName, TestDirectory); 381Assert.Equal(info.FullName, FileInfoFromSystemIO.FullName);
MSBuild (5)
BuildEnvironmentHelper.cs (2)
586=> currentToolsDirectory.Parent?.FullName, 599MSBuildToolsDirectoryRoot = currentToolsDirectory.Parent?.FullName;
FileUtilities.cs (1)
1321return parent?.FullName ?? path;
MSBuildLoadContext.cs (1)
35_directory = Directory.GetParent(assemblyPath)!.FullName;
TempFileUtilities.cs (1)
216CopyDirectory(subdirInfo.FullName, destDir);
MSBuildTaskHost (3)
BuildEnvironmentHelper.cs (2)
586=> currentToolsDirectory.Parent?.FullName, 599MSBuildToolsDirectoryRoot = currentToolsDirectory.Parent?.FullName;
FileUtilities.cs (1)
1321return parent?.FullName ?? path;
PresentationCore (1)
MS\Internal\FontCache\DWriteFactory.cs (1)
63localPath = Directory.GetParent(fontCollectionUri.LocalPath).FullName + Path.DirectorySeparatorChar;
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.cs (1)
389templateList.Add(new Uri(file.FullName));
ResultsOfTGenerator (2)
Program.cs (2)
214Console.WriteLine($"{file.Length:N0} bytes written to {file.FullName} successfully!"); 300Console.WriteLine($"{file.Length:N0} bytes written to {file.FullName} successfully!");
Roslyn.Compilers.Extension (1)
CompilerPackage.cs (1)
107if (!filesToWrite.ContainsKey(file.FullName))
RulesetToEditorconfigConverter.UnitTests (4)
RulesetToEditorconfigConverterTests.cs (4)
22var ruleset = Path.Combine(directory.FullName, PrimaryRulesetName); 28var includedRuleset = Path.Combine(directory.FullName, IncludedRulesetName); 32var editorconfigPath = Path.Combine(directory.FullName, ".editorconfig"); 45Directory.Delete(directory.FullName, recursive: true);
sdk-tasks (2)
GenerateMSBuildExtensionsSWR.cs (1)
35File.WriteAllText(outputFileInfo.FullName, sb.ToString());
TarGzFileCreateFromDirectory.cs (1)
101var parentDirectory = Directory.GetParent(SourceDirectory).Parent.FullName;
ServerComparison.FunctionalTests (2)
Helpers.cs (2)
19var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "FunctionalTests.slnf")); 22return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "..", "..", "testassets", "ServerComparison.TestSites"));
StaticFilesAuth (4)
Startup.cs (4)
52return string.Equals(directory.FullName, basePath, StringComparison.OrdinalIgnoreCase) 53|| string.Equals(directory.FullName, usersPath, StringComparison.OrdinalIgnoreCase) 54|| string.Equals(directory.FullName, userPath, StringComparison.OrdinalIgnoreCase) 55|| directory.FullName.StartsWith(userPath + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase);
System.CodeDom (1)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
160return Directory.CreateTempSubdirectory().FullName;
System.CommandLine.StaticCompletions.Tests (1)
VerifyExtensions.cs (1)
27settings.UseDirectory(runtimeSnapshotDir.FullName);
System.Configuration.ConfigurationManager (2)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
160return Directory.CreateTempSubdirectory().FullName;
System\Configuration\LocalFileSettingsProvider.cs (1)
327file = Path.Combine(previousDirectory.FullName, ConfigurationManagerInternalFactory.Instance.UserConfigFilename);
System.Formats.Tar (4)
System\Formats\Tar\TarFile.cs (4)
337writer.WriteEntry(di.FullName, GetEntryNameForBaseDirectory(di.Name)); 392await writer.WriteEntryAsync(di.FullName, GetEntryNameForBaseDirectory(di.Name), cancellationToken).ConfigureAwait(false); 445includeBaseDirectory && di.Parent != null ? di.Parent.FullName : di.FullName;
System.IO.Compression.ZipFile (4)
System\IO\Compression\ZipFile.Create.cs (3)
513string basePath = di.FullName; 517basePath = di.Parent.FullName; 520FileSystemEnumerable<(string, CreateEntryType)> fse = CreateEnumerableForCreate(di.FullName);
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
115string destinationDirectoryFullPath = di.FullName;
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
884package = new ZipPackage(packageFileInfo.FullName, packageMode, packageAccess, packageShare);
System.IO.Ports (4)
System\IO\Ports\SerialPort.Unix.cs (4)
56(File.Exists(entry.FullName + "/device/id") || 57Directory.Exists(entry.FullName + "/device/of_node"))) || 58(!isTtyS && Directory.Exists(entry.FullName + "/device/tty")) || 60(isTtyGS && (File.Exists(entry.FullName + "/dev"))))
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (4)
163if (!new DirectoryInfo(Path.GetDirectoryName(FullName)!).Exists) 164throw new DirectoryNotFoundException(SR.Format(SR.IO_PathNotFound_Path, FullName)); 167throw new FileNotFoundException(SR.Format(SR.IO_FileNotFound_FileName, FullName), FullName);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystemInfo.cs (3)
110/// If a link does not exist in <see cref="FullName"/>, or this instance does not represent a link, returns <see langword="null"/>. 149/// Creates a symbolic link located in <see cref="FullName"/> that points to the specified <paramref name="pathToTarget"/>. 158/// <exception cref="IOException">A file or directory already exists in the location of <see cref="FullName"/>.
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\OpenSslCachedDirectoryStoreProvider.cs (1)
62Interop.Crypto.X509StackAddDirectoryStore(newColl, info.FullName);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
172string fullPath = file.FullName;
System.Windows.Forms.IntegrationTests.Common (2)
TestHelpers.cs (2)
223string repoRoot = Directory.GetParent(gitPath).FullName; 254currentDirectory = Directory.GetParent(currentDirectory).FullName;
Templates.Blazor.Tests (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
Templates.Blazor.WebAssembly.Auth.Tests (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
Templates.Blazor.WebAssembly.Tests (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
Templates.Mvc.Tests (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
Templates.Tests (5)
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
488Log.DirectoryPermissionsNotSecure(dirInfo.FullName);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
478Log.DirectoryPermissionsNotSecure(dirInfo.FullName); 917if (!TryGetOpenSslHash(cert.FullName, out var hash)) 937Log.UnixOpenSslRehashTooManyHashes(cert.FullName, hash, MaxHashCollisions);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
163Log.DirectoryPermissionsNotSecure(dirInfo.FullName);