10420 references to Path
aspire (397)
Agents\Playwright\PlaywrightCliInstaller.cs (10)
58internal static readonly string s_primarySkillBaseDirectory = Path.Combine(".claude", "skills");
181var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-playwright-{Guid.NewGuid():N}");
254var primarySkillDir = Path.Combine(repoRoot, s_primarySkillBaseDirectory, PlaywrightCliSkillName);
270var targetSkillDir = Path.Combine(repoRoot, skillBaseDir, PlaywrightCliSkillName);
295var relativePath = Path.GetRelativePath(sourceDir, sourceFile);
296var targetFile = Path.Combine(targetDir, relativePath);
298var targetFileDir = Path.GetDirectoryName(targetFile);
312var relativePath = Path.GetRelativePath(targetDir, targetFile);
313var sourceFile = Path.Combine(sourceDir, relativePath);
Certificates\CertificateGeneration\UnixCertificateManager.cs (21)
110var sslCertDirs = sslCertDirString.Split(Path.PathSeparator);
113var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem");
241var certPath = Path.Combine(certDir, nickname) + ".pem";
355var homeDirectoryWithSlash = homeDirectory[^1] == Path.DirectorySeparatorChar
357: homeDirectory + Path.DirectorySeparatorChar;
360? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..])
369var existingDirs = existingSslCertDir.Split(Path.PathSeparator);
370var certDirFullPath = Path.GetFullPath(certDir);
380return string.Equals(Path.GetFullPath(dir), certDirFullPath, StringComparison.Ordinal);
404Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName);
470var certPath = Path.Combine(certDir, nickname) + ".pem";
560return Path.Combine(homeDirectory, ".pki", "nssdb");
565return Path.Combine(homeDirectory, "snap", "chromium", "current", ".pki", "nssdb");
570return Path.Combine(homeDirectory, ".mozilla", "firefox");
575return Path.Combine(homeDirectory, "snap", "firefox", "common", ".mozilla", "firefox");
599var searchFolders = searchPath.Split(Path.PathSeparator);
609if (File.Exists(Path.Combine(searchFolder, command)))
816return Path.Combine(homeDirectory, ".aspnet", "dev-certs", "trust");
848var paths = nssDbOverride.Split(Path.PathSeparator); // May be empty - the user may not want to add browser trust
851var nssDb = Path.GetFullPath(path);
1057var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
Commands\InitCommand.cs (14)
269project => Path.GetFileNameWithoutExtension(project.ProjectFile.Name).EscapeMarkup(),
322project => Path.GetFileNameWithoutExtension(project.ProjectFile.Name).EscapeMarkup(),
345var tempProjectDir = Path.Combine(Path.GetTempPath(), $"aspire-init-{Guid.NewGuid()}");
425var finalAppHostDir = Path.Combine(initContext.SolutionDirectory.FullName, appHostProjectDir.Name);
426var finalServiceDefaultsDir = Path.Combine(initContext.SolutionDirectory.FullName, serviceDefaultsProjectDir.Name);
435var appHostProjectFile = new FileInfo(Path.Combine(finalAppHostDir, $"{appHostProjectDir.Name}.csproj"));
436var serviceDefaultsProjectFile = new FileInfo(Path.Combine(finalServiceDefaultsDir, $"{serviceDefaultsProjectDir.Name}.csproj"));
516InteractionService.DisplayError($"Failed to add reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}.");
550InteractionService.DisplayError($"Failed to add ServiceDefaults reference to {Path.GetFileNameWithoutExtension(project.ProjectFile.Name)}.");
580var appHostPath = Path.Combine(workingDirectory.FullName, appHostFileName);
842public string SolutionName => Path.GetFileNameWithoutExtension(SelectedSolutionFile!.Name);
852public string ExpectedAppHostDirectory => Path.Combine(SolutionDirectory.FullName, $"{SolutionName}.AppHost");
857public string ExpectedServiceDefaultsDirectory => Path.Combine(SolutionDirectory.FullName, $"{SolutionName}.ServiceDefaults");
Projects\DotNetBasedAppHostServerProject.cs (31)
58_appPath = Path.GetFullPath(appPath);
62_repoRoot = Path.GetFullPath(repoRoot) + Path.DirectorySeparatorChar;
77var tempPath = Path.GetTempPath();
90_projectModelPath = Path.Combine(tempPath, FolderPrefix, AppsFolder, pathDir);
104public string BuildPath => Path.Combine(_projectModelPath, BuildFolder);
109public string GetProjectFilePath() => Path.Combine(_projectModelPath, ProjectFileName);
113var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
125var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
194var projectPath = Path.Combine(_repoRoot, "src", integration.Name, $"{integration.Name}.csproj");
213var hostingPath = Path.Combine(_repoRoot, "src", "Aspire.Hosting", "Aspire.Hosting.csproj");
235var appHostInTargets = Path.Combine(_repoRoot, "src", "Aspire.Hosting.AppHost", "build", "Aspire.Hosting.AppHost.in.targets");
236var sdkInTargets = Path.Combine(_repoRoot, "src", "Aspire.AppHost.Sdk", "SDK", "Sdk.in.targets");
248var dashboardProject = Path.Combine(_repoRoot, "src", "Aspire.Dashboard", "Aspire.Dashboard.csproj");
255var remoteHostProject = Path.Combine(_repoRoot, "src", "Aspire.Hosting.RemoteHost", "Aspire.Hosting.RemoteHost.csproj");
277var objPath = Path.Combine(_projectModelPath, "obj");
294File.WriteAllText(Path.Combine(_projectModelPath, "Program.cs"), programCs);
328File.WriteAllText(Path.Combine(_projectModelPath, "appsettings.json"), appSettingsJson);
336var nugetConfigPath = Path.Combine(_projectModelPath, "nuget.config");
390var repoDirectoryPackagesProps = Path.Combine(_repoRoot, "Directory.Packages.props");
401File.WriteAllText(Path.Combine(_projectModelPath, "Directory.Packages.props"), directoryPackagesProps);
406File.WriteAllText(Path.Combine(_projectModelPath, "Directory.Build.props"), "<Project />");
407File.WriteAllText(Path.Combine(_projectModelPath, "Directory.Build.targets"), "<Project />");
409var projectFileName = Path.Combine(_projectModelPath, ProjectFileName);
425var projectFile = new FileInfo(Path.Combine(_projectModelPath, ProjectFileName));
473var assemblyPath = Path.Combine(BuildPath, ProjectDllName);
574var workingDirFullPath = Path.GetFullPath(workingDirectory);
576var globalNuGetPath = Path.Combine(userProfile, ".nuget");
582var configFullPath = Path.GetFullPath(configPath);
583var configDir = Path.GetDirectoryName(configFullPath);
626var versionsPropsPath = Path.Combine(repoRoot, "eng", "Versions.props");
Projects\GuestAppHostProject.cs (8)
625var apphostRunPath = Path.Combine(directory.FullName, "apphost.run.json");
626var launchSettingsPath = Path.Combine(directory.FullName, "Properties", "launchSettings.json");
928var aspireCliPath = Path.Combine(homeDirectory, ".aspire", "cli", "backchannels");
931return Path.Combine(aspireCliPath, socketName);
1208var outputPath = Path.Combine(appPath, GeneratedFolderName);
1213var filePath = Path.Combine(outputPath, fileName);
1214var directory = Path.GetDirectoryName(filePath);
1236var hashPath = Path.Combine(generatedPath, ".codegen-hash");
Projects\PrebuiltAppHostServer.cs (14)
64_appPath = Path.GetFullPath(appPath);
77_workingDirectory = Path.Combine(Path.GetTempPath(), ".aspire", "bundle-hosts", pathDir);
174var appHostDirectory = Path.GetDirectoryName(_appPath);
195var restoreDir = Path.Combine(_workingDirectory, "integration-restore");
198var outputDir = Path.Combine(restoreDir, "libs");
219var projectFilePath = Path.Combine(restoreDir, "IntegrationRestore.csproj");
231Path.Combine(restoreDir, "Directory.Packages.props"), directoryPackagesProps, cancellationToken);
235Path.Combine(restoreDir, "Directory.Build.props"), "<Project />", cancellationToken);
237Path.Combine(restoreDir, "Directory.Build.targets"), "<Project />", cancellationToken);
326new XAttribute("File", Path.Combine(outputDir, "_project-ref-assemblies.txt")),
340var localConfig = AspireJsonConfiguration.Load(Path.GetDirectoryName(_appPath)!);
516var filePath = Path.Combine(libsPath, "_project-ref-assemblies.txt");
573Path.Combine(_workingDirectory, "appsettings.json"),
Projects\ProjectLocator.cs (17)
125var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName);
134var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName);
141var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName);
192var qualifiedPath = Path.IsPathRooted(configAppHostPath)
194: Path.Combine(searchDirectory.FullName, configAppHostPath);
205var configFilePath = Path.Combine(searchDirectory.FullName, AspireConfigFile.FileName);
223var qualifiedAppHostPath = Path.IsPathRooted(appHostPath) ? appHostPath : Path.Combine(settingsFile.Directory!.FullName, appHostPath);
295file => $"{file.Name.EscapeMarkup()} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, file.FullName).EscapeMarkup()})",
387MultipleAppHostProjectsFoundBehavior.Prompt => await interactionService.PromptForSelectionAsync(InteractionServiceStrings.SelectAppHostToUse, results.BuildableAppHost, projectFile => $"{projectFile.Name.EscapeMarkup()} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName).EscapeMarkup()})", cancellationToken),
414var relativePathToProjectFile = Path.GetRelativePath(settingsFile.Directory!.FullName, projectFile.FullName).Replace(Path.DirectorySeparatorChar, '/');
435var relativeSettingsFilePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, settingsFile.FullName).Replace(Path.DirectorySeparatorChar, '/');
453var newConfigPath = Path.Combine(executionContext.WorkingDirectory.FullName, AspireConfigFile.FileName);
458var aspireConfigFile = new FileInfo(Path.Combine(legacySettingsRootDirectory.FullName, AspireConfigFile.FileName));
470var configFilePath = Path.Combine(settingsRootDirectory.FullName, AspireConfigFile.FileName);
aspire-managed (20)
NuGet\Commands\LayoutCommand.cs (12)
109packagesPath = Path.Combine(
132var packagePath = Path.Combine(packagesPath, libraryName.ToLowerInvariant(), libraryVersion);
154var sourcePath = Path.Combine(packagePath, runtimeAssembly.Path.Replace('/', Path.DirectorySeparatorChar));
162var fileName = Path.GetFileName(sourcePath);
163var destPath = Path.Combine(outputPath, fileName);
179var xmlSourcePath = Path.ChangeExtension(sourcePath, ".xml");
182var xmlDestPath = Path.ChangeExtension(destPath, ".xml");
200var sourcePath = Path.Combine(packagePath, nativeLib.Path.Replace('/', Path.DirectorySeparatorChar));
208var fileName = Path.GetFileName(sourcePath);
209var destPath = Path.Combine(outputPath, fileName);
Aspire.Cli.EndToEnd.Tests (79)
CentralPackageManagementTests.cs (10)
47var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest");
48var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost");
49var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj");
50var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props");
69File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """
142var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest");
143var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost");
144var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj");
145var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props");
160File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """
ConfigMigrationTests.cs (14)
46var aspireHomeDir = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home");
125var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
126var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
191var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
192var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
240var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
243Path.Combine(aspireHomeDir, "globalsettings.json"),
299var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
300var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
369var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
370var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
453var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
454var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
576var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
ProjectReferenceTests.cs (11)
50var configPath = Path.Combine(workDir, "aspire.config.json");
56var integrationDir = Path.Combine(workDir, "MyIntegration");
59File.WriteAllText(Path.Combine(integrationDir, "MyIntegration.csproj"), $$"""
75var aspireHome = Path.Combine(
77var hivesDir = Path.Combine(aspireHome, "hives");
84var packagesDir = Path.Combine(hiveDir, "packages");
87var hiveName = Path.GetFileName(hiveDir);
100File.WriteAllText(Path.Combine(workDir, "nuget.config"), nugetConfig);
103File.WriteAllText(Path.Combine(integrationDir, "MyIntegrationExtensions.cs"), """
129var modulesDir = Path.Combine(workDir, ".modules");
136File.WriteAllText(Path.Combine(workDir, "apphost.ts"), """
Aspire.Cli.Tests (951)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (8)
57var mcpConfigPath = Path.Combine(copilotFolder.FullName, "mcp-config.json");
110var mcpConfigPath = Path.Combine(copilotFolder.FullName, "mcp-config.json");
150var mcpConfigPath = Path.Combine(copilotFolder.FullName, "mcp-config.json");
154var skillFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".github", "skills", "aspire", "SKILL.md");
155Directory.CreateDirectory(Path.GetDirectoryName(skillFilePath)!);
237var mcpConfigPath = Path.Combine(copilotFolder.FullName, "mcp-config.json");
265var mcpConfigPath = Path.Combine(copilotFolder.FullName, "mcp-config.json");
290var mcpConfigPath = Path.Combine(copilotFolder.FullName, "mcp-config.json");
Agents\PlaywrightCliInstallerTests.cs (49)
19var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
69var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
88WorkingDirectory = new DirectoryInfo(Path.GetTempPath()),
152var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
154var tarballPath = Path.Combine(tempDir, "package.tgz");
182var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
184var tarballPath = Path.Combine(tempDir, "package.tgz");
222var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
224var tarballPath = Path.Combine(tempDir, "package.tgz");
257var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
259var tarballPath = Path.Combine(tempDir, "package.tgz");
297var tempPath = Path.GetTempFileName();
317var tempPath = Path.GetTempFileName();
333var tempPath = Path.GetTempFileName();
369var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
371var tarballPath = Path.Combine(tempDir, "package.tgz");
446var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-mirror-test-{Guid.NewGuid():N}");
452var primarySkillDir = Path.Combine(tempDir, ".claude", "skills", "playwright-cli");
454await File.WriteAllTextAsync(Path.Combine(primarySkillDir, "SKILL.md"), "# Playwright CLI Skill");
455Directory.CreateDirectory(Path.Combine(primarySkillDir, "subdir"));
456await File.WriteAllTextAsync(Path.Combine(primarySkillDir, "subdir", "extra.md"), "Extra content");
479context.AddSkillBaseDirectory(Path.Combine(".claude", "skills"));
480context.AddSkillBaseDirectory(Path.Combine(".github", "skills"));
481context.AddSkillBaseDirectory(Path.Combine(".opencode", "skill"));
486Assert.True(File.Exists(Path.Combine(tempDir, ".github", "skills", "playwright-cli", "SKILL.md")));
487Assert.True(File.Exists(Path.Combine(tempDir, ".github", "skills", "playwright-cli", "subdir", "extra.md")));
488Assert.Equal("# Playwright CLI Skill", await File.ReadAllTextAsync(Path.Combine(tempDir, ".github", "skills", "playwright-cli", "SKILL.md")));
491Assert.True(File.Exists(Path.Combine(tempDir, ".opencode", "skill", "playwright-cli", "SKILL.md")));
492Assert.True(File.Exists(Path.Combine(tempDir, ".opencode", "skill", "playwright-cli", "subdir", "extra.md")));
506var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-sync-test-{Guid.NewGuid():N}");
507var sourceDir = Path.Combine(tempDir, "source");
508var targetDir = Path.Combine(tempDir, "target");
514File.WriteAllText(Path.Combine(sourceDir, "keep.md"), "keep");
518File.WriteAllText(Path.Combine(targetDir, "keep.md"), "old content");
519File.WriteAllText(Path.Combine(targetDir, "stale.md"), "should be removed");
520Directory.CreateDirectory(Path.Combine(targetDir, "stale-dir"));
521File.WriteAllText(Path.Combine(targetDir, "stale-dir", "old.md"), "should be removed");
526Assert.Equal("keep", File.ReadAllText(Path.Combine(targetDir, "keep.md")));
529Assert.False(File.Exists(Path.Combine(targetDir, "stale.md")));
530Assert.False(Directory.Exists(Path.Combine(targetDir, "stale-dir")));
Caching\DiskCacheTests.cs (10)
20var hives = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "hives"));
21var cacheDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache"));
22var ctx = new CliExecutionContext(workspace.WorkspaceRoot, hives, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
72var diskPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache", "nuget-search");
118var diskPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache", "nuget-search");
123var nameNoExt = Path.GetFileNameWithoutExtension(current);
127var oldName = Path.Combine(diskPath, $"{hash}.{oldUnix}.json");
Commands\AgentMcpCommandTests.cs (5)
161AppHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "TestAppHost", "TestAppHost.csproj"),
231AppHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "TestAppHost", "TestAppHost.csproj"),
308AppHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "TestAppHost", "TestAppHost.csproj"),
424AppHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "TestAppHost", "TestAppHost.csproj"),
510AppHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "TestAppHost", "TestAppHost.csproj"),
Commands\ConfigCommandTests.cs (13)
71var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
94var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
119var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
153var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
273var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
489var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
521var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
552var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
583var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
597var settingsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
599var settingsPath = Path.Combine(settingsDir, "settings.json");
630var settingsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
632var settingsPath = Path.Combine(settingsDir, "settings.json");
Commands\ExportCommandTests.cs (16)
27var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
116var customDir = Path.Combine(workspace.WorkspaceRoot.FullName, "custom", "nested");
117var outputPath = Path.Combine(customDir, "my-export.zip");
150var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
153var appHostDir = Path.Combine(workspace.WorkspaceRoot.FullName, "MyAppHost");
155var appHostProjectPath = Path.Combine(appHostDir, "MyAppHost.csproj");
183var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
193AppHostPath = Path.Combine("C:", "other", "OtherAppHost", "OtherAppHost.csproj"),
216AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TargetAppHost", "TargetAppHost.csproj"),
303var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
430var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
489var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
544var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
610var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
639var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
703AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestAppHost", "TestAppHost.csproj"),
Commands\InitCommandTests.cs (14)
27var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
30var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectFileName));
66var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
84var appHostDir = Path.Combine(outputPath, "Test.AppHost");
85var serviceDefaultsDir = Path.Combine(outputPath, "Test.ServiceDefaults");
88File.WriteAllText(Path.Combine(appHostDir, "Test.AppHost.csproj"), "<Project />");
89File.WriteAllText(Path.Combine(serviceDefaultsDir, "Test.ServiceDefaults.csproj"), "<Project />");
110Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost", "Test.AppHost.csproj")));
111Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.ServiceDefaults", "Test.ServiceDefaults.csproj")));
164var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
219var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
345Assert.Equal(workspace.WorkspaceRoot.FullName, Path.GetFullPath(outputPath));
348var appHostFile = Path.Combine(outputPath, "apphost.cs");
503var appHostFile = Path.Combine(outputPath, "apphost.cs");
Commands\NewCommandTests.cs (10)
896File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
912Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")));
1018Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
1081var runProfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
1193var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestApp");
1255await File.WriteAllTextAsync(Path.Combine(context.TargetDirectory.FullName, "aspire.config.json"), """
1285var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
1347var modulesDir = Directory.CreateDirectory(Path.Combine(directory.FullName, ".modules"));
1348File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.ts"), "// generated sdk");
1362Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".modules", "aspire.ts")));
Commands\PsCommandTests.cs (5)
110AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "App1", "App1.AppHost.csproj"),
126AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "App2", "App2.AppHost.csproj"),
205AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "App1", "App1.AppHost.csproj"),
286AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "App1", "App1.AppHost.csproj"),
340AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "App1", "App1.AppHost.csproj"),
Commands\RunCommandTests.cs (44)
152var logsDirectory = Path.Combine(Path.GetTempPath(), "aspire-cli-tests");
157var fileName = Path.GetFileName(path);
466$"{InteractionServiceStrings.BuildingAppHost} src{Path.DirectorySeparatorChar}MyApp.AppHost{Path.DirectorySeparatorChar}MyApp.AppHost.csproj",
475var appHostDirectoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "src", "MyApp.AppHost");
477var appHostProjectPath = Path.Combine(appHostDirectory.FullName, "MyApp.AppHost.csproj");
938var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
948workingDirectory: workspace.WorkspaceRoot, hivesDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("hives"), cacheDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("cache"), sdksDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), logFilePath: "test.log"
988var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
998workingDirectory: workspace.WorkspaceRoot, hivesDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("hives"), cacheDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("cache"), sdksDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), logFilePath: "test.log"
1034var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1044workingDirectory: workspace.WorkspaceRoot, hivesDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("hives"), cacheDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("cache"), sdksDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), logFilePath: "test.log"
1084var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1094workingDirectory: workspace.WorkspaceRoot, hivesDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("hives"), cacheDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("cache"), sdksDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), logFilePath: "test.log"
1129var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1139workingDirectory: workspace.WorkspaceRoot, hivesDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("hives"), cacheDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("cache"), sdksDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), logFilePath: "test.log"
1175var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1185workingDirectory: workspace.WorkspaceRoot, hivesDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("hives"), cacheDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("cache"), sdksDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), logFilePath: "test.log"
1221var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1231workingDirectory: workspace.WorkspaceRoot, hivesDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("hives"), cacheDirectory: workspace.WorkspaceRoot.CreateSubdirectory(".aspire").CreateSubdirectory("cache"), sdksDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory: new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), logFilePath: "test.log"
1349var originalSecretsDir = Path.GetDirectoryName(originalSecretsPath)!;
1505var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
Commands\UpdateCommandTests.cs (22)
86var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
87var oldBackup1 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
88var oldBackup2 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.9876543210");
89var otherFile = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.something");
112var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
113var oldBackup = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
141var nonExistentPath = Path.Combine("C:", "NonExistent", "aspire.exe");
153var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
223return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
296return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
382var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
429var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
470var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
504return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
571return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
637return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
695return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
773return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
818return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
930var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
975var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1008var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
Configuration\AspireConfigFileTests.cs (10)
27var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
47var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
70var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
89var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
103var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
116var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
139var filePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
152var subDir = Path.Combine(workspace.WorkspaceRoot.FullName, "nested", "dir");
157Assert.True(File.Exists(Path.Combine(subDir, AspireConfigFile.FileName)));
173File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), "{}");
Configuration\ConfigurationServiceTests.cs (8)
18var globalSettingsFile = new FileInfo(Path.Combine(globalSettingsDir.FullName, AspireConfigFile.FileName));
20var settingsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
26var logsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "logs"));
29new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "hives")),
30new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache")),
31new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")),
117var sentinelPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
DotNet\DotNetCliRunnerTests.cs (41)
24var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache"));
25return new CliExecutionContext(workingDirectory, hivesDirectory, cacheDirectory, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
32var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
72var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
101var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
129var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
168var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
197var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
226var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
264var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
305var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
383var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
423var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
465var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
512var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
560var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
613var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
680var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
746var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
819var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
824var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj"));
828var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj"));
848invocationOptions.StandardOutputCallback?.Invoke($"Project1{Path.DirectorySeparatorChar}Project1.csproj");
849invocationOptions.StandardOutputCallback?.Invoke($"Project2{Path.DirectorySeparatorChar}Project2.csproj");
866var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
869var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj"));
899var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
945var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
990var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1035var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1086var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1135var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1183var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1219var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1398var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1436var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1474var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1514var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Interaction\ConsoleInteractionServiceTests.cs (120)
27var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
40var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
61var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
86var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
111var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
142var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
169var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
194var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
221var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
240var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
254var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
269var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
284var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
306var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
339var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
372var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
399var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
426var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
456var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
485var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
512var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
539var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
565var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
592var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
620var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
647var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
675var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
702var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
731var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log", debugMode: true);
760var executionContext = new CliExecutionContext(new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo("."), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
Mcp\ListAppHostsToolTests.cs (8)
47var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestAppHost");
111var inScopeAppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "InScopeAppHost");
169var hivesDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "hives"));
170var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache"));
171return new CliExecutionContext(workingDirectory, hivesDirectory, cacheDirectory, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
NuGet\NuGetPackagePrefetcherTests.cs (6)
16var hivesDir = new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "hives"));
17var cacheDir = new DirectoryInfo(Path.Combine(workingDir.FullName, ".aspire", "cache"));
18var executionContext = new CliExecutionContext(workingDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
Packaging\NuGetConfigMergerSnapshotTests.cs (36)
47var path = Path.Combine(dir.FullName, "nuget.config");
65var cacheDir = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
66var executionContext = new CliExecutionContext(root, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
87var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
94var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
115var cacheDir2 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
116var executionContext = new CliExecutionContext(root, hivesDir, cacheDir2, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
150var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
157var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
178var cacheDir3 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
179var executionContext = new CliExecutionContext(root, hivesDir, cacheDir3, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
212var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
219var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
240var cacheDir4 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
241var executionContext = new CliExecutionContext(root, hivesDir, cacheDir4, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
272var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
279var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
300var cacheDir5 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
301var executionContext = new CliExecutionContext(root, hivesDir, cacheDir5, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
337var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
344var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
Packaging\NuGetConfigMergerTests.cs (16)
24var path = Path.Combine(dir.FullName, "nuget.config");
66var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
90var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
134var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
173var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
213var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
323var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
373var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
442var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
508var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
581var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
611var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
661var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
683var originalContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "nuget.config")).DefaultTimeout();
704var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
726var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
Packaging\PackagingServiceTests.cs (133)
46var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
47var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
48var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
81var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
82var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
83var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
125var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
126var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
127var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
158var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
159var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
160var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
191var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
192var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
193var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
223var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
224var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
225var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
254var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
255var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
256var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
285var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
286var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
287var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
316var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
317var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
318var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
358new CliExecutionContext(tempDir, tempDir, tempDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log"),
370var nugetConfigPath = Path.Combine(tempDir.FullName, "nuget.config");
394var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
395var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
399Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-10167"));
400Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-11832"));
402var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
451var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
452var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
456Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-12345"));
458var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
492var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
493var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
494var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
528var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
529var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
530var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
564var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
565var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
566var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
616new CliExecutionContext(tempDir, tempDir, tempDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log"),
628var nugetConfigPath = Path.Combine(tempDir.FullName, "nuget.config");
645var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
646var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
647var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
678var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
679var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
680var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
709var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
710var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
711var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
754var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
755var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
756var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
807var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
808var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
809var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
859var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
860var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
861var executionContext = new CliExecutionContext(tempDir, hivesDir, cacheDir, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
Projects\FallbackProjectParserTests.cs (15)
25var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
47var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
72var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
97var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
122var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
148var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
168var tempPath = Path.GetTempPath().Replace("\\", "/");
187var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
209var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
233var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
263var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
286var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
310var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
333var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
355var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.txt");
Projects\ProjectLocatorTests.cs (66)
28var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache"));
29return new CliExecutionContext(workingDirectory, hivesDirectory, cacheDirectory, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
37var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
55var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
59var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
63var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
68appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
89var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
93var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
97var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
102appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
120var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
125var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
161var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
165var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
168var relativePath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName);
169var forwardSlashPath = relativePath.Replace(Path.DirectorySeparatorChar, '/');
191var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
194var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
209var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
212var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
255var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectFileExtension}"));
270var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
287var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
296var globalSettingsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.global.json");
307var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName));
326var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "MyAppHost.csproj"));
331var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj"));
338var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
339var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
340var relativeAppHostPath = Path
342.Replace(Path.DirectorySeparatorChar, '/');
346var globalSettingsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.global.json");
361var aspireConfigFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
375var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
400var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
426var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs"));
436var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj"));
441var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs"));
481var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
501var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj"));
506var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs"));
542var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
566var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
587var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
598var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj"));
613var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt"));
633var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
638var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
705? Path.Combine(executionContext.HomeDirectory.FullName, ".aspire", AspireConfigFile.FileName)
706: Path.Combine(executionContext.WorkingDirectory.FullName, AspireConfigFile.FileName);
743var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
797var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj"));
799var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj"));
834var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs"));
862var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj"));
901var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
906var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.cs"));
944var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
948var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
986var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
1009var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1030var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Projects\ProjectUpdaterTests.cs (54)
30var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
33var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
36var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
140var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
143var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
146var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
271var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
274var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
277var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
421var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj"));
424var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj"));
427var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj"));
430var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj"));
554var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
557var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
559var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
690var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
692var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
792var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
794var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
895var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache"));
896return new CliExecutionContext(workingDirectory, hivesDirectory, cacheDirectory, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
925var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
927var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1038var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1040var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1162var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1164var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1276var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1278var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1387var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1481var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1483var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1583var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1662var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1744var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
1827var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
1909var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1995var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2073var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2151var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2258var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2260var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2382var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2410var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2437var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2469var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2500var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2528var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2559var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2577var directoryPackagesPropsFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props");
Templating\DotNetTemplateFactoryTests.cs (21)
59var path = Path.Combine(dir.FullName, "nuget.config");
84var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
116var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
129var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
154var parentConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
160var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
173var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
196var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
210var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
223var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
227var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
240var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
249var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
250var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
261var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
270var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
271var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
373var executionContext = new CliExecutionContext(workingDirectory, hivesDirectory, cacheDirectory, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")), "test.log");
Utils\AppHostHelperTests.cs (25)
14var appHostPath = Path.Combine("path", "to", "MyApp.AppHost.csproj");
15var homeDirectory = Path.Combine(Path.GetTempPath(), "testuser");
21var fileName = Path.GetFileName(socketPrefix);
25var dir = Path.GetDirectoryName(socketPrefix);
75var fileName = Path.GetFileName(socketPrefix);
91var fileName = Path.GetFileName(socketPrefix);
209var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
216var hash = Path.GetFileName(prefix)["auxi.sock.".Length..];
219var socket1 = Path.Combine(backchannelsDir, $"auxi.sock.{hash}.12345");
220var socket2 = Path.Combine(backchannelsDir, $"auxi.sock.{hash}.67890");
225var otherSocket = Path.Combine(backchannelsDir, "auxi.sock.differenthash123.99999");
240var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
247var hash = Path.GetFileName(prefix)["auxi.sock.".Length..];
250var oldFormatSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}");
254var newFormatSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}.12345");
269var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
276var hash = Path.GetFileName(prefix)["auxi.sock.".Length..];
279var similarSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}xyz.12345");
292var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
298var otherSocket = Path.Combine(backchannelsDir, "auxi.sock.differenthash123.99999");
310var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
320var oldFormatSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}");
325var orphanedSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}.{deadPid}");
330var liveSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}.{currentPid}");
Utils\CliTestHelper.cs (10)
72var globalSettingsFilePath = Path.Combine(options.WorkingDirectory.FullName, ".aspire", "settings.global.json");
82var testLogsDirectory = Path.Combine(options.WorkingDirectory.FullName, ".aspire", "logs");
246var hivesDirectory = new DirectoryInfo(Path.Combine(WorkingDirectory.FullName, ".aspire", "hives"));
247var cacheDirectory = new DirectoryInfo(Path.Combine(WorkingDirectory.FullName, ".aspire", "cache"));
248var logsDirectory = new DirectoryInfo(Path.Combine(WorkingDirectory.FullName, ".aspire", "logs"));
249var logFilePath = Path.Combine(logsDirectory.FullName, "test.log");
250return new CliExecutionContext(WorkingDirectory, hivesDirectory, cacheDirectory, new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-sdks")), logsDirectory, logFilePath);
332var globalSettingsFilePath = Path.Combine(workingDirectory.FullName, ".aspire", "settings.global.json");
506var tmpDirectory = new DirectoryInfo(Path.Combine(executionContext.WorkingDirectory.FullName, "tmp"));
Utils\FileSystemHelperTests.cs (51)
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;");
28Assert.True(File.Exists(Path.Combine(destDir, "file1.txt")));
29Assert.True(File.Exists(Path.Combine(destDir, "file2.txt")));
30Assert.True(File.Exists(Path.Combine(destDir, "file3.cs")));
32Assert.Equal("content1", File.ReadAllText(Path.Combine(destDir, "file1.txt")));
33Assert.Equal("content2", File.ReadAllText(Path.Combine(destDir, "file2.txt")));
34Assert.Equal("using System;", File.ReadAllText(Path.Combine(destDir, "file3.cs")));
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");
58Assert.True(File.Exists(Path.Combine(destDir, "root.txt")));
59Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1")));
60Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "level1.txt")));
61Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1", "subdir2")));
62Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt")));
64Assert.Equal("root content", File.ReadAllText(Path.Combine(destDir, "root.txt")));
65Assert.Equal("level 1 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "level1.txt")));
66Assert.Equal("level 2 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt")));
75var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "empty_destination");
91var nonExistentSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nonexistent");
92var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
104var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
128var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
153var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
156var binaryFilePath = Path.Combine(sourceDir.FullName, "binary.dat");
165var copiedFilePath = Path.Combine(destDir, "binary.dat");
178var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
185File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}");
195currentDest = Path.Combine(currentDest, $"level{i}");
197var filePath = Path.Combine(currentDest, $"file{i}.txt");
209var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
212File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "new content 1");
213File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "new content 2");
216File.WriteAllText(Path.Combine(subDir.FullName, "project.assets.json"), "new assets");
217File.WriteAllText(Path.Combine(subDir.FullName, "project.csproj.nuget.dgspec.json"), "new dgspec");
221File.WriteAllText(Path.Combine(destDir, "file1.txt"), "old content 1");
222File.WriteAllText(Path.Combine(destDir, "file2.txt"), "old content 2");
224var destSubDir = Directory.CreateDirectory(Path.Combine(destDir, "obj"));
225File.WriteAllText(Path.Combine(destSubDir.FullName, "project.assets.json"), "old assets");
226File.WriteAllText(Path.Combine(destSubDir.FullName, "project.csproj.nuget.dgspec.json"), "old dgspec");
232Assert.Equal("new content 1", File.ReadAllText(Path.Combine(destDir, "file1.txt")));
233Assert.Equal("new content 2", File.ReadAllText(Path.Combine(destDir, "file2.txt")));
234Assert.Equal("new assets", File.ReadAllText(Path.Combine(destDir, "obj", "project.assets.json")));
235Assert.Equal("new dgspec", File.ReadAllText(Path.Combine(destDir, "obj", "project.csproj.nuget.dgspec.json")));
244var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
247File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "new content");
251File.WriteAllText(Path.Combine(destDir, "file1.txt"), "old content");
Aspire.Components.Common.TestUtilities (1)
Aspire.Dashboard (7)
Aspire.Dashboard.Tests (19)
Aspire.Deployment.EndToEnd.Tests (71)
Aspire.EndToEnd.Tests (61)
tests\Shared\TemplatesTesting\AspireProject.cs (21)
23Path.Combine(BuildEnvironment.TestAssetsPath, "nuget8.config");
32public string ServiceDefaultsProjectPath => Path.Combine(RootDir, $"{Id}.ServiceDefaults");
33public string TestsProjectDirectory => Path.Combine(RootDir, $"{Id}.Tests");
48LogPath = Path.Combine(_buildEnv.LogRootPath, Id);
50AppHostProjectDirectory = Path.Combine(RootDir, $"{Id}.AppHost");
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
72string targetNuGetConfigPath = Path.Combine(dir, "nuget.config");
93projectDir = Path.Combine(rootDir, id);
97rootDir = projectDir = Path.Combine(BuildEnvironment.TestRootPath, id);
100string logPath = Path.Combine(BuildEnvironment.ForDefaultFramework.LogRootPath, id);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
115cmd.WithWorkingDirectory(Path.GetDirectoryName(projectDir)!)
153File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
154string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
253_testOutput.WriteLine($"----------- [{Path.GetFileName(AppHostProjectDirectory)}] app has exited -------------");
332workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
336var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
339var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (23)
25? Path.GetTempPath()
26: Environment.GetEnvironmentVariable("DEV_TEMP") is { } devTemp && Path.Exists(devTemp)
28: Path.GetTempPath();
31public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
32public static readonly string TestRootPath = Path.Combine(TempDir, "templates-testroot");
80var sdkFromArtifactsPath = Path.Combine(RepoRoot!.FullName, "artifacts", "bin", sdkDirName);
83sdkForTemplatePath = Path.GetFullPath(sdkFromArtifactsPath);
88string workloadsProjString = Path.Combine("tests", "workloads.proj");
99.Split(Path.PathSeparator)
100.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
106sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
112BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Debug", "Shipping");
122.Split(Path.PathSeparator)
123.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
129sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
139string? baseDir = Path.GetDirectoryName(EnvironmentVariables.SdkForTemplateTestingPath);
145sdkForTemplatePath = Path.Combine(baseDir, sdkDirName);
160sdkForTemplatePath = Path.GetFullPath(sdkForTemplatePath);
162NuGetPackagesPath = UsesCustomDotNet ? Path.Combine(AppContext.BaseDirectory, $"nuget-cache-{Guid.NewGuid()}") : null;
170EnvVars["PATH"] = $"{sdkForTemplatePath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
190DotNet = Path.Combine(sdkForTemplatePath!, "dotnet");
198LogRootPath = Path.GetFullPath(EnvironmentVariables.TestLogPath);
203LogRootPath = Path.Combine(AppContext.BaseDirectory, "logs");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (10)
29? Path.Combine(Path.GetTempPath(), $"templates-${s_tmpDirSuffix}")
30: Path.Combine(AppContext.BaseDirectory, "templates");
31_customHiveDirectory = Path.Combine(customHiveBaseDirectory, customHiveDirName);
32_stampFilePath = Path.Combine(_customHiveDirectory, ".stamp-installed");
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p)));
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}");
95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
104? Path.GetTempPath()
105: Path.Combine(BuildEnvironment.TempDir, "templates", "working"); // avoid running from the repo
Aspire.Hosting (178)
Dashboard\DashboardEventHandlers.cs (20)
122if (string.Equals(".dll", Path.GetExtension(assemblyPath), StringComparison.OrdinalIgnoreCase))
124runtimeConfigPath = Path.ChangeExtension(assemblyPath, ".runtimeconfig.json");
130var directory = Path.GetDirectoryName(assemblyPath)!;
131var fileName = Path.GetFileName(assemblyPath);
132var baseName = Path.GetExtension(fileName) switch
134".exe" => Path.GetFileNameWithoutExtension(fileName), // Windows: remove .exe
137runtimeConfigPath = Path.Combine(directory, $"{baseName}.runtimeconfig.json");
193if (string.Equals(".dll", Path.GetExtension(dashboardPath), StringComparison.OrdinalIgnoreCase))
196originalRuntimeConfig = Path.ChangeExtension(dashboardPath, ".runtimeconfig.json");
202var directory = Path.GetDirectoryName(dashboardPath)!;
203var fileName = Path.GetFileName(dashboardPath);
204var baseName = Path.GetExtension(fileName) switch
206".exe" => Path.GetFileNameWithoutExtension(fileName), // Windows: remove .exe
209originalRuntimeConfig = Path.Combine(directory, $"{baseName}.runtimeconfig.json");
287var fullyQualifiedDashboardPath = Path.GetFullPath(dashboardPath);
288var dashboardWorkingDirectory = Path.GetDirectoryName(fullyQualifiedDashboardPath);
309if (string.Equals(".dll", Path.GetExtension(fullyQualifiedDashboardPath), StringComparison.OrdinalIgnoreCase))
316var directory = Path.GetDirectoryName(fullyQualifiedDashboardPath)!;
317var fileName = Path.GetFileName(fullyQualifiedDashboardPath);
321dashboardDll = Path.Combine(directory, $"{baseName}.dll");
Dcp\DcpExecutor.cs (18)
58private static readonly string s_macOSUserDevCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspire", "dev-certs", "https");
1461exe.Spec.WorkingDirectory = Path.GetDirectoryName(projectMetadata.ProjectPath);
1750var certificatesRootDir = Path.Join(_locations.DcpSessionDir, exe.Name());
1751var bundleOutputPath = Path.Join(certificatesRootDir, "cert.pem");
1752var customBundleOutputPath = Path.Join(certificatesRootDir, "bundles");
1753var certificatesOutputPath = Path.Join(certificatesRootDir, "certs");
1754var baseServerAuthOutputPath = Path.Join(certificatesRootDir, "private");
1767dirs.AddRange(existing.Split(Path.PathSeparator, StringSplitOptions.RemoveEmptyEntries));
1775CertificateDirectoriesPath = ReferenceExpression.Create($"{string.Join(Path.PathSeparator, dirs)}"),
1781CertificatePath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{cert.Thumbprint}.crt")}"),
1782KeyPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{cert.Thumbprint}.key")}"),
1783PfxPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{cert.Thumbprint}.pfx")}"),
1817File.WriteAllBytes(Path.Join(customBundleOutputPath, bundleId), bundleBytes);
1838File.WriteAllText(Path.Join(baseServerAuthOutputPath, $"{thumbprint}.crt"), publicCetificatePem);
1845File.WriteAllBytes(Path.Join(baseServerAuthOutputPath, $"{thumbprint}.key"), keyBytes);
1853File.WriteAllBytes(Path.Join(baseServerAuthOutputPath, $"{thumbprint}.pfx"), pfxBytes);
2842var keyFileName = Path.Join(s_macOSUserDevCertificateLocation, $"{lookup}.key");
2915var pfxFileName = Path.Join(s_macOSUserDevCertificateLocation, $"{lookup}.pfx");
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (15)
Aspire.Hosting.Azure.Functions (8)
Aspire.Hosting.Azure.Kusto.Tests (3)
Aspire.Hosting.Azure.Tests (48)
AzureEnvironmentResourceTests.cs (14)
34var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
38var envBicepPath = Path.Combine(tempDir.FullName, "env", "env.bicep");
71var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
122var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
170var mainBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "main.bicep"));
171var storageBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "storage", "storage.bicep"));
204var mainBicepPath = Path.Combine(tempDir.Path, "main.bicep");
209var includedStorageBicepPath = Path.Combine(tempDir.Path, "included-storage", "included-storage.bicep");
213var excludedStorageBicepPath = Path.Combine(tempDir.Path, "excluded-storage", "excluded-storage.bicep");
235var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile");
259var bicepFilePath = Path.Combine(tempDir, bicepFileName);
278var outputDir = Path.Combine(tempDir, "output");
295var mainBicepPath = Path.Combine(outputDir, "main.bicep");
298var resourceBicepPath = Path.Combine(outputDir, "custom-resource", "custom-resource.bicep");
Aspire.Hosting.CodeGeneration.Go (2)
Aspire.Hosting.CodeGeneration.Go.Tests (2)
Aspire.Hosting.CodeGeneration.Java (1)
Aspire.Hosting.CodeGeneration.Java.Tests (2)
Aspire.Hosting.CodeGeneration.Python (3)
Aspire.Hosting.CodeGeneration.Python.Tests (2)
Aspire.Hosting.CodeGeneration.Rust (2)
Aspire.Hosting.CodeGeneration.Rust.Tests (2)
Aspire.Hosting.CodeGeneration.TypeScript (2)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (2)
Aspire.Hosting.Containers.Tests (12)
Aspire.Hosting.Docker (11)
Aspire.Hosting.Docker.Tests (51)
DockerComposePublisherTests.cs (38)
97var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
98var envPath = Path.Combine(tempDir.Path, ".env");
134var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
135var envPath = Path.Combine(tempDir.Path, ".env");
162var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
191var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
240var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
242var envPath = Path.Combine(tempDir.Path, ".env");
253var envFilePath = Path.Combine(tempDir.Path, ".env");
284var envFilePath = Path.Combine(tempDir.Path, ".env");
339var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
365var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
397var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
426var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
452var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
480var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
512var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
537var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile");
561var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
588var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production"));
617var envFilePath = Path.Combine(tempDir.Path, ".env.Staging");
651var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production"));
673var envFilePath = Path.Combine(tempDir.Path, ".env.Production");
707var envFilePath = Path.Combine(tempDir.Path, ".env.Staging");
738var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
739var envPath = Path.Combine(tempDir.Path, ".env");
765var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
796var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
797var envPath = Path.Combine(tempDir.Path, ".env");
823envVar.DefaultValue = "./" + Path.GetFileName(mount.Source);
835var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
836var envPath = Path.Combine(tempDir.Path, ".env");
883var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
884var envPath = Path.Combine(tempDir.Path, ".env");
917var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
918var envPath = Path.Combine(tempDir.Path, ".env");
961var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
995var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
Aspire.Hosting.Foundry.Tests (2)
Aspire.Hosting.Garnet.Tests (4)
Aspire.Hosting.JavaScript (29)
JavaScriptHostingExtensions.cs (29)
123appDirectory = Path.GetFullPath(appDirectory, builder.AppHostDirectory);
155if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
259if (File.Exists(Path.Combine(appDirectory, "package.json")))
338appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
392if (File.Exists(Path.Combine(appDirectory, "Dockerfile")))
515appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
587var candidatePath = Path.GetFullPath(Path.Join(appDirectory, configFile));
601var absoluteConfigPath = Path.GetFullPath(configTarget, appDirectory);
603var relativeConfigPath = Path.GetRelativePath(Path.Join(appDirectory, "node_modules", ".bin"), absoluteConfigPath);
609var aspireConfigPath = Path.Join(appDirectory, "node_modules", ".bin", $"aspire.{Path.GetFileName(configTarget)}");
739var hasBunLock = File.Exists(Path.Combine(workingDirectory, "bun.lock")) ||
740File.Exists(Path.Combine(workingDirectory, "bun.lockb"));
745if (File.Exists(Path.Combine(workingDirectory, "bun.lock")))
749if (File.Exists(Path.Combine(workingDirectory, "bun.lockb")))
786File.Exists(Path.Combine(resource.Resource.WorkingDirectory, "package-lock.json"))
803var hasYarnLock = File.Exists(Path.Combine(workingDirectory, "yarn.lock"));
804var hasYarnrc = File.Exists(Path.Combine(workingDirectory, ".yarnrc.yml"));
805var hasYarnBerryDir = Directory.Exists(Path.Combine(workingDirectory, ".yarn"));
878var hasPnpmLock = File.Exists(Path.Combine(workingDirectory, "pnpm-lock.yaml"));
954var workingDirectory = Path.GetFullPath(resource.WorkingDirectory);
966ScriptPath = Path.GetFullPath(scriptPath, workingDirectory),
982var workingDirectory = Path.GetFullPath(resource.WorkingDirectory);
1192var nvmrcPath = Path.Combine(workingDirectory, ".nvmrc");
1204var nodeVersionPath = Path.Combine(workingDirectory, ".node-version");
1216var packageJsonPath = Path.Combine(workingDirectory, "package.json");
1241var toolVersionsPath = Path.Combine(workingDirectory, ".tool-versions");
Aspire.Hosting.JavaScript.Tests (66)
AddJavaScriptAppTests.cs (9)
20var appDir = Path.Combine(tempDir.Path, "js");
29var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile");
58var appDir = Path.Combine(tempDir.Path, "js");
63File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), string.Empty);
72var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile");
87var appDir = Path.Combine(tempDir.Path, "pnpm-app");
100await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson);
108var dockerfilePath = Path.Combine(tempDir.Path, "pnpm-app.Dockerfile");
120var dockerfileInContext = Path.Combine(appDir, "Dockerfile");
AddNodeAppTests.cs (19)
101var appDir = Path.Combine(tempDir.Path, "js");
106File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
107File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "{}");
114var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile");
169var appDir = Path.Combine(tempDir.Path, "js");
171File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
183var dockerfilePath = Path.Combine(tempDir.Path, "js.Dockerfile");
216var appDir = Path.Combine(tempDir.Path, "js");
218File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
229var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "js.Dockerfile"));
238File.WriteAllText(Path.Combine(tempDir.Path, "app.js"), "{}");
265File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), "{}");
338File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
339File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
364var nodeDockerfilePath = Path.Combine(outputDir.Path, "nodeapp.Dockerfile");
394File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
395File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
420var nodeDockerfilePath = Path.Combine(outputDir.Path, "nodeapp.Dockerfile");
559File.WriteAllText(Path.Combine(tempDir.Path, "app.js"), "console.log('hello');");
AddViteAppTests.cs (27)
22var viteDir = Path.Combine(tempDir.Path, "vite");
26File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
57var dockerfilePath = Path.Combine(tempDir.Path, "vite.Dockerfile");
91File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), packageJson);
99var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
111File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), "18.20.0");
119var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
131File.WriteAllText(Path.Combine(tempDir.Path, ".node-version"), "v21.5.0");
139var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
156File.WriteAllText(Path.Combine(tempDir.Path, ".tool-versions"), toolVersions);
164var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
182var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
198File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), versionString);
206var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
228var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
286var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin");
290var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js");
347var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin");
351var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js");
451var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin");
455var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js");
506var subDir = Path.Combine(tempDir.Path, "my-app", "frontend");
510var nodeModulesBinDir = Path.Combine(subDir, "node_modules", ".bin");
514var viteConfigPath = Path.Combine(subDir, "vite.config.js");
562var absoluteConfigPath = Path.GetFullPath(viteConfigPath);
585var nodeModulesBinDir = Path.Combine(tempDir.Path, "node_modules", ".bin");
589var viteConfigPath = Path.Combine(tempDir.Path, configFileName);
PackageInstallationTests.cs (8)
458File.WriteAllText(Path.Combine(tempDir.Path, "package-lock.json"), "empty");
485File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty");
506File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty");
507File.WriteAllText(Path.Combine(tempDir.Path, ".yarnrc.yml"), "empty");
522File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty");
523Directory.CreateDirectory(Path.Combine(tempDir.Path, ".yarn", "releases"));
538File.WriteAllText(Path.Combine(tempDir.Path, "pnpm-lock.yaml"), "empty");
553File.WriteAllText(Path.Combine(tempDir.Path, "bun.lock"), "empty");
Aspire.Hosting.Kafka.Tests (4)
Aspire.Hosting.Keycloak (2)
Aspire.Hosting.Keycloak.Tests (8)
Aspire.Hosting.Kubernetes (5)
Aspire.Hosting.Kubernetes.Tests (25)
KubernetesPublisherTests.cs (20)
63var filePath = Path.Combine(tempDir.Path, expectedFile);
64var fileExtension = Path.GetExtension(filePath)[1..];
102var deploymentPath = Path.Combine(tempDir.Path, "templates/service/deployment.yaml");
158var filePath = Path.Combine(tempDir.Path, expectedFile);
159var fileExtension = Path.GetExtension(filePath)[1..];
212var filePath = Path.Combine(tempDir.Path, expectedFile);
213var fileExtension = Path.GetExtension(filePath)[1..];
267var filePath = Path.Combine(tempDir.Path, expectedFile);
268var fileExtension = Path.GetExtension(filePath)[1..];
299var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile");
394var filePath = Path.Combine(tempDir.Path, expectedFile);
395var fileExtension = Path.GetExtension(filePath)[1..];
438var filePath = Path.Combine(tempDir.Path, expectedFile);
439var fileExtension = Path.GetExtension(filePath)[1..];
495var filePath = Path.Combine(tempDir.Path, expectedFile);
496var fileExtension = Path.GetExtension(filePath)[1..];
549var filePath = Path.Combine(tempDir.Path, expectedFile);
550var fileExtension = Path.GetExtension(filePath)[1..];
606var filePath = Path.Combine(tempDir.Path, expectedFile);
607var fileExtension = Path.GetExtension(filePath)[1..];
Aspire.Hosting.Maui (9)
Aspire.Hosting.Maui.Tests (3)
Aspire.Hosting.Milvus.Tests (3)
Aspire.Hosting.MongoDB (1)
Aspire.Hosting.MongoDB.Tests (11)
Aspire.Hosting.MySql (1)
Aspire.Hosting.MySql.Tests (8)
Aspire.Hosting.Oracle (1)
Aspire.Hosting.Oracle.Tests (2)
Aspire.Hosting.PostgreSQL (1)
Aspire.Hosting.PostgreSQL.Tests (15)
Aspire.Hosting.Python (37)
PythonAppResourceBuilderExtensions.cs (33)
357var resource = createResource(name, "python", Path.GetFullPath(appDirectory, builder.AppHostDirectory));
428if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
504var appDirectoryFullPath = Path.GetFullPath(appDirectory, builder.AppHostDirectory);
506if (File.Exists(Path.Combine(appDirectoryFullPath, "pyproject.toml")) ||
507File.Exists(Path.Combine(appDirectoryFullPath, "requirements.txt")))
526var uvLockPath = Path.Combine(resource.WorkingDirectory, "uv.lock");
635var requirementsTxtPath = Path.Combine(resource.WorkingDirectory, "requirements.txt");
675var pyprojectTomlPath = Path.Combine(resource.WorkingDirectory, "pyproject.toml");
753var appDirectoryFullPath = Path.GetFullPath(appDirectory, builder.AppHostDirectory);
757var appHostParentDirectory = Path.GetDirectoryName(builder.AppHostDirectory);
763var relativePath = Path.GetRelativePath(appHostParentDirectory, appDirectoryFullPath);
765!Path.IsPathRooted(relativePath);
770return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
778var venvPath = Path.Combine(currentDirectory, virtualEnvironmentPath);
796var parentDirectory = Path.GetDirectoryName(currentDirectory);
808return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
863var resolvedPath = Path.IsPathRooted(virtualEnvironmentPath)
865: Path.GetFullPath(virtualEnvironmentPath, builder.Resource.WorkingDirectory);
938programPath = Path.GetFullPath(entrypoint, builder.Resource.WorkingDirectory);
957var venvPath = Path.IsPathRooted(annotation.VirtualEnvironment.VirtualEnvironmentPath)
959: Path.GetFullPath(annotation.VirtualEnvironment.VirtualEnvironmentPath, builder.Resource.WorkingDirectory);
963interpreterPath = Path.Join(venvPath, "Scripts", "python.exe");
967interpreterPath = Path.Join(venvPath, "bin", "python");
1163if (File.Exists(Path.Combine(workingDirectory, "pyproject.toml")))
1168else if (File.Exists(Path.Combine(workingDirectory, "requirements.txt")))
1273foreach (var directory in pathVariable.Split(Path.PathSeparator))
1275var fullPath = Path.Combine(directory, commandWithExt);
1286foreach (var directory in pathVariable.Split(Path.PathSeparator))
1288var fullPath = Path.Combine(directory, command);
1380var venvPath = Path.IsPathRooted(pythonEnv.VirtualEnvironment.VirtualEnvironmentPath)
1382: Path.GetFullPath(pythonEnv.VirtualEnvironment.VirtualEnvironmentPath, builder.Resource.WorkingDirectory);
1515var venvPath = Path.IsPathRooted(pythonEnv.VirtualEnvironment.VirtualEnvironmentPath)
1517: Path.GetFullPath(pythonEnv.VirtualEnvironment.VirtualEnvironmentPath, builder.Resource.WorkingDirectory);
Aspire.Hosting.Python.Tests (136)
AddPythonAppTests.cs (127)
28var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
32options.ProjectDirectory = Path.GetFullPath(projectDirectory);
66var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
70options.ProjectDirectory = Path.GetFullPath(projectDirectory);
166Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command);
170Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command);
205Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command);
209Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command);
248Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command);
252Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command);
266var projectDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
278var pythonExecutable = Path.Combine(projectDirectory,
289var scriptPath = Path.Combine(projectDirectory, "main.py");
292var requirementsPath = Path.Combine(projectDirectory, "requirements.txt");
296var dockerFilePath = Path.Combine(projectDirectory, "Dockerfile");
330var relativePipPath = Path.Combine(
335var pipPath = Path.GetFullPath(relativePipPath, projectDirectory);
368? Path.Join(expectedVenvPath, "Scripts", "python.exe")
369: Path.Join(expectedVenvPath, "bin", "python");
419var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
423Assert.Equal(Path.Join(expectedProjectDirectory, "custom-venv", "Scripts", "python.exe"), pythonProjectResource.Command);
427Assert.Equal(Path.Join(expectedProjectDirectory, "custom-venv", "bin", "python"), pythonProjectResource.Command);
454Assert.Equal(Path.Join(tempVenvDir.Path, "Scripts", "python.exe"), pythonProjectResource.Command);
458Assert.Equal(Path.Join(tempVenvDir.Path, "bin", "python"), pythonProjectResource.Command);
531var appVenvPath = Path.Combine(tempAppDir.Path, ".venv");
544var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempAppDir.Path));
545var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv");
561var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
565var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
607var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
611var appVenvPath = Path.Combine(appDirPath, ".venv");
614var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
663var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempAppDir.Path));
664var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv");
680var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
684var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
688var customVenvPath = Path.Combine(appDirPath, "custom-venv");
740var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
990var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
995Assert.Equal(Path.Join(expectedProjectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command);
999Assert.Equal(Path.Join(expectedProjectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command);
1024var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
1028Assert.Equal(Path.Join(expectedProjectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command);
1032Assert.Equal(Path.Join(expectedProjectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command);
1058var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
1062Assert.Equal(Path.Join(expectedProjectDirectory, ".venv", "Scripts", $"{executableName}.exe"), pythonProjectResource.Command);
1066Assert.Equal(Path.Join(expectedProjectDirectory, ".venv", "bin", executableName), pythonProjectResource.Command);
1270File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1271File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1272File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1274var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
1293var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile");
1296var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile");
1299var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile");
1335File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1337File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1339var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
1358var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile");
1361var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile");
1364var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile");
1397var appDirectory = Path.Combine(tempDir.Path, "myapp");
1399var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
1435var appDirectory = Path.Combine(tempDir.Path, "myapp");
1437var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
1475var appDirectory = Path.Combine(tempDir.Path, "myapp");
1477var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
1512var appDirectory = Path.Combine(tempDir.Path, "myapp");
1514var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
1545var appDirectory = Path.Combine(tempDir.Path, "myapp");
1547var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
1653File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1654File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1655File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1670var dockerfilePath = Path.Combine(outputDir.Path, "custom-images-app.Dockerfile");
1699File.WriteAllText(Path.Combine(projectDirectory, "requirements.txt"), requirementsContent);
1700File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1711var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile");
1748File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1749File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1760var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile");
1780File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1791var dockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile");
1813File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1814File.WriteAllText(Path.Combine(projectDirectory, ".python-version"), pythonVersionContent);
1827var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile");
1830var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile");
1833var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile");
1862var scriptPath = Path.Combine(tempDir.Path, scriptName);
1866var pyprojectPath = Path.Combine(tempDir.Path, "pyproject.toml");
1896var scriptPath = Path.Combine(tempDir.Path, scriptName);
1900var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
1931var scriptPath = Path.Combine(tempDir.Path, scriptName);
1935var pyprojectPath = Path.Combine(tempDir.Path, "pyproject.toml");
1937var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
1961var scriptPath = Path.Combine(tempDir.Path, scriptName);
1985var scriptPath = Path.Combine(tempDir.Path, scriptName);
2008var scriptPath = Path.Combine(tempDir.Path, scriptName);
2012var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2036var scriptPath = Path.Combine(tempDir.Path, scriptName);
2040var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2065var scriptPath = Path.Combine(tempDir.Path, "main.py");
2093var scriptPath = Path.Combine(tempDir.Path, "main.py");
2097var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2136var scriptPath = Path.Combine(tempDir.Path, "main.py");
2139var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2166var scriptPath = Path.Combine(tempDir.Path, "main.py");
2169var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2200var scriptPath = Path.Combine(tempDir.Path, "main.py");
2203var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2236var scriptPath = Path.Combine(tempDir.Path, "main.py");
2239var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2266var scriptPath = Path.Combine(tempDir.Path, "main.py");
2269var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2298var scriptPath = Path.Combine(tempDir.Path, "main.py");
2301var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2330var scriptPath = Path.Combine(tempDir.Path, "main.py");
2333var requirementsPath = Path.Combine(tempDir.Path, "requirements.txt");
2366var scriptPath = Path.Combine(tempDir.Path, "main.py");
Aspire.Hosting.Qdrant.Tests (3)
Aspire.Hosting.Redis.Tests (4)
Aspire.Hosting.RemoteHost (8)
Aspire.Hosting.RemoteHost.Tests (4)
Aspire.Hosting.Seq.Tests (4)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.SqlServer.Tests (3)
Aspire.Hosting.Testing (2)
Aspire.Hosting.Testing.Tests (6)
Aspire.Hosting.Tests (192)
Dashboard\DashboardLifecycleHookTests.cs (14)
277var tempDir = Path.GetTempFileName();
283var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
284var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
366var tempDir = Path.GetTempFileName();
372var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard.exe");
373var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
374var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
435var tempDir = Path.GetTempFileName();
441var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard");
442var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
443var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
504var tempDir = Path.GetTempFileName();
510var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
511var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
Dcp\DcpHostNotificationTests.cs (8)
505Path.Combine(Directory.GetCurrentDirectory(), "tests", "Shared", "TestCertificates", "testCert.pfx"),
506Path.Combine(AppContext.BaseDirectory, "shared", "TestCertificates", "testCert.pfx"),
507Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "..", "tests", "Shared", "TestCertificates", "testCert.pfx"))
647var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test");
827var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test");
MSBuildTests.cs (35)
23var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
26File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
55File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
80var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
83File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
111File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
121var metadataDirectory = Path.Combine(appHostDirectory, "obj", "Debug", "net8.0", "Aspire", "references");
122var appHostMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "_AppHost.ProjectMetadata.g.cs"));
123var appMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "App.ProjectMetadata.g.cs"));
136.Replace(Path.DirectorySeparatorChar, '/');
150File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
160File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
175var libraryDirectory = Path.Combine(basePath, name);
178File.WriteAllText(Path.Combine(libraryDirectory, $"{name}.csproj"),
190File.WriteAllText(Path.Combine(libraryDirectory, "Class1.cs"),
202var appDirectory = Path.Combine(basePath, name);
205File.WriteAllText(Path.Combine(appDirectory, $"{name}.csproj"),
216File.WriteAllText(Path.Combine(appDirectory, "Program.cs"),
269var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
272File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
301File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
328var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
331File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
360File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
381var projectDirectory = Path.Combine(tempDirectory.Path, "MyHostingExtension");
384File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
401File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
430var projectDirectory = Path.Combine(tempDirectory.Path, "MyHostingExtension");
433File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
450File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
478File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
486File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
511var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
514File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
542File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
PathLookupHelperTests.cs (32)
15Path.Combine("/usr/bin", "mycommand")
22Assert.Equal(Path.Combine("/usr/bin", "mycommand"), result);
70Path.Combine("/first/path", "mycommand"),
71Path.Combine("/second/path", "mycommand")
78Assert.Equal(Path.Combine("/first/path", "mycommand"), result);
85var dir = Path.Combine("testdir", "bin");
86var expectedPath = Path.Combine(dir, "mycommand");
103var dir = Path.Combine("testdir", "bin");
104var expectedPath = Path.Combine(dir, "code.CMD");
122var dir = Path.Combine("testdir", "bin");
123var exePath = Path.Combine(dir, "code.EXE");
124var cmdPath = Path.Combine(dir, "code.CMD");
146var dir = Path.Combine("testdir", "bin");
147var exactPath = Path.Combine(dir, "code");
148var cmdPath = Path.Combine(dir, "code.CMD");
167var dir = Path.Combine("testdir", "bin");
168var exactPath = Path.Combine(dir, "mytool");
186var dir = Path.Combine("testdir", "bin");
187var expectedPath = Path.Combine(dir, "code.CMD");
205var dir = Path.Combine("testdir", "bin");
220var dir = Path.Combine("testdir", "bin");
221var cmdPath = Path.Combine(dir, "code.CMD");
243Path.Combine(dir, "code.cmd")
260Path.Combine(dir, "code.cmd")
277var dir1 = Path.Combine("first", "bin");
278var dir2 = Path.Combine("second", "bin");
279var dir1CmdPath = Path.Combine(dir1, "code.CMD");
280var dir2ExePath = Path.Combine(dir2, "code.EXE");
299var dir1 = Path.Combine("first", "bin");
300var dir2 = Path.Combine("second", "bin");
301var dir1ExactPath = Path.Combine(dir1, "mytool");
302var dir2ExePath = Path.Combine(dir2, "mytool.EXE");
Schema\SchemaTests.cs (16)
59var tempPath = Path.GetTempPath();
60var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
62var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
71var tempPath = Path.GetTempPath();
72var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
74var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
89var tempPath = Path.GetTempPath();
90var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
92var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
123var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
219var relativePath = Path.Combine("Schema", "aspire-8.0.json");
220var schemaPath = Path.GetFullPath(relativePath);
232var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: Path.Combine(manifestDir, "not-used.json"), step: "publish-json-manifest");
Aspire.Hosting.Valkey.Tests (4)
Aspire.Hosting.Yarp.Tests (3)
Aspire.Playground.Tests (6)
Aspire.Templates.Tests (74)
LocalhostTldHostnameTests.cs (4)
57"aspire-ts-cs-starter" or "aspire-starter" => Path.Combine(project.RootDir, $"{projectName}.AppHost", "Properties", "launchSettings.json"),
58"aspire" => Path.Combine(project.RootDir, $"{projectName}.AppHost", "Properties", "launchSettings.json"),
59"aspire-apphost" => Path.Combine(project.RootDir, "Properties", "launchSettings.json"),
60"aspire-apphost-singlefile" or "aspire-py-starter" => Path.Combine(project.RootDir, "apphost.run.json"),
tests\Shared\TemplatesTesting\AspireProject.cs (21)
23Path.Combine(BuildEnvironment.TestAssetsPath, "nuget8.config");
32public string ServiceDefaultsProjectPath => Path.Combine(RootDir, $"{Id}.ServiceDefaults");
33public string TestsProjectDirectory => Path.Combine(RootDir, $"{Id}.Tests");
48LogPath = Path.Combine(_buildEnv.LogRootPath, Id);
50AppHostProjectDirectory = Path.Combine(RootDir, $"{Id}.AppHost");
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
72string targetNuGetConfigPath = Path.Combine(dir, "nuget.config");
93projectDir = Path.Combine(rootDir, id);
97rootDir = projectDir = Path.Combine(BuildEnvironment.TestRootPath, id);
100string logPath = Path.Combine(BuildEnvironment.ForDefaultFramework.LogRootPath, id);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
115cmd.WithWorkingDirectory(Path.GetDirectoryName(projectDir)!)
153File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
154string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
253_testOutput.WriteLine($"----------- [{Path.GetFileName(AppHostProjectDirectory)}] app has exited -------------");
332workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
336var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
339var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (23)
25? Path.GetTempPath()
26: Environment.GetEnvironmentVariable("DEV_TEMP") is { } devTemp && Path.Exists(devTemp)
28: Path.GetTempPath();
31public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
32public static readonly string TestRootPath = Path.Combine(TempDir, "templates-testroot");
80var sdkFromArtifactsPath = Path.Combine(RepoRoot!.FullName, "artifacts", "bin", sdkDirName);
83sdkForTemplatePath = Path.GetFullPath(sdkFromArtifactsPath);
88string workloadsProjString = Path.Combine("tests", "workloads.proj");
99.Split(Path.PathSeparator)
100.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
106sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
112BuiltNuGetsPath = Path.Combine(RepoRoot.FullName, "artifacts", "packages", "Debug", "Shipping");
122.Split(Path.PathSeparator)
123.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
129sdkForTemplatePath = Path.GetDirectoryName(dotnetPath)!;
139string? baseDir = Path.GetDirectoryName(EnvironmentVariables.SdkForTemplateTestingPath);
145sdkForTemplatePath = Path.Combine(baseDir, sdkDirName);
160sdkForTemplatePath = Path.GetFullPath(sdkForTemplatePath);
162NuGetPackagesPath = UsesCustomDotNet ? Path.Combine(AppContext.BaseDirectory, $"nuget-cache-{Guid.NewGuid()}") : null;
170EnvVars["PATH"] = $"{sdkForTemplatePath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
190DotNet = Path.Combine(sdkForTemplatePath!, "dotnet");
198LogRootPath = Path.GetFullPath(EnvironmentVariables.TestLogPath);
203LogRootPath = Path.Combine(AppContext.BaseDirectory, "logs");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (10)
29? Path.Combine(Path.GetTempPath(), $"templates-${s_tmpDirSuffix}")
30: Path.Combine(AppContext.BaseDirectory, "templates");
31_customHiveDirectory = Path.Combine(customHiveBaseDirectory, customHiveDirName);
32_stampFilePath = Path.Combine(_customHiveDirectory, ".stamp-installed");
87.Where(p => packageNameRegex.IsMatch(Path.GetFileName(p)));
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}");
95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
104? Path.GetTempPath()
105: Path.Combine(BuildEnvironment.TempDir, "templates", "working"); // avoid running from the repo
Aspire.TestUtilities (3)
Binding.UDS.IntegrationTests (4)
blazor-devserver (6)
CatalogService (1)
cdac-build-tool (4)
CodeStyleConfigFileGenerator (4)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (2)
crossgen2 (18)
Crossgen2Tasks (53)
PrepareForReadyToRunCompilation.cs (21)
167var outputR2RImage = Path.Combine(OutputPath, outputR2RImageRelativePath);
179outputPDBImage = Path.ChangeExtension(outputR2RImage, "ni.pdb");
180outputPDBImageRelativePath = Path.ChangeExtension(outputR2RImageRelativePath, "ni.pdb");
181crossgen1CreatePDBCommand = $"/CreatePDB \"{Path.GetDirectoryName(outputPDBImage)}\"";
202outputPDBImage = Path.ChangeExtension(outputR2RImage, perfmapExtension);
203outputPDBImageRelativePath = Path.ChangeExtension(outputR2RImageRelativePath, perfmapExtension);
204crossgen1CreatePDBCommand = $"/CreatePerfMap \"{Path.GetDirectoryName(outputPDBImage)}\"";
278MainAssembly.SetMetadata(MetadataKeys.RelativePath, Path.GetFileName(MainAssembly.ItemSpec));
281compositeR2RImageRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, "r2r" + Path.GetExtension(compositeR2RImageRelativePath));
291compositeR2RImageRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, ".o");
292compositeR2RFinalImageRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, ".dylib");
295var compositeR2RImage = Path.Combine(OutputPath, compositeR2RImageRelativePath);
296var compositeR2RImageFinal = Path.Combine(OutputPath, compositeR2RFinalImageRelativePath);
314compositePDBImage = Path.ChangeExtension(compositeR2RImage, ".ni.pdb");
315compositePDBRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, ".ni.pdb");
321compositePDBImage = Path.ChangeExtension(compositeR2RImage, perfmapExtension);
322compositePDBRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, perfmapExtension);
466bool excludeFromR2R = (exclusionSet != null && exclusionSet.Contains(Path.GetFileName(file.ItemSpec)));
467bool excludeFromComposite = (r2rCompositeExclusionSet != null && r2rCompositeExclusionSet.Contains(Path.GetFileName(file.ItemSpec))) || excludeFromR2R;
471bool rootedInComposite = (r2rCompositeRootSet == null || r2rCompositeRootSet.Contains(Path.GetFileName(file.ItemSpec)));
ResolveReadyToRunCompilers.cs (26)
300_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
301_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
302_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.arm.dll");
307_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "x86_arm", "crossgen.exe");
308_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x86_arm", "native", "clrjit.dll");
309_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x86_arm", "native", "Microsoft.DiaSymReader.Native.x86.dll");
316_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
317_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
318_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.arm64.dll");
328_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "x64_arm64", "crossgen.exe");
329_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x64_arm64", "native", "clrjit.dll");
330_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x64_arm64", "native", "Microsoft.DiaSymReader.Native.amd64.dll");
335_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
336_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
339_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.amd64.dll");
343_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.x86.dll");
353_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
354_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.so");
359_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", xarchPath, "crossgen");
360_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", xarchPath, "native", "libclrjit.so");
369_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
370_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.so");
381_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
382_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.dylib");
417_crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", clrJitFileName);
424_crossgen2Tool.ToolPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", toolFileName);
csc (14)
CSharpSyntaxGenerator (5)
csi (3)
datacollector (4)
datacollector.arm64 (4)
dotnet (495)
Commands\Project\Convert\ProjectConvertCommand.cs (52)
44string file = Path.GetFullPath(_file);
67string entryPointName = Path.GetFileNameWithoutExtension(file);
68string entryPointOutputDir = hasRefs ? Path.Combine(targetDirectory, entryPointName) : targetDirectory;
74await ValidateRefTargetDirectoriesAsync(evaluatedDirectives, Path.GetDirectoryName(file)!,
83await ConvertReferencedFilesAsync(evaluatedDirectives, Path.GetDirectoryName(file)!);
114var sourceDirectory = Path.GetDirectoryName(sourceFile)!;
145var targetFile = Path.Join(outputDirectory, Path.GetFileName(sourceFile));
159var projectFile = Path.Join(outputDirectory, Path.GetFileNameWithoutExtension(sourceFile) + ".csproj");
244string targetItemFullPath = Path.Combine(outputDirectory, item.RelativePath);
252string targetItemDirectory = Path.GetDirectoryName(targetItemFullPath)!;
284var refPath = refDirective.ResolvedPath ?? Path.GetFullPath(Path.Combine(sourceDirectory, refDirective.Name.Replace('\\', '/')));
291var refName = Path.GetFileNameWithoutExtension(refPath);
292var refDir = Path.GetDirectoryName(refPath)!;
293var refTargetDirectory = Path.Combine(targetDirectory, refName);
313var refPath = refDirective.ResolvedPath ?? Path.GetFullPath(Path.Combine(sourceDirectory, refDirective.Name.Replace('\\', '/')));
320var refName = Path.GetFileNameWithoutExtension(refPath);
321var refDir = Path.GetDirectoryName(refPath)!;
322var refTargetDirectory = Path.Combine(targetDirectory, refName);
348string sourceFileDirectory = PathUtilities.EnsureTrailingSlash(Path.GetDirectoryName(sourceFile)!);
366string itemFullPath = Path.GetFullPath(path: item.GetMetadataValue("FullPath"), basePath: sourceFileDirectory);
374string itemRelativePath = Path.GetRelativePath(relativeTo: sourceFileDirectory, path: itemFullPath);
380if (itemRelativePath.StartsWith($"..{Path.DirectorySeparatorChar}", StringComparison.Ordinal))
382itemRelativePath = Path.GetFileName(itemFullPath);
387fileNameWithoutExtension = Path.GetFileNameWithoutExtension(itemRelativePath);
388extension = Path.GetExtension(itemRelativePath);
420.Select(item => (item.ItemType, item.RelativePath, OutputFullPath: Path.GetFullPath(Path.Combine(outputDirectory, item.RelativePath))))
439var fullPath = Path.GetFullPath(item.GetMetadataValue("FullPath"), outputDirectory);
447var entryPointOutputFullPath = Path.GetFullPath(entryPointOutputPath);
448AddExplicitProjectItem("Compile", entryPointOutputFullPath, Path.GetRelativePath(outputDirectory, entryPointOutputFullPath));
476sourceDirectory ??= Path.GetDirectoryName(file)!;
490if (Path.IsPathFullyQualified(project.Name))
507if (!Path.IsPathFullyQualified(project.OriginalName))
509project = project.WithName(Path.GetRelativePath(relativeTo: outputDirectory, path: project.Name), CSharpDirective.Project.NameKind.Final);
517if (Directory.Exists(Path.Combine(sourceDirectory, project.ExpandedName)))
519var projectFileName = Path.GetFileName(project.Name);
520project = project.WithName(Path.Join(project.OriginalName, projectFileName), CSharpDirective.Project.NameKind.Final);
523project = project.WithName(Path.GetRelativePath(relativeTo: outputDirectory, path: Path.Combine(sourceDirectory, project.Name)), CSharpDirective.Project.NameKind.Final);
532var refPath = refDirective.ResolvedPath ?? Path.GetFullPath(Path.Combine(sourceDirectory, refDirective.Name.Replace('\\', '/')));
533var refName = Path.GetFileNameWithoutExtension(refPath);
536var convertedProjectPath = Path.Combine(targetDirectory, refName, refName + ".csproj");
537var relativePath = Path.GetRelativePath(relativeTo: outputDirectory, path: convertedProjectPath);
600string defaultValue = Path.ChangeExtension(file, null);
601string defaultValueRelative = Path.GetRelativePath(relativeTo: Environment.CurrentDirectory, defaultValue);
620string pathToValidate = string.IsNullOrWhiteSpace(path) ? defaultValue : Path.GetFullPath(path);
631targetDirectory = string.IsNullOrWhiteSpace(answer) ? defaultValue : Path.GetFullPath(answer);
Commands\Run\CSharpCompilerCommand.cs (24)
48private static string DotNetRootPath => field ??= Path.GetDirectoryName(Path.GetDirectoryName(SdkPath)!)!;
49private static string ClientDirectory => field ??= Path.Combine(SdkPath, "Roslyn", "bincore");
60public string BaseDirectory => field ??= Path.GetDirectoryName(EntryPointFileFullPath)!;
61internal string BaseDirectoryWithTrailingSeparator => field ??= BaseDirectory + Path.DirectorySeparatorChar;
62internal string FileName => field ??= Path.GetFileName(EntryPointFileFullPath);
63internal string FileNameWithoutExtension => field ??= Path.GetFileNameWithoutExtension(EntryPointFileFullPath);
95tempDirectory: Path.GetTempPath(),
217private static string GetCscRspPath(string artifactsPath) => Path.Join(artifactsPath, "csc.rsp");
231string objDir = Path.Join(ArtifactsPath, "obj", "debug");
233string binDir = Path.Join(ArtifactsPath, "bin", "debug");
236string assemblyAttributes = Path.Join(objDir, $".NETCoreApp,Version=v{TargetFrameworkVersion}.AssemblyAttributes.cs");
242string globalUsings = Path.Join(objDir, $"{FileName}.GlobalUsings.g.cs");
248string assemblyInfo = Path.Join(objDir, $"{FileName}.AssemblyInfo.cs");
254string editorconfig = Path.Join(objDir, $"{FileName}.GeneratedMSBuildEditorConfig.editorconfig");
260var apphostTarget = Path.Join(binDir, $"{FileNameWithoutExtension}{FileNameSuffixes.CurrentPlatform.Exe}");
264var apphostSource = Path.Join(SdkPath, "..", "..", "packs", $"Microsoft.NETCore.App.Host.{rid}", RuntimeVersion, "runtimes", rid, "native", $"apphost{FileNameSuffixes.CurrentPlatform.Exe}");
272var runtimeConfig = Path.Join(binDir, $"{FileNameWithoutExtension}{FileNameSuffixes.RuntimeConfigJson}");
354string runtimeConfigPath = Path.Combine(SdkPath, "dotnet.runtimeconfig.json");
370var executingRuntimeVersion = Path.GetFileName(Path.GetDirectoryName(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()));
410var packRoot = Path.Join(DotNetRootPath, "packs", "Microsoft.NETCore.App.Ref", RuntimeVersion);
411var frameworkListPath = Path.Join(packRoot, "data", "FrameworkList.xml");
436yield return $"{argPrefix}{Path.Join(packRoot, filePath)}";
Commands\Test\MTP\SolutionAndProjectUtility.cs (13)
54string solutionName = Path.GetFileNameWithoutExtension(actualSolutionFiles[0]);
55string projectName = Path.GetFileNameWithoutExtension(actualProjectFiles[0]);
80string firstPotentialProjectExtension = Path.GetExtension(actualProjectFiles[0]);
81string secondPotentialProjectExtension = Path.GetExtension(actualProjectFiles[1]);
145return (false, string.Format(CliStrings.SolutionDoesNotExist, directory + Path.DirectorySeparatorChar));
150return (false, string.Format(CliStrings.MoreThanOneSolutionInDirectory, directory + Path.DirectorySeparatorChar));
278visitedTraversalProjects.Add(GetTraversalVisitKey(Path.GetFullPath(projectFilePath), configuration, platform));
298Logger.LogTrace($"Loaded project '{Path.GetFileName(projectFilePath)}' with TargetFramework '{targetFramework}', TargetFrameworks '{targetFrameworks}', IsTestProject '{projectInstance.GetPropertyValue(ProjectProperties.IsTestProject)}', and '{ProjectProperties.IsTestingPlatformApplication}' is '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}'.");
328Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}').");
342Logger.LogTrace($"Loaded inner project '{Path.GetFileName(projectFilePath)}' has '{ProjectProperties.IsTestingPlatformApplication}' = '{projectInstance.GetPropertyValue(ProjectProperties.IsTestingPlatformApplication)}' (TFM: '{framework}').");
409Path.GetFullPath(fullPath, projectDirectory),
602var launchSettings = TryGetLaunchProfileSettings(Path.GetDirectoryName(projectFullPath)!, Path.GetFileNameWithoutExtension(projectFullPath), project.GetPropertyValue(ProjectProperties.AppDesignerFolder), buildOptions, profileName: null);
Commands\Workload\Install\FileBasedInstaller.cs (47)
61_dotnetDir = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath);
73_workloadMetadataDir = Path.Combine(_workloadRootDir, "metadata", "workloads");
108var workloadSetPath = Path.Combine(_workloadRootDir, "sdk-manifests", workloadSetFeatureBand.ToString(), "workloadsets", workloadSetVersion);
138var tempExtractionDir = Path.Combine(_tempPackagesDir.Value, $"{WorkloadManifestUpdater.WorkloadSetManifestId}-{workloadSetPackageVersion}-extracted");
180var packagePath = Path.Combine(offlineCache.Value.Value, $"{packInfo.ResolvedPackageId}.{packInfo.Version}.nupkg");
197if (!Directory.Exists(Path.GetDirectoryName(packInfo.Path)))
199Directory.CreateDirectory(Path.GetDirectoryName(packInfo.Path));
208var tempExtractionDir = Path.Combine(_tempPackagesDir.Value, $"{packInfo.ResolvedPackageId}-{packInfo.Version}-extracted");
275return Path.Combine(_workloadRootDir, "sdk-manifests", sdkFeatureBand);
280var newManifestPath = Path.Combine(GetManifestInstallDirForFeatureBand(manifestUpdate.NewFeatureBand), manifestUpdate.ManifestId.ToString(), manifestUpdate.NewVersion.ToString());
322packagePath = Path.Combine(offlineCache.Value.Value, $"{packageId}.{packageVersion}.nupkg");
332tempBackupDir = Path.Combine(_tempPackagesDir.Value, $"{packageId} - {packageVersion}-backup");
368var versionDir = Path.GetDirectoryName(packagePath);
372var idDir = Path.GetDirectoryName(versionDir);
411var installedSdkFeatureBands = NETCoreSdkResolverNativeWrapper.GetAvailableSdks(_dotnetDir).Select(sdkDir => new SdkFeatureBand(Path.GetFileName(sdkDir))).ToHashSet();
456string workloadSetDirectory = Path.Combine(GetManifestInstallDirForFeatureBand(workloadSetFeatureBand.ToString()), SdkDirectoryWorkloadManifestProvider.WorkloadSetsFolderName, workloadSetVersion);
497var manifestPath = Path.Combine(GetManifestInstallDirForFeatureBand(manifestFeatureBand.ToString()), manifestId.ToString(), manifestVersion.ToString());
543var installationRecordDirectory = Path.GetDirectoryName(GetPackInstallRecordPath(packId, packVersion, featureBandsToRemove.First()));
554string packIdDirectory = Path.GetDirectoryName(installationRecordDirectory);
594string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, _workloadRootDir), "default.json");
595Directory.CreateDirectory(Path.GetDirectoryName(path));
631return Path.Combine(_workloadMetadataDir, RuntimeInformation.ProcessArchitecture.ToString(), _sdkFeatureBand.ToString(), HistoryDir);
638string logFile = Path.Combine(historyDirectory, $"{workloadHistoryRecord.TimeStarted:yyyy'-'MM'-'dd'T'HHmmss}_{workloadHistoryRecord.CommandName}.json");
684var packIdDir = Path.GetDirectoryName(packInfo.Path);
697Path.Combine(_workloadMetadataDir, InstalledWorkloadSetsDir, "v1", workloadSetVersion, workloadSetFeatureBand.ToString(), referencingFeatureBand.ToString());
702Directory.CreateDirectory(Path.GetDirectoryName(path));
717var installedWorkloadSetsDir = Path.Combine(_workloadMetadataDir, InstalledWorkloadSetsDir, "v1");
726var workloadSetVersion = Path.GetFileName(workloadSetVersionDir);
729var workloadSetFeatureBand = new SdkFeatureBand(Path.GetFileName(workloadSetFeatureBandDir));
732var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(featureBandInstallationRecord));
748Path.Combine(_workloadMetadataDir, InstalledManifestsDir, "v1", manifestId.ToString(), manifestVersion.ToString(), featureBand.ToString(), referencingFeatureBand.ToString());
753Directory.CreateDirectory(Path.GetDirectoryName(path));
768var installedManifestsDir = Path.Combine(_workloadMetadataDir, InstalledManifestsDir, "v1");
777var manifestId = new ManifestId(Path.GetFileName(manifestIdDir));
780var manifestVersion = new ManifestVersion(Path.GetFileName(manifestVersionDir));
783var manifestFeatureBand = new SdkFeatureBand(Path.GetFileName(manifestFeatureBandDir));
786var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(featureBandInstallationRecord));
804Path.Combine(_workloadMetadataDir, InstalledPacksDir, "v1", packId, packVersion, featureBand.ToString());
810var installedPacksDir = Path.Combine(_workloadMetadataDir, InstalledPacksDir, "v1");
819var packId = new WorkloadPackId(Path.GetFileName(packIdDir));
822var packVersion = Path.GetFileName(packVersionDir);
825var referencingFeatureBand = new SdkFeatureBand(Path.GetFileName(bandRecord));
844if (!Directory.Exists(Path.GetDirectoryName(path)))
846Directory.CreateDirectory(Path.GetDirectoryName(path));
858var packRecordVersionDir = Path.GetDirectoryName(packInstallRecord);
863var packRecordIdDir = Path.GetDirectoryName(packRecordVersionDir);
874var packInstallRecordDir = Path.Combine(_workloadMetadataDir, InstalledPacksDir, "v1", packInfo.Id, packInfo.Version);
Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (14)
102string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json");
113Directory.CreateDirectory(Path.GetDirectoryName(filePath)!);
129var workloadSetVersionFilePath = Path.Combine(advertisedPath, Constants.workloadSetVersionFileName);
173var overlayProvider = new TempDirectoryWorkloadManifestProvider(Path.Combine(_userProfileDir, "sdk-advertising", _sdkFeatureBand.ToString()), _sdkFeatureBand.ToString());
204Path.GetFileName(path).StartsWith(manifestPackageId.ToString(), StringComparison.OrdinalIgnoreCase) &&
222File.WriteAllText(Path.Combine(adManifestPath, "AdvertisedManifestFeatureBand.txt"), band.ToString());
235File.WriteAllText(Path.Combine(adManifestPath, Constants.workloadSetVersionFileName), workloadSetVersion);
258var versionDir = Path.GetDirectoryName(packagePath);
263var idDir = Path.GetDirectoryName(versionDir);
291var manifestPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "WorkloadManifest.json");
301var adManifestFeatureBandPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "AdvertisedManifestFeatureBand.txt");
363private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}");
367internal static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}");
369private string GetAdvertisingManifestPath(SdkFeatureBand featureBand, ManifestId manifestId) => Path.Combine(_userProfileDir, "sdk-advertising", featureBand.ToString(), manifestId.ToString());
Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (8)
21.Where(band => Directory.Exists(Path.Combine(band, InstalledWorkloadDir)) && Directory.GetFiles(Path.Combine(band, InstalledWorkloadDir)).Any())
22.Select(path => new SdkFeatureBand(Path.GetFileName(path)));
32var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir);
36.Select(file => new WorkloadId(Path.GetFileName(file)));
46var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir, workloadId.ToString());
49var pathDir = Path.GetDirectoryName(path);
60var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir, workloadId.ToString());
Telemetry\DevDeviceIDGetter.cs (7)
56cacheFilePath = Path.Combine(xdgCacheHome, "Microsoft", "DeveloperTools", "deviceid");
60cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "deviceid");
71string cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support", "Microsoft", "DeveloperTools", "deviceid");
104cacheFilePath = Path.Combine(xdgCacheHome, "Microsoft", "DeveloperTools", "deviceId");
108cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "deviceid");
116string cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support", "Microsoft", "DeveloperTools", "deviceid");
124string directory = Path.GetDirectoryName(filePath);
ToolPackage\ToolPackageDownloaderBase.cs (6)
60_runtimeJsonPath = runtimeJsonPathForTests ?? Path.Combine(AppContext.BaseDirectory!, "PortableRuntimeIdentifierGraph.json");
284CreateAssetFile(packageId, packageVersion, packageDownloadDir, Path.Combine(assetFileDirectory.Value, ToolPackageInstance.AssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
294CreateAssetFile(ridSpecificPackage, packageVersion, packageDownloadDir, Path.Combine(assetFileDirectory.Value, ToolPackageInstance.RidSpecificPackageAssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
311CreateAssetFile(packageId, packageVersion, _localToolDownloadDir, Path.Combine(_localToolAssetDir.Value, ToolPackageInstance.AssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
321Path.Combine(_localToolAssetDir.Value, ToolPackageInstance.RidSpecificPackageAssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
383var runtimeConfigFilePath = Path.ChangeExtension(toolPackageInstance.Command.Executable.Value, ".runtimeconfig.json");
dotnet-aot (122)
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (14)
102string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json");
113Directory.CreateDirectory(Path.GetDirectoryName(filePath)!);
129var workloadSetVersionFilePath = Path.Combine(advertisedPath, Constants.workloadSetVersionFileName);
173var overlayProvider = new TempDirectoryWorkloadManifestProvider(Path.Combine(_userProfileDir, "sdk-advertising", _sdkFeatureBand.ToString()), _sdkFeatureBand.ToString());
204Path.GetFileName(path).StartsWith(manifestPackageId.ToString(), StringComparison.OrdinalIgnoreCase) &&
222File.WriteAllText(Path.Combine(adManifestPath, "AdvertisedManifestFeatureBand.txt"), band.ToString());
235File.WriteAllText(Path.Combine(adManifestPath, Constants.workloadSetVersionFileName), workloadSetVersion);
258var versionDir = Path.GetDirectoryName(packagePath);
263var idDir = Path.GetDirectoryName(versionDir);
291var manifestPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "WorkloadManifest.json");
301var adManifestFeatureBandPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "AdvertisedManifestFeatureBand.txt");
363private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}");
367internal static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}");
369private string GetAdvertisingManifestPath(SdkFeatureBand featureBand, ManifestId manifestId) => Path.Combine(_userProfileDir, "sdk-advertising", featureBand.ToString(), manifestId.ToString());
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (8)
21.Where(band => Directory.Exists(Path.Combine(band, InstalledWorkloadDir)) && Directory.GetFiles(Path.Combine(band, InstalledWorkloadDir)).Any())
22.Select(path => new SdkFeatureBand(Path.GetFileName(path)));
32var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir);
36.Select(file => new WorkloadId(Path.GetFileName(file)));
46var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir, workloadId.ToString());
49var pathDir = Path.GetDirectoryName(path);
60var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir, workloadId.ToString());
src\sdk\src\Cli\dotnet\Telemetry\DevDeviceIDGetter.cs (7)
56cacheFilePath = Path.Combine(xdgCacheHome, "Microsoft", "DeveloperTools", "deviceid");
60cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "deviceid");
71string cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support", "Microsoft", "DeveloperTools", "deviceid");
104cacheFilePath = Path.Combine(xdgCacheHome, "Microsoft", "DeveloperTools", "deviceId");
108cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "deviceid");
116string cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support", "Microsoft", "DeveloperTools", "deviceid");
124string directory = Path.GetDirectoryName(filePath);
dotnet-dev-certs (37)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (21)
111var sslCertDirs = sslCertDirString.Split(Path.PathSeparator);
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem");
242var certPath = Path.Combine(certDir, nickname) + ".pem";
356var homeDirectoryWithSlash = homeDirectory[^1] == Path.DirectorySeparatorChar
358: homeDirectory + Path.DirectorySeparatorChar;
361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..])
370var existingDirs = existingSslCertDir.Split(Path.PathSeparator);
371var certDirFullPath = Path.GetFullPath(certDir);
381return string.Equals(Path.GetFullPath(dir), certDirFullPath, StringComparison.Ordinal);
405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName);
471var certPath = Path.Combine(certDir, nickname) + ".pem";
561return Path.Combine(homeDirectory, ".pki", "nssdb");
566return Path.Combine(homeDirectory, "snap", "chromium", "current", ".pki", "nssdb");
571return Path.Combine(homeDirectory, ".mozilla", "firefox");
576return Path.Combine(homeDirectory, "snap", "firefox", "common", ".mozilla", "firefox");
600var searchFolders = searchPath.Split(Path.PathSeparator);
610if (File.Exists(Path.Combine(searchFolder, command)))
813return Path.Combine(homeDirectory, ".aspnet", "dev-certs", "trust");
845var paths = nssDbOverride.Split(Path.PathSeparator); // May be empty - the user may not want to add browser trust
848var nssDb = Path.GetFullPath(path);
1050var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
dotnet-format (25)
dotnet-getdocument (14)
dotnet-Microsoft.XmlSerializer.Generator (5)
dotnet-openapi (15)
dotnet-razorpagegenerator (4)
dotnet-sourcelink (1)
dotnet-sql-cache (3)
dotnet-suggest (13)
dotnet-svcutil-lib (165)
CommandProcessorOptions.cs (23)
171fileOptions.ResolveFullPathsFrom(new DirectoryInfo(Path.GetDirectoryName(fileUri.LocalPath)));
395workingDirectory = Path.IsPathRooted(this.OutputFile.OriginalPath()) ?
396Path.GetDirectoryName(this.OutputFile.FullName) : Path.GetDirectoryName(Path.Combine(Directory.GetCurrentDirectory(), this.OutputFile.OriginalPath()));
403new DirectoryInfo(Path.Combine(workingDirectory, this.UpdateServiceReferenceFolder)) :
413if (!Path.IsPathRooted(originalDirSpec))
416this.OutputDir = new DirectoryInfo(Path.Combine(workingDirectory, originalDirSpec));
492var updateFileName = Path.GetFileName(this.UpdateServiceReferenceFolder);
497this.UpdateServiceReferenceFolder = Path.GetDirectoryName(this.UpdateServiceReferenceFolder);
506var paramsFiles = jsonFiles.Except(excludeJsonFiles).Where(fn => Path.GetFileName(fn).Equals(CommandProcessorOptions.SvcutilParamsFileName, RuntimeEnvironmentHelper.FileStringComparison) ||
507Path.GetFileName(fn).Equals(CommandProcessorOptions.WCFCSParamsFileName, RuntimeEnvironmentHelper.FileStringComparison));
521var svcRefNames = paramsFiles.Select(pf => { PathHelper.GetRelativePath(Path.GetDirectoryName(pf), new DirectoryInfo(projectDir), out var relPath); return relPath; })
531var svcutilParmasFile = Path.Combine(projectDir, this.UpdateServiceReferenceFolder, CommandProcessorOptions.SvcutilParamsFileName);
534var wcfcsParamsFile = Path.Combine(projectDir, this.UpdateServiceReferenceFolder, CommandProcessorOptions.WCFCSParamsFileName);
542var relDir = Path.GetDirectoryName(fileRelPath);
551if (Path.GetFileName(paramsFilePath).Equals(CommandProcessorOptions.WCFCSParamsFileName))
561updateOptions.ResolveFullPathsFrom(new DirectoryInfo(Path.GetDirectoryName(paramsFilePath)));
580var tempDir = Path.GetTempPath();
584this.BootstrapPath = new DirectoryInfo(Path.Combine(tempDir, baseDirName, sessionDirName));
704var projectFullPath = Path.Combine(this.BootstrapPath.FullName, "TFMResolver", "TFMResolver.csproj");
710Directory.Delete(Path.GetDirectoryName(projectFullPath));
853string projFolder = Path.Combine(this.BootstrapPath.FullName, nameof(SvcutilBootstrapper));
Shared\MSBuildProj.cs (31)
67public string FullPath { get { return Path.Combine(DirectoryPath, FileName); } }
161using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Parsing project {Path.GetFileName(projectFullPath)}").ConfigureAwait(false))
163projectFullPath = Path.GetFullPath(projectFullPath);
167FileName = Path.GetFileName(projectFullPath),
168DirectoryPath = Path.GetDirectoryName(projectFullPath)
297if (!Path.IsPathRooted(binReference))
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName;
338fullPath = Path.Combine(fullPath, binReference);
340else if (Directory.Exists(Path.Combine(msbuildProj.DirectoryPath, fullPath)))
342fullPath = Path.Combine(msbuildProj.DirectoryPath, fullPath, binReference);
385fullPath = Path.GetFullPath(fullPath);
387string projectName = Path.GetFileNameWithoutExtension(fullPath);
388string projectExtension = Path.GetExtension(fullPath);
389string projectDir = Path.GetDirectoryName(fullPath);
427string filePath = Path.Combine(dirPath, DirBuildProps);
558basePath = dependency.FullPath.Substring(0, dependency.FullPath.LastIndexOf(Path.DirectorySeparatorChar));
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
802var assetsFile = new FileInfo(Path.Combine(this.DirectoryPath, "obj", "project.assets.json")).FullName;
821if (Path.GetExtension(compiletimeAssembly.Path) == ".dll")
823var dependency = ProjectDependency.FromPackage(Path.GetFileNameWithoutExtension(compiletimeAssembly.Path), lib.Name, lib.Version.ToNormalizedString());
879if (!Path.IsPathRooted(outputPath))
881outputPath = Path.Combine(this.DirectoryPath, outputPath.Trim(new char[] { '\"' }));
885Path.Combine(outputPath, $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json") :
900var targetLib = Path.GetFileName(this._resolvedProperties["TargetPath"].Trim('\"'));
903targetLib = $"{Path.ChangeExtension(this.FileName, ".dll")}";
917if (!Path.GetFileName(assetPath).Equals(targetLib, RuntimeEnvironmentHelper.FileStringComparison))
919dependency = ProjectDependency.FromAssembly(Path.Combine(outputPath, assetPath));
1001var fileName = $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json";
1010.Where(d => Path.GetFileName(d).Equals(fileName, RuntimeEnvironmentHelper.FileStringComparison))
1011.Where(f => PathHelper.GetFolderName(Path.GetDirectoryName(f)) == this.TargetFramework || Directory.GetParent(Directory.GetParent(f).FullName).Name == this.TargetFramework)
Shared\ProjectDependency.cs (12)
75if (!string.IsNullOrWhiteSpace(filePath) && Path.GetInvalidPathChars().Intersect(filePath).Count() > 0)
80if (!string.IsNullOrWhiteSpace(packageName) && Path.GetInvalidFileNameChars().Intersect(packageName).Count() > 0)
108if (s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(AssemblyName), ext, StringComparison.OrdinalIgnoreCase) == 0))
115(s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0));
118if (s_exeExtensions.Any((ext) => String.Compare(Path.GetExtension(packageName), ext, StringComparison.OrdinalIgnoreCase) == 0))
133fileHasKnownExtension = s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0);
137fileHasKnownExtension = s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0);
145this.FullPath = fileHasKnownExtension ? Path.GetFullPath(filePath) : filePath;
150fileHasKnownExtension ? Path.GetFileNameWithoutExtension(filePath) : Path.GetFileName(filePath);
310if (s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(path), ext, StringComparison.OrdinalIgnoreCase) == 0))
315else if (s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(path), ext, StringComparison.OrdinalIgnoreCase) == 0))
Shared\Utilities\PathHelper.cs (21)
61if (!isUrl && (Uri.TryCreate(Path.Combine(basePath, input), UriKind.Absolute, out var uri)) && uri.Scheme == "file")
85filePath = Path.Combine(directory.FullName, relPath);
109if (Path.IsPathRooted(childPath))
112var childFileName = Path.GetFileName(childPath);
113var childDirectory = childFileName.Contains("*") ? Path.GetDirectoryName(childPath) : childPath;
114var parentSegments = Path.GetFullPath(parentPath.FullName).Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
115var childSegments = Path.GetFullPath(childDirectory).Split(new char[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
133builder.Append($"..{Path.AltDirectorySeparatorChar}");
142builder.Append($"{childSegments[idx]}{Path.AltDirectorySeparatorChar}");
151relativePath = builder.ToString().Trim(Path.AltDirectorySeparatorChar);
168return path.Split(new char[] { '/', '\\', Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);
178var directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName));
198directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName + nextIndex));
215var dstFilePath = Path.Combine(destinationDir, fileName);
253fullPath = EnumerateItems(workingDir).Where(item => Path.GetFileName(item).Equals(itemName, RuntimeEnvironmentHelper.FileStringComparison)).FirstOrDefault();
259workingDir = Path.GetDirectoryName(workingDir);
dotnet-svcutil-lib.Tests (140)
E2ETests.cs (26)
20this_TestGroupBaselinesDir = Path.Combine(g_BaselinesDir, this_TestCaseName);
21this_TestGroupOutputDir = Path.Combine(g_TestResultsDir, this_TestCaseName);
22this_TestGroupBootstrapDir = Path.Combine(g_TestBootstrapDir, this_TestCaseName);
23this_TestGroupProjDir = Path.Combine(g_TestResultsDir, this_TestCaseName, "Project");
92Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
94var uri = $"\"\"{Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl")}\"\"";
123var uri = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl");
173var wsdlFile = Path.Combine(this_TestGroupOutputDir, "wsdl", "tempuri.org.wsdl");
176var wsdlDocsSrdDir = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService");
177FileUtil.CopyDirectory(wsdlDocsSrdDir, Path.GetDirectoryName(wsdlFile));
182uri = uri.Replace("$wsdlDir$", $"{Path.GetDirectoryName(wsdlFile)}{Path.DirectorySeparatorChar}");
198var url = $"{Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl")}";
214var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
222var libProjPath = Path.Combine(this_TestGroupOutputDir, "TypesLib", "TypesLib.csproj");
223var binProjPath = Path.Combine(this_TestGroupOutputDir, "BinLib", "BinLib.csproj");
224var assemblyPath = Path.Combine(Path.GetDirectoryName(binProjPath), "bin", "Debug", "netstandard1.3", "BinLib.dll");
228var typeReuseProjectsPath = Path.Combine(g_TestCasesDir, "TypeReuse");
250Directory.CreateDirectory(Path.Combine(this_TestCaseBootstrapDir, "SvcutilBootstrapper"));
252var uri = PathHelper.GetRelativePath(Path.Combine(this_TestGroupOutputDir, "TypeReuseSvc.wsdl"), new DirectoryInfo(this_TestCaseOutputDir));
368var srcParamsFilePath = Path.Combine(g_TestCasesDir, filePath, paramsFileName);
374File.Copy(f, Path.Combine(this_TestCaseProject.DirectoryPath, Path.GetFileName(f)));
501string wsdlFile = Path.Combine(g_TestCasesDir, "wsdl", "memberNamedSystem.wsdl");
512string wsdlFile = Path.Combine(g_TestCasesDir, "wsdl", "TypeNameUseReservedKeyword.wsdl");
GlobalToolTests.cs (35)
55var wsdlFile = Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl");
90Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
92var uri = $"\"{Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl")}\"";
113File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.cs"), Path.Combine(this_TestCaseOutputDir, "FullFramework.cs"), true);
114File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.csproj"), Path.Combine(this_TestCaseOutputDir, "FullFramework.csproj"), true);
116var uri = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl");
117var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
134this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
136this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
137this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
138this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
141File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, "Program.cs"), Path.Combine(this_TestCaseOutputDir, "Program.cs"), true);
142File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, $"{testCaseName}.csproj"), Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), true);
143this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None);
148var uri = Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl");
149var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
162this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testClientFolder);
165this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
166this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{this_TestCaseName}.log");
167this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testClientFolder);
170FileUtil.CopyDirectory(Path.Combine(g_TestCasesDir, this_TestCaseName), this_TestGroupOutputDir, true);
171this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None);
178var uri = Path.Combine(g_TestCasesDir, "wsdl", "TypeReuseSvc.wsdl");
179var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
197var url = $"{Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl")}";
201var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json");
232var uri = Path.Combine(g_TestCasesDir, "TypeReuse", "TypeReuseIXmlSerializable.wsdl");
233var refs = Path.Combine(g_TestCasesDir, "TypeReuse", "CommonTypes.dll");
255var uri = Path.Combine(g_TestCasesDir, "wsdl", "CollectionTypes.wsdl");
TestInit.cs (47)
60File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
61File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
62var projectPath = Path.Combine(g_TestOutputDir, "TestStarterProject", "TestStarterProject.csproj");
92var fileName = Path.GetFileNameWithoutExtension(this_TestGroupProjectName);
93var filePath = Path.Combine(this_TestGroupProjDir, this_TestGroupProjectName);
111var projectPath = Path.Combine(outputDir, $"{projectName}.csproj");
112var programPath = Path.Combine(outputDir, $"{projectName}.cs");
119.Replace(Path.GetFileNameWithoutExtension(project.FileName), projectName));
143g_TestOutputDir = Path.Combine(g_RepositoryRoot, "artifacts", "TestOutput");
144g_TestResultsDir = Path.Combine(g_TestOutputDir, "TestResults");
145g_TestBootstrapDir = Path.Combine(g_TestOutputDir, "TestBootstrap");
146g_TestCasesDir = Path.Combine(vsTestsRoot, "TestCases");
147g_BaselinesDir = Path.Combine(vsTestsRoot, "Baselines");
173File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
174File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
179string pkgPath = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "Shipping");
182pkgPath = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "NonShipping");
210var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
234var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
242this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
247this_TestCaseBootstrapDir = Path.Combine(this_TestGroupBootstrapDir, testCaseName);
250this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
266this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
267var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
353var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
365var nonRefbaselineFiles = baselineFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList();
375.Any(e => e.Equals(Path.GetExtension(f), RuntimeEnvironmentHelper.FileStringComparison))).ToList();
377var nonRefGeneratedFiles = generatedFiles.Where(f => f.EndsWith(".cs") && !f.EndsWith(Path.DirectorySeparatorChar + "reference.cs", StringComparison.OrdinalIgnoreCase)).ToList();
428var expected = Path.Combine(baselineDir, relativePath);
429Directory.CreateDirectory(Path.GetDirectoryName(expected));
445var scriptPath = Path.Combine(g_TestOutputDir, @"TestScripts", $"{this_TestCaseName}.cmd");
446var globalScriptPath = Path.Combine(g_TestOutputDir, @"TestScripts\deleteAll.cmd");
457Directory.CreateDirectory(Path.GetDirectoryName(scriptPath));
479var isLogFile = Path.GetExtension(baselineFile).Equals(".log", StringComparison.OrdinalIgnoreCase);
537if (!Directory.Exists(Path.Combine(vstestDir, "TestCases")))
539vstestDir = new DirectoryInfo(Path.Combine(g_RepositoryRoot, "src", "dotnet-svcutil", "lib", "tests")).FullName;
555var binDir = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "Shipping");
558binDir = Path.Combine(g_RepositoryRoot, "artifacts", "packages", buildType, "NonShipping");
568nugetId = Path.GetFileNameWithoutExtension(nugetFile.Name);
573nugetId = Path.GetFileNameWithoutExtension(nugetFiles[0]);
592g_RepositoryRoot = Path.GetDirectoryName(rootSolutionFolder);
606File.WriteAllText(Path.Combine(directory, "global.json"), globalConfig);
624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
UnitTest.cs (16)
61var uri = Path.Combine(g_TestCasesDir, "wsdl", "brokenWsdl.wsdl");
128var uri = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl");
150var uri = Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl");
218var wsdlFilesDstDir = Path.Combine(this_TestGroupOutputDir, "wsdl");
221var wsdlFilesSrcDir = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService");
222FileUtil.CopyDirectory(wsdlFilesSrcDir.Replace("$testCasesDir$", g_TestCasesDir), Path.Combine(wsdlFilesDstDir, "WcfProjectNService"), overwrite: true);
224Directory.CreateDirectory(Path.Combine(this_TestGroupOutputDir, "wsdl"));
225File.Copy(Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl"), Path.Combine(this_TestGroupOutputDir, "wsdl", "Simple.wsdl"));
327var jsonFilesRoot = Path.Combine(g_TestCasesDir, "options", "JSON");
329var jsonFileSrcPath = Path.Combine(jsonFilesRoot, jsonFile);
330var jsonFileDstPath = Path.Combine(this_TestCaseOutputDir, Path.GetFileName(jsonFileSrcPath));
347var outputDir = Path.GetTempPath();
353var outJsonFile = Path.Combine(outputDir, Path.GetFileName(jsonFileSrcPath));
dotnet-svcutil.xmlserializer (18)
dotnet-svcutil.xmlserializer.IntegrationTests (1)
dotnet-user-jwts (38)
dotnet-user-secrets (22)
dotnet-watch (19)
Program.cs (10)
40sdkRootDirectory = Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "..", "..");
121project = new ProjectRepresentation(projectPath: null, entryPointFilePath: Path.GetFullPath(Path.Combine(workingDirectory, options.FilePath)));
169entryPointPath = Path.GetFullPath(Path.Combine(workingDirectory, firstArg));
190projectPath = Path.GetFullPath(Path.Combine(workingDirectory, projectPath));
204.Where(p => !PathUtilities.OSSpecificPathComparer.Equals(Path.GetExtension(p), ".shproj"))];
377var roslynPath = Path.Combine(sdkRootDirectory, "Roslyn", "bincore");
383var loadedAssembly = context.LoadFromAssemblyPath(Path.Combine(roslynPath, assembly.Name + ".dll"));
DotnetTool.AppHost (4)
GenerateAnalyzerNuspec (32)
Program.cs (32)
142string assemblyNameWithoutExtension = Path.GetFileNameWithoutExtension(assembly);
146string assemblyFolder = Path.Combine(artifactsBinDir, assemblyNameWithoutExtension, configuration, tfm);
147string assemblyPathForNuspec = Path.Combine(assemblyFolder, assembly);
158var resourceAssemblyFullPath = Path.Combine(directory, resourceAssemblyName);
161var directoryName = Path.GetFileName(directory);
162string resourceAssemblyPathForNuspec = Path.Combine(artifactsBinDir, assemblyNameWithoutExtension, configuration, tfm, directoryName, resourceAssemblyName);
163string targetForNuspec = Path.Combine(target, directoryName);
174var fileWithPath = Path.IsPathRooted(file) ? file : Path.Combine(projectDir, file);
180readmeFile = Path.IsPathRooted(readmeFile) ? readmeFile : Path.GetFullPath(Path.Combine(projectDir, readmeFile));
181var directoryName = Path.GetDirectoryName(readmePackageLocation) ?? string.Empty;
189var fileWithPath = Path.Combine(artifactsBinDir, Path.GetFileNameWithoutExtension(file), configuration, tfm, file);
194result.AppendLine(FileElement(fileWithPath, Path.Combine("lib", tfm)));
206string folderPath = Path.Combine(artifactsBinDir, folder, configuration, tfm);
209var fileExtension = Path.GetExtension(file);
212var fileName = Path.GetFileName(file);
216var fileWithPath = Path.Combine(folderPath, file);
217var targetPath = tfms.Length > 1 ? Path.Combine(folder, tfm) : folder;
224result.AppendLine(FileElement(Path.Combine(assetsDir, "Install.ps1"), "tools"));
225result.AppendLine(FileElement(Path.Combine(assetsDir, "Uninstall.ps1"), "tools"));
232if (Path.GetExtension(ruleset) == ".ruleset")
234result.AppendLine(FileElement(Path.Combine(rulesetsDir, ruleset), "rulesets"));
246result.AppendLine(FileElement(Path.Combine(directory, editorconfig), $"editorconfig\\{directoryName}"));
255if (Path.GetExtension(globalconfig) == ".globalconfig")
257result.AppendLine(FileElement(Path.Combine(globalAnalyzerConfigsDir, globalconfig), $"buildTransitive\\config"));
268var fileWithPath = Path.Combine(analyzerDocumentationFileDir, analyzerDocumentationFileName);
277var fileWithPath = Path.Combine(analyzerSarifFileDir, analyzerSarifFileName);
286var fileWithPath = Path.Combine(analyzerConfigurationFileDir, analyzerConfigurationFileName);
293result.AppendLine(FileElement(Path.Combine(assetsDir, "ThirdPartyNotices.txt"), ""));
GenerateDocumentationAndConfigFiles (50)
Program.cs (21)
273var assemblyName = Path.GetFileNameWithoutExtension(assembly);
274string path = Path.Combine(args.BinDirectory, assemblyName, args.Configuration, args.Tfm, assembly);
433var fileWithPath = Path.Combine(directory.FullName, args.PropsFileName);
442fileWithPath = Path.Combine(directory.FullName, args.PropsFileToDisableNetAnalyzersInNuGetPackageName);
544var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerDocumentationFileName);
548var fileTitle = Path.GetFileNameWithoutExtension(args.AnalyzerDocumentationFileName);
640var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerSarifFileName);
734Validate(Path.Combine(directory.FullName, args.AnalyzerSarifFileName), stringWriter.ToString(), fileNamesWithValidationFailures);
776var fileWithPath = Path.Combine(directory.FullName, "RulesMissingDocumentation.md");
899var assemblyDir = Path.GetDirectoryName(assemblyPath);
905var assemblyName = Path.GetFileNameWithoutExtension(assembly);
906var shippedFile = Path.Combine(assemblyDir, "AnalyzerReleases", assemblyName, ReleaseTrackingHelper.ShippedFileName);
907var unshippedFile = Path.Combine(assemblyDir, "AnalyzerReleases", assemblyName, ReleaseTrackingHelper.UnshippedFileName);
1079var assemblyName = Path.GetFileNameWithoutExtension(assembly);
1080var assemblyDir = Path.Combine(args.BinDirectory, assemblyName, args.Configuration, args.Tfm);
1081return Path.Combine(assemblyDir, assembly);
1112var rulesetFilePath = Path.Combine(directory.FullName, rulesetFileName);
1176var directory = Directory.CreateDirectory(Path.Combine(analyzerEditorconfigsDir, editorconfigFolder));
1177var editorconfigFilePath = Path.Combine(directory.FullName, ".editorconfig");
1400var configFilePath = Path.Combine(directory.FullName, fileName.ToLowerInvariant());
1612var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
GetDocument.Insider (8)
HelixTestTasks (1)
ilasm (6)
ilc (13)
ILCompiler.Build.Tasks (3)
ILCompiler.Compiler (12)
ILCompiler.Diagnostics (8)
ILCompiler.ReadyToRun (30)
ILCompiler.RyuJit (1)
illink (26)
Linker.Steps\OutputStep.cs (13)
158using (var fs = File.Open(Path.Combine(Context.OutputDirectory, Context.PInvokesListFile), FileMode.Create))
176File.Delete(Path.ChangeExtension(target, "pdb"));
219var satelliteAssembly = Path.Combine(subDirectory, resourceFile);
223string cultureName = subDirectory.Substring(subDirectory.LastIndexOf(Path.DirectorySeparatorChar) + 1);
224string culturePath = Path.Combine(directory, cultureName);
227File.Copy(satelliteAssembly, Path.Combine(culturePath, resourceFile), true);
237string target = Path.GetFullPath(GetConfigFile(GetAssemblyFileName(assembly, directory)));
247return Path.GetFileNameWithoutExtension(assembly) + ".resources.dll";
263string target = Path.GetFullPath(Path.Combine(directory, fi.Name));
277var pdb = Path.ChangeExtension(source, "pdb");
279File.Copy(pdb, Path.ChangeExtension(target, "pdb"), true);
285return Path.Combine(directory, file);
ILLink.Tasks (6)
Infrastructure.Common (1)
Infrastructure.Tests (166)
ExtractTestPartitions\ExtractTestPartitionsTests.cs (22)
30var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
36var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
55var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
61var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
76var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
82var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
100var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
103var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
118var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
125var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
143var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
150var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
166var nonExistentPath = Path.Combine(_tempDir.Path, "DoesNotExist.dll");
167var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
192var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
198var outputFile = Path.Combine(_tempDir.Path, "nested", "dir", "partitions.txt");
212var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
217var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
234var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
241var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
259var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
266var outputFile = Path.Combine(_tempDir.Path, "partitions.txt");
PowerShellScripts\BuildTestMatrixTests.cs (61)
22_scriptPath = Path.Combine(FindRepoRoot(), "eng", "scripts", "build-test-matrix.ps1");
32var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
36Path.Combine(artifactsDir, "MyProject.tests-metadata.json"),
41var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
62var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
66Path.Combine(artifactsDir, "ProjectA.tests-metadata.json"),
71Path.Combine(artifactsDir, "ProjectB.tests-metadata.json"),
75var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
94var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
98Path.Combine(artifactsDir, "SplitProject.tests-metadata.json"),
104Path.Combine(artifactsDir, "SplitProject.tests-partitions.json"),
107var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
135var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
139Path.Combine(artifactsDir, "ClassSplitProject.tests-metadata.json"),
145Path.Combine(artifactsDir, "ClassSplitProject.tests-partitions.json"),
148var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
171var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
176Path.Combine(artifactsDir, "NoTimeouts.tests-metadata.json"),
180var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
199var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
203Path.Combine(artifactsDir, "CustomTimeouts.tests-metadata.json"),
209var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
228var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
232Path.Combine(artifactsDir, "NeedsNugets.tests-metadata.json"),
238Path.Combine(artifactsDir, "NoNugets.tests-metadata.json"),
243var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
262var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
266Path.Combine(artifactsDir, "FilterTest.tests-metadata.json"),
271Path.Combine(artifactsDir, "FilterTest.tests-partitions.json"),
274var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
292var emptyArtifactsDir = Path.Combine(_tempDir.Path, "empty-artifacts");
295var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
312var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
316Path.Combine(artifactsDir, "SplitProject.tests-metadata.json"),
326Path.Combine(artifactsDir, "SplitProject.tests-partitions.json"),
329var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
357var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
361Path.Combine(artifactsDir, "SdkProject.tests-metadata.json"),
366var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
384var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
388Path.Combine(artifactsDir, "LinuxOnly.tests-metadata.json"),
393var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
412var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
416Path.Combine(artifactsDir, "OsRestrictedSplit.tests-metadata.json"),
423Path.Combine(artifactsDir, "OsRestrictedSplit.tests-partitions.json"),
426var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
449var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
453Path.Combine(artifactsDir, "CustomRunner.tests-metadata.json"),
458var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
478var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
482Path.Combine(artifactsDir, "NoRunner.tests-metadata.json"),
486var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
504var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
508Path.Combine(artifactsDir, "SplitRunner.tests-metadata.json"),
515Path.Combine(artifactsDir, "SplitRunner.tests-partitions.json"),
518var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
540var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
544Path.Combine(artifactsDir, "ClassRunner.tests-metadata.json"),
555Path.Combine(artifactsDir, "ClassRunner.tests-partitions.json"),
558var outputFile = Path.Combine(_tempDir.Path, "matrix.json");
596if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
PowerShellScripts\ExpandTestMatrixGitHubTests.cs (47)
22_scriptPath = Path.Combine(FindRepoRoot(), "eng", "scripts", "expand-test-matrix-github.ps1");
38var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
41var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
65var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
68var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
91var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
94var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
115var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
118var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
141var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
144var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
168var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
171var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
199var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
202var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
238var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
241var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
266var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
269var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
283var nonExistentFile = Path.Combine(_tempDir.Path, "does-not-exist.json");
284var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
302var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
305var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
328var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
331var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
354var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
357var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
387var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
390var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
414var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
417var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
453var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
456var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
487var canonicalMatrix = Path.Combine(_tempDir.Path, "canonical.json");
490var outputFile = Path.Combine(_tempDir.Path, "expanded.json");
510var artifactsDir = Path.Combine(_tempDir.Path, "artifacts");
514Path.Combine(artifactsDir, "RegularProject.tests-metadata.json"),
520Path.Combine(artifactsDir, "SplitMultiOS.tests-metadata.json"),
527Path.Combine(artifactsDir, "SplitMultiOS.tests-partitions.json"),
531Path.Combine(artifactsDir, "LinuxE2E.tests-metadata.json"),
539Path.Combine(artifactsDir, "CliE2E.tests-metadata.json"),
548var buildMatrixScript = Path.Combine(FindRepoRoot(), "eng", "scripts", "build-test-matrix.ps1");
549var canonicalFile = Path.Combine(_tempDir.Path, "canonical.json");
559var expandedFile = Path.Combine(_tempDir.Path, "expanded.json");
564var splitScriptPath = Path.Combine(FindRepoRoot(), "eng", "scripts", "split-test-matrix-by-deps.ps1");
565var githubOutputFile = Path.Combine(_tempDir.Path, "github_output.txt");
699if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
PowerShellScripts\SplitTestProjectsTests.cs (12)
31_scriptPath = Path.Combine(_repoRoot, "eng", "scripts", "split-test-projects-for-ci.ps1");
41var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
47var outputFile = Path.Combine(_tempDir.Path, "partitions.json");
71var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
76var outputFile = Path.Combine(_tempDir.Path, "partitions.json");
99var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
105var outputFile = Path.Combine(_tempDir.Path, "partitions.json");
130var assemblyPath = Path.Combine(_tempDir.Path, "TestAssembly.dll");
137var outputFile = Path.Combine(_tempDir.Path, "partitions.json");
165var nonExistentPath = Path.Combine(_tempDir.Path, "DoesNotExist.dll");
166var outputFile = Path.Combine(_tempDir.Path, "partitions.json");
215if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
installer.tasks (10)
Microsoft.Agents.AI.ProjectTemplates.Tests (21)
test\ProjectTemplates\Infrastructure\WellKnownPaths.cs (6)
33ProjectTemplatesArtifactsRoot = Path.Combine(RepoRoot, "artifacts", "ProjectTemplates");
34TemplateSandboxSource = Path.Combine(RepoRoot, "test", "ProjectTemplates", "Infrastructure", "TemplateSandbox");
35TemplateTestNuGetConfigPath = Path.Combine(TemplateSandboxSource, "nuget.config");
37LocalShippingPackagesPath = Path.Combine(RepoRoot, "artifacts", "packages", BuildConfigurationFolder, "Shipping");
46var gitPath = Path.Combine(directory, ".git");
66var dotNetExePath = Path.Combine(RepoRoot, ".dotnet", dotNetExeName);
Microsoft.Analyzers.Extra.Tests (4)
Microsoft.Analyzers.Local (2)
Microsoft.Analyzers.Local.Tests (4)
Microsoft.Arcade.Common (13)
Microsoft.AspNetCore (8)
Microsoft.AspNetCore.Components.Testing (9)
Microsoft.AspNetCore.Components.Testing.Tasks (8)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebAssembly.Server (11)
Microsoft.AspNetCore.Components.WebView (3)
Microsoft.AspNetCore.Components.WebView.Maui (4)
Microsoft.AspNetCore.Components.WebView.WindowsForms (10)
Microsoft.AspNetCore.Components.WebView.Wpf (10)
Microsoft.AspNetCore.DataProtection (10)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (32)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (21)
111var sslCertDirs = sslCertDirString.Split(Path.PathSeparator);
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem");
242var certPath = Path.Combine(certDir, nickname) + ".pem";
356var homeDirectoryWithSlash = homeDirectory[^1] == Path.DirectorySeparatorChar
358: homeDirectory + Path.DirectorySeparatorChar;
361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..])
370var existingDirs = existingSslCertDir.Split(Path.PathSeparator);
371var certDirFullPath = Path.GetFullPath(certDir);
381return string.Equals(Path.GetFullPath(dir), certDirFullPath, StringComparison.Ordinal);
405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName);
471var certPath = Path.Combine(certDir, nickname) + ".pem";
561return Path.Combine(homeDirectory, ".pki", "nssdb");
566return Path.Combine(homeDirectory, "snap", "chromium", "current", ".pki", "nssdb");
571return Path.Combine(homeDirectory, ".mozilla", "firefox");
576return Path.Combine(homeDirectory, "snap", "firefox", "common", ".mozilla", "firefox");
600var searchFolders = searchPath.Split(Path.PathSeparator);
610if (File.Exists(Path.Combine(searchFolder, command)))
813return Path.Combine(homeDirectory, ".aspnet", "dev-certs", "trust");
845var paths = nssDbOverride.Split(Path.PathSeparator); // May be empty - the user may not want to add browser trust
848var nssDb = Path.GetFullPath(path);
1050var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
Microsoft.AspNetCore.Diagnostics (2)
Microsoft.AspNetCore.Hosting (13)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Results (2)
Microsoft.AspNetCore.HttpLogging (4)
Microsoft.AspNetCore.Identity.UI (4)
Microsoft.AspNetCore.InternalTesting (16)
Microsoft.AspNetCore.Mvc.Core (3)
Microsoft.AspNetCore.Mvc.Localization (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (5)
Microsoft.AspNetCore.Mvc.RazorPages (1)
Microsoft.AspNetCore.Mvc.Testing (5)
Microsoft.AspNetCore.Razor.Utilities.Shared (15)
Microsoft.AspNetCore.Server.IIS (4)
Microsoft.AspNetCore.Server.IntegrationTesting (22)
Microsoft.AspNetCore.Server.Kestrel.Core (49)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (21)
111var sslCertDirs = sslCertDirString.Split(Path.PathSeparator);
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem");
242var certPath = Path.Combine(certDir, nickname) + ".pem";
356var homeDirectoryWithSlash = homeDirectory[^1] == Path.DirectorySeparatorChar
358: homeDirectory + Path.DirectorySeparatorChar;
361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..])
370var existingDirs = existingSslCertDir.Split(Path.PathSeparator);
371var certDirFullPath = Path.GetFullPath(certDir);
381return string.Equals(Path.GetFullPath(dir), certDirFullPath, StringComparison.Ordinal);
405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName);
471var certPath = Path.Combine(certDir, nickname) + ".pem";
561return Path.Combine(homeDirectory, ".pki", "nssdb");
566return Path.Combine(homeDirectory, "snap", "chromium", "current", ".pki", "nssdb");
571return Path.Combine(homeDirectory, ".mozilla", "firefox");
576return Path.Combine(homeDirectory, "snap", "firefox", "common", ".mozilla", "firefox");
600var searchFolders = searchPath.Split(Path.PathSeparator);
610if (File.Exists(Path.Combine(searchFolder, command)))
813return Path.Combine(homeDirectory, ".aspnet", "dev-certs", "trust");
845var paths = nssDbOverride.Split(Path.PathSeparator); // May be empty - the user may not want to add browser trust
848var nssDb = Path.GetFullPath(path);
1050var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
Microsoft.AspNetCore.SpaProxy (6)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets (5)
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.AspNetCore.TestHost (2)
Microsoft.AspNetCore.Watch.BrowserRefresh (1)
Microsoft.AspNetCore.WebUtilities (6)
Microsoft.Build (274)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (10)
488? Path.Combine(GetOrInitializeX64Clr2Path(toolName, basePath64), toolName)
489: Path.Combine(GetOrInitializeX32Clr2Path(toolName, basePath), toolName);
494return Path.Combine(s_pathToX64Clr4 ??= basePath64, toolName);
499return Path.Combine(s_pathToArm64Clr4 ??= basePathArm64, toolName);
502return Path.Combine(s_pathToX32Clr4 ??= basePath, toolName);
580string lastDirectoryName = Path.GetFileName(path.TrimEnd(Path.DirectorySeparatorChar));
614string fullPath = Path.Combine(envPath, toolName);
855string appHostPath = Path.Combine(msbuildAssemblyPath, Constants.MSBuildExecutableName);
858: (Path.Combine(msbuildAssemblyPath, Constants.MSBuildAssemblyName), false);
Evaluation\Evaluator.cs (9)
1232string projectFileWithoutExtension = EscapingUtilities.Escape(Path.GetFileNameWithoutExtension(_projectRootElement.FullPath));
1233string projectExtension = EscapingUtilities.Escape(Path.GetExtension(_projectRootElement.FullPath));
1236string projectFullPath = Path.Combine(projectDirectory, projectFile);
1238int rootLength = Path.GetPathRoot(projectDirectory).Length;
1903ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(sdkResult.Path, project),
1916ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(additionalPath, project),
1953string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(sdkResult.Path, 5), Constants.DotnetProcessName);
2167if (directoryOfImportingFile != null && !Path.IsPathRooted(importFileUnescaped))
2169importFileUnescaped = Path.Combine(directoryOfImportingFile, importFileUnescaped);
Evaluation\Expander\WellKnownFunctions.cs (24)
38var logFile = Path.Combine(Directory.GetCurrentDirectory(), fileName);
50if (string.Equals(methodName, nameof(Path.Combine), StringComparison.OrdinalIgnoreCase))
62returnVal = Path.Combine(arg0);
69returnVal = Path.Combine(arg0, arg1);
76returnVal = Path.Combine(arg0, arg1, arg2);
83returnVal = Path.Combine(arg0, arg1, arg2, arg3);
90returnVal = Path.Combine(Array.ConvertAll(args, o => (string)o));
96else if (string.Equals(methodName, nameof(Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase))
100returnVal = Path.DirectorySeparatorChar;
104else if (string.Equals(methodName, nameof(Path.GetFullPath), StringComparison.OrdinalIgnoreCase))
109? Path.GetFullPath(Path.Combine(FileUtilities.CurrentThreadWorkingDirectory, arg0))
110: Path.GetFullPath(arg0);
114else if (string.Equals(methodName, nameof(Path.IsPathRooted), StringComparison.OrdinalIgnoreCase))
118returnVal = Path.IsPathRooted(arg0);
122else if (string.Equals(methodName, nameof(Path.GetTempPath), StringComparison.OrdinalIgnoreCase))
126returnVal = Path.GetTempPath();
130else if (string.Equals(methodName, nameof(Path.GetFileName), StringComparison.OrdinalIgnoreCase))
134returnVal = Path.GetFileName(arg0);
138else if (string.Equals(methodName, nameof(Path.GetDirectoryName), StringComparison.OrdinalIgnoreCase))
142returnVal = Path.GetDirectoryName(arg0);
146else if (string.Equals(methodName, nameof(Path.GetFileNameWithoutExtension), StringComparison.OrdinalIgnoreCase))
150returnVal = Path.GetFileNameWithoutExtension(arg0);
856else if (receiverType == typeof(Path))
Microsoft.Build.Framework (156)
BuildEnvironmentHelper.cs (13)
165return TryFromStandaloneMSBuildExe(Path.Combine(sdkRoot, Constants.MSBuildExecutableName))
166?? TryFromStandaloneMSBuildExe(Path.Combine(sdkRoot, Constants.MSBuildAssemblyName));
240var msBuildExecutableCandidate = Path.Combine(Path.GetDirectoryName(buildAssembly), Constants.MSBuildExecutableName);
368return TryFromStandaloneMSBuildExe(Path.Combine(appContextBaseDirectory, Constants.MSBuildExecutableName))
370?? TryFromStandaloneMSBuildExe(Path.Combine(appContextBaseDirectory, Constants.MSBuildAssemblyName));
392string directory = Path.GetDirectoryName(msBuildAssembly);
430var processFileName = Path.GetFileNameWithoutExtension(processName);
606CurrentMSBuildConfigurationFile = Path.ChangeExtension(currentMSBuildExePath, configFileExtension);
656MSBuildToolsDirectory64 = existsCheck(potentialAmd64FromX86) ? Path.Combine(MSBuildToolsDirectoryRoot, "amd64") : CurrentMSBuildToolsDirectory;
660MSBuildToolsDirectoryArm64 = existsCheck(potentialARM64FromX86) ? Path.Combine(MSBuildToolsDirectoryRoot, "arm64") : CurrentMSBuildToolsDirectory;
667? Path.Combine(VisualStudioInstallRootDirectory, "MSBuild")
725defaultSdkPath = Path.Combine(CurrentMSBuildToolsDirectory, "Sdks");
FileUtilities.cs (41)
25using NewPath = System.IO.Path;
26using Path = System.IO.Path;
87string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
139internal static readonly string DirectorySeparatorString = Path.DirectorySeparatorChar.ToString();
152cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
178return (c == Path.DirectorySeparatorChar) || (c == Path.AltDirectorySeparatorChar);
199return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == WindowsDirectorySeparator ? path : path.Replace(WindowsDirectorySeparator, UnixDirectorySeparator);
213fileSpec += Path.DirectorySeparatorChar;
340return new AbsolutePath(FixFilePath(NewPath.GetFullPath(path.Value)),
387if (NewPath.IsPathFullyQualified(path))
397return new AbsolutePath(NewPath.GetFullPath(path, workingDir!));
452string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
501string.Concat(path.AsSpan(start), new(in Path.DirectorySeparatorChar)));
591while (i > 0 && fullPath[--i] != Path.DirectorySeparatorChar && fullPath[i] != Path.AltDirectorySeparatorChar)
690string fullPath = NewPath.GetFullPath(path);
696return NormalizePath(Path.Combine(directory, file));
701return NormalizePath(Path.Combine(paths));
853return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
864string? directory = Path.GetDirectoryName(FixFilePath(fileSpec));
876directory += Path.DirectorySeparatorChar;
921if (allowedExtensions != null && Path.HasExtension(fileName))
953string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
967fullPath += Path.DirectorySeparatorChar;
1031var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1341string fullBase = NewPath.GetFullPath(basePath);
1342string fullPath = NewPath.GetFullPath(path);
1351while (path[indexOfFirstNonSlashChar] == Path.DirectorySeparatorChar)
1382sb.Append("..").Append(Path.DirectorySeparatorChar);
1386sb.Append(splitPath[i]).Append(Path.DirectorySeparatorChar);
1389if (fullPath[fullPath.Length - 1] != Path.DirectorySeparatorChar)
1426return Path.IsPathRooted(FixFilePath(path));
1472return paths.Aggregate(root, Path.Combine);
1500var separator = Path.DirectorySeparatorChar;
1640string? lookInDirectory = NewPath.GetFullPath(startingDirectory);
1645string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
1659lookInDirectory = Path.GetDirectoryName(lookInDirectory);
1679if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
Utilities\FrameworkLocationHelper.cs (30)
445? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
455? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
465? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV30)
475? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV35)
485? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV40)
495? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV45)
505? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
515? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
592Path.DirectorySeparatorChar.ToString(),
596Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
601s_pathToV35ToolsInFallbackDotNetFrameworkSdk += Path.DirectorySeparatorChar;
641s_pathToV4ToolsInFallbackDotNetFrameworkSdk = Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin", "NetFX 4.0 Tools");
836var frameworkPath = Path.Combine(NativeMethods.FrameworkBasePath, prefix ?? string.Empty);
846return Path.Combine(complusInstallRoot, complusVersion);
851string leaf = Path.GetFileName(currentRuntimePath);
859string baseLocation = Path.GetDirectoryName(currentRuntimePath);
979combinedPath = Path.GetFullPath(combinedPath);
987? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
988: Path.Combine(NativeMethods.FrameworkBasePath, "xbuild-frameworks");
990return Path.GetFullPath(combinedPath);
1038string path = Path.Combine(targetFrameworkRootPath, frameworkName.Identifier, "v" + frameworkName.Version.ToString());
1041path = Path.Combine(path, "Profile", frameworkName.Profile);
1044return Path.GetFullPath(path);
1066var endedWithASlash = path.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)
1068Path.AltDirectorySeparatorChar.ToString(),
1087fixedPath += Path.DirectorySeparatorChar;
1145string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1468(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) &&
1469!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1501frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
Microsoft.Build.NuGetSdkResolver (5)
Microsoft.Build.Tasks.CodeAnalysis (30)
Microsoft.Build.Tasks.Core (282)
AssemblyDependency\ReferenceTable.cs (16)
479if (!Path.IsPathRooted(assemblyFileName))
529string simpleName = Path.GetFileNameWithoutExtension(assemblyFileName);
766pathRooted = Path.IsPathRooted(finalName);
904Path.GetExtension(itemSpec));
964if (!String.IsNullOrEmpty(implementationFile) && Path.GetExtension(implementationFile) == ".dll")
966companionFile = Path.Combine(Path.GetDirectoryName(baseName), implementationFile);
1003string cultureName = Path.GetFileName(subDirectory);
1009string satelliteAssembly = Path.Combine(subDirectory, satelliteFilename);
1013reference.AddSatelliteFile(Path.Combine(cultureName, satelliteFilename));
1032string serializationAssemblyPath = Path.Combine(reference.DirectoryName, serializationAssemblyFilename);
2770AddRelatedItem(serializationAssemblyItems, relatedItemBase, Path.Combine(reference.DirectoryName, serializationAssemblyFile));
2776AddRelatedItem(scatterItems, relatedItemBase, Path.Combine(reference.DirectoryName, scatterFile));
2788relatedItemBase.SetMetadata(ItemMetadataNames.destinationSubDirectory, FileUtilities.EnsureTrailingSlash(Path.GetDirectoryName(satelliteFile)));
2789AddRelatedItem(satelliteItems, relatedItemBase, Path.Combine(reference.DirectoryName, satelliteFile));
2855yield return new KeyValuePair<string, string>(ItemMetadataNames.winmdImplmentationFile, Path.GetFileName(reference.ImplementationAssembly));
BootstrapperUtil\BootstrapperBuilder.cs (27)
176string strOutputExe = System.IO.Path.Combine(settings.OutputPath, SETUP_EXE);
363string setupSourceFile = System.IO.Path.Combine(bootstrapperPath, SETUP_BIN);
432invariantPath = Util.AddTrailingChar(invariantPath, System.IO.Path.DirectorySeparatorChar);
455packagePaths.AddRange(Util.AdditionalPackagePaths.Select(p => Util.AddTrailingChar(p.ToLowerInvariant(), System.IO.Path.DirectorySeparatorChar)));
459string folder = System.IO.Path.GetDirectoryName(file);
505private string BootstrapperPath => System.IO.Path.Combine(Path, ENGINE_PATH);
507private string PackagePath => System.IO.Path.Combine(Path, PACKAGE_PATH);
509private string SchemaPath => System.IO.Path.Combine(Path, SCHEMA_PATH);
530string startDirectory = System.IO.Path.Combine(BootstrapperPath, RESOURCES_PATH);
537string resourceDirectory = System.IO.Path.Combine(startDirectory, subDirectory);
538string resourceFilePath = System.IO.Path.Combine(resourceDirectory, SETUP_RESOURCES_FILE);
608if (strSubDirectory[nStartIndex] == System.IO.Path.DirectorySeparatorChar)
882string strSubDirectoryFullPath = System.IO.Path.Combine(packagePath, strSubDirectory);
885string strBaseManifestFilename = System.IO.Path.Combine(strSubDirectoryFullPath, ROOT_MANIFEST_FILE);
886string strBaseManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
924UpdatePackageFileNodes(packageFilesNode, System.IO.Path.Combine(packagePath, strSubDirectory), strSubDirectory);
937string strLangManifestFilename = System.IO.Path.Combine(strLanguageDirectory, CHILD_MANIFEST_FILE);
938string strLangManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
969System.IO.Path.DirectorySeparatorChar)
1174string strSourceFile = System.IO.Path.Combine(strSourcePath, relativePath);
1178targetPathAttribute.Value = System.IO.Path.Combine(strTargetPath, relativePath);
1181string newNameValue = System.IO.Path.Combine(strTargetPath, relativePath);
1470string strDestinationFileName = System.IO.Path.Combine(settings.OutputPath, packageFileDestination.Value);
1479EnsureFolderExists(System.IO.Path.GetDirectoryName(strDestinationFileName));
2005using (var xmlwriter = new XmlTextWriter(System.IO.Path.Combine(s_logPath, fileName), Encoding.UTF8))
2047using (var fileWriter = new StreamWriter(System.IO.Path.Combine(s_logPath, fileName), append))
2208string logPath = System.IO.Path.Combine(
GenerateResource.cs (17)
578commandLineBuilder.AppendFileNameIfNotNull(Path.Combine(_resgenPath, "resgen.exe"));
1599string extension = Path.GetExtension(sourceFilePath);
2140OutputResources[i] = new TaskItem(Path.ChangeExtension(Sources[i].ItemSpec, ".resources"));
2617_assemblyNames[i] = new AssemblyNameExtension(Path.GetFileNameWithoutExtension(assemblyFile.ItemSpec));
2747string priDirectory = Path.Combine(outFileOrDir ?? String.Empty,
2749currentOutputDirectory = Path.Combine(priDirectory,
2757currentOutputFile = Path.Combine(currentOutputDirectory, currentOutputFileNoPath);
2900return Path.GetFullPath(currentOutputFile);
2911currentOutputFile = Path.GetFullPath(currentOutputFile);
2921string shorterPath = Path.Combine(outputDirectory ?? String.Empty, cultureName ?? String.Empty);
2926currentOutputFile = Path.Combine(shorterPath, currentOutputFileNoPath);
2931currentOutputFile = Path.GetFullPath(currentOutputFile);
2982extension = Path.GetExtension(filename);
3012_logger.LogErrorWithCodeFromResources("GenerateResource.UnknownFileExtension", Path.GetExtension(filename), filename);
3506_stronglyTypedClassName = Path.GetFileNameWithoutExtension(outFile);
3551_logger.LogWarningWithCodeFromResources(null, Path.GetFullPath(inputFileName), 0, 0, 0, 0, messageKey, [skipped.Key, .. skipped.AdditionalMessageArgs]);
3574return Path.ChangeExtension(outputResourcesFile, provider.FileExtension);
GetSDKReferenceFiles.cs (12)
512string directory = Path.GetDirectoryName(reference.AssemblyLocation);
513string fileNameNoExtension = Path.GetFileNameWithoutExtension(reference.AssemblyLocation);
514string xmlFile = Path.Combine(directory, fileNameNoExtension + ".xml");
553if (Path.GetExtension(file.RedistFile).Equals(".PRI", StringComparison.OrdinalIgnoreCase))
578string fileExtension = Path.GetExtension(file);
630string targetPath = Path.Combine(targetPathRoot, relativeToBase);
731FileName = Path.GetFileNameWithoutExtension(assemblyLocation);
960referencesCacheFile = Path.Combine(_cacheFileDirectory, GetCacheFileName(saveContext.SdkIdentity, saveContext.SdkRoot, cacheFileInfo.Hash.ToString("X", CultureInfo.InvariantCulture)));
1030group reference by Path.GetDirectoryName(reference);
1085string referencesCacheFile = Path.Combine(cacheFileFolder, GetCacheFileName(sdkIdentity, sdkRoot, hash.ToString("X", CultureInfo.InvariantCulture)));
1165string redistPath = Path.Combine(sdkRoot, "Redist");
1179string referencesPath = Path.Combine(sdkRoot, "References");
InstalledSDKResolver.cs (4)
60string referenceAssemblyFilePath = Path.Combine(sdkDirectory, "References", configuration, architecture);
61string referenceAssemblyCommonArchFilePath = Path.Combine(sdkDirectory, "References", "CommonConfiguration", architecture);
62string referenceAssemblyPathNeutral = Path.Combine(sdkDirectory, "References", configuration, "Neutral");
63string referenceAssemblyArchFilePathNeutral = Path.Combine(sdkDirectory, "References", "CommonConfiguration", "Neutral");
Microsoft.Build.Tasks.Git (62)
GitDataReader\GitConfig.Reader.cs (12)
103return Path.Combine(xdgConfigHome, "git");
108return Path.Combine(_environment.HomeDirectory, ".config", "git");
119var programDataConfig = Path.Combine(_environment.ProgramDataDirectory, "git", "config");
130var systemConfig = Path.Combine(systemDir, "gitconfig");
141var xdgConfig = Path.Combine(xdgDir, "config");
151var globalConfig = Path.Combine(_environment.HomeDirectory, ".gitconfig");
159var localConfig = Path.Combine(_commonDirectory, "config");
180var mingwEtc = Path.Combine(_environment.SystemDirectory, "..", "mingw64", "etc");
283root = Path.GetDirectoryName(basePath) ?? "";
288return Path.GetFullPath(Path.Combine(root, relativePath));
334pattern = PathUtils.CombinePosixPaths(PathUtils.ToPosixPath(Path.GetDirectoryName(configFilePath)!), pattern[2..]);
GitDataReader\GitRepository.cs (18)
139return Path.GetFullPath(Path.Combine(location.GitDirectory, value));
182var dotGitPath = Path.Combine(submoduleWorkingDirectoryFullPath, GitDirName);
244fullPath = Path.GetFullPath(Path.Combine(workingDirectory, path));
281var submodulesConfigFile = Path.Combine(workingDirectory, GitModulesFileName);
323var commonInfoExclude = Path.Combine(CommonDirectory, "info", "exclude");
341directory = Path.GetFullPath(directory);
364dir = Path.GetFullPath(dir);
381dir = Path.GetDirectoryName(dir);
391var dotGitPath = Path.Combine(directory, GitDirName);
449return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(path)!, link));
460if (!File.Exists(Path.Combine(directory, GitHeadFileName)))
467var commonLinkPath = Path.Combine(directory, CommonDirFileName);
472commonDirectory = Path.Combine(directory, File.ReadAllText(commonLinkPath).TrimEnd(CharUtils.AsciiWhitespace));
474commonDirectory = Path.GetFullPath(commonDirectory);
Microsoft.Build.Utilities.Core (68)
ToolLocationHelper.cs (48)
664string legacyWindowsMetadataLocation = Path.Combine(sdkRoot, "Windows Metadata");
845propsFileLocation = Path.Combine(sdkRoot, designTimeFolderName, commonConfigurationFolderName, neutralArchitectureName);
849propsFileLocation = Path.Combine(sdkRoot, designTimeFolderName, commonConfigurationFolderName, neutralArchitectureName, targetPlatformIdentifier, targetPlatformVersion);
1039winmdLocation = Path.Combine(sdkRoot, referencesFolderName, commonConfigurationFolderName, neutralArchitectureName);
1132string referencesRoot = Path.Combine(targetPlatformSdkRoot, referencesFolderName, targetPlatformSdkVersion);
1137string contractPath = Path.Combine(referencesRoot, contract.Name, contract.Version);
1224return Path.Combine(sdkLocation, folderName);
1237? Path.Combine(matchingSdk.Path, folderName, targetPlatformVersion)
1238: Path.Combine(matchingSdk.Path, folderName);
1436var folders = string.IsNullOrEmpty(subFolder) ? vsInstallFolders : vsInstallFolders.Select(i => Path.Combine(i, subFolder));
1501string fullPath = Path.Combine(root, file);
1766if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
1840if (legacyMsCorlib20Path != null && FileSystems.Default.FileExists(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll")))
1857if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
2258Path.DirectorySeparatorChar.ToString(),
2261dotNetFrameworkReferenceAssemblies[i] += Path.DirectorySeparatorChar;
2426string referenceAssemblyPath = Path.Combine(sdkRoot, contentFolderName, targetConfiguration, targetArchitecture);
2553string pathToSDKManifest = Path.Combine(sdkVersionDirectory.FullName, "SDKManifest.xml");
2628string platformSDKDirectory = Path.Combine(rootPathWithIdentifier.FullName, version);
2629string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2652string sdkFolderPath = Path.Combine(platformSDKDirectory, "ExtensionSDKs");
2747string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2825string sdkManifestFileLocation = Path.Combine(directoryName, "SDKManifest.xml");
2903string localAppdataFolder = Path.Combine(userLocalAppData, "Microsoft SDKs");
2910string defaultProgramFilesLocation = Path.Combine(
3028string platformsRoot = Path.Combine(sdk.Path, platformsFolderName);
3056string pathToPlatformManifest = Path.Combine(platformVersion.FullName, "Platform.xml");
3094string path = Path.GetFullPath(targetFrameworkDirectory);
3115string redistListFolder = Path.Combine(path, "RedistList");
3116string redistFilePath = Path.Combine(redistListFolder, "FrameworkList.xml");
3200pathToReturn = Path.Combine(pathToReturn, includeFramework);
3201pathToReturn = Path.GetFullPath(pathToReturn);
3349pathToSdk = Path.Combine(pathToSdk, "x64");
3352pathToSdk = Path.Combine(pathToSdk, "ia64");
3360string filePath = Path.Combine(pathToSdk, fileName);
3469pathToSdk = Path.Combine(pathToSdk, "bin");
3510pathToSdk = Path.Combine(pathToSdk, "x86");
3513pathToSdk = Path.Combine(pathToSdk, "x64");
3521string filePath = Path.Combine(pathToSdk, fileName);
3584toolPath = Path.Combine(toolPath, fileName);
3614return pathToFx == null ? null : Path.Combine(pathToFx, fileName);
3622public static string GetPathToSystemFile(string fileName) => Path.Combine(PathToSystem, fileName);
3840string frameworkIdentifierPath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3898string frameworkProfilePath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3899frameworkProfilePath = Path.Combine(frameworkProfilePath, frameworkVersion);
3900frameworkProfilePath = Path.Combine(frameworkProfilePath, "Profiles");
3945string dotNextFx30RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
3952string dotNextFx35RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
Microsoft.CodeAnalysis (83)
Microsoft.CodeAnalysis.Analyzers (39)
Microsoft.CodeAnalysis.AnalyzerUtilities (27)
Microsoft.CodeAnalysis.CodeStyle (22)
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Microsoft.CodeAnalysis.Extensions.Package (4)
Microsoft.CodeAnalysis.ExternalAccess.HotReload (1)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
Microsoft.CodeAnalysis.Features (57)
EditAndContinue\TraceLog.cs (6)
44path = Path.Combine(_logDirectory, _traceLog._name + ".log");
56var directory = Path.Combine(_logDirectory, sessionId.Ordinal.ToString(), relativePath);
74var directory = CreateSessionDirectory(updateId.SessionId, Path.Combine(document.Project.Name, relativeDir));
75return Path.Combine(directory, $"{fileName}.{updateId.Ordinal}.{generation?.ToString() ?? "-"}.{suffix}{extension}");
83path = Path.Combine(CreateSessionDirectory(sessionId, directory), fileName);
97path = Path.Combine(CreateSessionDirectory(sessionId, directory), fileName);
PdbSourceDocument\ImplementationAssemblyLookupService.cs (10)
29private static readonly string PathSeparatorString = Path.DirectorySeparatorChar.ToString();
44var pathParts = referencedDllPath.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
58var basePath = Path.GetDirectoryName(dllPath);
81dllPath = Path.Combine(basePath, $"{assemblyName}.dll");
132var pathToTry = Path.Combine(
156var frameworkXml = Path.Combine(referencedDllPath, "..", "..", "..", "data", "FrameworkList.xml");
180var basePath = Path.GetFullPath(Path.Combine(referencedDllPath, "..", "..", "..", "..", "..", ".."));
181var dllPath = Path.Combine(basePath, "shared", sdkName, packVersion, dllFileName);
Microsoft.CodeAnalysis.NetAnalyzers (10)
Microsoft.CodeAnalysis.Razor.Compiler (11)
Microsoft.CodeAnalysis.Rebuild (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (33)
Microsoft.CodeAnalysis.Scripting (30)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (18)
87_baseDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
385string directory = Path.GetDirectoryName(fullPath);
410string shadowCopyPath = Path.Combine(assemblyCopyDir, Path.GetFileName(originalPath));
467originalDirectory = Path.GetDirectoryName(originalPath);
468shadowCopyDirectory = Path.GetDirectoryName(shadowCopyPath);
472originalPath: Path.Combine(originalDirectory, moduleName),
473shadowCopyPath: Path.Combine(shadowCopyDirectory, moduleName));
512string dir = Path.Combine(basePath, Guid.NewGuid().ToString());
545string assemblyDirectory = Path.GetDirectoryName(originalAssemblyPath);
546string assemblyFileName = Path.GetFileName(originalAssemblyPath);
560Directory.CreateDirectory(Path.Combine(assemblyCopyDirectory, xmlSubdirectory));
568string xmlCopyPath = Path.Combine(assemblyCopyDirectory, xmlSubdirectory, xmlFileName);
569string xmlOriginalPath = Path.Combine(assemblyDirectory, xmlSubdirectory, xmlFileName);
588docFileName = Path.ChangeExtension(assemblyFileName, ".xml");
593if (File.Exists(Path.Combine(assemblyDirectory, docSubdirectory, docFileName)))
603if (File.Exists(Path.Combine(assemblyDirectory, docFileName)))
Microsoft.CodeAnalysis.Workspaces (86)
Microsoft.CodeAnalysis.Workspaces.MSBuild (39)
MSBuild\BuildHostProcessManager.cs (7)
36private static string MSBuildWorkspaceDirectory => Path.GetDirectoryName(typeof(BuildHostProcessManager).Assembly.Location) ?? AppContext.BaseDirectory;
37private static bool IsLoadedFromNuGetPackage => File.Exists(Path.Combine(MSBuildWorkspaceDirectory, "..", "..", "microsoft.codeanalysis.workspaces.msbuild.nuspec"));
162dotnetPath = Path.GetFullPath(Path.Combine(msbuildLocation.Path, $"../../{DotnetExecutable}"));
313buildHostPath = Path.GetFullPath(Path.Combine(MSBuildWorkspaceDirectory, "..", "..", "contentFiles", "any", "any", contentFolderName, assemblyName));
318buildHostPath = Path.Combine(MSBuildWorkspaceDirectory, contentFolderName, assemblyName);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (20)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (10)
Microsoft.Data.Analysis.Tests (7)
Microsoft.Deployment.DotNet.Releases (3)
Microsoft.Diagnostics.DataContractReader.Legacy (4)
Microsoft.Diagnostics.NETCore.Client (9)
Microsoft.DiaSymReader (1)
Microsoft.DotNet.ApiCompat.Task (6)
Microsoft.DotNet.ApiSymbolExtensions (11)
Microsoft.DotNet.Arcade.Sdk (21)
src\InstallDotNetCore.cs (6)
193string dotNetPath = Path.TrimEndingDirectorySeparator(DotNetPath);
284dotnetRoot = Path.Combine(dotnetRoot, architecture.ToLowerInvariant());
289"dotnet" => Path.Combine(dotnetRoot, "shared", "Microsoft.NETCore.App", version),
290"aspnetcore" => Path.Combine(dotnetRoot, "shared", "Microsoft.AspNetCore.App", version),
291"windowsdesktop" => Path.Combine(dotnetRoot, "shared", "Microsoft.WindowsDesktop.App", version),
292_ => Path.Combine(dotnetRoot, "shared", version)
Microsoft.DotNet.Build.Tasks.FileCatalog (3)
Microsoft.DotNet.Build.Tasks.Installers (78)
src\CreateWixBuildWixpack.cs (49)
98WixpackWorkingDir = Path.Combine(Path.GetTempPath(), "WixpackTemp", Guid.NewGuid().ToString().Split('-')[0]);
101_installerFilename = Path.GetFileName(InstallerFile);
114string destPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(projectPath));
147OutputFile = Path.Combine(OutputFolder, $"{_installerFilename}{_packageExtension}");
179var randomDirName = Path.GetRandomFileName();
182CopyDirectoryRecursive(fullSourceDir, Path.Combine(WixpackWorkingDir, randomDirName));
201var tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
262_defineConstantsDictionary["ProjectPath"] = Path.GetFileName(projectPath);
280_defineConstantsDictionary["TargetPath"] = Path.Combine("%outputfolder%", Path.GetFileName(targetPath));
284InstallerFile = Path.Combine("%outputfolder%", Path.GetFileName(InstallerFile));
292PdbFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(PdbFile.ItemSpec));
298BindTrackingFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(BindTrackingFile.ItemSpec));
426commandLineArgs.Add($"{Path.GetFileName(sourceFile.ItemSpec)}");
432File.WriteAllText(Path.Combine(WixpackWorkingDir, "create.rsp"), string.Join(System.Environment.NewLine, commandLineArgs));
446File.WriteAllText(Path.Combine(WixpackWorkingDir, "create.cmd"), createCmdFileContents.ToString());
518var copiedXmlPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(xmlPath));
520string sourceFileFolder = Path.GetDirectoryName(xmlPath);
597var filePath = Path.Combine(dir, Path.GetFileName(source));
598CopySourceFile(Path.GetFileName(dir), filePath);
609id = Path.GetFileName(source);
615var newSourceValue = $"{id}\\{Path.GetFileName(source)}";
653string id = Path.GetFileName(includeFilePath);
666var potentialPath = Path.Combine(WixpackWorkingDir, searchPath, Path.GetFileName(includeFilePath));
1016var destDir = Path.Combine(WixpackWorkingDir, fileId);
1023var destPath = Path.Combine(destDir, Path.GetFileName(source));
1038string filename = Path.GetFileName(extensionPath);
1042Extensions[i] = new TaskItem(Path.Combine(filename, filename));
1054string wixpackSubfolder = Path.GetRandomFileName();
1081string filename = Path.GetFileName(localizationPath);
1085LocalizationFiles[i] = new TaskItem(Path.Combine(filename, filename));
1092if (!Path.IsPathRooted(source))
1095Path.Combine(_wixprojDir, source) :
1096Path.Combine(relativeRoot, source);
1108File.Copy(file, Path.Combine(destDir, Path.GetFileName(file)), overwrite: true);
1113CopyDirectoryRecursive(dir, Path.Combine(destDir, Path.GetFileName(dir)));
src\CreateWixCommandPackageDropBase.cs (17)
67OutputFile = Path.Combine(OutputFolder, $"{Path.GetFileName(InstallerFile)}{_packageExtension}");
81string commandFilename = Path.Combine(packageDropOutputFolder, $"create.cmd");
97commandString.Append($" -out %outputfolder%{Path.GetFileName(InstallerFile)}");
106commandString.Append($" -loc {Path.GetFileName(locItem.ItemSpec)}");
120commandString.Append($" {Path.GetFileName(wixSrcFile.ItemSpec)}");
144string newWixSrcFilePath = Path.Combine(packageDropOutputFolder, Path.GetFileName(wixSrcFile.ItemSpec));
147string wixSrcFileExtension = Path.GetExtension(wixSrcFile.ItemSpec);
176var destinationPath = Path.Combine(packageDropOutputFolder, Path.GetFileName(locItem.ItemSpec));
283else if (!Path.IsPathRooted(oldPath))
292var possiblePath = Path.Combine(additionalBasePath.ItemSpec, oldPath);
310newRelativePath = Path.Combine(id, Path.GetFileName(oldPath));
325string newFolder = Path.Combine(outputPath, id);
331File.Copy(oldPath, Path.Combine(outputPath, newRelativePath), true);
Microsoft.DotNet.Build.Tasks.Packaging (63)
NuGetPack.cs (13)
24@"**\*.pdb".Replace('\\', Path.DirectorySeparatorChar),
25@"src\**\*".Replace('\\', Path.DirectorySeparatorChar)
32@"content\**\*".Replace('\\', Path.DirectorySeparatorChar),
33@"tools\**\*.ps1".Replace('\\', Path.DirectorySeparatorChar)
211string baseDirectoryPath = (string.IsNullOrEmpty(BaseDirectory)) ? Path.GetDirectoryName(nuspecPath) : BaseDirectory;
262return Path.Combine(nupkgOutputDirectory, $"{id}.{version}{nupkgExtension}");
267bool creatingSymbolsPackage = packSymbols && (Path.GetExtension(nupkgPath) == _symbolsPackageExtension);
273string baseDirectoryPath = (string.IsNullOrEmpty(BaseDirectory)) ? Path.GetDirectoryName(nuspecPath) : BaseDirectory;
310var directory = Path.GetDirectoryName(nupkgPath);
391if(Path.GetFileName(fileName) == "runtime.json" && file.Target == "")
393string packedPackageSourcePath = Path.Combine(Path.GetDirectoryName(fileName), string.Join(".", _packageNamePrefix, Path.GetFileName(fileName)));
Microsoft.DotNet.Build.Tasks.Templating (2)
Microsoft.DotNet.Build.Tasks.VisualStudio (11)
Microsoft.DotNet.Build.Tasks.Workloads (23)
Microsoft.DotNet.Cli.CoreUtils (7)
Microsoft.DotNet.Cli.Definitions (16)
Microsoft.DotNet.Cli.Utils (46)
PathUtility.cs (33)
19return string.Equals(Path.GetFileName(path), "_._", StringComparison.Ordinal);
32dir = Path.GetFullPath(dir);
34candidate = Path.GetFullPath(candidate);
43if (lastChar == Path.DirectorySeparatorChar)
54string? directory = Path.GetDirectoryName(filePath);
92var dir = Path.GetDirectoryName(path);
101dir = Path.GetDirectoryName(dir);
116return GetRelativePath(path1, path2, Path.DirectorySeparatorChar, true);
124if (!Path.IsPathRooted(path1) || !Path.IsPathRooted(path2))
129return GetRelativePath(path1, path2, Path.DirectorySeparatorChar, true);
138return GetRelativePath(path1, path2, Path.DirectorySeparatorChar, false);
161if (!string.Equals(Path.GetPathRoot(path1), Path.GetPathRoot(path2), compare))
173var path1Segments = path1.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
174var path2Segments = path2.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
246path = path.TrimEnd(Path.DirectorySeparatorChar);
247return path.Substring(Path.GetDirectoryName(path)?.Length ?? 0).Trim(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
262if (Path.DirectorySeparatorChar == '/')
279var components = path.Split(Path.DirectorySeparatorChar);
296result += Path.DirectorySeparatorChar;
301result = Path.Combine(result, component);
305if (path[path.Length - 1] == Path.DirectorySeparatorChar)
307result += Path.DirectorySeparatorChar;
322return Path.GetExtension(filePath).Equals(extension, comparison);
336return Path.GetFullPath(path);
368return string.IsNullOrEmpty(path) || Path.DirectorySeparatorChar == '\\' ? path : path.Replace('\\', '/');
373return Regex.Escape(Path.DirectorySeparatorChar.ToString());
382var filePath = Path.Combine(directory.FullName, relativeFilePath);
Microsoft.DotNet.CMake.Sdk (11)
src\GetCMakeArtifactsFromFileApi.cs (9)
48string replyDir = Path.Combine(CMakeOutputDir, ".cmake", "api", "v1", "reply");
82string codeModelFile = Path.Combine(replyDir, index.Reply.ClientReply.CodemodelV2.JsonFile);
104string normalizedSourceDir = Path.GetFullPath(SourceDirectory).Replace('\\', '/').TrimEnd('/');
130if (!Path.IsPathRooted(dirSource))
132dirSource = Path.Combine(sourceRoot, dirSource);
133dirSource = Path.GetFullPath(dirSource).Replace('\\', '/').TrimEnd('/');
165string targetFile = Path.Combine(replyDir, target.JsonFile);
184string fullPath = Path.Combine(CMakeOutputDir, artifact.Path);
185fullPath = Path.GetFullPath(fullPath);
Microsoft.DotNet.CodeAnalysis (2)
Microsoft.DotNet.Configurer (11)
Microsoft.DotNet.GenFacades (6)
Microsoft.DotNet.HotReload.Utils.Generator (5)
Microsoft.DotNet.HotReload.Watch (67)
Microsoft.DotNet.HotReload.WebAssembly.Browser (3)
Microsoft.DotNet.InternalAbstractions (12)
Microsoft.DotNet.MacOsPkg.Core (16)
Microsoft.DotNet.NativeWrapper (8)
Microsoft.DotNet.NuGetRepack.Tasks (8)
Microsoft.DotNet.PackageTesting (5)
Microsoft.DotNet.PackageValidation (2)
Microsoft.DotNet.ProjectTools (27)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.SharedFramework.Sdk (17)
Microsoft.DotNet.SourceBuild.Tasks (9)
Microsoft.DotNet.TemplateLocator (46)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (28)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
109var knownManifestIdsFilePath = Path.Combine(_sdkRootPath, "sdk", sdkVersion, "KnownWorkloadManifests.txt");
112knownManifestIdsFilePath = Path.Combine(_sdkRootPath, "sdk", sdkVersion, "IncludedWorkloadManifests.txt");
130_manifestRoots = manifestDirectoryEnvironmentVariable.Split(Path.PathSeparator)
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
363AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory));
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
392directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory;
452AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir));
480string manifestId = Path.GetFileName(manifestDirectory);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
491return (directory: dir, version: Path.GetFileName(dir));
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
526.Select(dir => Path.GetFileName(dir))
532.Select(featureBand => (featureBand, manifestDirectory: Path.Combine(sdkManifestPath, featureBand.ToString(), manifestId)))
557var specifiedManifestDirectory = Path.Combine(manifestDirectory, manifestSpecifier.FeatureBand.ToString(), manifestSpecifier.Id.ToString(),
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
624var featureBandDirectoryName = Path.GetFileName(featureBandDirectory);
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
639var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
668string globalJsonPath = Path.Combine(directory, "global.json");
673directory = Path.GetDirectoryName(directory);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadInstallType.cs (3)
29dotnetDir is not null && File.Exists(Path.Combine(
40return Path.Combine(dotnetDir, "metadata", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
44return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (6)
30string runtimeIdentifierChainPath = Path.Combine(dotnetRootPath, "sdk", sdkVersion, "NETCoreSdkRuntimeIdentifierChain.txt");
48workloadRootPaths = packRootEnvironmentVariable!.Split(Path.PathSeparator).Select(path => new WorkloadRootPath(path, false)).Concat(workloadRootPaths).ToArray();
329packPath = Path.Combine(rootPath.Path, "packs", resolvedPackageId.ToString(), packageVersion);
333packPath = Path.Combine(rootPath.Path, "template-packs", resolvedPackageId.GetNuGetCanonicalId() + "." + packageVersion.ToLowerInvariant() + ".nupkg");
337packPath = Path.Combine(rootPath.Path, "library-packs", resolvedPackageId.GetNuGetCanonicalId() + "." + packageVersion.ToLowerInvariant() + ".nupkg");
341packPath = Path.Combine(rootPath.Path, "tool-packs", resolvedPackageId.ToString(), packageVersion);
Microsoft.DotNet.VersionTools.Cli (1)
Microsoft.DotNet.XliffTasks (48)
Tasks\TransformTemplates.cs (14)
63string templateName = Path.GetFileNameWithoutExtension(template.ItemSpec);
65string templateDirectory = Path.GetDirectoryName(templatePath);
70? Path.Combine(TranslatedOutputDirectory, $"{templateName}.default.1033")
71: Path.Combine(TranslatedOutputDirectory, $"{templateName}.{language}");
73string cultureSpecificTemplateFile = Path.Combine(localizedTemplateDirectory, Path.GetFileName(template.ItemSpec));
79string projectFileFullPath = Path.Combine(templateDirectory, projectNode.Attribute("File").Value);
80File.Copy(projectFileFullPath, Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value)), overwrite: true);
86string templateItemFullPath = Path.Combine(templateDirectory, templateItem.Value);
87string templateItemDestinationPath = Path.Combine(localizedTemplateDirectory, templateItem.Value);
104Path.GetFileNameWithoutExtension(unstructuredResource.ItemSpec),
107Path.GetExtension(unstructuredResource.ItemSpec));
108File.Copy(Path.Combine(TranslatedOutputDirectory, localizedFileName), templateItemDestinationPath, overwrite: true);
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Abstractions.Tests (47)
Contents\DataContentTests.cs (47)
316string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.json");
327Assert.Equal(Path.GetFileName(tempPath), content.Name);
343string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.bin");
354Assert.Equal(Path.GetFileName(tempPath), content.Name);
370string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.unknownextension");
396string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.png");
408Assert.Equal(Path.GetFileName(tempPath), content.Name);
459string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.bin");
486string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
516string tempDir = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
518string expectedPath = Path.Combine(tempDir, "myfile.json");
545string tempDir = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
574string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.txt");
608Assert.Equal(filename, Path.GetFileName(savedPath));
636Assert.Equal(content.Name, Path.GetFileName(savedPath));
664Assert.Equal(content.Name, Path.GetFileName(savedPath));
706string tempDir = Path.Combine(Path.GetTempPath(), $"test_subdir_{Guid.NewGuid()}");
707string subDir = Path.Combine(tempDir, "subdir");
712string filePath = Path.Combine(subDir, "nested.html");
739string tempDir = Path.Combine(Path.GetTempPath(), $"test_dir_noname_{Guid.NewGuid()}");
766string tempPath = Path.Combine(Path.GetTempPath(), $"test_cancel_{Guid.NewGuid()}.txt");
797string tempPath = Path.Combine(Path.GetTempPath(), $"test_save_cancel_{Guid.NewGuid()}.bin");
837string tempDir = Path.Combine(Path.GetTempPath(), $"test_dir_name_{Guid.NewGuid()}");
839string expectedPath = Path.Combine(tempDir, content.Name);
865string tempDir = Path.Combine(Path.GetTempPath(), $"test_nonexist_{Guid.NewGuid()}");
867string filePath = Path.Combine(tempDir, "newfile");
894string tempPath = Path.Combine(Path.GetTempPath(), $"test_large_{Guid.NewGuid()}.bin");
923string tempPath = Path.Combine(Path.GetTempPath(), $"test_save_large_{Guid.NewGuid()}.bin");
946string tempPath = Path.Combine(Path.GetTempPath(), $"test_existing_{Guid.NewGuid()}.bin");
Microsoft.Extensions.AI.Evaluation.Console (7)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (3)
Microsoft.Extensions.AI.Evaluation.Reporting (18)
Storage\DiskBasedResultStore.cs (11)
48storageRootPath = Path.GetFullPath(storageRootPath);
49_resultsRootPath = Path.Combine(storageRootPath, "results");
93new DirectoryInfo(Path.Combine(_resultsRootPath, result.ExecutionName, result.ScenarioName));
97var resultFile = new FileInfo(Path.Combine(resultDir.FullName, $"{result.IterationName}.json"));
123var executionDir = new DirectoryInfo(Path.Combine(_resultsRootPath, executionName));
133new DirectoryInfo(Path.Combine(_resultsRootPath, executionName, scenarioName));
143new FileInfo(Path.Combine(_resultsRootPath, executionName, scenarioName, $"{iterationName}.json"));
235yield return Path.GetFileNameWithoutExtension(resultFile.Name);
263var executionDir = new DirectoryInfo(Path.Combine(_resultsRootPath, executionName));
296var scenarioDir = new DirectoryInfo(Path.Combine(executionDir.FullName, scenarioName));
332var resultFile = new FileInfo(Path.Combine(scenarioDir.FullName, $"{iterationName}.json"));
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (19)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.AI.Templates.Tests (21)
test\ProjectTemplates\Infrastructure\WellKnownPaths.cs (6)
33ProjectTemplatesArtifactsRoot = Path.Combine(RepoRoot, "artifacts", "ProjectTemplates");
34TemplateSandboxSource = Path.Combine(RepoRoot, "test", "ProjectTemplates", "Infrastructure", "TemplateSandbox");
35TemplateTestNuGetConfigPath = Path.Combine(TemplateSandboxSource, "nuget.config");
37LocalShippingPackagesPath = Path.Combine(RepoRoot, "artifacts", "packages", BuildConfigurationFolder, "Shipping");
46var gitPath = Path.Combine(directory, ".git");
66var dotNetExePath = Path.Combine(RepoRoot, ".dotnet", dotNetExeName);
Microsoft.Extensions.ApiDescription.Client (3)
Microsoft.Extensions.Configuration.FileExtensions (4)
Microsoft.Extensions.Configuration.UserSecrets (4)
Microsoft.Extensions.DataIngestion.Abstractions (1)
Microsoft.Extensions.DataIngestion.MarkItDown (3)
Microsoft.Extensions.DataIngestion.Tests (13)
Microsoft.Extensions.DependencyModel (21)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.DotNetDeltaApplier (5)
Microsoft.Extensions.FileProviders.Embedded (9)
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (2)
Microsoft.Extensions.FileProviders.Physical (26)
Microsoft.Extensions.FileSystemGlobbing (29)
InMemoryDirectoryInfo.cs (24)
18private static readonly char[] DirectorySeparators = new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
54Name = isParentPath ? ".." : Path.GetFileName(rootDir);
63string normalizedRoot = Path.GetFullPath(rootDir.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
68string fileWithNormalSeparators = file.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
69if (Path.IsPathRooted(file))
71fileList.Add(Path.GetFullPath(fileWithNormalSeparators));
75fileList.Add(Path.GetFullPath(Path.Combine(normalizedRoot, fileWithNormalSeparators)));
93new InMemoryDirectoryInfo(Path.GetDirectoryName(FullName)!, _files, true, _comparisonType);
139(rootDir[rootDirLength - 1] == Path.DirectorySeparatorChar ||
140filePath.IndexOf(Path.DirectorySeparatorChar, rootDirLength) == rootDirLength);
152normPath = Path.GetDirectoryName(FullName) ?? FullName;
156string combinedPath = Path.Combine(FullName, path);
157normPath = Path.GetFullPath(combinedPath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
170string combinedPath = Path.Combine(FullName, path);
171string normPath = Path.GetFullPath(combinedPath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
Microsoft.Extensions.Hosting (5)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (4)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Microsoft.Extensions.Localization (4)
Microsoft.Extensions.Logging.AzureAppServices (4)
Microsoft.Extensions.ML (2)
Microsoft.Extensions.ML.Tests (4)
Microsoft.Extensions.ServiceDiscovery.Dns (8)
DnsSrvServiceEndpointProviderFactory.cs (8)
17private static readonly string s_serviceAccountPath = Path.Combine($"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount");
18private static readonly string s_serviceAccountNamespacePath = Path.Combine($"{Path.DirectorySeparatorChar}var", "run", "secrets", "kubernetes.io", "serviceaccount", "namespace");
19private static readonly string s_resolveConfPath = Path.Combine($"{Path.DirectorySeparatorChar}etc", "resolv.conf");
133var tokenPath = Path.Combine(s_serviceAccountPath, "token");
139var certPath = Path.Combine(s_serviceAccountPath, "ca.crt");
Microsoft.Gen.BuildMetadata (2)
Microsoft.Gen.BuildMetadata.Unit.Tests (3)
Microsoft.Gen.ComplianceReports (5)
Microsoft.Gen.ComplianceReports.Unit.Tests (8)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
Microsoft.Gen.Logging (2)
Microsoft.Gen.Logging.Unit.Tests (8)
Microsoft.Gen.MetadataExtractor (7)
Microsoft.Gen.MetadataExtractor.Unit.Tests (13)
Microsoft.Gen.Metrics (2)
Microsoft.Gen.Metrics.Unit.Tests (3)
Microsoft.Gen.MetricsReports (3)
Microsoft.Gen.MetricsReports.Unit.Tests (13)
Microsoft.Maui (1)
Microsoft.Maui.Controls (1)
Microsoft.Maui.Controls.Build.Tasks (6)
Microsoft.Maui.Controls.SourceGen (10)
Microsoft.Maui.Essentials (6)
Microsoft.Maui.Resizetizer (56)
Microsoft.McpServer.ProjectTemplates.Tests (21)
test\ProjectTemplates\Infrastructure\WellKnownPaths.cs (6)
33ProjectTemplatesArtifactsRoot = Path.Combine(RepoRoot, "artifacts", "ProjectTemplates");
34TemplateSandboxSource = Path.Combine(RepoRoot, "test", "ProjectTemplates", "Infrastructure", "TemplateSandbox");
35TemplateTestNuGetConfigPath = Path.Combine(TemplateSandboxSource, "nuget.config");
37LocalShippingPackagesPath = Path.Combine(RepoRoot, "artifacts", "packages", BuildConfigurationFolder, "Shipping");
46var gitPath = Path.Combine(directory, ".git");
66var dotNetExePath = Path.Combine(RepoRoot, ".dotnet", dotNetExeName);
Microsoft.ML.AutoML (5)
Microsoft.ML.AutoML.Samples (5)
Microsoft.ML.AutoML.Tests (24)
ColumnInferenceTests.cs (8)
81var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithEmptyColumn.txt"), DefaultColumnNames.Label, groupColumns: false);
89var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "BinaryDatasetWithBoolColumn.txt"), DefaultColumnNames.Label);
108var filePath = Path.Combine("TestData", "DatasetWithoutHeader.txt");
136var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "NameColumnIsOnlyFeatureDataset.txt"), DefaultColumnNames.Label);
153.InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
173var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
204var dataset = Path.Combine("TestData", "DatasetWithNewlineBetweenQuotes.txt");
245var wiki = Path.Combine("TestData", "wiki-column-inference.json");
DatasetUtil.cs (14)
27public static string TrivialMulticlassDatasetPath = Path.Combine("TestData", "TrivialMulticlassDataset.txt");
49return Path.Combine(TestCommon.GetRepoRoot(), "test", "data", fileName);
132string imagesDownloadFolderPath = Path.Combine(assetsPath, "inputs",
139string fullImagesetFolderPath = Path.Combine(
166var extension = Path.GetExtension(file).ToLower();
174var label = Path.GetFileName(file);
191UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
193return Path.GetFileNameWithoutExtension(fileName);
199destFileName = Path.GetFileName(new Uri(url).AbsolutePath); ;
203string relativeFilePath = Path.Combine(destDir, destFileName);
223var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
228if (File.Exists(Path.Combine(destFolder, flag)))
232File.Create(Path.Combine(destFolder, flag));
236Path.Combine(new FileInfo(typeof(
Microsoft.ML.CodeAnalyzer.Tests (1)
Microsoft.ML.CodeGenerator (12)
Microsoft.ML.Core (45)
Microsoft.ML.Core.Tests (19)
UnitTests\TestEntryPoints.cs (5)
237var entryPointsSubDir = Path.Combine("..", "Common", "EntryPoints");
265var entryPointsSubDir = Path.Combine("..", "Common", "EntryPoints");
4560TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS1.csv")), "sep=, col=Features:R4:1 header=+",
4589TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "real_1.csv")), "sep=, col=Features:R4:1 header=+",
4613TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS2.csv")), "sep=, col=Features:R4:1 header=+",
Microsoft.ML.CpuMath.UnitTests (1)
Microsoft.ML.Data (16)
Microsoft.ML.DnnImageFeaturizer.AlexNet (3)
AlexNetExtension.cs (3)
28return AlexNet(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Dropout234_Output_0" }, new[] { "Input140" }, Path.Combine(modelDir, "AlexNetOnnx", "AlexNet.onnx"));
Microsoft.ML.DnnImageFeaturizer.ResNet101 (3)
ResNet101Extension.cs (3)
28return ResNet101(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Pooling2286_Output_0" }, new[] { "Input1600" }, Path.Combine(modelDir, "ResNet101Onnx", "ResNet101.onnx"));
Microsoft.ML.DnnImageFeaturizer.ResNet18 (3)
ResNet18Extension.cs (3)
28return ResNet18(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Pooling395_Output_0" }, new[] { "Input247" }, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"));
Microsoft.ML.DnnImageFeaturizer.ResNet50 (3)
ResNet50Extension.cs (3)
28return ResNet50(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
46var prepEstimator = new OnnxScoringEstimator(env, new[] { "PreprocessedInput" }, new[] { "OriginalInput" }, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"));
47var mainEstimator = new OnnxScoringEstimator(env, new[] { "Pooling1096_Output_0" }, new[] { "Input750" }, Path.Combine(modelDir, "ResNet50Onnx", "ResNet50.onnx"));
Microsoft.ML.Ensemble (2)
Microsoft.ML.EntryPoints (1)
Microsoft.ML.GenAI.Core.Tests (1)
Microsoft.ML.GenAI.LLaMA (3)
Microsoft.ML.GenAI.LLaMA.Tests (1)
Microsoft.ML.GenAI.Mistral (3)
Microsoft.ML.GenAI.Phi (5)
Microsoft.ML.GenAI.Phi.Tests (3)
Microsoft.ML.GenAI.Samples (11)
Microsoft.ML.ImageAnalytics (4)
Microsoft.ML.IntegrationTests (5)
Microsoft.ML.Maml (4)
Microsoft.ML.OneDal (1)
Microsoft.ML.OnnxConverter (1)
Microsoft.ML.OnnxTransformer (4)
Microsoft.ML.OnnxTransformerTest (21)
Microsoft.ML.Parquet (6)
Microsoft.ML.PerformanceTests (33)
Microsoft.ML.Predictor.Tests (14)
CompareBaselines.cs (14)
58log.WriteLine("Comparison of baselines {0} to {1}", Path.GetFileName(root1), Path.GetFileName(root2));
66string dir1 = Path.Combine(root1, rel);
67string dir2 = Path.Combine(root2, rel);
70.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false);
73string name = Path.GetFileName(path1);
74string relCur = Path.Combine(rel, name);
89log.WriteLine("*** Missing left file: '{0}'", Path.Combine(rel, kvp.Key));
93.ToDictionary(s => Path.GetFileName(s).ToLowerInvariant(), s => false);
96string name = Path.GetFileName(path1);
97string relCur = Path.Combine(rel, name);
112log.WriteLine("*** Missing left directory: '{0}'", Path.Combine(rel, kvp.Key));
167using (var rdr1 = OpenReader(Path.Combine(root1, rel)))
168using (var rdr2 = OpenReader(Path.Combine(root2, rel)))
Microsoft.ML.ResultProcessor (1)
Microsoft.ML.Samples (71)
Microsoft.ML.Samples.GPU (62)
Microsoft.ML.SamplesUtils (11)
SamplesDatasetUtils.cs (11)
27while (!Directory.Exists(Path.Combine(directory, ".git")) && directory != null)
36return Path.Combine(directory, "test", "data", fileName);
179string varPath = Path.Combine(path, "variables");
183Download(Path.Combine(remotePath, "saved_model.pb"), Path.Combine(path, "saved_model.pb")).Wait();
184Download(Path.Combine(remotePath, "imdb_word_index.csv"), Path.Combine(path, "imdb_word_index.csv")).Wait();
185Download(Path.Combine(remotePath, "variables", "variables.data-00000-of-00001"), Path.Combine(varPath, "variables.data-00000-of-00001")).Wait();
186Download(Path.Combine(remotePath, "variables", "variables.index"), Path.Combine(varPath, "variables.index")).Wait();
Microsoft.ML.SearchSpace.Tests (2)
Microsoft.ML.Sweeper (5)
Microsoft.ML.TensorFlow (11)
Microsoft.ML.TensorFlow.Tests (51)
TensorflowTests.cs (48)
34tempFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
35assetsPath = Path.Combine(tempFolder, "assets");
36parentWorkspacePath = Path.Combine(assetsPath, "cached");
66string imagesDownloadFolderPath = Path.Combine(TensorFlowScenariosTestsFixture.assetsPath, "inputs",
73_fullImagesetFolderPath = Path.Combine(
122var imageFolder = Path.GetDirectoryName(dataFile);
489var imageFolder = Path.GetDirectoryName(dataFile);
525var imageFolder = Path.GetDirectoryName(dataFile);
750var varDir = Path.Combine(modelLocation, "variables");
995var imageFolder = Path.GetDirectoryName(dataFile);
1054var imageFolder = Path.GetDirectoryName(dataFile);
1097var imageFolder = Path.GetDirectoryName(dataFile);
1132var imageFolder = Path.GetDirectoryName(dataFile);
1169var mlModelLocation = DeleteOutputPath(Path.ChangeExtension(modelLocation, ".zip"));
1209var imageFolder = Path.GetDirectoryName(dataFile);
1433if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName))
1434&& File.Exists(Path.Combine(workspacePath, validationSetBottleneckCachedValuesFileName)))
1449string workspacePath = Path.Combine(TensorFlowScenariosTestsFixture.parentWorkspacePath, finalImagesFolderName + "_" + (int)arch);
1549ImagePath = Path.Combine(_fullImagesetFolderPath, "daisy", "5794835_d15905c7c8_n.jpg")
1555ImagePath = Path.Combine(_fullImagesetFolderPath, "roses", "12240303_80d87f77a3_n.jpg")
1708ImagePath = Path.Combine(_fullImagesetFolderPath, "daisy", "5794835_d15905c7c8_n.jpg")
1714ImagePath = Path.Combine(_fullImagesetFolderPath, "roses", "12240303_80d87f77a3_n.jpg")
1734Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.TrainSetBottleneckCachedValuesFileName)));
1735Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.ValidationSetBottleneckCachedValuesFileName)));
1736Assert.True(File.Exists(Path.Combine(Path.GetTempPath(), "MLNET", ImageClassificationTrainer.ModelFileName[options.Arch])));
1828string imagesDownloadFolderPath = Path.Combine(TensorFlowScenariosTestsFixture.assetsPath, "inputs",
1834string fullImagesetFolderPath = Path.Combine(
1908if (Path.GetExtension(file) != ".jpg")
1911var label = Path.GetFileName(file);
1942UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1944if (!Directory.Exists(Path.Combine(imagesDownloadFolder, filenameAlias)))
1945Directory.Move(Path.Combine(imagesDownloadFolder, Path.GetFileNameWithoutExtension(fileName)), Path.Combine(imagesDownloadFolder, "FPTSUT"));
1955UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1957return Path.GetFileNameWithoutExtension(fileName);
1963destFileName = url.Split(Path.DirectorySeparatorChar).Last();
1967string relativeFilePath = Path.Combine(destDir, destFileName);
1978var flag = gzArchiveName.Split(Path.DirectorySeparatorChar)
1983if (File.Exists(Path.Combine(destFolder, flag)))
1987File.Create(Path.Combine(destFolder, flag));
2010string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
2025string imageFolder = Path.GetDirectoryName(dataFile);
Microsoft.ML.TestFramework (23)
BaseTestBaseline.cs (12)
37private readonly string _logRootRelPath = Path.Combine("Logs", BuildString); // Relative to OutDir.
94string baselineRootDir = Path.Combine(RootDir, TestDir, "BaselineOutput");
97_baselineCommonDir = Path.Combine(baselineRootDir, "Common");
100string logDir = Path.Combine(OutDir, _logRootRelPath);
103string logPath = Path.Combine(logDir, FullTestName + LogSuffix);
288baselinePath = Path.GetFullPath(Path.Combine(_baselineCommonDir, subDir, baselineConfigDir, name));
297return Path.GetFullPath(Path.Combine(_baselineCommonDir, subDir, name));
411Contracts.Assert(!Path.IsPathRooted(name), "file name should not be a full path");
412Contracts.Assert(!Path.IsPathRooted(nameBase), "file nameBase should not be a full path");
414string relPath = Path.Combine(dir, name);
Microsoft.ML.TestFrameworkCommon (19)
Microsoft.ML.Tests (49)
OnnxConversionTest.cs (14)
87var subDir = Path.Combine("Onnx", "Regression", "Adult");
165var subDir = Path.Combine("Onnx", "Cluster", "BreastCancer");
207var subDir = Path.Combine("Onnx", "Regression", "Adult");
442var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
584var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
610var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
635var subDir = Path.Combine("Onnx", "MultiClassClassification", "BreastCancer");
647string modelPath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".model.bin";
648string onnxPath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".model.onnx";
649string onnxJsonPath = Path.GetTempPath() + Guid.NewGuid().ToString() + ".model.onnx.json";
817var subDir = Path.Combine("Onnx", "BinaryClassification", "BreastCancer");
856var subDir = Path.Combine("Onnx", "Transforms", "Sentiment");
1172var subDir = Path.Combine("Onnx", "Transforms");
1901var subDir = Path.Combine("Onnx", "Transforms");
Microsoft.ML.TimeSeries.Tests (4)
Microsoft.ML.Tokenizers.Data.Tests (3)
Microsoft.ML.Tokenizers.Tests (38)
BpeTests.cs (9)
366using Stream vocabStream = File.OpenRead(Path.Combine(@"Gpt-2", "vocab.json"));
367using Stream mergesStream = File.OpenRead(Path.Combine(@"Gpt-2", "merges.txt"));
380string vocabFile = Path.Combine(@"Gpt-2", "vocab.json");
381string mergesFile = Path.Combine(@"Gpt-2", "merges.txt");
546using Stream vocabStream = File.OpenRead(Path.Combine(@"Gpt-2", "vocab.json"));
547using Stream mergesStream = File.OpenRead(Path.Combine(@"Gpt-2", "merges.txt"));
894BpeOptions options = new BpeOptions(Path.Combine(@"Gpt-2", "vocab.json"), Path.Combine(@"Gpt-2", "merges.txt"))
951using Stream jsonModelStream = File.OpenRead(Path.Combine(@"DeepSeek", "tokenizer-DeepSeek-R1.json"));
Microsoft.ML.TorchSharp (12)
Microsoft.ML.TorchSharp.Tests (1)
Microsoft.ML.Transforms (5)
Microsoft.ML.Vision (25)
DnnRetrainTransform.cs (16)
118var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(DnnRetrainTransformer) + "_" + Guid.NewGuid()));
130string fullFilePath = Path.Combine(tempDirPath, relativeFile);
131string fullFileDir = Path.GetDirectoryName(fullFilePath);
409var path = Path.Combine(modelDir, DefaultModelFileNames.TmpMlnetModel);
416var variablesPath = Path.Combine(modelDir, DefaultModelFileNames.VariablesFolder);
417var archivePath = Path.Combine(variablesPath + "-" + Guid.NewGuid().ToString());
420File.Copy(f, Path.Combine(archivePath, Path.GetFileName(f)));
439var destination = Path.Combine(variablesPath, DefaultModelFileNames.Data);
446var destination = Path.Combine(variablesPath, DefaultModelFileNames.Index);
533_modelLocation = Path.IsPathRooted(modelLocation) ? modelLocation : Path.Combine(Directory.GetCurrentDirectory(), modelLocation);
705Path.Combine(_modelLocation, DefaultModelFileNames.Graph),
706Path.Combine(_modelLocation, DefaultModelFileNames.VariablesFolder, DefaultModelFileNames.Data),
707Path.Combine(_modelLocation, DefaultModelFileNames.VariablesFolder, DefaultModelFileNames.Index),
ImageClassificationTrainer.cs (9)
537_resourcePath = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, "MLNET");
570_checkpointPath = Path.Combine(_options.WorkspacePath, _options.FinalModelPrefix +
572_sizeFile = Path.Combine(_options.WorkspacePath, "TrainingSetSize.txt");
668string trainSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
671string validationSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
856Path.Combine(_options.WorkspacePath, _options.ValidationSetBottleneckCachedValuesFileName),
954trainWriter = tf.summary.FileWriter(Path.Combine(_options.WorkspacePath, "train"),
1149var evalGraph = LoadMetaGraph(Path.Combine(_resourcePath, ModelFileName[_options.Arch]));
1313var modelFilePath = Path.Combine(_resourcePath, modelFileName);
Microsoft.NET.Build.Containers (21)
Microsoft.NET.Build.Extensions.Tasks (9)
Microsoft.NET.Build.Tasks (235)
FrameworkPackages\FrameworkPackages.cs (8)
128var packsFolder = Path.Combine(targetingPackRoot, frameworkName + ".Ref");
129var originalPacksFolder = Path.Combine(targetingPackRoot.OriginalValue, frameworkName + ".Ref");
135log.LogMessage("Pack directories found: {0}", string.Join(Environment.NewLine, packDirectories.Select(d => Path.Combine(originalPacksFolder, Path.GetFileName(d)))));
137.Select(d => (Overrides: Path.Combine(d, "data", "PackageOverrides.txt"), OriginalOverrides: Path.Combine(originalPacksFolder, Path.GetFileName(d), "data", "PackageOverrides.txt"), Version: ParseVersion(Path.GetFileName(d))))
PrepareForReadyToRunCompilation.cs (26)
170var outputR2RImage = Path.Combine(OutputPath, outputR2RImageRelativePath);
182outputPDBImage = Path.ChangeExtension(outputR2RImage, "ni.pdb");
183outputPDBImageRelativePath = Path.ChangeExtension(outputR2RImageRelativePath, "ni.pdb");
184crossgen1CreatePDBCommand = $"/CreatePDB \"{Path.GetDirectoryName(outputPDBImage)}\"";
205outputPDBImage = Path.ChangeExtension(outputR2RImage, perfmapExtension);
206outputPDBImageRelativePath = Path.ChangeExtension(outputR2RImageRelativePath, perfmapExtension);
207crossgen1CreatePDBCommand = $"/CreatePerfMap \"{Path.GetDirectoryName(outputPDBImage)}\"";
250r2rFileToPublish.ItemSpec = Path.Combine(OutputPath, Path.GetFileName(outputR2RImageRelativePath));
259r2rFileToPublish.ItemSpec = Path.Combine(OutputPath, Path.GetFileName(outputR2RImageRelativePath));
303MainAssembly.SetMetadata(MetadataKeys.RelativePath, Path.GetFileName(MainAssembly.ItemSpec));
306compositeR2RImageRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, "r2r" + Path.GetExtension(compositeR2RImageRelativePath));
323compositePDBImage = Path.ChangeExtension(compositeR2RImageOutputPath, ".ni.pdb");
324compositePDBRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, ".ni.pdb");
330compositePDBImage = Path.ChangeExtension(compositeR2RImageOutputPath, perfmapExtension);
331compositePDBRelativePath = Path.ChangeExtension(compositeR2RImageRelativePath, perfmapExtension);
371r2rImageRelativePath = Path.ChangeExtension(r2rImageRelativePath, ".o");
372r2rFinalImageRelativePath = Path.ChangeExtension(r2rImageRelativePath, ".dylib");
375intermediateR2RImage = Path.Combine(OutputPath, r2rImageRelativePath);
376var r2rImageFinal = Path.Combine(OutputPath, r2rFinalImageRelativePath);
502bool excludeFromR2R = (exclusionSet != null && exclusionSet.Contains(Path.GetFileName(file.ItemSpec)));
503bool excludeFromComposite = (r2rCompositeExclusionSet != null && r2rCompositeExclusionSet.Contains(Path.GetFileName(file.ItemSpec))) || excludeFromR2R;
504bool partialImage = (partialSet != null && partialSet.Contains(Path.GetFileName(file.ItemSpec)));
508bool rootedInComposite = (r2rCompositeRootSet == null || r2rCompositeRootSet.Contains(Path.GetFileName(file.ItemSpec)));
ResolveReadyToRunCompilers.cs (26)
308_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
309_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
310_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.arm.dll");
315_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "x86_arm", "crossgen.exe");
316_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x86_arm", "native", "clrjit.dll");
317_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x86_arm", "native", "Microsoft.DiaSymReader.Native.x86.dll");
324_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
325_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
326_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.arm64.dll");
336_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "x64_arm64", "crossgen.exe");
337_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x64_arm64", "native", "clrjit.dll");
338_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", "x64_arm64", "native", "Microsoft.DiaSymReader.Native.amd64.dll");
343_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen.exe");
344_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "clrjit.dll");
347_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.amd64.dll");
351_crossgenTool.DiaSymReaderPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "Microsoft.DiaSymReader.Native.x86.dll");
361_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
362_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.so");
367_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", xarchPath, "crossgen");
368_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", xarchPath, "native", "libclrjit.so");
377_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
378_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.so");
389_crossgenTool.ToolPath = Path.Combine(_crossgenTool.PackagePath, "tools", "crossgen");
390_crossgenTool.ClrJitPath = Path.Combine(_crossgenTool.PackagePath, "runtimes", _targetRuntimeIdentifier, "native", "libclrjit.dylib");
425_crossgen2Tool.ClrJitPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", clrJitFileName);
432_crossgen2Tool.ToolPath = Path.Combine(_crossgen2Tool.PackagePath, "tools", toolFileName);
ResolveRuntimePackAssets.cs (11)
151string runtimeListPath = Path.Combine(runtimePackRoot, "data", "RuntimeList.xml");
152AbsolutePath absoluteRuntimeListPath = new(Path.Combine("data", "RuntimeList.xml"), absoluteRuntimePackRoot);
209? Path.GetFullPath(absoluteRuntimePackRoot)
210: Path.GetFullPath(new AbsolutePath(pathAttributeValue, absoluteRuntimePackRoot));
233throw new BuildErrorException($"Culture not set in runtime manifest for {Path.GetFullPath(Path.Combine(runtimePack.GetMetadata(MetadataKeys.PackageDirectory), fileElement.Attribute("Path").Value))}");
243throw new BuildErrorException($"Unrecognized file type '{typeAttributeValue}' in {Path.Combine(absoluteRuntimePackRoot.OriginalValue, absoluteRuntimeListPath.OriginalValue)}");
280assetItem.SetMetadata(MetadataKeys.DestinationSubPath, Path.GetFileName(assetPath));
284assetItem.SetMetadata(MetadataKeys.DestinationSubDirectory, culture + Path.DirectorySeparatorChar);
285assetItem.SetMetadata(MetadataKeys.DestinationSubPath, Path.Combine(culture, Path.GetFileName(assetPath)));
ResolveTargetingPackAssets.cs (13)
212Path.Combine(targetingPackRoot.OriginalValue, "ref", targetingPackTargetFramework));
220Path.Combine(targetingPackRoot.OriginalValue, "ref", targetingPackTargetFramework));
223string targetingPackOriginalDataPath = Path.Combine(targetingPackRoot.OriginalValue, "data");
226Path.Combine(targetingPackOriginalDataPath, "PlatformManifest.txt"));
229Path.Combine(targetingPackOriginalDataPath, "PackageOverrides.txt"));
232Path.Combine(targetingPackOriginalDataPath, "FrameworkList.xml"));
309Path.Combine(targetingPackRoot.OriginalValue, "build", targetingPackTargetFramework, "ref"));
313string itemSpec = Path.Combine(targetingPackAssetPath.OriginalValue, Path.GetFileName(dll));
321if (!Path.GetFileName(dll).Equals("netstandard.dll", StringComparison.OrdinalIgnoreCase))
410Path.Combine(definition.TargetingPackRoot.OriginalValue, fileElement.Attribute("Path").Value) :
467string dllPath = Path.Combine(targetingPackDllFolder, assemblyName + ".dll");
477var dllPath = Path.Combine(targetingPackDllFolder, assemblyName + ".dll");
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (28)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
109var knownManifestIdsFilePath = Path.Combine(_sdkRootPath, "sdk", sdkVersion, "KnownWorkloadManifests.txt");
112knownManifestIdsFilePath = Path.Combine(_sdkRootPath, "sdk", sdkVersion, "IncludedWorkloadManifests.txt");
130_manifestRoots = manifestDirectoryEnvironmentVariable.Split(Path.PathSeparator)
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
363AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory));
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
392directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory;
452AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir));
480string manifestId = Path.GetFileName(manifestDirectory);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
491return (directory: dir, version: Path.GetFileName(dir));
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
526.Select(dir => Path.GetFileName(dir))
532.Select(featureBand => (featureBand, manifestDirectory: Path.Combine(sdkManifestPath, featureBand.ToString(), manifestId)))
557var specifiedManifestDirectory = Path.Combine(manifestDirectory, manifestSpecifier.FeatureBand.ToString(), manifestSpecifier.Id.ToString(),
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
624var featureBandDirectoryName = Path.GetFileName(featureBandDirectory);
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
639var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
668string globalJsonPath = Path.Combine(directory, "global.json");
673directory = Path.GetDirectoryName(directory);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadInstallType.cs (3)
29dotnetDir is not null && File.Exists(Path.Combine(
40return Path.Combine(dotnetDir, "metadata", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
44return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (6)
30string runtimeIdentifierChainPath = Path.Combine(dotnetRootPath, "sdk", sdkVersion, "NETCoreSdkRuntimeIdentifierChain.txt");
48workloadRootPaths = packRootEnvironmentVariable!.Split(Path.PathSeparator).Select(path => new WorkloadRootPath(path, false)).Concat(workloadRootPaths).ToArray();
329packPath = Path.Combine(rootPath.Path, "packs", resolvedPackageId.ToString(), packageVersion);
333packPath = Path.Combine(rootPath.Path, "template-packs", resolvedPackageId.GetNuGetCanonicalId() + "." + packageVersion.ToLowerInvariant() + ".nupkg");
337packPath = Path.Combine(rootPath.Path, "library-packs", resolvedPackageId.GetNuGetCanonicalId() + "." + packageVersion.ToLowerInvariant() + ".nupkg");
341packPath = Path.Combine(rootPath.Path, "tool-packs", resolvedPackageId.ToString(), packageVersion);
Microsoft.NET.HostModel (7)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (20)
Microsoft.NET.Sdk.Publish.Tasks (57)
Microsoft.NET.Sdk.Razor.Tasks (23)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (72)
Microsoft.NET.Sdk.WorkloadManifestReader (46)
SdkDirectoryWorkloadManifestProvider.cs (28)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
109var knownManifestIdsFilePath = Path.Combine(_sdkRootPath, "sdk", sdkVersion, "KnownWorkloadManifests.txt");
112knownManifestIdsFilePath = Path.Combine(_sdkRootPath, "sdk", sdkVersion, "IncludedWorkloadManifests.txt");
130_manifestRoots = manifestDirectoryEnvironmentVariable.Split(Path.PathSeparator)
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
363AddManifest(id, finalManifestDirectory, featureBand, version ?? Path.GetFileName(manifestDirectory));
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
392directoriesWithManifests[Path.GetFileName(workloadManifestDirectory)] = workloadManifestDirectory;
452AddManifest(missingManifestId, manifestDir, featureBand, Path.GetFileName(manifestDir));
480string manifestId = Path.GetFileName(manifestDirectory);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
491return (directory: dir, version: Path.GetFileName(dir));
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
526.Select(dir => Path.GetFileName(dir))
532.Select(featureBand => (featureBand, manifestDirectory: Path.Combine(sdkManifestPath, featureBand.ToString(), manifestId)))
557var specifiedManifestDirectory = Path.Combine(manifestDirectory, manifestSpecifier.FeatureBand.ToString(), manifestSpecifier.Id.ToString(),
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
624var featureBandDirectoryName = Path.GetFileName(featureBandDirectory);
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
639var workloadSetVersion = Path.GetFileName(workloadSetDirectory);
668string globalJsonPath = Path.Combine(directory, "global.json");
673directory = Path.GetDirectoryName(directory);
WorkloadInstallType.cs (3)
29dotnetDir is not null && File.Exists(Path.Combine(
40return Path.Combine(dotnetDir, "metadata", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
44return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
WorkloadResolver.cs (6)
30string runtimeIdentifierChainPath = Path.Combine(dotnetRootPath, "sdk", sdkVersion, "NETCoreSdkRuntimeIdentifierChain.txt");
48workloadRootPaths = packRootEnvironmentVariable!.Split(Path.PathSeparator).Select(path => new WorkloadRootPath(path, false)).Concat(workloadRootPaths).ToArray();
329packPath = Path.Combine(rootPath.Path, "packs", resolvedPackageId.ToString(), packageVersion);
333packPath = Path.Combine(rootPath.Path, "template-packs", resolvedPackageId.GetNuGetCanonicalId() + "." + packageVersion.ToLowerInvariant() + ".nupkg");
337packPath = Path.Combine(rootPath.Path, "library-packs", resolvedPackageId.GetNuGetCanonicalId() + "." + packageVersion.ToLowerInvariant() + ".nupkg");
341packPath = Path.Combine(rootPath.Path, "tool-packs", resolvedPackageId.ToString(), packageVersion);
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (20)
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (8)
21.Where(band => Directory.Exists(Path.Combine(band, InstalledWorkloadDir)) && Directory.GetFiles(Path.Combine(band, InstalledWorkloadDir)).Any())
22.Select(path => new SdkFeatureBand(Path.GetFileName(path)));
32var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir);
36.Select(file => new WorkloadId(Path.GetFileName(file)));
46var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir, workloadId.ToString());
49var pathDir = Path.GetDirectoryName(path);
60var path = Path.Combine(_workloadMetadataDir, featureBand.ToString(), InstalledWorkloadDir, workloadId.ToString());
Microsoft.Private.Windows.Core (1)
src\winforms\src\Microsoft.Private.Windows.Polyfills\System\IO\PathExtensions.cs (1)
8extension(Path)
Microsoft.SourceLink.AzureDevOpsServer.Git (8)
Microsoft.SourceLink.AzureRepos.Git (8)
Microsoft.SourceLink.Bitbucket.Git (8)
Microsoft.SourceLink.Common (8)
Microsoft.SourceLink.Gitea (8)
Microsoft.SourceLink.Gitee (8)
Microsoft.SourceLink.GitHub (8)
Microsoft.SourceLink.GitLab (8)
Microsoft.SourceLink.GitWeb (8)
Microsoft.TemplateEngine.Cli (20)
Microsoft.TemplateEngine.Core (9)
Microsoft.TemplateEngine.Edge (29)
Microsoft.TemplateEngine.IDE (2)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (5)
Microsoft.TemplateEngine.Utils (31)
InMemoryFileSystem.cs (15)
22_root = new FileSystemDirectory(Path.GetFileName(root.TrimEnd('/', '\\')), root);
26_root = new FileSystemDirectory(Path.GetFileName(newRoot.TrimEnd('/', '\\')), newRoot);
53dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
77dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
86targetFile = new FileSystemFile(parts[parts.Length - 1], Path.Combine(currentDir.FullPath, parts[parts.Length - 1]));
451dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
507dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
565dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
597dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
628dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
659dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
699if (!Path.IsPathRooted(path))
701path = Path.Combine(GetCurrentDirectory(), path);
742processedPath = string.Join(Path.DirectorySeparatorChar + string.Empty, realParts);
743if (processedPath.Equals(_root.FullPath) || processedPath.StartsWith(_root.FullPath.TrimEnd('/', '\\') + Path.DirectorySeparatorChar))
Microsoft.TemplateSearch.Common (2)
Microsoft.TestPlatform.Build (1)
Microsoft.TestPlatform.CommunicationUtilities (2)
Microsoft.TestPlatform.CoreUtilities (14)
Microsoft.TestPlatform.CrossPlatEngine (47)
Microsoft.TestPlatform.Extensions.BlameDataCollector (23)
Microsoft.TestPlatform.PlatformAbstractions (15)
Microsoft.TestPlatform.TestHostRuntimeProvider (33)
Microsoft.TestPlatform.Utilities (10)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (1)
Microsoft.VisualBasic.Core (78)
Microsoft\VisualBasic\FileIO\FileSystem.vb (60)
71baseDirectory = IO.Path.GetFullPath(baseDirectory) ' Throw exceptions if BaseDirectoryPath is invalid.
73Return NormalizePath(IO.Path.Combine(baseDirectory, relativePath))
92(file.EndsWith(IO.Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase) Or
93file.EndsWith(IO.Path.AltDirectorySeparatorChar, StringComparison.OrdinalIgnoreCase)) Then
223Return IO.Path.GetFileName(path)
234''' <exception cref="IO.Path.GetFullPath">See IO.Path.GetFullPath: If path is an invalid path.</exception>
241IO.Path.GetFullPath(path)
246Return IO.Path.GetDirectoryName(path.TrimEnd(
247IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar))
476directory = IO.Path.GetFullPath(directory)
545''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath() exceptions: if FilePath is invalid.</exception>
656''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath exceptions: If directory is invalid.</exception>
663directory = IO.Path.GetFullPath(directory)
699''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath exceptions: If file is invalid.</exception>
837''' <exception cref="IO.Path.GetFullPath">See IO.Path.GetFullPath for possible exceptions.</exception>
840Return GetLongPath(RemoveEndingSeparator(IO.Path.GetFullPath(Path)))
852If path.EndsWith(IO.Path.DirectorySeparatorChar, StringComparison.Ordinal) Or
853path.EndsWith(IO.Path.AltDirectorySeparatorChar, StringComparison.Ordinal) Then
883''' <exception cref="IO.Path.GetFullPath">IO.Path.GetFullPath exceptions: If SourceDirectoryPath or TargetDirectoryPath is invalid.
938If TargetDirectoryFullPath.Chars(SourceDirectoryFullPath.Length) = IO.Path.DirectorySeparatorChar Then
965Debug.Assert(sourceDirectoryPath <> "" And IO.Path.IsPathRooted(sourceDirectoryPath), "Invalid Source")
966Debug.Assert(targetDirectoryPath <> "" And IO.Path.IsPathRooted(targetDirectoryPath), "Invalid Target")
1041CopyOrMoveFile(Operation, SubFilePath, IO.Path.Combine(SourceDirectoryNode.TargetPath, IO.Path.GetFileName(SubFilePath)),
1083''' <exception cref="IO.Path.GetFullPath">
1186Dim directoryFullPath As String = IO.Path.GetFullPath(directory)
1267Debug.Assert(FilePath <> "" AndAlso IO.Path.IsPathRooted(FilePath), FilePath)
1449Debug.Assert(Path <> "" AndAlso IO.Path.IsPathRooted(Path), Path)
1450Debug.Assert(Path.Equals(IO.Path.GetFullPath(Path)), Path)
1464Dim FullPath As String = RemoveEndingSeparator(IO.Path.GetFullPath(IO.Path.Combine(Path, NewName)))
1485Debug.Assert(Not FullPath = "" AndAlso IO.Path.IsPathRooted(FullPath), "Must be full path")
1497Debug.Assert(DInfo.GetFiles(IO.Path.GetFileName(FullPath)).Length = 1, "Must found exactly 1")
1498Return DInfo.GetFiles(IO.Path.GetFileName(FullPath))(0).FullName
1500Debug.Assert(DInfo.GetDirectories(IO.Path.GetFileName(FullPath)).Length = 1,
1502Return DInfo.GetDirectories(IO.Path.GetFileName(FullPath))(0).FullName
1538Path1 = Path1.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1539Path2 = Path2.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1540Return String.Equals(IO.Path.GetPathRoot(Path1), IO.Path.GetPathRoot(Path2), StringComparison.OrdinalIgnoreCase)
1556If Not IO.Path.IsPathRooted(Path) Then
1560Path = Path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1561Return String.Equals(Path, IO.Path.GetPathRoot(Path), StringComparison.OrdinalIgnoreCase)
1571If IO.Path.IsPathRooted(Path) Then
1576If Path.Equals(IO.Path.GetPathRoot(Path), StringComparison.OrdinalIgnoreCase) Then
1582Return Path.TrimEnd(IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar)
1602Debug.Assert(FullSourcePath <> "" And IO.Path.IsPathRooted(FullSourcePath), "Invalid FullSourcePath")
1603Debug.Assert(FullTargetPath <> "" And IO.Path.IsPathRooted(FullTargetPath), "Invalid FullTargetPath")
1667Debug.Assert(FullPath <> "" And IO.Path.IsPathRooted(FullPath), "FullPath must be a full path")
2056IO.Path.DirectorySeparatorChar, IO.Path.AltDirectorySeparatorChar, IO.Path.VolumeSeparatorChar}
2097Debug.Assert(TargetDirectoryPath <> "" And IO.Path.IsPathRooted(TargetDirectoryPath), "Invalid TargetPath")
2103Dim SubTargetDirPath As String = IO.Path.Combine(m_TargetPath, IO.Path.GetFileName(SubDirPath))
Microsoft.VisualBasic.Forms (16)
Microsoft.VisualStudio.TestPlatform.Client (6)
Microsoft.VisualStudio.TestPlatform.Common (26)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (4)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (43)
Microsoft.VisualStudio.TestPlatform.ObjectModel (10)
Microsoft.Web.XmlTransform (3)
Mono.Cecil (8)
MSBuild (39)
XMake.cs (16)
164s_exePath = Path.GetDirectoryName(typeof(MSBuildApp).GetAssemblyPath());
2730Console.WriteLine($"{Path.Combine(s_exePath, s_exeName)} {equivalentCommandLine} {projectFile}");
3540if (!extensionsToIgnore.Contains(Path.GetExtension(s)) && !s.EndsWith("~", StringComparison.CurrentCultureIgnoreCase))
3555if (!extensionsToIgnore.Contains(Path.GetExtension(s)))
3573string solutionName = Path.GetFileNameWithoutExtension(actualSolutionFiles[0]);
3574string projectName = Path.GetFileNameWithoutExtension(actualProjectFiles[0]);
3593string firstPotentialProjectExtension = Path.GetExtension(actualProjectFiles[0]);
3594string secondPotentialProjectExtension = Path.GetExtension(actualProjectFiles[1]);
3648|| Path.IsPathRooted(projectFile)
3657if (string.IsNullOrEmpty(logicalCurrentDirectory) || !Path.IsPathRooted(logicalCurrentDirectory))
3671string rebasedProjectFile = Path.GetFullPath(Path.Combine(logicalCurrentDirectory, projectFile));
3695InitializationException.VerifyThrow(string.Equals(extension, Path.GetExtension(extension), StringComparison.OrdinalIgnoreCase), "InvalidExtensionToIgnore", extension, null, false);
4151if (!string.IsNullOrEmpty(logFileName) && !Path.IsPathRooted(logFileName))
4154$"logFile={Path.Combine(Directory.GetCurrentDirectory(), logFileName)}");
4171fileParameters += $"logFile={Path.Combine(Directory.GetCurrentDirectory(), msbuildLogFileName)}";
MSBuild.Coordinator (1)
mscorlib (1)
netstandard (1)
NuGet.Build.Tasks (34)
NuGet.Build.Tasks.Console (15)
MSBuildStaticGraphRestore.cs (14)
145if ((string.Equals(Path.GetExtension(entryProjectFilePath), ".sln", StringComparison.OrdinalIgnoreCase)
146|| string.Equals(Path.GetExtension(entryProjectFilePath), ".slnx", StringComparison.OrdinalIgnoreCase))
622: Path.GetDirectoryName(solutionDir);
637return outputPath == null ? null : Path.GetFullPath(Path.Combine(project.Directory, outputPath));
644return outputPath == null ? null : Path.GetFullPath(Path.Combine(projectDirectory, outputPath));
716var extension = Path.GetExtension(entryProjectPath);
912var message = string.Format(CultureInfo.CurrentCulture, Strings.Error_ReadingProjectInformation, projectName ?? Path.GetFileNameWithoutExtension(projectPath), innerException.Message);
932outputPath ??= Path.Combine(projectDirectory, "obj");
937Name = projectName ?? Path.GetFileNameWithoutExtension(projectPath),
1487LoggingQueue.Enqueue(new ConsoleOutLogEmbedInBinlog(Path.Combine(project.RestoreMetadata.OutputPath, LockFileFormat.AssetsFileName)));
1494LoggingQueue.Enqueue(new ConsoleOutLogEmbedInBinlog(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))));
NuGet.Build.Tasks.Pack (40)
PackTaskLogic.cs (32)
108var assetsFilePath = Path.Combine(request.RestoreOutputPath, LockFileFormat.AssetsFileName);
344string assetsFilePath = Path.Combine(request.RestoreOutputPath, LockFileFormat.AssetsFileName);
542targetPath = Path.GetFileName(finalOutputPath);
620packArgs.CurrentDirectory = Path.Combine(
622request.PackItem.GetProperty("Directory")).TrimEnd(Path.DirectorySeparatorChar);
639if (Path.IsPathRooted(request.NuspecOutputPath))
645packArgs.PackTargetArgs.NuspecOutputPath = Path.Combine(
716var fileName = Path.GetFileName(sourcePath);
720Compare(Path.GetExtension(fileName),
721Path.GetExtension(targetPath)) == 0
722&& !string.IsNullOrEmpty(Path.GetExtension(fileName))
724: Path.Combine(targetPath, recursiveDir));
744if (setOfTargetPaths.Remove("contentFiles" + Path.DirectorySeparatorChar)
750Path.Combine("contentFiles", language, framework.GetShortFolderName()
764!Path.GetFileName(sourcePath)
771if (Path.IsPathRooted(identity))
774identity = Path.GetDirectoryName(identity);
778else if (identity.EndsWith(Path.GetFileName(sourcePath), StringComparison.CurrentCultureIgnoreCase))
780identity = Path.GetDirectoryName(identity);
785var newTargetPath = Path.Combine(targetPath, identity);
802var fileName = Path.GetFileName(sourcePath);
803if (string.IsNullOrEmpty(Path.GetExtension(fileName)) ||
804!Path.GetExtension(fileName)
805.Equals(Path.GetExtension(targetPath), StringComparison.OrdinalIgnoreCase))
807currentPath = Path.Combine(targetPath, fileName);
829sourcePath = Path.Combine(sourceProjectFile.Replace(Path.GetFileName(sourceProjectFile), string.Empty), identity);
831return Path.GetFullPath(sourcePath);
860sourceProjectFile = Path.GetDirectoryName(sourceProjectFile);
923library => Path.GetFullPath(Path.Combine(
924Path.GetDirectoryName(assetsFile.PackageSpec.RestoreMetadata.ProjectPath),
NuGet.CommandLine.XPlat (24)
NuGet.Commands (122)
CommandRunners\PackCommandRunner.cs (30)
46@"**\*.pdb".Replace('\\', Path.DirectorySeparatorChar),
47@"src\**\*".Replace('\\', Path.DirectorySeparatorChar)
53@"content\**\*".Replace('\\', Path.DirectorySeparatorChar),
54@"tools\**\*.ps1".Replace('\\', Path.DirectorySeparatorChar)
87var result = BuildPackage(Path.GetFullPath(Path.Combine(_packArgs.CurrentDirectory, _packArgs.Path)));
93string extension = Path.GetExtension(path);
117Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
202Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
204string resolvedNuSpecOutputPath = Path.Combine(
205Path.GetDirectoryName(outputPath),
230string tempOutputPath = Path.Combine(
232Path.GetRandomFileName());
250Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
252string sha512OutputPath = Path.Combine(outputPath + ".sha512");
256string tempOutputPath = Path.Combine(
258Path.GetRandomFileName());
571WriteLine(Strings.Log_PackageCommandAttemptingToBuildSymbolsPackage, Path.GetFileName(path));
706var fileName = Path.GetFileName(filePath);
748path = path.Substring(index + basePath.Length).TrimStart(Path.DirectorySeparatorChar);
823List<IPackageFile> toRemove = files.Where(t => !string.Equals(Path.GetExtension(t.Path), ".pdb", StringComparison.OrdinalIgnoreCase)).ToList();
876return Path.Combine(finalOutputDirectory, outputFile);
911string directory = Path.GetDirectoryName(packArgs.Path);
919packArgs.OutputDirectory = Path.GetFullPath(packArgs.OutputDirectory);
924packArgs.BasePath = Path.GetFullPath(packArgs.BasePath);
948List<string> candidates = files.Where(file => AllowedExtensions.Contains(Path.GetExtension(file))).ToList();
953!Path.GetFileName(ext).Equals(ProjectJsonPathUtilities.ProjectConfigFileName, StringComparison.OrdinalIgnoreCase) &&
967candidates.RemoveAll(file => Path.GetExtension(file).Equals(NuGetConstants.ManifestExtension, StringComparison.OrdinalIgnoreCase));
975candidates.RemoveAll(file => Path.GetExtension(file).Equals(".json", StringComparison.OrdinalIgnoreCase));
987return Path.Combine(packArgs.CurrentDirectory, result);
MSBuildProjectFactory.cs (19)
103var manifestDirectory = Path.GetDirectoryName(manifestPath);
134var extension = Path.GetExtension(file.FinalOutputPath);
148Target = IsTool ? Path.Combine(targetFolders[i], targetPath) : Path.Combine(targetFolders[i], tfm, targetPath)
160var fileExtension = Path.GetExtension(packageFile.Source);
195Target = target.EndsWith(Path.DirectorySeparatorChar.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal) || string.IsNullOrEmpty(target)
196? Path.Combine(target, Path.GetFileName(sourcePath))
204var includePath = PathUtility.GetRelativePath("contentFiles" + Path.DirectorySeparatorChar, packageFile.Target, '/');
207if (!Path.GetExtension(includePath)
208.Equals(Path.GetExtension(sourcePath), StringComparison.OrdinalIgnoreCase))
210includePath = Path.Combine(includePath, Path.GetFileName(sourcePath));
258var projectName = Path.GetFileName(projectDirectory);
259var targetPath = Path.Combine(SourcesFolder, projectName);
270var relativePath = Path.GetDirectoryName(sourcePath).Replace(projectDirectoryWithSeparatorChar, string.Empty, StringComparison.Ordinal);
282targetPath = Path.Combine(targetPath, relativePath);
285var finalTargetPath = Path.Combine(targetPath, Path.GetFileName(sourcePath));
RestoreCommand\Utility\LockFileUtils.cs (14)
312if (Path.GetFileName(btItem.Path).Equals(Path.GetFileName(buildItem.Path), StringComparison.OrdinalIgnoreCase))
450lockFileLib.RuntimeAssemblies = lockFileLib.RuntimeAssemblies.Where(p => !p.Path.StartsWith("lib/", StringComparison.Ordinal) || referenceFilter.Contains(Path.GetFileName(p.Path))).ToList();
451lockFileLib.CompileTimeAssemblies = lockFileLib.CompileTimeAssemblies.Where(p => !p.Path.StartsWith("lib/", StringComparison.Ordinal) || referenceFilter.Contains(Path.GetFileName(p.Path))).ToList();
637string relativePath = PathUtility.GetPathWithForwardSlashes(Path.Combine("bin", "placeholder", $"{localMatch.Library.Name}.dll"));
805int lastSeparator = path.LastIndexOf(Path.AltDirectorySeparatorChar);
809int separator = path.IndexOf(Path.AltDirectorySeparatorChar, segmentStart);
878Path.GetFileName(c.Path),
889Path.GetFileName(c.Path),
979var fileName = Path.GetFileName(firstItem.Path);
1145if (Path.DirectorySeparatorChar == '/')
1150return path.Replace('/', Path.DirectorySeparatorChar);
1235item => Path.GetFileName(item.Path).Equals(Path.GetFileName(currentBuildItem.Path), StringComparison.OrdinalIgnoreCase));
NuGet.Common (108)
PathUtil\NuGetEnvironment.cs (18)
64var tempPath = Path.GetTempPath();
68nuGetScratch = Path.Combine(tempPath,
113return Path.Combine(machineWideBaseDir,
117return Path.Combine(
122return Path.Combine(
127return Path.Combine(
134return Path.Combine(
141return Path.Combine(
150return Path.Combine(
157return Path.Combine(
171return Path.Combine(programFilesPath, "MSBuild", "14.0", "Bin", "MSBuild.exe");
238return Path.Combine(_getHome.Value, ".nuget");
254return Path.Combine(_getHome.Value, ".local", "share");
361foreach (var dir in path.Split(Path.PathSeparator))
363var fullPath = Path.Combine(dir, executable);
375var fullPath = Path.Combine(programFiles, DotNet, DotNetExe);
385var fullPath = Path.Combine(programFiles, DotNet, DotNetExe);
397var fullPath = Path.Combine(localBin, DotNet);
PathUtil\PathUtility.cs (31)
99return EnsureTrailingCharacter(path, Path.DirectorySeparatorChar);
140dir = Path.GetFullPath(dir);
142candidate = Path.GetFullPath(candidate);
163return (ch == Path.DirectorySeparatorChar ||
164ch == Path.AltDirectorySeparatorChar);
168return ch == Path.DirectorySeparatorChar;
174string? directory = Path.GetDirectoryName(filePath);
190return GetRelativePath(path1, path2, Path.DirectorySeparatorChar);
213if (!string.Equals(Path.GetPathRoot(path1), Path.GetPathRoot(path2), compare))
225var path1Segments = path1.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
226var path2Segments = path2.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
298path = path.TrimEnd(Path.DirectorySeparatorChar);
299string? fullDirectoryPath = Path.GetDirectoryName(path);
304return path.Substring(fullDirectoryPath.Length).Trim(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
314if (Path.DirectorySeparatorChar == '/')
334return Uri.UnescapeDataString(path.Replace('/', Path.DirectorySeparatorChar));
378var folder = path.Split(new[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault() ?? string.Empty;
380folder = Path.DirectorySeparatorChar + folder + Path.DirectorySeparatorChar;
382var root = Path.GetPathRoot(path);
417basePath = basePath.TrimEnd(Path.DirectorySeparatorChar);
423return path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
428return path.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
485string? parentDirectory = Path.GetFullPath(path);
494parentDirectory = Path.GetDirectoryName(parentDirectory);
NuGet.Configuration (52)
Settings\Settings.cs (25)
471.OrderByDescending(file => file.FullName.Count(c => c == Path.DirectorySeparatorChar))
556var defaultSettingsFilePath = Path.Combine(userSettingsDir, DefaultSettingsFileName);
588Path.Combine(rootDirectory, configFileName));
602? Path.Combine(rootDirectory, "TestingGlobalPath")
608return Path.Combine(userSettingsDirectory, ConfigurationConstants.Config);
635var combinedPath = Path.Combine(paths);
654var index = combinedPath.LastIndexOf(Path.DirectorySeparatorChar);
685if (Path.IsPathRooted(settingsPath))
687fileName = Path.GetFileName(settingsPath);
688directory = Path.GetDirectoryName(settingsPath)!;
692var fullPath = Path.Combine(root ?? string.Empty, settingsPath);
693fileName = Path.GetFileName(fullPath);
694directory = Path.GetDirectoryName(fullPath)!;
748var rawPath = Path.Combine(originDirectoryPath, ResolvePath(Path.GetDirectoryName(originFilePath)!, path));
766root = Path.GetPathRoot(value)!;
780&& (root[0] == Path.DirectorySeparatorChar || value[0] == Path.AltDirectorySeparatorChar))
782return Path.Combine(Path.GetPathRoot(configDirectory)!, value.Substring(1));
784return Path.Combine(configDirectory, value);
793if (!Path.IsPathRooted(settingsPath) && !string.IsNullOrWhiteSpace(settingsRoot))
795settingsPath = Path.Combine(settingsRoot, settingsPath);
844var file = Path.Combine(directory, nugetConfigCasing);
860current = Path.GetDirectoryName(current);
NuGet.Credentials (3)
NuGet.PackageManagement (88)
Projects\FolderNuGetProject.cs (11)
155nuGetProjectContext.Log(MessageLevel.Info, Strings.AddingPackageToFolder, packageIdentity, Path.GetFullPath(Root));
215nuGetProjectContext.Log(MessageLevel.Info, Strings.AddedPackageToFolder, packageIdentity, Path.GetFullPath(Root));
221nuGetProjectContext.Log(MessageLevel.Debug, Strings.AddedPackageToFolderFromSource, packageIdentity, Path.GetFullPath(Root), downloadResourceResult.PackageSource);
432var installPath = Path.GetFullPath(Path.Combine(packageDirectory, packageName));
488var installPath = Path.GetFullPath(Path.Combine(packageDirectory, manifestName));
517var filePath = Path.GetFullPath(Path.Combine(packageDirectory, fileName));
546return Path.GetDirectoryName(installFilePath);
583var packageDirectoryPath = Path.GetDirectoryName(packageFilePath);
Projects\PackagesConfigNuGetProject.cs (6)
76PackagesConfigPath = Path.Combine(folderPath, "packages.config");
79PackagesProjectNameConfigPath = Path.Combine(folderPath, "packages." + projectName + ".config");
125nuGetProjectContext.Log(MessageLevel.Warning, Strings.PackageAlreadyExistsInPackagesConfig, packageIdentity, Path.GetFileName(FullPath));
181nuGetProjectContext.Log(MessageLevel.Info, Strings.AddedPackageToPackagesConfig, packageIdentity, Path.GetFileName(FullPath));
202nuGetProjectContext.Log(MessageLevel.Warning, Strings.PackageDoesNotExisttInPackagesConfig, packageIdentity, Path.GetFileName(FullPath));
235nuGetProjectContext.Log(MessageLevel.Info, Strings.RemovedPackageFromPackagesConfig, packageIdentity, Path.GetFileName(FullPath));
Utility\FileSystemUtility.cs (28)
46return Path.Combine(root, path);
72|| string.IsNullOrEmpty(Path.GetFileName(path)))
77Directory.CreateDirectory(GetFullPath(root, Path.GetDirectoryName(path)));
96var folderPath = Path.GetDirectoryName(path);
100nuGetProjectContext.Log(MessageLevel.Debug, Strings.Debug_AddedFileToFolder, Path.GetFileName(path), folderPath);
104nuGetProjectContext.Log(MessageLevel.Debug, Strings.Debug_AddedFile, Path.GetFileName(path));
127if (string.IsNullOrEmpty(Path.GetFileName(fullPath)))
142if (string.IsNullOrEmpty(Path.GetFileName(fullPath)))
148Directory.CreateDirectory(Path.GetDirectoryName(fullPath));
155|| string.IsNullOrEmpty(Path.GetFileName(fullPath)))
170path = PathUtility.EnsureTrailingSlash(Path.Combine(root, path));
188trimmedPaths.Add(filePath.Substring(root.Length).TrimStart(Path.DirectorySeparatorChar));
192trimmedPaths.Add(filePath.TrimStart(Path.DirectorySeparatorChar));
224var folderPath = Path.GetDirectoryName(fullPath);
230Path.GetFileName(fullPath),
231Path.GetFullPath(folderPath));
235nuGetProjectContext.Log(MessageLevel.Debug, Strings.Debug_RemovedFile, Path.GetFileName(fullPath));
273var directoryLookup = filesToDelete.ToLookup(p => Path.GetDirectoryName(p));
285var dirPath = Path.Combine(packagesDir, directory);
294var path = Path.Combine(packagesDir, file);
303DeleteDirectorySafe(Path.Combine(packagesDir, dirPath), recursive: false, nuGetProjectContext: nuGetProjectContext);
398for (var path = Path.GetDirectoryName(filePath); !string.IsNullOrEmpty(path); path = Path.GetDirectoryName(path))
466foreach (var index in IndexOfAll(path, altDirectorySeparator ? Path.AltDirectorySeparatorChar : Path.DirectorySeparatorChar))
491return fullPath.TrimStart(Path.DirectorySeparatorChar);
493return fullPath.Substring(root.Length).TrimStart(Path.DirectorySeparatorChar);
498return fullPath.Substring(root.Length).TrimStart(Path.DirectorySeparatorChar);
NuGet.Packaging (137)
PackageCreation\Authoring\PackageBuilder.cs (22)
50: this(path, Path.GetDirectoryName(path)!, propertyProvider, includeEmptyDirectories, deterministic)
55: this(path, Path.GetDirectoryName(path)!, propertyProvider, includeEmptyDirectories, deterministic, logger, versionOverride: "")
60: this(path, Path.GetDirectoryName(path)!, propertyProvider, includeEmptyDirectories, deterministic, logger, versionOverride)
429(f.Path.StartsWith(PackagingConstants.Folders.Content + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase) ||
430f.Path.StartsWith(PackagingConstants.Folders.Tools + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase)));
440f.Path.StartsWith(PackagingConstants.Folders.Lib + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase) &&
450file.Path.StartsWith(PackagingConstants.Folders.ContentFiles + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase));
464file.Path.StartsWith(PackagingConstants.Folders.Content + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase) &&
506select Path.GetFileName(file.Path), StringComparer.OrdinalIgnoreCase);
599var ext = Path.GetExtension(licenseMetadata.License);
635var ext = Path.GetExtension(iconPath);
761var extension = Path.GetExtension(readmePath);
955var fileExtension = Path.GetExtension(file.Path);
990exclude = exclude?.Replace('\\', Path.DirectorySeparatorChar);
992List<PhysicalPackageFile> searchFiles = ResolveSearchPattern(basePath, source.Replace('\\', Path.DirectorySeparatorChar), destination, _includeEmptyDirectories).ToList();
997searchFiles.RemoveAll(file => Path.GetFileName(file.TargetPath) == PackagingConstants.PackageEmptyFileName
1050packagePath = fullPath.Substring(searchDirectory.Length).TrimStart(Path.DirectorySeparatorChar);
1052else if (!isWildcardSearch && Path.GetExtension(searchPattern).Equals(Path.GetExtension(targetPath), StringComparison.OrdinalIgnoreCase))
1060packagePath = Path.GetFileName(fullPath);
1062return Path.Combine(targetPath ?? string.Empty, packagePath);
1126var segments = path.Split(new[] { '/', '\\', Path.DirectorySeparatorChar }, StringSplitOptions.None)
NuGet.ProjectModel (13)
NuGet.Protocol (58)
Pipelines.AppHost (6)
Pipelines.Library (4)
PresentationBuildTasks (71)
PresentationCore (21)
PresentationFramework (20)
PresentationUI (11)
ReachFramework (4)
RepoTasks (42)
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (21)
111var sslCertDirs = sslCertDirString.Split(Path.PathSeparator);
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem");
242var certPath = Path.Combine(certDir, nickname) + ".pem";
356var homeDirectoryWithSlash = homeDirectory[^1] == Path.DirectorySeparatorChar
358: homeDirectory + Path.DirectorySeparatorChar;
361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..])
370var existingDirs = existingSslCertDir.Split(Path.PathSeparator);
371var certDirFullPath = Path.GetFullPath(certDir);
381return string.Equals(Path.GetFullPath(dir), certDirFullPath, StringComparison.Ordinal);
405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName);
471var certPath = Path.Combine(certDir, nickname) + ".pem";
561return Path.Combine(homeDirectory, ".pki", "nssdb");
566return Path.Combine(homeDirectory, "snap", "chromium", "current", ".pki", "nssdb");
571return Path.Combine(homeDirectory, ".mozilla", "firefox");
576return Path.Combine(homeDirectory, "snap", "firefox", "common", ".mozilla", "firefox");
600var searchFolders = searchPath.Split(Path.PathSeparator);
610if (File.Exists(Path.Combine(searchFolder, command)))
813return Path.Combine(homeDirectory, ".aspnet", "dev-certs", "trust");
845var paths = nssDbOverride.Split(Path.PathSeparator); // May be empty - the user may not want to add browser trust
848var nssDb = Path.GetFullPath(path);
1050var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
ResultsOfTGenerator (2)
Roslyn.Diagnostics.Analyzers (29)
rzc (53)
ShadowCopyManager.cs (15)
24BaseDirectory = baseDirectory ?? Path.Combine(Path.GetTempPath(), "Razor", "ShadowCopy");
27UniqueDirectory = Path.Combine(BaseDirectory, guid);
42var destination = Path.Combine(assemblyDirectory, Path.GetFileName(filePath));
45var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(filePath);
49foreach (var directory in Directory.EnumerateDirectories(Path.GetDirectoryName(filePath)))
51var directoryName = Path.GetFileName(directory);
53var resourcesPath = Path.Combine(directory, resourcesNameWithExtension);
56var resourcesShadowCopyPath = Path.Combine(assemblyDirectory, directoryName, resourcesNameWithExtension);
60resourcesPath = Path.Combine(directory, resourcesNameWithoutExtension, resourcesNameWithExtension);
63var resourcesShadowCopyPath = Path.Combine(assemblyDirectory, directoryName, resourcesNameWithoutExtension, resourcesNameWithExtension);
85var directory = Path.Combine(UniqueDirectory, id.ToString(CultureInfo.InvariantCulture));
92var directory = Path.GetDirectoryName(shadowCopyPath);
146if (!Mutex.TryOpenExisting(Path.GetFileName(directory).ToLowerInvariant(), out mutex))
sdk-tasks (66)
Stress.ApiService (2)
SuperFileCheck (6)
System.CodeDom (5)
System.CommandLine (7)
System.CommandLine.StaticCompletions (1)
System.ComponentModel.Annotations (1)
System.ComponentModel.Composition (3)
System.ComponentModel.TypeConverter (3)
System.Configuration.ConfigurationManager (41)
System.Console (4)
System.Data.Common (3)
System.Data.Odbc (1)
System.Data.OleDb (1)
System.Diagnostics.EventLog (6)
System.Diagnostics.FileVersionInfo (2)
System.Diagnostics.PerformanceCounter (4)
System.Diagnostics.Process (13)
System.Diagnostics.TextWriterTraceListener (4)
System.Drawing.Common (14)
System.Formats.Tar (68)
System.IO.Compression (2)
System.IO.Compression.ZipFile (15)
System.IO.FileSystem.AccessControl (7)
System.IO.FileSystem.DriveInfo (2)
System.IO.FileSystem.Watcher (9)
System.IO.IsolatedStorage (18)
System.IO.MemoryMappedFiles (4)
System.IO.Packaging (6)
System.IO.Pipes (8)
System.IO.Ports (2)
System.Management (1)
System.Net.Mail (8)
System.Net.NetworkInformation (3)
System.Net.Ping (2)
System.Net.Quic (2)
System.Net.Sockets (2)
System.Net.WebClient (4)
System.Private.CoreLib (155)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\File.cs (26)
55FileSystem.CopyFile(Path.GetFullPath(sourceFileName), Path.GetFullPath(destFileName), overwrite);
84FileSystem.DeleteFile(Path.GetFullPath(path));
100path = Path.GetFullPath(path);
170return SafeFileHandle.Open(Path.GetFullPath(path), mode, access, share, options, preallocationSize);
210=> FileSystem.SetCreationTime(Path.GetFullPath(path), creationTime, asDirectory: false);
241=> FileSystem.SetCreationTime(Path.GetFullPath(path), GetUtcDateTimeOffset(creationTimeUtc), asDirectory: false);
273=> FileSystem.GetCreationTime(Path.GetFullPath(path)).LocalDateTime;
298=> FileSystem.GetCreationTime(Path.GetFullPath(path)).UtcDateTime;
323=> FileSystem.SetLastAccessTime(Path.GetFullPath(path), lastAccessTime, false);
354=> FileSystem.SetLastAccessTime(Path.GetFullPath(path), GetUtcDateTimeOffset(lastAccessTimeUtc), false);
385=> FileSystem.GetLastAccessTime(Path.GetFullPath(path)).LocalDateTime;
410=> FileSystem.GetLastAccessTime(Path.GetFullPath(path)).UtcDateTime;
435=> FileSystem.SetLastWriteTime(Path.GetFullPath(path), lastWriteTime, false);
466=> FileSystem.SetLastWriteTime(Path.GetFullPath(path), GetUtcDateTimeOffset(lastWriteTimeUtc), false);
497=> FileSystem.GetLastWriteTime(Path.GetFullPath(path)).LocalDateTime;
522=> FileSystem.GetLastWriteTime(Path.GetFullPath(path)).UtcDateTime;
547=> FileSystem.GetAttributes(Path.GetFullPath(path));
571=> FileSystem.SetAttributes(Path.GetFullPath(path), fileAttributes);
1055Path.GetFullPath(sourceFileName),
1056Path.GetFullPath(destinationFileName),
1057destinationBackupFileName != null ? Path.GetFullPath(destinationBackupFileName) : null,
1077string fullSourceFileName = Path.GetFullPath(sourceFileName);
1078string fullDestFileName = Path.GetFullPath(destFileName);
1455string fullPath = Path.GetFullPath(path);
1477string fullPath = Path.GetFullPath(path);
System.Private.Windows.Core.TestUtilities (6)
System.Private.Xml (7)
System.Reflection.Metadata (3)
System.Reflection.MetadataLoadContext (4)
System.Runtime (1)
System.Runtime.Caching (2)
System.Runtime.Extensions (1)
System.Runtime.InteropServices (3)
System.Runtime.Serialization.Schema (1)
System.Security.Cryptography (1)
System.Speech (1)
System.Text.RegularExpressions (1)
System.Windows.Extensions (1)
System.Windows.Forms (24)
System.Windows.Forms.Design (3)
System.Windows.Forms.Primitives (6)
System.Xaml (1)
testhost (5)
testhost.arm64 (5)
testhost.x86 (5)
TestProject.AppHost (1)
UIAutomationClient (1)
vbc (14)
VBCSCompiler (40)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (22)
133=> Path.Combine(_cachePath, dllName, hashKey);
152var cachedAssemblyPath = Path.Combine(entryDir, AssemblyFileName);
205return !File.Exists(Path.Combine(entryDir, cachedFileName));
215copyAndUpdateTimestamp(Path.Combine(entryDir, cachedFileName), targetPath, outputTimestampUtc);
242var dllCacheDir = Path.Combine(_cachePath, dllName);
253.Select(d => (Path: d, Name: Path.GetFileName(d)))
268var keyPath = Path.Combine(entryPath, dllName + ".key");
302var dllCacheDir = Path.Combine(_cachePath, dllName);
322stagingDir = Path.Combine(dllCacheDir, hashKey + "." + Guid.NewGuid().ToString("N") + ".tmp");
325File.Copy(outputFiles.AssemblyPath, Path.Combine(stagingDir, AssemblyFileName), overwrite: false);
327tryCopyOptional(outputFiles.PdbPath, Path.Combine(stagingDir, PdbFileName));
328tryCopyOptional(outputFiles.RefAssemblyPath, Path.Combine(stagingDir, RefAssemblyFileName));
329tryCopyOptional(outputFiles.XmlDocPath, Path.Combine(stagingDir, XmlDocFileName));
331File.WriteAllText(Path.Combine(stagingDir, dllName + ".key"), deterministicKey, Encoding.UTF8);
332File.WriteAllText(Path.Combine(stagingDir, CreatedFileName), DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture));
457var path = Path.Combine(entryDir, LastUsedFileName);
488var dllName = Path.GetFileName(dllDir);
492var dirName = Path.GetFileName(entryDir);
553var lastUsedPath = Path.Combine(entryDir, LastUsedFileName);
581var createdPath = Path.Combine(entryDir, CreatedFileName);
621var dllName = Path.GetFileName(dllDir);
625var dirName = Path.GetFileName(entryDir);
vbi (3)
vstest.console (25)
vstest.console.arm64 (25)
Yarp.AppHost (1)