7333 references to Combine
AnalyzerRunner (1)
aspire (166)
Projects\DotNetBasedAppHostServerProject.cs (16)
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);
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);
576var globalNuGetPath = Path.Combine(userProfile, ".nuget");
Projects\PrebuiltAppHostServer.cs (9)
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")),
516var filePath = Path.Combine(libsPath, "_project-ref-assemblies.txt");
573Path.Combine(_workingDirectory, "appsettings.json"),
Aspire.Cli.EndToEnd.Tests (65)
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 (10)
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");
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 (592)
Agents\PlaywrightCliInstallerTests.cs (28)
19var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
69var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
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");
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}");
454await File.WriteAllTextAsync(Path.Combine(primarySkillDir, "SKILL.md"), "# Playwright CLI Skill");
455Directory.CreateDirectory(Path.Combine(primarySkillDir, "subdir"));
479context.AddSkillBaseDirectory(Path.Combine(".claude", "skills"));
480context.AddSkillBaseDirectory(Path.Combine(".github", "skills"));
481context.AddSkillBaseDirectory(Path.Combine(".opencode", "skill"));
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"));
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")));
Commands\ExportCommandTests.cs (12)
27var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
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");
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");
Commands\InitCommandTests.cs (11)
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 />");
164var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
219var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
348var appHostFile = Path.Combine(outputPath, "apphost.cs");
503var appHostFile = Path.Combine(outputPath, "apphost.cs");
Commands\NewCommandTests.cs (9)
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");
Commands\RunCommandTests.cs (24)
152var logsDirectory = Path.Combine(Path.GetTempPath(), "aspire-cli-tests");
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"
1505var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
Commands\UpdateCommandTests.cs (21)
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");
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 (9)
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);
157Assert.True(File.Exists(Path.Combine(subDir, AspireConfigFile.FileName)));
173File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), "{}");
DotNet\DotNetCliRunnerTests.cs (36)
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"));
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 (60)
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");
Packaging\NuGetConfigMergerSnapshotTests.cs (21)
47var path = Path.Combine(dir.FullName, "nuget.config");
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('\\', '/');
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('\\', '/');
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('\\', '/');
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('\\', '/');
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 (49)
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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");
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 (14)
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");
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 (54)
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"));
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"));
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"));
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"));
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"));
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"));
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 (51)
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"));
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 (19)
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 (11)
15var homeDirectory = Path.Combine(Path.GetTempPath(), "testuser");
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");
250var oldFormatSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}");
254var newFormatSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}.12345");
279var similarSocket = Path.Combine(backchannelsDir, $"auxi.sock.{hash}xyz.12345");
298var otherSocket = Path.Combine(backchannelsDir, "auxi.sock.differenthash123.99999");
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\FileSystemHelperTests.cs (44)
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")));
64Assert.Equal("root content", File.ReadAllText(Path.Combine(destDir, "root.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")));
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.Tests (9)
Aspire.Deployment.EndToEnd.Tests (62)
Aspire.EndToEnd.Tests (35)
tests\Shared\TemplatesTesting\AspireProject.cs (19)
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 />");
153File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
154string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
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";
Aspire.Hosting (46)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (12)
Aspire.Hosting.Azure.Functions (2)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Tests (33)
Aspire.Hosting.CodeGeneration.Go (2)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
Aspire.Hosting.CodeGeneration.Java (1)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
Aspire.Hosting.CodeGeneration.Python (3)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
Aspire.Hosting.CodeGeneration.Rust (2)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.CodeGeneration.TypeScript (2)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
Aspire.Hosting.Containers.Tests (11)
Aspire.Hosting.Docker (8)
Aspire.Hosting.Docker.Tests (49)
DockerComposePublisherTests.cs (37)
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");
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 (1)
Aspire.Hosting.Garnet.Tests (2)
Aspire.Hosting.JavaScript (18)
JavaScriptHostingExtensions.cs (18)
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));
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"));
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 (58)
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 (20)
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"));
290var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js");
351var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js");
455var viteConfigPath = Path.Combine(tempDir.Path, "vite.config.js");
514var viteConfigPath = Path.Combine(subDir, "vite.config.js");
589var viteConfigPath = Path.Combine(tempDir.Path, configFileName);
PackageInstallationTests.cs (7)
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");
538File.WriteAllText(Path.Combine(tempDir.Path, "pnpm-lock.yaml"), "empty");
553File.WriteAllText(Path.Combine(tempDir.Path, "bun.lock"), "empty");
Aspire.Hosting.Kafka.Tests (2)
Aspire.Hosting.Keycloak.Tests (4)
Aspire.Hosting.Kubernetes (4)
Aspire.Hosting.Kubernetes.Tests (14)
KubernetesPublisherTests.cs (11)
63var filePath = Path.Combine(tempDir.Path, expectedFile);
102var deploymentPath = Path.Combine(tempDir.Path, "templates/service/deployment.yaml");
158var filePath = Path.Combine(tempDir.Path, expectedFile);
212var filePath = Path.Combine(tempDir.Path, expectedFile);
267var filePath = Path.Combine(tempDir.Path, expectedFile);
299var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile");
394var filePath = Path.Combine(tempDir.Path, expectedFile);
438var filePath = Path.Combine(tempDir.Path, expectedFile);
495var filePath = Path.Combine(tempDir.Path, expectedFile);
549var filePath = Path.Combine(tempDir.Path, expectedFile);
606var filePath = Path.Combine(tempDir.Path, expectedFile);
Aspire.Hosting.Maui (3)
Aspire.Hosting.Maui.Tests (2)
Aspire.Hosting.Milvus.Tests (1)
Aspire.Hosting.MongoDB.Tests (5)
Aspire.Hosting.MySql.Tests (4)
Aspire.Hosting.Oracle.Tests (2)
Aspire.Hosting.PostgreSQL.Tests (7)
Aspire.Hosting.Python (15)
PythonAppResourceBuilderExtensions.cs (13)
428if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
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");
770return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
778var venvPath = Path.Combine(currentDirectory, virtualEnvironmentPath);
808return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
1163if (File.Exists(Path.Combine(workingDirectory, "pyproject.toml")))
1168else if (File.Exists(Path.Combine(workingDirectory, "requirements.txt")))
1275var fullPath = Path.Combine(directory, commandWithExt);
1288var fullPath = Path.Combine(directory, command);
Aspire.Hosting.Python.Tests (102)
AddPythonAppTests.cs (95)
28var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
66var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
266var projectDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
289var scriptPath = Path.Combine(projectDirectory, "main.py");
292var requirementsPath = Path.Combine(projectDirectory, "requirements.txt");
296var dockerFilePath = Path.Combine(projectDirectory, "Dockerfile");
419var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
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));
1024var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
1058var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
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 (1)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.RemoteHost (1)
Aspire.Hosting.RemoteHost.Tests (3)
Aspire.Hosting.Seq.Tests (2)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Testing (1)
Aspire.Hosting.Testing.Tests (4)
Aspire.Hosting.Tests (121)
Dashboard\DashboardLifecycleHookTests.cs (10)
283var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
284var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
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");
441var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard");
442var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
443var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
510var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
511var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
MSBuildTests.cs (33)
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"),
122var appHostMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "_AppHost.ProjectMetadata.g.cs"));
123var appMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "App.ProjectMetadata.g.cs"));
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 (9)
60var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
62var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
72var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
74var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
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");
232var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: Path.Combine(manifestDir, "not-used.json"), step: "publish-json-manifest");
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (2)
Aspire.Playground.Tests (2)
Aspire.Templates.Tests (44)
tests\Shared\TemplatesTesting\AspireProject.cs (19)
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 />");
153File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
154string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
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";
Aspire.TestUtilities (2)
aspire-managed (6)
Binding.UDS.IntegrationTests (2)
blazor-devserver (1)
BuildBoss (9)
BuildValidator (19)
CompilationDiff.cs (15)
219File.WriteAllText(Path.Combine(debugPath, "error.txt"), MiscErrorMessage);
227using var writer = new StreamWriter(Path.Combine(debugPath, "diagnostics.txt"), append: false);
237using var writer = new StreamWriter(Path.Combine(debugPath, "references.txt"), append: false);
282var originalDataFiles = createBuildArtifacts(Path.Combine(debugPath, "original"), assemblyFileName, originalInfo);
283var rebuildDataFiles = createBuildArtifacts(Path.Combine(debugPath, "rebuild"), assemblyFileName, rebuildInfo);
295File.WriteAllText(Path.Combine(debugPath, scriptName), $@"code --diff (Join-Path $PSScriptRoot ""{originalFilePath}"") (Join-Path $PSScriptRoot ""{rebuildFilePath}"")");
299var sourcesPath = Path.Combine(debugPath, "sources");
305var sourceFilePath = Path.Combine(sourcesPath, Path.GetFileName(tree.FilePath));
316var assemblyFilePath = Path.Combine(outputPath, assemblyFileName);
318AssemblyMdvFilePath: Path.Combine(outputPath, assemblyName + ".mdv"),
319PdbMdvFilePath: Path.Combine(outputPath, assemblyName + ".pdb.mdv"),
320ILFilePath: Path.Combine(outputPath, assemblyName + ".il"),
321PdbXmlFilePath: Path.Combine(outputPath, assemblyName + ".pdb.xml"),
322CustomDataFilePath: Path.Combine(outputPath, "custom-data.txt"));
330var pdbFilePath = Path.Combine(outputPath, assemblyName + ".extracted.pdb");
CodeStyleConfigFileGenerator (3)
ConfigurationSchemaGenerator.Tests (2)
Crossgen2Tasks (3)
csc (8)
CSharpSyntaxGenerator (4)
csi (1)
CustomEncryptorSample (1)
dotnet-dev-certs (8)
dotnet-getdocument (5)
dotnet-openapi (2)
dotnet-razorpagegenerator (1)
dotnet-razorsyntaxgenerator (3)
dotnet-svcutil.xmlserializer (1)
dotnet-svcutil-lib (38)
Shared\MSBuildProj.cs (9)
67public string FullPath { get { return Path.Combine(DirectoryPath, FileName); } }
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName;
338fullPath = Path.Combine(fullPath, binReference);
340else if (Directory.Exists(Path.Combine(msbuildProj.DirectoryPath, fullPath)))
427string filePath = Path.Combine(dirPath, DirBuildProps);
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
881outputPath = Path.Combine(this.DirectoryPath, outputPath.Trim(new char[] { '\"' }));
885Path.Combine(outputPath, $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json") :
919dependency = ProjectDependency.FromAssembly(Path.Combine(outputPath, assetPath));
dotnet-svcutil-lib.Tests (68)
E2ETests.cs (9)
20this_TestGroupBaselinesDir = Path.Combine(g_BaselinesDir, this_TestCaseName);
21this_TestGroupOutputDir = Path.Combine(g_TestResultsDir, this_TestCaseName);
22this_TestGroupBootstrapDir = Path.Combine(g_TestBootstrapDir, this_TestCaseName);
92Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
214var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
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));
374File.Copy(f, Path.Combine(this_TestCaseProject.DirectoryPath, Path.GetFileName(f)));
GlobalToolTests.cs (20)
90Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
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);
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);
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);
179var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
201var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json");
TestInit.cs (26)
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>");
93var filePath = Path.Combine(this_TestGroupProjDir, this_TestGroupProjectName);
111var projectPath = Path.Combine(outputDir, $"{projectName}.csproj");
112var programPath = Path.Combine(outputDir, $"{projectName}.cs");
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>");
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))))
428var expected = Path.Combine(baselineDir, relativePath);
446var globalScriptPath = Path.Combine(g_TestOutputDir, @"TestScripts\deleteAll.cmd");
537if (!Directory.Exists(Path.Combine(vstestDir, "TestCases")))
606File.WriteAllText(Path.Combine(directory, "global.json"), globalConfig);
624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
DotnetTool.AppHost (1)
dotnet-user-jwts (11)
dotnet-user-secrets (5)
FilesWebSite (7)
GenerateAnalyzerNuspec (17)
Program.cs (17)
147string assemblyPathForNuspec = Path.Combine(assemblyFolder, assembly);
158var resourceAssemblyFullPath = Path.Combine(directory, 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));
194result.AppendLine(FileElement(fileWithPath, Path.Combine("lib", tfm)));
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"));
234result.AppendLine(FileElement(Path.Combine(rulesetsDir, ruleset), "rulesets"));
246result.AppendLine(FileElement(Path.Combine(directory, editorconfig), $"editorconfig\\{directoryName}"));
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 (17)
Program.cs (12)
433var fileWithPath = Path.Combine(directory.FullName, args.PropsFileName);
442fileWithPath = Path.Combine(directory.FullName, args.PropsFileToDisableNetAnalyzersInNuGetPackageName);
544var fileWithPath = Path.Combine(directory.FullName, 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");
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);
GenerateRulesMissingDocumentation (1)
GetDocument.Insider (1)
HelixTestRunner (10)
HttpClientApp (2)
IdeBenchmarks (5)
IdeCoreBenchmarks (16)
IIS.FunctionalTests (23)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, $"W3SVC{result.DeploymentParameters.SiteName}");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
IIS.LongTests (29)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, $"W3SVC{result.DeploymentParameters.SiteName}");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
108using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
126using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
180File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (14)
216Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
217Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
218Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
283Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
284Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
348File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
407File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
448File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
625parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
649parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
688parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
742var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
743var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
962deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (29)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, $"W3SVC{result.DeploymentParameters.SiteName}");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
108using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
126using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
180File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (14)
216Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
217Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
218Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
283Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
284Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
348File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
407File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
448File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
625parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
649parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
688parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
742var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
743var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
962deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
IIS.ShadowCopy.Tests (33)
ShadowCopyTests.cs (21)
62var tempDirectoryPath = Path.Combine(deploymentResult.ContentRoot, directoryName);
188var deleteDirPath = Path.Combine(deploymentResult.ContentRoot, "wwwroot/deletethis");
190File.WriteAllText(Path.Combine(deleteDirPath, "file.dll"), "");
219DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
246DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "1"), copySubDirs: true);
258Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "0")), "Expected 0 shadow copy directory to be skipped");
269Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "2")), "Expected 2 shadow copy directory");
285DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "1"), copySubDirs: true);
286DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "3"), copySubDirs: true);
287DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "10"), copySubDirs: true);
299Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "0")), "Expected 0 shadow copy directory to be skipped");
310Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "11")), "Expected 11 shadow copy directory");
316Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "1")), "Expected 1 shadow copy directory to be deleted");
317Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "3")), "Expected 3 shadow copy directory to be deleted");
329DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
342Assert.True(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy")));
359DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
372Assert.True(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy")));
384var directoryPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
452string tempPath = Path.Combine(destDirName, file.Name);
465string tempPath = Path.Combine(destDirName, subdir.Name);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, $"W3SVC{result.DeploymentParameters.SiteName}");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
IIS.Tests (1)
IISExpress.FunctionalTests (37)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, $"W3SVC{result.DeploymentParameters.SiteName}");
92var destFileName = Path.Combine(target.FullName, fileInfo.Name);
99var webConfigPath = Path.Combine(deploymentResult.ContentRoot, "web.config");
203return Path.Combine(logFolderPath, $"std_{startTime.Year}{startTime.Month:D2}" +
216var path = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.runtimeconfig.json");
226Path.Combine(deploymentResult.DeploymentParameters.PublishedApplicationRootPath, "aspnetcore-debug.log"),
267File.WriteAllText(Path.Combine(rootApplicationDirectory.FullName, "web.config"), "<configuration></configuration>");
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
108using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
126using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
180File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (14)
216Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
217Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
218Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
283Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
284Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
348File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
407File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
448File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
625parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
649parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
688parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
742var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
743var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
962deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
illink (11)
Infrastructure.Common (1)
Infrastructure.Tests (147)
ExtractTestPartitions\ExtractTestPartitionsTests.cs (21)
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");
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 (60)
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 (44)
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"),
549var canonicalFile = Path.Combine(_tempDir.Path, "canonical.json");
559var expandedFile = Path.Combine(_tempDir.Path, "expanded.json");
565var githubOutputFile = Path.Combine(_tempDir.Path, "github_output.txt");
699if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
PowerShellScripts\SplitTestProjectsTests.cs (11)
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")))
InMemory.FunctionalTests (2)
InProcessWebSite (1)
installer.tasks (1)
InteractiveHost.UnitTests (3)
Interop.FunctionalTests (4)
IOperationGenerator (2)
KeyManagementSample (1)
Metrics (4)
Metrics.Legacy (4)
Microsoft.Agents.AI.ProjectTemplates.Tests (11)
Microsoft.Analyzers.Extra.Tests (3)
Microsoft.Analyzers.Local.Tests (3)
Microsoft.Arcade.Common (2)
Microsoft.AspNetCore (1)
Microsoft.AspNetCore.Analyzer.Testing (1)
Microsoft.AspNetCore.App.Analyzers.Test (3)
Microsoft.AspNetCore.App.UnitTests (11)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (65)
Microsoft.AspNetCore.BrowserTesting (9)
BrowserTestBase.cs (6)
49.AddJsonFile(Path.Combine(basePath, "playwrightSettings.json"))
50.AddJsonFile(Path.Combine(basePath, $"playwrightSettings.{os}.json"), optional: true);
54builder.AddJsonFile(Path.Combine(basePath, "playwrightSettings.ci.json"), optional: true)
55.AddJsonFile(Path.Combine(basePath, $"playwrightSettings.ci.{os}.json"), optional: true);
60builder.AddJsonFile(Path.Combine(basePath, "playwrightSettings.container.json"), optional: true);
65builder.AddJsonFile(Path.Combine(basePath, "playwrightSettings.debug.json"), optional: true);
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Microsoft.AspNetCore.Components.Testing (7)
Microsoft.AspNetCore.Components.Testing.Tasks (6)
Microsoft.AspNetCore.Components.Testing.Tests (25)
GenerateE2EManifestTaskTests.cs (25)
19_tempDir = Path.Combine(Path.GetTempPath(), "E2EManifestTests_" + Guid.NewGuid().ToString("N"));
36var manifestPath = Path.Combine(_tempDir, "manifest.json");
61var manifestPath = Path.Combine(_tempDir, "manifest.json");
75Assert.Equal(Path.Combine("e2e-apps", "MyApp"), entry.WorkingDirectory);
83var manifestPath = Path.Combine(_tempDir, "manifest.json");
99var appsOutputDir = Path.Combine(_tempDir, "e2e-apps");
101var manifestPath = Path.Combine(_tempDir, "manifest.json");
118Assert.Equal(Path.Combine("e2e-apps", "MyApp"), entry.WorkingDirectory);
126var appsOutputDir = Path.Combine(_tempDir, "e2e-apps");
128var manifestPath = Path.Combine(_tempDir, "manifest.json");
151var manifestPath = Path.Combine(_tempDir, "manifest.json");
167var appsOutputDir = Path.Combine(_tempDir, "e2e-apps");
169CreatePublishedApp(Path.Combine(appsOutputDir, "publish"), "MyApp", createExe: true);
170var manifestPath = Path.Combine(_tempDir, "manifest.json");
189Assert.Equal(Path.Combine("e2e-apps", "MyApp"), buildEntry.WorkingDirectory);
205var manifestPath = Path.Combine(_tempDir, "manifest.json");
219Assert.Equal(Path.Combine("test-apps", "MyApp"), entry!.WorkingDirectory);
228var manifestPath = Path.Combine(_tempDir, "manifest.json");
249var manifestPath = Path.Combine(_tempDir, "manifest.json");
274File.WriteAllText(Path.Combine(dir, name + ".csproj"), "<Project />");
280var dir = Path.Combine(appsOutputDir, name);
285File.WriteAllText(Path.Combine(dir, name + exeSuffix), "fake-exe");
289File.WriteAllText(Path.Combine(dir, name + ".dll"), "fake-dll");
295var item = new TaskItem(Path.Combine(projectDir, name + ".csproj"));
314E2EAppsOutputDir = appsOutputDir ?? Path.Combine(_tempDir, "e2e-apps"),
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
Microsoft.AspNetCore.Components.WebView.Wpf (3)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (10)
DataProtectionProviderTests.cs (10)
51var keysPath = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName());
121var filePath = Path.Combine(GetTestFilesPath(), "TestCert.pfx");
148var certWithoutKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCertWithoutPrivateKey.pfx"), "password");
176var certWithoutKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCert3WithoutPrivateKey.pfx"), "password3", X509KeyStorageFlags.Exportable);
193var certWithKey = new X509Certificate2(Path.Combine(GetTestFilesPath(), "TestCert3.pfx"), "password3");
216var filePath = Path.Combine(GetTestFilesPath(), "TestCert2.pfx");
245var filePath = Path.Combine(GetTestFilesPath(), "TestCert2.pfx");
287var filePath = Path.Combine(GetTestFilesPath(), "TestCert2.pfx");
323string uniqueTempPath = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName());
340=> Path.Combine(AppContext.BaseDirectory, "TestFiles");
Microsoft.AspNetCore.DataProtection.Tests (10)
Repositories\FileSystemXmlRepositoryTests.cs (9)
24? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ASP.NET")
25: Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".aspnet");
26var expectedDir = new DirectoryInfo(Path.Combine(baseDir, "DataProtection-Keys")).FullName;
210var filePath1 = Path.Combine(dirInfo.FullName, "friendly1.xml");
211var filePath2 = Path.Combine(dirInfo.FullName, "friendly2.xml");
212var filePath3 = Path.Combine(dirInfo.FullName, "friendly3.xml");
227fileLock2 = new FileStream(Path.Combine(dirInfo.FullName, "friendly2.xml"), FileMode.Open, FileAccess.ReadWrite, FileShare.None);
260var filePath = Path.Combine(dirInfo.FullName, "friendly1.xml");
325string uniqueTempPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Microsoft.AspNetCore.DeveloperCertificates.XPlat (8)
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (1)
Microsoft.AspNetCore.Diagnostics.Tests (2)
Microsoft.AspNetCore.FunctionalTests (11)
WebApplicationFunctionalTests.cs (7)
16var contentRootPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
21await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.json"), @"
59var contentRootPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
64await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.Development.json"), @"
102var contentRootPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
107await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.json"), @"
143await File.WriteAllTextAsync(Path.Combine(contentRootPath, "appsettings.json"), @"
WebHostFunctionalTests.cs (4)
156var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64)
211var deploymentParameters = new DeploymentParameters(Path.Combine(GetTestSitesPath(), applicationName), ServerType.Kestrel, RuntimeFlavor.CoreClr, RuntimeArchitectures.Current)
242var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "DefaultBuilder.slnf"));
245return Path.GetFullPath(Path.Combine(directoryInfo.FullName, "testassets"));
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
Microsoft.AspNetCore.Hosting (6)
Microsoft.AspNetCore.Hosting.Tests (3)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
Microsoft.AspNetCore.Http.Results.Tests (20)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (17)
38var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
60Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
69var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
92Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
101var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
119Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
128var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
146Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
158var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
175Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
186var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
215var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
242var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
270var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
294var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
310Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
337Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile_ASCII.txt")), sendFile.Name);
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.HttpLogging.Tests (12)
FileLoggerProcessorTests.cs (12)
22TempPath = Path.Combine(Environment.CurrentDirectory, "_");
34var path = Path.Combine(TempPath, Path.GetRandomFileName());
70var path = Path.Combine(TempPath, Path.GetRandomFileName());
112var path = Path.Combine(TempPath, Path.GetRandomFileName());
152var path = Path.Combine(TempPath, Path.GetRandomFileName());
154File.WriteAllText(Path.Combine(path, "randomFile.txt"), "Text");
207var path = Path.Combine(TempPath, Path.GetRandomFileName());
272var path = Path.Combine(TempPath, Path.GetRandomFileName());
358var path = Path.Combine(TempPath, Path.GetRandomFileName());
421var path = Path.Combine(TempPath, Path.GetRandomFileName());
490var path = Path.Combine(TempPath, Path.GetRandomFileName());
589return Path.Combine(path, GetLogFileName(prefix, dateTime, fileNumber));
Microsoft.AspNetCore.Identity.Test (2)
Microsoft.AspNetCore.InternalTesting (13)
Microsoft.AspNetCore.InternalTesting.Tests (3)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Core.Test (23)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (17)
38var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
60Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
69var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
92Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
101var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
119Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
128var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
146Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
158var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
175Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
186var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
215var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
242var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
270var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
294var path = Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt"));
310Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name);
337Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile_ASCII.txt")), sendFile.Name);
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (12)
FileProviderRazorProjectFileSystemTest.cs (12)
53Assert.Equal(Path.Combine("BasePath", "File1.cshtml"), file.PhysicalPath);
60Assert.Equal(Path.Combine("BasePath", "File3.cshtml"), file.PhysicalPath);
89var file5 = fileProvider.AddFile(Path.Combine("Level1-Dir2", "File5.cshtml"), "content");
104Assert.Equal(Path.Combine("BasePath", "File1.cshtml"), file.PhysicalPath);
112Assert.Equal(Path.Combine("Level1-Dir1", "File2.cshtml"), file.RelativePhysicalPath);
119Assert.Equal(Path.Combine("Level1-Dir1", "File3.cshtml"), file.RelativePhysicalPath);
126Assert.Equal(Path.Combine("Level1-Dir2", "File5.cshtml"), file.RelativePhysicalPath);
154var file5 = fileProvider.AddFile(Path.Combine("Level1-Dir2", "File5.cshtml"), "content");
170Assert.Equal(Path.Combine("Level1-Dir1", "File2.cshtml"), file.RelativePhysicalPath);
177Assert.Equal(Path.Combine("Level1-Dir1", "File3.cshtml"), file.RelativePhysicalPath);
199Assert.Equal(Path.Combine("BasePath", "File3.cshtml"), item.PhysicalPath);
221Assert.Equal(Path.Combine("BasePath2", "File3.cshtml"), item.PhysicalPath);
Microsoft.AspNetCore.Mvc.Testing (3)
Microsoft.AspNetCore.Mvc.Views.TestCommon (1)
Microsoft.AspNetCore.OpenApi.Build.Tests (8)
Microsoft.AspNetCore.OpenApi.Tests (1)
Microsoft.AspNetCore.OutputCaching.Tests (1)
Microsoft.AspNetCore.Razor.Language.UnitTests (17)
DefaultRazorProjectFileSystemTest.cs (8)
121Assert.Equal(Path.Combine(TestFolder, "Home.cshtml"), item.PhysicalPath);
151Assert.Equal(Path.Combine("Views", "_ViewImports.cshtml"), item.RelativePhysicalPath);
157Assert.Equal(Path.Combine(TestFolder, "_ViewImports.cshtml"), item.PhysicalPath);
179Assert.Equal(Path.Combine("About", "About.cshtml"), item.RelativePhysicalPath);
186Assert.Equal(Path.Combine("Home", "Index.cshtml"), item.RelativePhysicalPath);
193Assert.Equal(Path.Combine("Home", "_ViewImports.cshtml"), item.RelativePhysicalPath);
233Assert.Equal(Path.Combine(TestFolder, "_ViewImports.cshtml"), item.PhysicalPath);
241Assert.Equal(Path.Combine("Views", "_ViewImports.cshtml"), item.RelativePhysicalPath);
DefaultRazorProjectItemTest.cs (6)
20var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml"));
40var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml"));
53var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml"));
66var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml"));
83"/Views", "/FileDoesNotExist.cshtml", Path.Combine("Views", "FileDoesNotExist.cshtml"), fileKind: null, fileInfo, cssScope: null);
93var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml"));
Microsoft.AspNetCore.Razor.Microbenchmarks (1)
Microsoft.AspNetCore.Razor.Microbenchmarks.Compiler (4)
Microsoft.AspNetCore.Razor.Test.Common (20)
Microsoft.AspNetCore.Razor.Test.Common.Cohosting (2)
Microsoft.AspNetCore.Razor.Test.Common.Tooling (23)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Microsoft.AspNetCore.Razor.Utilities.Shared.UnitTests (5)
PathUtilitiesTests.cs (5)
36{ Path.Combine("dir", "baz"), "dir" },
38{ Path.Combine("dir", "baz", "bar"), Path.Combine("dir", "baz") },
39{ Path.Combine("..", "..", "files.txt"), Path.Combine("..", "..") },
190Assert.Equal(curDir, PathUtilities.GetDirectoryName(Path.Combine(curDir, "baz")));
252AssertEqual(curDir, PathUtilities.GetDirectoryName(Path.Combine(curDir, "baz").AsSpan()));
Microsoft.AspNetCore.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
Microsoft.AspNetCore.Server.IntegrationTesting (17)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (13)
IISDeployer.cs (7)
187var file = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, debugLogLocation);
318_configPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("D"));
319_applicationHostConfig = Path.Combine(_configPath, "applicationHost.config");
528HelixHelper.PreserveFile(Path.Combine(DeploymentParameters.PublishedApplicationRootPath, "web.config"), fileNamePrefix + ".web.config");
529HelixHelper.PreserveFile(Path.Combine(_configPath, "applicationHost.config"), fileNamePrefix + ".applicationHost.config");
530HelixHelper.PreserveFile(Path.Combine(Environment.SystemDirectory, @"inetsrv\config\ApplicationHost.config"), fileNamePrefix + ".inetsrv.applicationHost.config");
531HelixHelper.PreserveFile(Path.Combine(Environment.SystemDirectory, @"inetsrv\config\redirection.config"), fileNamePrefix + ".inetsrv.redirection.config");
Microsoft.AspNetCore.Server.Kestrel.Core (17)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (13)
CertificatePathWatcherTests.cs (11)
23var filePath = Path.Combine(dir, fileName);
79dirs[i] = Path.Combine(rootDir, $"dir{i}");
123var filePath = Path.Combine(dir, fileName);
173var filePath = Path.Combine(dir, fileName);
211var dir = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
222Path = Path.Combine(dir, "test.pfx"),
240var filePath = Path.Combine(dir, fileName);
274var filePath = Path.Combine(dir, fileName);
314var filePath = Path.Combine(dir, fileName);
345var filePath = Path.Combine(dir, fileName);
405var filePath = Path.Combine(dir, fileName);
Microsoft.AspNetCore.Server.Kestrel.Tests (12)
KestrelConfigurationLoaderTests.cs (10)
805certificateFilePath = Path.Combine(tempDir, $"test{extension}");
806certificateKeyPath = Path.Combine(tempDir, "test.key");
1219var oldDir = Directory.CreateDirectory(Path.Combine(tempDir, "old"));
1220var newDir = Directory.CreateDirectory(Path.Combine(tempDir, "new"));
1221var oldCertPath = Path.Combine(oldDir.FullName, "tls.key");
1222var newCertPath = Path.Combine(newDir.FullName, "tls.key");
1224var dirLink = Directory.CreateSymbolicLink(Path.Combine(tempDir, "link"), "./old");
1225var fileLink = File.CreateSymbolicLink(Path.Combine(tempDir, "tls.key"), "./link/tls.key");
1270dirLink = Directory.CreateSymbolicLink(Path.Combine(tempDir, "link"), "./new");
2145return Path.Combine(basePath, $"TestApplication.pfx");
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
Microsoft.AspNetCore.Shared.Tests (8)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SpaProxy (5)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets (3)
Microsoft.AspNetCore.StaticAssets.Tests (13)
StaticAssetsIntegrationTests.cs (13)
326var filePath = Path.Combine(webRoot, "sample.txt");
383File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Hello, World! Modified");
436File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Hello, World! Modified");
503File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Short");
559File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Hello, World! Modified");
568Assert.Equal(GetGzipEtag(Path.Combine(webRoot, "sample.txt")), response.Headers.ETag.Tag);
597var contentRoot = Path.Combine(AppContext.BaseDirectory, appName);
598var webRoot = Path.Combine(contentRoot, "wwwroot");
606var manifestPath = Path.Combine(AppContext.BaseDirectory, $"{appName}.staticwebassets.endpoints.json");
615var filePath = Path.Combine(webRoot, resource.Path);
638var compressedFilePath = Path.Combine(webRoot, resource.Path + ".gz");
1281var manifestPath = Path.Combine(AppContext.BaseDirectory, $"{appName}.staticwebassets.endpoints.json");
1284File.WriteAllText(Path.Combine(webRoot, "index.html"), "Hello, World!");
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (4)
Microsoft.AspNetCore.StaticFiles.Tests (23)
StaticFileMiddlewareTests.cs (10)
51var badLink = Path.Combine(AppContext.BaseDirectory, Path.GetRandomFileName() + ".txt");
177using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
213using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir));
253using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir));
296using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir));
340using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, ".")))
388using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, ".")))
444using var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, "."));
470using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
530using (var fileProvider = new PhysicalFileProvider(Path.Combine(AppContext.BaseDirectory, baseDir)))
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.TestHost.Tests (13)
UseSolutionRelativeContentRootTests.cs (13)
18_tempDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N")[..8]);
19_contentDirectory = Path.Combine(_tempDirectory, "src");
26var solutionFile = Path.Combine(_tempDirectory, "TestApp.sln");
44var solutionFile = Path.Combine(_tempDirectory, "TestApp.slnx");
69var subDirectory = Path.Combine(_tempDirectory, "sub");
72var slnFile = Path.Combine(subDirectory, "TestApp.sln");
73var slnxFile = Path.Combine(_tempDirectory, "TestApp.slnx");
98var expectedPath = Path.Combine(_contentDirectory, "sub");
101var slnFile = Path.Combine(_tempDirectory, "TestApp.sln");
102var slnxFile = Path.Combine(_contentDirectory, "TestApp.slnx");
127var slnFile = Path.Combine(_tempDirectory, "TestApp.sln");
128var slnxFile = Path.Combine(_tempDirectory, "TestApp.slnx");
173var solutionFile = Path.Combine(_tempDirectory, "TestApp.slnx");
Microsoft.AspNetCore.Tests (19)
WebApplicationTests.cs (19)
391var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
392var webRoot = Path.Combine(contentRoot, "wwwroot");
411var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
412var webRoot = Path.Combine(contentRoot, "wwwroot");
468var contentRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
502var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
504var fullWebRootPath = Path.Combine(contentRoot, "wwwroot2");
531var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
533var fullWebRootPath = Path.Combine(contentRoot, "wwwroot");
573var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
575var fullWebRootPath = Path.Combine(contentRoot, "wwwroot");
788var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
791var fullWebRootPath = Path.Combine(contentRoot, webRoot);
831var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
834var fullWebRootPath = Path.Combine(contentRoot, webRoot);
880var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
883var fullWebRootPath = Path.Combine(contentRoot, webRoot);
2216var wwwroot = Path.Combine(AppContext.BaseDirectory, "wwwroot");
2249var contentRoot = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
Microsoft.AspNetCore.WebUtilities (2)
Microsoft.Build (86)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (8)
490? Path.Combine(GetOrInitializeX64Clr2Path(toolName, basePath64), toolName)
491: Path.Combine(GetOrInitializeX32Clr2Path(toolName, basePath), toolName);
496return Path.Combine(s_pathToX64Clr4 ??= basePath64, toolName);
501return Path.Combine(s_pathToArm64Clr4 ??= basePathArm64, toolName);
504return Path.Combine(s_pathToX32Clr4 ??= basePath, toolName);
616string fullPath = Path.Combine(envPath, toolName);
778string appHostPath = Path.Combine(msbuildAssemblyPath, Constants.MSBuildExecutableName);
828$"\"{Path.Combine(msbuildAssemblyPath, Constants.MSBuildAssemblyName)}\" {commandLineArgs}",
BackEnd\Components\Scheduler\Scheduler.cs (5)
2678using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerTrace_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2706shouldWriteHeader = !FileSystems.Default.FileExists(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId));
2709using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2833using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2873using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
Evaluation\Evaluator.cs (5)
1190string projectFullPath = Path.Combine(projectDirectory, projectFile);
1854ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(sdkResult.Path, project),
1867ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(additionalPath, project),
1904string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(sdkResult.Path, 5), Constants.DotnetProcessName);
2120importFileUnescaped = Path.Combine(directoryOfImportingFile, importFileUnescaped);
Microsoft.Build.BuildCheck.UnitTests (41)
ConfigurationProvider_Tests.cs (10)
33var configs = configurationProvider.GetConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
55var configs = configurationProvider.GetConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
89var customConfiguration = configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
115var buildConfig = configurationProvider.GetUserConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
146configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
151configurationProvider.CheckCustomConfigurationDataValidity(Path.Combine(workFolder1.Path, "test123.csproj"), "rule_id");
178configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
183configurationProvider.CheckCustomConfigurationDataValidity(Path.Combine(workFolder1.Path, "test123.csproj"), "rule_id");
209configurationProvider.GetCustomConfiguration(Path.Combine(workFolder1.Path, "test.csproj"), "rule_id");
214configurationProvider.CheckCustomConfigurationDataValidity(Path.Combine(workFolder1.Path, "test123.csproj"), "rule_id");
EndToEndTests.cs (25)
39private static string TestAssetsRootPath { get; } = Path.Combine(AssemblyLocation, "TestAssets");
164FileUtilities.CopyDirectory(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
171_env.SetCurrentDirectory(Path.Combine(workFolder.Path, entryProjectName));
178string[] depsFiles = Directory.GetFiles(Path.Combine(workFolder.Path, entryProjectName), $"{entryProjectName}.deps.json", SearchOption.AllDirectories);
259FileUtilities.CopyDirectory(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
261_env.SetCurrentDirectory(Path.Combine(workFolder.Path, entryProjectName));
371FileUtilities.CopyDirectory(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
372ReplaceStringInFile(Path.Combine(workFolder.Path, $"{projectName}.csproj"),
592$"{logFile} -flp:logfile={Path.Combine(projectDirectory!, "logFile.log")};verbosity=diagnostic",
658string checkCandidatePath = Path.Combine(TestAssetsRootPath, "CheckCandidate");
664string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
674$"{Path.Combine(checkCandidatePath, $"CheckCandidate.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool success, timeoutMilliseconds: 1200_0000);
703$"{logFile} -flp:logfile={Path.Combine(projectDirectory!, "logFile.log")};verbosity=diagnostic {(checkRequested ? "-check" : string.Empty)}",
838var checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
842$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n",
871string checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
875string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
882$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool _, timeoutMilliseconds: timeoutInMilliseconds);
900string checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
904string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
911$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool success, timeoutMilliseconds: timeoutInMilliseconds);
947File.Copy(nugetTemplatePath, Path.Combine(workFolder.Path, nugetTemplateName));
971var nugetTemplatePath = Path.Combine(checkCandidatePath, "nugetTemplate.config");
980string checksPackagesPath = Path.Combine(Directory.GetParent(AssemblyLocation)?.Parent?.FullName ?? string.Empty, "CustomChecks");
993doc.Save(Path.Combine(checkCandidatePath, "nuget.config"));
Microsoft.Build.CommandLine.UnitTests (57)
XMake_Tests.cs (44)
85private static string TestAssetsRootPath { get; } = Path.Combine(Path.Combine(Path.GetDirectoryName(typeof(XMakeAppTests).Assembly.Location) ?? AppContext.BaseDirectory), "TestAssets");
1197string projectFileName = Path.Combine(tempdir, "msbEnvironmenttest.proj");
1231string projectFileName = Path.Combine(tempdir, "msbLoggertest.proj");
1232string logFile = Path.Combine(tempdir, "logFile");
1272? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "notepad.exe")
1347string projectPath = Path.Combine(directory, "my.proj");
1348string rspPath = Path.Combine(directory, AutoResponseFileName);
1454directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
1456string projectPath = Path.Combine(directory, "my.proj");
1457string rspPath = Path.Combine(directory, AutoResponseFileName);
1460string exePath = Path.Combine(exeDirectory, Constants.MSBuildExecutableName);
1461string mainRspPath = Path.Combine(exeDirectory, AutoResponseFileName);
1498string projectPath = Path.Combine(directory, "my.proj");
1499string rspPath = Path.Combine(directory, AutoResponseFileName);
1500string exePath = Path.Combine(directory, Constants.MSBuildExecutableName);
2073string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName;
2096string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName;
2214distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2227distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"{fileLoggerParameters[0]};logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2240distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"{fileLoggerParameters[0]};logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2253distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($";Parameter1;logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2270fileLoggerParameters = new[] { "Parameter1", "verbosity=Normal;logfile=" + Path.Combine("..", "cat.log") + ";Parameter1" };
2286distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"Parameter1;Parameter;;;Parameter;Parameter;logFile={Path.Combine(Directory.GetCurrentDirectory(), "msbuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2644var dllFilePath = Path.Combine(tempDir.Path, expectedLoggerName);
2669$"\"{Path.Combine(tempLoggerProjDir, "CustomLogger.csproj")}\" -restore -verbosity:n", out bool success);
2696$"{Path.Combine(tempLoggerProjDir, $"FaultyLogger.csproj")} -restore -verbosity:n", out bool success);
2777string binLog1 = Path.Combine(binLogLocation, "1.binlog");
2778string binLog2 = Path.Combine(binLogLocation, "2.binlog");
2779string binLog3 = Path.Combine(binLogLocation, "3.binlog");
2816string binLog1 = Path.Combine(binLogLocation, "1.binlog");
2817string binLog2 = Path.Combine(binLogLocation, "2.binlog");
2856string binLog1 = Path.Combine(binLogLocation, "with-imports.binlog");
2857string binLog2 = Path.Combine(binLogLocation, "no-imports.binlog");
3034string binlogPath = Path.Combine(testProject.TestRoot, match.Groups[1] + ".binlog");
3061string binlogPath = Path.Combine(testProject.TestRoot, match.Groups[1] + ".binlog");
3093var preprocessFile = Path.Combine(testProject.TestRoot, "Preprocess.xml");
3148dest = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
3169File.Copy(file, Path.Combine(dest, Path.GetFileName(file)));
3175string destSubDir = Path.Combine(dest, dirName);
3214File.WriteAllText(Path.Combine(testProject.TestRoot, item.Key), item.Value);
3233var testAssetsPath = Path.Combine(TestAssetsRootPath, folderName);
3234var loggerProjDir = Path.Combine(testAssetsPath, "LoggerProject");
3238var tempLoggerProjDir = Path.Combine(tempDir.Path, "LoggerProject");
3244var destPath = Path.Combine(tempLoggerProjDir, relativePath);
Microsoft.Build.EndToEnd.Tests (8)
Microsoft.Build.Engine.OM.UnitTests (81)
Construction\ProjectRootElement_Tests.cs (10)
160Assert.Equal(project.FullPath, Path.Combine(Directory.GetCurrentDirectory(), "X"));
189projectXml1.FullPath = Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc");
207ProjectRootElement projectXml2 = ProjectRootElement.Open(Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc"));
226ProjectRootElement projectXml2 = ProjectRootElement.Open(Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc"));
243projectXml1.FullPath = Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc");
536string path = Path.Combine(toolsPath, target);
635directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
637string path = Path.Combine(directory, file);
668string path = Path.Combine(curDir, file);
669directory = Path.Combine(curDir, "bar");
Definition\DefinitionEditing_Tests.cs (10)
285string wildcard = Path.Combine(Path.GetDirectoryName(paths[0]), "*.xxx;");
668string wildcard = Path.Combine(directory, "*.xxx;");
789string wildcard = Path.Combine(directory, "*.xxx;");
1094string wildcard = Path.Combine(directory, "*.xxx;");
1111ProjectCollection.Escape(Path.Combine(directory, "i2.xxx")));
1134string wildcard = Path.Combine(directory, "*.xxx;");
1143item.Rename(Path.Combine(directory, "i2.xxx"));
1389string wildcard = Path.Combine(directory, "*.xxx;");
1408ProjectCollection.Escape(Path.Combine(directory, "i2.xxx")));
2209string wildcard = Path.Combine(Path.GetDirectoryName(paths[0]), "*.xxx;");
Definition\Project_Tests.cs (19)
684project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
685projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
689project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
690projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
1729testFileRoot = Path.Combine(Path.GetTempPath(), "foodir");
1735string filePath = Path.Combine(testFileRoot, fileName);
1741projectConstruction.AddItem("foo", Path.Combine(testFileRoot, "*.foo"));
2489directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
2490string subdirectory = Path.Combine(directory, "sub");
2493string projectPath = Path.Combine(subdirectory, "a.proj");
2494string targetsPath = Path.Combine(directory, "b.targets");
2602ProjectRootElement one = ProjectRootElement.Create(Path.Combine(myTempDir, "1.targets"));
2606ProjectRootElement two = ProjectRootElement.Create(Path.Combine(myTempDir, "2.targets"));
2610ProjectRootElement zero = ProjectRootElement.Create(Path.Combine(myTempDir, "0.targets"));
2614zero.AddImport(Path.Combine(myTempDir, "*.targets"));
3293var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.ProjectFile), "1.foo");
3771var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.ProjectFile), "a.cs");
4110string importPath = Path.Combine(pre.DirectoryPath, Guid.NewGuid().ToString());
4153string importGlob = Path.Combine(pre.DirectoryPath, @"__NoMatch__\**");
Definition\ProjectItem_Tests.cs (11)
350directory = Path.Combine(Path.GetTempPath(), "a");
356subdirectory = Path.Combine(directory, "b");
362file = Path.Combine(subdirectory, "c");
397directory = Path.Combine(Path.GetTempPath(), "a");
403subdirectory = Path.Combine(directory, "b");
409file = Path.Combine(subdirectory, "c");
1092: Path.Combine(relativeFragmentFromRootToFile, file);
1985string projectDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
1989string sourceFile = Path.Combine(projectDirectory, "a.cs");
1990string renamedSourceFile = Path.Combine(projectDirectory, "b.cs");
1994project.FullPath = Path.Combine(projectDirectory, "test.proj"); // assign a path so the wildcards can lock onto something.
Instance\ProjectInstance_Tests.cs (16)
284directory = Path.Combine(Path.GetTempPath(), "WildcardsInsideTargets");
286file1 = Path.Combine(directory, "a.exe");
287file2 = Path.Combine(directory, "b.exe");
288file3 = Path.Combine(directory, "c.bat");
293string path = Path.Combine(directory, "*.exe");
419projA.FullPath = Path.Combine(Path.GetTempPath(), "a.proj");
420projB.FullPath = Path.Combine(Path.GetTempPath(), "b.proj");
455projA.FullPath = Path.Combine(Path.GetTempPath(), "a.proj");
456projB.FullPath = Path.Combine(Path.GetTempPath(), "b.proj");
501File.Create(Path.Combine(tempDir, "aItem.cs")).Dispose();
503projA.FullPath = Path.Combine(tempDir, "a.proj");
504projB.FullPath = Path.Combine(tempDir, "b.proj");
529string projectA = Path.Combine(ObjectModelHelpers.TempProjectDir, "a.proj");
530string projectB = Path.Combine(ObjectModelHelpers.TempProjectDir, "b.proj");
532string includeFileA = Path.Combine(ObjectModelHelpers.TempProjectDir, "aaa4.cs");
533string includeFileB = Path.Combine(ObjectModelHelpers.TempProjectDir, "bbb4.cs");
Microsoft.Build.Engine.UnitTests (570)
BackEnd\SdkResolverLoader_Tests.cs (24)
61var d1 = Directory.CreateDirectory(Path.Combine(root, "Resolver1"));
64var f1 = Path.Combine(d1.FullName, "Resolver1.dll");
67var f2 = Path.Combine(d1.FullName, "Dependency.dll");
68var f3 = Path.Combine(d1.FullName, "InvalidName.dll");
69var f4 = Path.Combine(d1.FullName, "NoResolver.txt");
94var testFolder = Directory.CreateDirectory(Path.Combine(root, "MyTestResolver"));
96var wrongResolverDll = Path.Combine(testFolder.FullName, "MyTestResolver.dll");
97var resolverManifest = Path.Combine(testFolder.FullName, "MyTestResolver.xml");
98var assemblyToLoad = Path.Combine(root, "SomeOtherResolver.dll");
220var resolverPath = Path.Combine(root, "MyTestResolver");
221var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
245var resolverPath = Path.Combine(root, "MyTestResolver");
246var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
272var resolverPath = Path.Combine(root, "MyTestResolver");
273var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
296var resolverPath = Path.Combine(root, "MyTestResolver");
312var resolverPath = Path.Combine(root, "MyTestResolver");
313var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
371Directory.CreateDirectory(Path.Combine(testRoot, resolver1));
373Directory.CreateDirectory(Path.Combine(additionalRoot, resolver1));
377Directory.CreateDirectory(Path.Combine(testRoot, resolver2));
381Directory.CreateDirectory(Path.Combine(additionalRoot, resolver3));
442var resolverFolder = Path.Combine(testRoot, "Microsoft.DotNet.MSBuildSdkResolver");
445var assemblyFile = Path.Combine(resolverFolder, "Microsoft.DotNet.MSBuildSdkResolver.dll");
BinaryLogger_Tests.cs (13)
355RunnerUtilities.ExecMSBuild($"{_logFile} -flp:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic", out success);
358string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log"));
412RunnerUtilities.ExecMSBuild($"{projectFile.Path} -nr:False -bl:{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile2.log")};verbosity=normal", out bool success);
417string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log"));
421string text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile2.log"));
424RunnerUtilities.ExecMSBuild($"{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile3.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile4.log")};verbosity=normal", out success);
426text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile3.log"));
430text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile4.log"));
475string symlinkPath = Path.Combine(testFolder2.Path, symlinkName);
476string symlinkLvl2Path = Path.Combine(testFolder2.Path, symlinkLvl2Name);
562string logFilePath = Path.Combine(_env.DefaultTestDirectory.Path, "test.binlog");
BuildEnvironmentHelper_Tests.cs (19)
22string expectedMSBuildPath = Path.Combine(msbuildPath, Constants.MSBuildExecutableName).ToLowerInvariant();
44var msBuildPath = Path.Combine(path, Constants.MSBuildExecutableName);
45var msBuildConfig = Path.Combine(path,
76var msBuildPath = Path.Combine(msbuildBinDirectory, Constants.MSBuildExecutableName);
77var msBuildConfig = Path.Combine(msbuildBinDirectory, $"{Constants.MSBuildExecutableName}.config");
78var vsMSBuildDirectory = Path.Combine(env.TempFolderRoot, "MSBuild");
368BuildEnvironmentHelper.Instance.MSBuildToolsDirectory64.ShouldBe(Path.Combine(env.BuildDirectory, "amd64"));
384BuildEnvironmentHelper.Instance.MSBuildToolsDirectory64.ShouldBe(Path.Combine(env.BuildDirectory, "amd64"));
409var entryProcess = Path.Combine(Path.GetTempPath(), "foo.exe");
425var msBuildAssembly = Path.Combine(env.BuildDirectory, "Microsoft.Build.dll");
442var msBuildAssembly = Path.Combine(env.BuildDirectory64, "Microsoft.Build.dll");
467public string MSBuildExePath64 => Path.Combine(BuildDirectory64, Constants.MSBuildExecutableName);
476BuildDirectory64 = Path.Combine(BuildDirectory, "amd64");
483File.WriteAllText(Path.Combine(BuildDirectory, file), string.Empty);
489File.WriteAllText(Path.Combine(BuildDirectory64, file), string.Empty);
511public string MSBuildExePath => Path.Combine(BuildDirectory, Constants.MSBuildExecutableName);
522TempFolderRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
523BuildDirectory = Path.Combine(TempFolderRoot, "MSBuild");
533Directory.CreateDirectory(Path.Combine(BuildDirectory, "amd64"));
Construction\SolutionFile_OldParser_Tests.cs (14)
168string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
219string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
220string proj2Path = Path.Combine(FileUtilities.TempFileDirectory, "someproja.proj");
344string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
345string proj2Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj2.etp");
539string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
540string proj2Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj2.etp");
594Directory.CreateDirectory(Path.Combine(FileUtilities.TempFileDirectory, "ETPProjUpgradeTest"));
631string proj1Path = Path.Combine(FileUtilities.TempFileDirectory, "someproj.etp");
689string proj1Path = Path.Combine(Path.GetTempPath(), "someproj.etp");
773var solutionFolder = env.CreateFolder(Path.Combine(FileUtilities.GetTemporaryDirectory(), "sln"));
774env.CreateFolder(Path.Combine(solutionFolder.Path, "RelativePath"));
786proj.RelativePath.ShouldBe(Path.Combine("RelativePath", "project file"));
2429solution.ProjectsInOrder[0].AbsolutePath.ShouldBe(Path.GetFullPath(Path.Combine(Path.GetDirectoryName(solution.FullPath)!, expectedRelativePath)));
Construction\SolutionFilter_Tests.cs (19)
53TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "ClassLibrary"), createFolder: true);
54TransientTestFolder classLibSubFolder = testEnvironment.CreateFolder(Path.Combine(classLibFolder.Path, "ClassLibrary"), createFolder: true);
63TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "SimpleProject"), createFolder: true);
64TransientTestFolder simpleProjectSubFolder = testEnvironment.CreateFolder(Path.Combine(simpleProjectFolder.Path, "SimpleProject"), createFolder: true);
231TransientTestFolder src = testEnvironment.CreateFolder(Path.Combine(folder.Path, "src"), createFolder: true);
243Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build"", """ + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)) + @""", ""{69BE05E2-CBDA-4D27-9733-44E12B0F5627}""
245Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""MSBuild"", """ + Path.Combine("src", Path.GetFileName(msbuild.Path)) + @""", ""{6F92CA55-1D15-4F34-B1FE-56C0B7EB455E}""
247Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.CommandLine.UnitTests"", """ + Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)) + @""", ""{0ADDBC02-0076-4159-B351-2BF33FAA46B2}""
249Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.Tasks.UnitTests"", """ + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)) + @""", ""{CF999BDE-02B3-431B-95E6-E88D621D9CBF}""
269""" + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!).Replace("\\", "\\\\") + @""",
270""" + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!).Replace("\\", "\\\\") + @"""
275sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!)).ShouldBeTrue();
276sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!)).ShouldBeTrue();
279(sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)!))
280|| sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(msbuild.Path)!))
281|| sp.ProjectShouldBuild(Path.Combine("src", "notAProject.csproj")))
292folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, $"test@folder%special$symbols"), createFolder: true);
393TransientTestFolder src = testEnvironment.CreateFolder(Path.Combine(folder.Path, "src"), createFolder: true);
394TransientTestFolder nested = testEnvironment.CreateFolder(Path.Combine(src.Path, "nested"), createFolder: true);
Construction\SolutionProjectGenerator_Tests.cs (18)
121TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
131TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
166TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
182TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
241TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
257TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
909<ProjectConfiguration Project="{786E302A-96CE-43DC-B640-D6B6CC9BF6C0}" AbsolutePath="##temp##{{Path.Combine("Project1", "A.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU</ProjectConfiguration>
910<ProjectConfiguration Project="{881C1674-4ECA-451D-85B6-D7C59B7F16FA}" AbsolutePath="##temp##{{Path.Combine("Project2", "B.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU<ProjectDependency Project="{4A727FF8-65F2-401E-95AD-7C8BBFBE3167}" /></ProjectConfiguration>
911<ProjectConfiguration Project="{4A727FF8-65F2-401E-95AD-7C8BBFBE3167}" AbsolutePath="##temp##{{Path.Combine("Project3", "C.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU</ProjectConfiguration>
2599string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2619ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"),
2658string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2678ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"),
2736string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2756string projectPath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, projectName),
2768ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, "Directory.Solution.props"),
2777ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, "Directory.Solution.targets"),
2846projectInSolution.AbsolutePath.ShouldBe(Path.Combine(solution.SolutionFileDirectory, projectInSolution.RelativePath));
Definition\ProjectEvaluationContext_Tests.cs (37)
123{Path.Combine(_env.DefaultTestDirectory.Path, "1.file"), 1},
124{Path.Combine(_env.DefaultTestDirectory.Path, "2.file"), 1}
182{ Path.Combine(_env.DefaultTestDirectory.Path, "1.file"), 2 }
378File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.cs"), "");
388File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.cs"), "");
438File.WriteAllText(Path.Combine(projectDirectory1, $"1.{evaluationCount}.cs"), "");
439File.WriteAllText(Path.Combine(projectDirectory2, $"2.{evaluationCount}.cs"), "");
445Path.Combine(projectDirectory1, "1"),
448<i Include=`{Path.Combine("**", "*.cs")}` />
452Path.Combine(projectDirectory2, "2"),
455<i Include=`{Path.Combine("**", "*.cs")}` />
472File.WriteAllText(Path.Combine(projectDirectory1, $"1.{evaluationCount}.cs"), "");
473File.WriteAllText(Path.Combine(projectDirectory2, $"2.{evaluationCount}.cs"), "");
493File.WriteAllText(Path.Combine(project1GlobDirectory, $"1.{evaluationCount}.cs"), "");
494File.WriteAllText(Path.Combine(project2GlobDirectory, $"2.{evaluationCount}.cs"), "");
500Path.Combine(project1Directory, "1"),
507Path.Combine(project2Directory, "2"),
529File.WriteAllText(Path.Combine(project1GlobDirectory, $"1.{evaluationCount}.cs"), "");
530File.WriteAllText(Path.Combine(project2GlobDirectory, $"2.{evaluationCount}.cs"), "");
555File.WriteAllText(Path.Combine(project1GlobDirectory, $"{evaluationCount}.cs"), "");
562Path.Combine(project1Directory.Path, "1"),
570Path.Combine(project2Directory.Path, "2"),
591.Select(i => Path.Combine(project1Directory.Path, i))
600File.WriteAllText(Path.Combine(project1GlobDirectory, $"{evaluationCount}.cs"), "");
622File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
628Path.Combine(project1Directory.Path, "1"),
635Path.Combine(project2Directory.Path, "2"),
652.Select(i => Path.Combine(globFixedDirectoryPart, i))
660File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
686? Path.Combine("..", "GlobDirectory")
702prependedGlobExpansion[i] = Path.Combine(itemSpecDirectoryPart, globExpansion[i]);
726File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
736File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), "");
763File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.props"), $"<Project><ItemGroup><i Include=`{evaluationCount}.cs`/></ItemGroup></Project>".Cleanup());
773File.WriteAllText(Path.Combine(projectDirectory, $"{evaluationCount}.props"), $"<Project><ItemGroup><i Include=`{evaluationCount}.cs`/></ItemGroup></Project>".Cleanup());
804var theFile = Path.Combine(projectDirectory, "0.cs");
958projectContents.Select((p, i) => new ProjectSpecification(Path.Combine(_env.DefaultTestDirectory.Path, $"Project{i}.proj"), p)),
Evaluation\Evaluator_Tests.cs (109)
107TransientTestFolder projDirectory = env.CreateFolder(Path.Combine(env.CreateNewTempPath().TempPath, projectPathCandidate), createFolder: true);
140yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}"" Condition=""Exists('{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}')""", true };
141yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}"" Condition=""'true'""", false };
142yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "projectThatDoesNotExist.csproj")}""", false };
143yield return new object[] { $@"Project=""{Path.Combine("nonexistentDirectory", "*.*proj")}""", true };
146yield return new object[] { $@"Project=""{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}"" Condition=""Exists('{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}')""", true };
147yield return new object[] { $@"Project=""{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}"" Condition=""'true'""", false };
148yield return new object[] { $@"Project=""{Path.Combine("realFolder", "projectThatDoesNotExist.csproj")}""", false };
149yield return new object[] { $@"Project=""{Path.Combine("realFolder", "*.*proj")}""", true };
152yield return new object[] { $@"Project=""{Path.Combine("realFolder", "realFile.csproj")}"" Condition=""Exists('{Path.Combine("realFolder", "realFile.csproj")}')""", true };
153yield return new object[] { $@"Project=""{Path.Combine("realFolder", "realFile.csproj")}"" Condition=""'true'""", true };
154yield return new object[] { $@"Project=""{Path.Combine("realFolder", "realFile.csproj")}""", true };
155yield return new object[] { $@"Project=""{Path.Combine("realFolder", "*.*proj")}""", true };
164yield return new object[] { $@"Project=""{Path.Combine("$(VSToolsPath)", "*.*proj")}""", true };
333string targetDirectory = Path.Combine(tempPath, "VerifyConditionsInsideOutsideTargets");
334string subDirectory = Path.Combine(targetDirectory, "subdir");
336string testTargetPath = Path.Combine(targetDirectory, "test.targets");
337string targetDirectoryTargetsPath = Path.Combine(targetDirectory, "targetdir.targets");
338string targetDirectoryTargetsPath2 = Path.Combine(targetDirectory, "targetdir2.targets");
339string subdirProjPath = Path.Combine(subDirectory, "test.proj");
340string projectDirectoryTargetsPath = Path.Combine(subDirectory, "projdir.targets");
341string projectDirectoryTargetsPath2 = Path.Combine(subDirectory, "projdir2.targets");
342string textTextPath = Path.Combine(targetDirectory, "test.txt");
462string targetDirectory = Path.Combine(tempPath, "VerifyConditionsInsideOutsideTargets");
463string subDirectory = Path.Combine(targetDirectory, "subdir");
465string testTargetPath = Path.Combine(targetDirectory, "test.targets");
466string targetDirectoryTargetsPath = Path.Combine(targetDirectory, "targetdir.targets");
467string targetDirectoryTargetsPath2 = Path.Combine(targetDirectory, "targetdir2.targets");
468string subdirProjPath = Path.Combine(subDirectory, "test.proj");
469string projectDirectoryTargetsPath = Path.Combine(subDirectory, "projdir.targets");
470string projectDirectoryTargetsPath2 = Path.Combine(subDirectory, "projdir2.targets");
471string textTextPath = Path.Combine(targetDirectory, "test.txt");
489logger.AssertLogContains("PropertyOutsideTarget: " + Path.Combine("..", "test.txt"));
491logger.AssertLogContains("PropertyInsideTarget: " + Path.Combine("..", "test.txt"));
492logger.AssertLogContains("PropertyGroupInsideTarget: " + Path.Combine("..", "test.txt"));
534string targetDirectory = Path.Combine(tempPath, "VerifyUsedUnInitializedPropertyInImports");
536string targetAPath = Path.Combine(targetDirectory, "targetA.targets");
537string targetBPath = Path.Combine(targetDirectory, "targetB.targets");
538string projectPath = Path.Combine(targetDirectory, "test.proj");
581string targetDirectory = Path.Combine(tempPath, "EmptyPropertyIsThenSet");
582string testTargetPath = Path.Combine(targetDirectory, "test.proj");
623string targetDirectory = Path.Combine(tempPath, "EmptyPropertyIsThenSet");
624string testTargetPath = Path.Combine(targetDirectory, "test.proj");
669string targetDirectory = Path.Combine(tempPath, "SetPropertyToItself");
670string testTargetPath = Path.Combine(targetDirectory, "test.proj");
715string targetDirectory = Path.Combine(tempPath, "UsePropertyInCondition");
716string testTargetPath = Path.Combine(targetDirectory, "test.proj");
759string targetDirectory = Path.Combine(tempPath, "UsePropertyBeforeSet");
760string testTargetPath = Path.Combine(targetDirectory, "test.proj");
805string targetDirectory = Path.Combine(tempPath, "UsePropertyBeforeSetDuplicates");
806string testTargetPath = Path.Combine(targetDirectory, "test.proj");
1156directory = Path.Combine(Path.GetTempPath(), "fol$der");
1157directory2 = Path.Combine(Path.GetTempPath(), "fol$der" + Path.DirectorySeparatorChar + "fol$der2");
1160string importPathRelativeEscaped = Path.Combine("fol$(x)$der2", "Escap%3beab$(x)leChar$ac%3BtersInI*tPa?h");
1161string importRelative1 = Path.Combine("fol$der2", "Escap;eableChar$ac;tersInImportPath");
1162string importRelative2 = Path.Combine("fol$der2", "Escap;eableChar$ac;tersInI_XXXX_tPath");
1163importPath1 = Path.Combine(directory, importRelative1);
1164importPath2 = Path.Combine(directory, importRelative2);
1185projectPath = Path.Combine(directory, "my.proj"); // project path has $ in too
2272string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsRelative");
2273string directory2 = Path.Combine(directory, "sub");
2275VerifyImportTargetRelativePath(directory, directory2, new string[] { Path.Combine("**", "*.targets") });
2284string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsRelative2");
2285string directory2 = Path.Combine(directory, "sub");
2290new string[] { Path.Combine(directory2, "*.targets"), Path.Combine(directory, "*.targets") });
2299string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsRelative3");
2300string directory2 = Path.Combine(directory, "sub");
2321string directory = Path.Combine(Path.GetTempPath(), "ImportWildcardsFullPath");
2322string directory2 = Path.Combine(directory, "sub");
2325string file1 = Path.Combine(directory, "1.targets");
2326string file2 = Path.Combine(directory2, "2.targets");
2327string file3 = Path.Combine(directory2, "3.cpp.targets");
3422string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyPropertySetInImportStillOverrides");
3433string primaryProject = Path.Combine(projectDirectory, "project.proj");
3434string import = Path.Combine(projectDirectory, "import.proj");
3483string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyTreatAsLocalPropertyInImportDoesntAffectParentProjectAboveIt");
3494string primaryProject = Path.Combine(projectDirectory, "project.proj");
3495string import = Path.Combine(projectDirectory, "import.proj");
3543string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyTreatAsLocalPropertyInImportAffectsParentProjectBelowIt");
3554string primaryProject = Path.Combine(projectDirectory, "project.proj");
3555string import = Path.Combine(projectDirectory, "import.proj");
3615string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyTreatAsLocalPropertyUnionBetweenImports");
3626string primaryProject = Path.Combine(projectDirectory, "project.proj");
3627string import = Path.Combine(projectDirectory, "import.proj");
3688string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyDuplicateTreatAsLocalProperty");
3699string primaryProject = Path.Combine(projectDirectory, "project.proj");
3700string import = Path.Combine(projectDirectory, "import.proj");
3753string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyGlobalPropertyPassedToP2P");
3764string primaryProject = Path.Combine(projectDirectory, "project.proj");
3765string project2 = Path.Combine(projectDirectory, "project2.proj");
3815string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyLocalPropertyPropagatesIfExplicitlyPassedToP2P");
3826string primaryProject = Path.Combine(projectDirectory, "project.proj");
3827string project2 = Path.Combine(projectDirectory, "project2.proj");
4388string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyDTDProcessingIsDisabled");
4399string projectFilename = Path.Combine(projectDirectory, "project.proj");
4541string projectDirectory = Path.Combine(Path.GetTempPath(), "ThrownInvalidProjectExceptionProperlyHandled");
4552string primaryProject = Path.Combine(projectDirectory, "project.proj");
4553string import = Path.Combine(projectDirectory, "import.proj");
5075string targetDirectory = Path.Combine(tempPath, "LogPropertyAssignments");
5076string testTargetPath = Path.Combine(targetDirectory, "test.proj");
5221string file0 = Path.Combine(directory, "my.proj");
5222file1 = Path.Combine(directory, "1.targets");
5223file2 = Path.Combine(directory2, "2.targets");
5224file3 = Path.Combine(directory2, "3.cpp.targets");
5225file4 = Path.Combine(directory2, "4.nottargets");
Evaluation\Expander_Tests.cs (83)
274Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"seconddirectory"), itemsDir[0].EvaluatedInclude);
294Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude);
350Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, result);
705Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude);
764Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"secondd;rectory"), items[5].EvaluatedInclude);
765Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"someo;herplace"), items[6].EvaluatedInclude);
808pi.SetMetadata("Meta9", Path.Combine("seconddirectory", "file.ext"));
809pi.SetMetadata("Meta10", String.Format(";{0};{1};", Path.Combine("someo%3bherplace", "foo.txt"), Path.Combine("secondd%3brectory", "file.ext")));
2226pg.Set(ProjectPropertyInstance.Create("PathRoot", Path.Combine(s_rootPathPrefix, "goo")));
2227pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar));
2361pg.Set(ProjectPropertyInstance.Create("PathRoot", Path.Combine(s_rootPathPrefix, "goo")));
2362pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar));
2579pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo", "file.txt")));
2724pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo", "file.txt")));
2745Path.Combine(s_rootPathPrefix, "foo goo") + "`, `$(File)`))",
2758pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo bar", "baz.txt")));
2763Path.Combine(s_rootPathPrefix, "foo baz") + @"`, `$(File)`))",
2776pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo bar", "baz.txt")));
2781Path.Combine(s_rootPathPrefix, "foo baz") + @" `, `$(File)`))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance);
3454string directoryStart = Path.Combine(tempPath, "one\\two\\three\\four\\five");
3684$"{Path.GetFullPath(Path.Combine("one", "two"))}{Path.DirectorySeparatorChar}",
4410string path = Path.Combine("foo", "bar");
4985var expectedAlphaSquigglePath = Path.Combine("Alpha", ".squiggle");
4986var expectedBetaSquigglePath = Path.Combine("Beta", ".squiggle");
5032var alphaOnePath = Path.Combine("alpha", "One.cs");
5033var alphaThreePath = Path.Combine("alpha", "Three.cs");
5073var alphaBetaPath = Path.Combine("alpha", "beta");
5074var alphaDeltaPath = Path.Combine("alpha", "delta");
5257string reflectionInfoPath = Path.Combine(Directory.GetCurrentDirectory(), "PropertyFunctionsRequiringReflection");
5377File.WriteAllText(Path.Combine(correctDir.Path, "notes.txt"), "correct content");
5378File.WriteAllText(Path.Combine(wrongDir.Path, "notes.txt"), "wrong content");
5393File.WriteAllText(Path.Combine(correctDir.Path, "exists.txt"), "data");
5409string filePath = Path.Combine(correctDir.Path, "attrs.txt");
5427string filePath = Path.Combine(correctDir.Path, "time.txt");
5444string filePath = Path.Combine(correctDir.Path, "time.txt");
5461string filePath = Path.Combine(correctDir.Path, "time.txt");
5482Directory.CreateDirectory(Path.Combine(correctDir.Path, "subdir"));
5514string subDir = Path.Combine(correctDir.Path, "sub");
5516File.WriteAllText(Path.Combine(subDir, "a.txt"), "data");
5547string subDir = Path.Combine(correctDir.Path, "sub");
5564string subDir = Path.Combine(correctDir.Path, "sub");
5586File.WriteAllText(Path.Combine(correctDir.Path, "lines.txt"), "line1\nline2");
5587File.WriteAllText(Path.Combine(wrongDir.Path, "lines.txt"), "wrong");
5603File.WriteAllBytes(Path.Combine(correctDir.Path, "data.bin"), [0x42]);
5622File.Exists(Path.Combine(correctDir.Path, "output.txt")).ShouldBeTrue();
5623File.ReadAllText(Path.Combine(correctDir.Path, "output.txt")).ShouldBe("hello");
5624File.Exists(Path.Combine(wrongDir.Path, "output.txt")).ShouldBeFalse();
5635File.WriteAllText(Path.Combine(correctDir.Path, "append.txt"), "base");
5640File.ReadAllText(Path.Combine(correctDir.Path, "append.txt")).ShouldBe("base added");
5651string correctFile = Path.Combine(correctDir.Path, "todelete.txt");
5652string wrongFile = Path.Combine(wrongDir.Path, "todelete.txt");
5671string filePath = Path.Combine(correctDir.Path, "utc.txt");
5689string filePath = Path.Combine(correctDir.Path, "utc.txt");
5707string filePath = Path.Combine(correctDir.Path, "utc.txt");
5732Directory.Exists(Path.Combine(correctDir.Path, "newdir")).ShouldBeTrue();
5733Directory.Exists(Path.Combine(wrongDir.Path, "newdir")).ShouldBeFalse();
5744Directory.CreateDirectory(Path.Combine(correctDir.Path, "todel"));
5745Directory.CreateDirectory(Path.Combine(wrongDir.Path, "todel"));
5750Directory.Exists(Path.Combine(correctDir.Path, "todel")).ShouldBeFalse();
5751Directory.Exists(Path.Combine(wrongDir.Path, "todel")).ShouldBeTrue();
5764string filePath = Path.Combine(dir.Path, "abs.txt");
5780string filePath = Path.Combine(dir.Path, "abs.txt");
5795string subDir = Path.Combine(dir.Path, "subdir");
5815string absFile = Path.Combine(otherDir.Path, "abs.txt");
5832string absFile = Path.Combine(otherDir.Path, "abs.txt");
5853File.WriteAllText(Path.Combine(correctDir.Path, "source.txt"), "copy me");
5858File.Exists(Path.Combine(correctDir.Path, "dest.txt")).ShouldBeTrue();
5859File.ReadAllText(Path.Combine(correctDir.Path, "dest.txt")).ShouldBe("copy me");
5860File.Exists(Path.Combine(wrongDir.Path, "dest.txt")).ShouldBeFalse();
5871File.WriteAllText(Path.Combine(correctDir.Path, "movesrc.txt"), "move me");
5876File.Exists(Path.Combine(correctDir.Path, "movesrc.txt")).ShouldBeFalse();
5877File.Exists(Path.Combine(correctDir.Path, "movedst.txt")).ShouldBeTrue();
5878File.ReadAllText(Path.Combine(correctDir.Path, "movedst.txt")).ShouldBe("move me");
5889Directory.CreateDirectory(Path.Combine(correctDir.Path, "dirsrc"));
5894Directory.Exists(Path.Combine(correctDir.Path, "dirsrc")).ShouldBeFalse();
5895Directory.Exists(Path.Combine(correctDir.Path, "dirdst")).ShouldBeTrue();
5910string siblingDir = Path.Combine(rootDir.Path, "sibling");
5911string subDir = Path.Combine(rootDir.Path, "subdir");
5914File.WriteAllText(Path.Combine(siblingDir, "file.txt"), "traversal works");
5933string siblingDir = Path.Combine(rootDir.Path, "sibling");
5934string subDir = Path.Combine(rootDir.Path, "subdir");
5937File.WriteAllText(Path.Combine(siblingDir, "file.txt"), "backslash traversal works");
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (35)
51extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), GetExtensionTargetsFileContent1());
56projColln.ResetToolsetsForTests(WriteConfigFileAndGetReader("MSBuildExtensionsPath", extnDir1, Path.Combine("tmp", "nonexistent")));
93string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContentWithCondition);
96CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { extnDir1, Path.Combine("tmp", "nonexistent") },
129string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
130string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn2.proj"),
134new string[] { extnDir2, Path.Combine("tmp", "nonexistent"), extnDir1 },
159string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
197string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
199string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"),
205new[] { extnDir1, Path.Combine("tmp", "nonexistent"), extnDir2 },
247string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("circularwildcardtest", "extn.proj"),
249string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("circularwildcardtest", "extn.proj"),
251string extnDir3 = GetNewExtensionsPathAndCreateFile("extensions3", Path.Combine("circularwildcardtest", "extn3.proj"),
284string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
287CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { Path.Combine("tmp", "nonexistent"), extnDir1 },
301extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
306Path.Combine("tmp", "nonexistent")));
356string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
357string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"), extnTargetsFileContent2);
360CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { extnDir2, Path.Combine("tmp", "nonexistent"), extnDir1 },
400string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
401string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"), extnTargetsFileContent2);
408projColln.ResetToolsetsForTests(WriteConfigFileAndGetReader("MSBuildExtensionsPath", Path.Combine("tmp", "non-existent"), extnDir1));
487extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
489extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("bar", "extn2.proj"),
491extnDir3 = GetNewExtensionsPathAndCreateFile("extensions3", Path.Combine("xyz", "extn3.proj"),
567extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
628extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
838logger.AssertLogContains(@"MSB4226: The imported project """ + Path.Combine("$(UndefinedProperty)", "filenotfound.props")
890extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
892extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("bar", "extn2.proj"),
1000var extnDir = Path.Combine(ObjectModelHelpers.TempProjectDir, extnDirName);
1001Directory.CreateDirectory(Path.Combine(extnDir, Path.GetDirectoryName(relativeFilePath)));
1002File.WriteAllText(Path.Combine(extnDir, relativeFilePath), fileContents);
Evaluation\Preprocessor_Tests.cs (13)
707directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
743<Import Project=""" + Path.Combine(directoryXmlCommentFriendly, "*.targets") + @""">
745" + Path.Combine(directoryXmlCommentFriendly, "1.targets") + @"
758<Import Project=""" + Path.Combine(directoryXmlCommentFriendly, "*.targets") + @""">
760" + Path.Combine(directoryXmlCommentFriendly, "2.targets") + @"
858string sdkPropsPath = Path.Combine(testSdkDirectory, "Sdk.props");
859string sdkTargetsPath = Path.Combine(testSdkDirectory, "Sdk.targets");
974string importedPropsPath = Path.Combine(testDirectory, "Import.props");
981string projectPath = Path.Combine(testDirectory, "TestProject.csproj");
1065string sdkPropsPath1 = Path.Combine(sdk1, "Sdk.props");
1066string sdkTargetsPath1 = Path.Combine(sdk1, "Sdk.targets");
1079string sdkPropsPath2 = Path.Combine(sdk2, "Sdk.props");
1080string sdkTargetsPath2 = Path.Combine(sdk2, "Sdk.targets");
Evaluation\SdkResultEvaluation_Tests.cs (26)
129string projectPath = Path.Combine(_testFolder, "project.proj");
162string projectPath = Path.Combine(_testFolder, "project.proj");
192Path.Combine(_testFolder, "Sdk"),
199new[] { Path.Combine(_testFolder, "Sdk") },
224string projectPath = Path.Combine(_testFolder, "project.proj");
235Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
287Path.Combine(_testFolder, "Sdk1"),
288Path.Combine(_testFolder, "Sdk2")
312string projectPath = Path.Combine(_testFolder, "project.proj");
323Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk1"));
334Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk2"));
388new[] { Path.Combine(_testFolder, "Sdk") },
404string projectPath = Path.Combine(_testFolder, "project.proj");
415Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
481string projectPath = Path.Combine(_testFolder, "project.proj");
502factory.IndicateSuccess(Path.Combine(_testFolder, "Sdk"), "1.0.0", null, null, null, environmentVariablesToAdd: new Dictionary<string, string>
522string projectPath = Path.Combine(_testFolder, "project.proj");
528Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
556factory.IndicateSuccess(Path.Combine(_testFolder, "Sdk"), "1.0.0", null, null, null, environmentVariablesToAdd: new Dictionary<string, string>
574string projectPath = Path.Combine(_testFolder, "project.proj");
579Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
608return factory.IndicateSuccess(Path.Combine(_testFolder, "Sdk1"), "1.0.0", null, null, null, environmentVariablesToAdd: new Dictionary<string, string>
616return factory.IndicateSuccess(Path.Combine(_testFolder, "Sdk2"), "1.0.0", null, null, null, environmentVariablesToAdd: new Dictionary<string, string>
634string projectPath = Path.Combine(_testFolder, "project.proj");
639Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk1"));
644Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk2"));
FileLogger_Tests.cs (12)
335string directory = Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"));
336string log = Path.Combine(directory, "build.log");
494fileLogger.Parameters = "logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile.log");
496Assert.Equal(0, string.Compare(fileLogger.InternalFilelogger.Parameters, "ForceNoAlign;ShowEventId;ShowCommandLine;logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile3.log") + ";", StringComparison.OrdinalIgnoreCase));
500fileLogger.Parameters = "logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile.log");
502Assert.Equal(0, string.Compare(fileLogger.InternalFilelogger.Parameters, "ForceNoAlign;ShowEventId;ShowCommandLine;logfile=" + Path.Combine(Directory.GetCurrentDirectory(), "mylogfile4.log") + ";", StringComparison.OrdinalIgnoreCase));
505Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "tempura"));
514if (Directory.Exists(Path.Combine(Directory.GetCurrentDirectory(), "tempura")))
517FileUtilities.DeleteWithoutTrailingBackslash(Path.Combine(Directory.GetCurrentDirectory(), "tempura"));
519File.Delete(Path.Combine(Directory.GetCurrentDirectory(), "mylogfile0.log"));
520File.Delete(Path.Combine(Directory.GetCurrentDirectory(), "mylogfile3.log"));
521File.Delete(Path.Combine(Directory.GetCurrentDirectory(), "mylogfile4.log"));
Graph\GetCompatiblePlatformGraph_Tests.cs (6)
354TransientTestFolder project1Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, firstProjectName), createFolder: true);
355TransientTestFolder project1SubFolder = testEnvironment.CreateFolder(Path.Combine(project1Folder.Path, firstProjectName), createFolder: true);
369TransientTestFolder project2Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, secondProjectName), createFolder: true);
370TransientTestFolder project2SubFolder = testEnvironment.CreateFolder(Path.Combine(project2Folder.Path, secondProjectName), createFolder: true);
380TransientTestFolder project3Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, thirdProjectName), createFolder: true);
381TransientTestFolder project3SubFolder = testEnvironment.CreateFolder(Path.Combine(project3Folder.Path, thirdProjectName), createFolder: true);
NetTaskHost_E2E_Tests.cs (10)
21private static string TestAssetsRootPath { get; } = Path.Combine(AssemblyLocation, "TestAssets");
67var coreDirectory = Path.Combine(RunnerUtilities.BootstrapRootPath, "core");
81testTaskOutput.ShouldNotContain("Process path: " + Path.Combine(env.GetEnvironmentVariable("DOTNET_ROOT") ?? "", "dotnet.exe"));
191var coreDirectory = Path.Combine(RunnerUtilities.BootstrapRootPath, "core");
214var coreDirectory = Path.Combine(RunnerUtilities.BootstrapRootPath, "core");
236var coreDirectory = Path.Combine(RunnerUtilities.BootstrapRootPath, "core");
286var coreDirectory = Path.Combine(RunnerUtilities.BootstrapRootPath, "core");
307var coreDirectory = Path.Combine(RunnerUtilities.BootstrapRootPath, "core");
354string symlinkPath = Path.Combine(Path.GetTempPath(), $"msbuild_symlink_test_{Guid.NewGuid():N}");
383[Constants.DotnetHostPathEnvVarName] = Path.Combine(realSdkPath, "dotnet"),
TypeLoader_Tests.cs (13)
21private static readonly string ProjectFileFolder = Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, "PortableTask");
67string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
75string dllPath = Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, dllName);
84string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
90string dllPath = Path.Combine(dir.Path, DLLFileName);
104string newAssemblyLocation = Path.Combine(folder.Path, Path.GetFileName(currentAssembly));
108string utilities = Path.Combine(portableTaskPath, utilitiesName);
109File.Copy(utilities, Path.Combine(folder.Path, utilitiesName));
123string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
124string originalDLLPath = Path.Combine(dir.Path, DLLFileName);
148string projectFilePath = Path.Combine(dir.Path, ProjectFileName);
149string originalDLLPath = Path.Combine(dir.Path, DLLFileName);
174var newDllPath = Path.Combine(temporaryDirectory, DLLFileName);
Microsoft.Build.Framework (48)
FileUtilities.cs (9)
87string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
152cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
452string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
675return NormalizePath(Path.Combine(directory, file));
894return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
994string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
1072var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1513return paths.Aggregate(root, Path.Combine);
1686string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
Utilities\FrameworkLocationHelper.cs (17)
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)
596Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
836var frameworkPath = Path.Combine(NativeMethods.FrameworkBasePath, prefix ?? string.Empty);
846return Path.Combine(complusInstallRoot, complusVersion);
987? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
988: Path.Combine(NativeMethods.FrameworkBasePath, "xbuild-frameworks");
1145string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1453(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) &&
1454!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1486frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
Microsoft.Build.Framework.UnitTests (41)
FileMatcher_Tests.cs (23)
64File.WriteAllBytes(Path.Combine(testFolder.Path, file), new byte[1]);
78TransientTestFolder tf2 = _env.CreateFolder(Path.Combine(testFolder.Path, "subfolder"));
79string symlinkPath = Path.Combine(tf2.Path, "mySymlink");
103foreach (string fullPath in GetFilesComplexGlobbingMatchingInfo.FilesToCreate.Select(i => Path.Combine(testFolder.Path, i.ToPlatformSlash())))
617return new string[] { Path.Combine(path, "LongDirectoryName") };
624return new string[] { Path.Combine(path, "LongSubDirectory") };
631return new string[] { Path.Combine(path, "LongFileName.txt") };
638return new string[] { Path.Combine(path, "pomegranate") };
994ValidateFileMatch(Path.Combine(".", "File.txt"), Path.Combine(".", "File.txt"), false);
995ValidateNoFileMatch(Path.Combine(".", "File.txt"), Path.Combine(".", "File.bin"), false);
1019ValidateFileMatch(Path.Combine("**", "*.cs"), Path.Combine("dir1", "dir2", "file.cs"), true);
1020ValidateFileMatch(Path.Combine("**", "*.cs"), "file.cs", true);
1249string workingPathSubfolder = Path.Combine(workingPath, "SubDir");
1250string offendingPattern = Path.Combine(workingPath, @"*\..\bar");
1263string fileName = Path.Combine(workingPath, "MyFile.txt");
1264string offendingPattern = Path.Combine(workingPath, @"**\**");
1280string workingPathSubdir = Path.Combine(workingPath, "subdir");
1281string workingPathSubdirBing = Path.Combine(workingPathSubdir, "bing");
1283string offendingPattern = Path.Combine(workingPath, @"**\sub*\*.");
2135if (normalizedCandidate == Path.Combine(path, pattern))
2485return new string[] { Path.Combine(path, pattern) };
FileUtilities_Tests.cs (5)
419Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath)));
433Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath)));
817string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "subfolder");
1004Assert.Equal(Path.Combine(root, "1"), FileUtilities.GetFolderAbove(path, 4));
1018Path.Combine(root, "path1"),
Microsoft.Build.Tasks.CodeAnalysis (14)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (13)
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (5)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (38)
ManagedCompilerGlobalCacheTests.cs (9)
39var expectedPath = Path.Combine(Path.GetTempPath(), $"{(visualBasic ? "vb" : "cs")}-cache-path");
60var expectedPath = Path.Combine(Path.GetTempPath(), $"{(visualBasic ? "vb" : "cs")} cache path");
83var path = Path.Combine(Path.GetTempPath(), $"{(visualBasic ? "vb" : "cs")} cache path");
107var expectedPath = Path.Combine(Path.GetTempPath(), "custom-cache-path");
120var explicitPath = Path.Combine(Path.GetTempPath(), "explicit-cache-path");
123Path.Combine(Path.GetTempPath(), "environment-cache-path"),
134var expectedPath = Path.Combine(Path.GetTempPath(), $"{(visualBasic ? "vb" : "cs")}-cache-path");
149var expectedPath = Path.Combine(Path.GetTempPath(), $"{(visualBasic ? "vb" : "cs")}-cache-path");
163var expectedPath = Path.Combine(Path.GetTempPath(), $"{(visualBasic ? "vb" : "cs")}-cache-path");
TestUtilities\DotNetSdkTestBase.cs (11)
73=> dotnetDir != null && File.Exists(Path.Combine(dotnetDir, DotNetExeName)) && Directory.Exists(GetSdkPath(dotnetDir, DotNetSdkVersion));
98var filePath = Path.Combine(objDirectory, projectFileName + ".TestHelpers.g.props");
116var filePath = Path.Combine(objDirectory, projectFileName + ".TestHelpers.g.targets");
154DotNetPath = Path.Combine(DotNetInstallDir, DotNetExeName);
156var sdksDir = Path.Combine(DotNetSdkPath ?? string.Empty, "Sdks");
177var csharpCoreTargets = Path.Combine(testBinDirectory, "Microsoft.CSharp.Core.targets");
178var visualBasicCoreTargets = Path.Combine(testBinDirectory, "Microsoft.VisualBasic.Core.targets");
199Assert.True(File.Exists(Path.Combine(ObjDir.Path, "project.assets.json")));
200Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.props")));
201Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.targets")));
224var evaluationResultsFile = Path.Combine(OutDir.Path, "EvaluationResult.txt");
Microsoft.Build.Tasks.Core (107)
AssemblyDependency\ReferenceTable.cs (7)
956companionFile = Path.Combine(Path.GetDirectoryName(baseName), implementationFile);
999string satelliteAssembly = Path.Combine(subDirectory, satelliteFilename);
1003reference.AddSatelliteFile(Path.Combine(cultureName, satelliteFilename));
1022string serializationAssemblyPath = Path.Combine(reference.DirectoryName, serializationAssemblyFilename);
2753AddRelatedItem(serializationAssemblyItems, relatedItemBase, Path.Combine(reference.DirectoryName, serializationAssemblyFile));
2759AddRelatedItem(scatterItems, relatedItemBase, Path.Combine(reference.DirectoryName, scatterFile));
2772AddRelatedItem(satelliteItems, relatedItemBase, Path.Combine(reference.DirectoryName, satelliteFile));
BootstrapperUtil\BootstrapperBuilder.cs (21)
174string strOutputExe = System.IO.Path.Combine(settings.OutputPath, SETUP_EXE);
361string setupSourceFile = System.IO.Path.Combine(bootstrapperPath, SETUP_BIN);
503private string BootstrapperPath => System.IO.Path.Combine(Path, ENGINE_PATH);
505private string PackagePath => System.IO.Path.Combine(Path, PACKAGE_PATH);
507private string SchemaPath => System.IO.Path.Combine(Path, SCHEMA_PATH);
528string startDirectory = System.IO.Path.Combine(BootstrapperPath, RESOURCES_PATH);
535string resourceDirectory = System.IO.Path.Combine(startDirectory, subDirectory);
536string resourceFilePath = System.IO.Path.Combine(resourceDirectory, SETUP_RESOURCES_FILE);
880string strSubDirectoryFullPath = System.IO.Path.Combine(packagePath, strSubDirectory);
883string strBaseManifestFilename = System.IO.Path.Combine(strSubDirectoryFullPath, ROOT_MANIFEST_FILE);
884string strBaseManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
922UpdatePackageFileNodes(packageFilesNode, System.IO.Path.Combine(packagePath, strSubDirectory), strSubDirectory);
935string strLangManifestFilename = System.IO.Path.Combine(strLanguageDirectory, CHILD_MANIFEST_FILE);
936string strLangManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
1172string strSourceFile = System.IO.Path.Combine(strSourcePath, relativePath);
1176targetPathAttribute.Value = System.IO.Path.Combine(strTargetPath, relativePath);
1179string newNameValue = System.IO.Path.Combine(strTargetPath, relativePath);
1468string strDestinationFileName = System.IO.Path.Combine(settings.OutputPath, packageFileDestination.Value);
2000using (var xmlwriter = new XmlTextWriter(System.IO.Path.Combine(s_logPath, fileName), Encoding.UTF8))
2042using (var fileWriter = new StreamWriter(System.IO.Path.Combine(s_logPath, fileName), append))
2203string logPath = System.IO.Path.Combine(
GetSDKReferenceFiles.cs (6)
514string xmlFile = Path.Combine(directory, fileNameNoExtension + ".xml");
630string targetPath = Path.Combine(targetPathRoot, relativeToBase);
960referencesCacheFile = Path.Combine(_cacheFileDirectory, GetCacheFileName(saveContext.SdkIdentity, saveContext.SdkRoot, cacheFileInfo.Hash.ToString("X", CultureInfo.InvariantCulture)));
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");
Microsoft.Build.Tasks.UnitTests (693)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (189)
189protected static readonly string s_myProjectPath = Path.Combine(s_rootPathPrefix, "MyProject");
198protected static readonly string s_myMissingAssemblyRelPath = Path.Combine("MyProject", "MyMissingAssembly.dll");
199protected static readonly string s_myPrivateAssemblyRelPath = Path.Combine("MyProject", "MyPrivateAssembly.exe");
201protected static readonly string s_frameworksPath = Path.Combine(s_rootPathPrefix, "Frameworks");
203protected static readonly string s_myComponents2RootPath = Path.Combine(s_rootPathPrefix, "MyComponents2");
204protected static readonly string s_myComponentsRootPath = Path.Combine(s_rootPathPrefix, "MyComponents");
205protected static readonly string s_myComponents10Path = Path.Combine(s_myComponentsRootPath, "1.0");
206protected static readonly string s_myComponents20Path = Path.Combine(s_myComponentsRootPath, "2.0");
207protected static readonly string s_myComponentsMiscPath = Path.Combine(s_myComponentsRootPath, "misc");
209protected static readonly string s_myComponentsV05Path = Path.Combine(s_myComponentsRootPath, "v0.5");
210protected static readonly string s_myComponentsV10Path = Path.Combine(s_myComponentsRootPath, "v1.0");
211protected static readonly string s_myComponentsV20Path = Path.Combine(s_myComponentsRootPath, "v2.0");
212protected static readonly string s_myComponentsV30Path = Path.Combine(s_myComponentsRootPath, "v3.0");
214protected static readonly string s_unifyMeDll_V05Path = Path.Combine(s_myComponentsV05Path, "UnifyMe.dll");
215protected static readonly string s_unifyMeDll_V10Path = Path.Combine(s_myComponentsV10Path, "UnifyMe.dll");
216protected static readonly string s_unifyMeDll_V20Path = Path.Combine(s_myComponentsV20Path, "UnifyMe.dll");
217protected static readonly string s_unifyMeDll_V30Path = Path.Combine(s_myComponentsV30Path, "UnifyMe.dll");
219protected static readonly string s_myComponents40ComponentPath = Path.Combine(s_myComponentsRootPath, "4.0Component");
220protected static readonly string s_40ComponentDependsOnOnlyv4AssembliesDllPath = Path.Combine(s_myComponents40ComponentPath, "DependsOnOnlyv4Assemblies.dll");
222protected static readonly string s_myLibrariesRootPath = Path.Combine(s_rootPathPrefix, "MyLibraries");
223protected static readonly string s_myLibraries_V1Path = Path.Combine(s_myLibrariesRootPath, "v1");
224protected static readonly string s_myLibraries_V2Path = Path.Combine(s_myLibrariesRootPath, "v2");
225protected static readonly string s_myLibraries_V1_EPath = Path.Combine(s_myLibraries_V1Path, "E");
227protected static readonly string s_myLibraries_ADllPath = Path.Combine(s_myLibrariesRootPath, "A.dll");
228protected static readonly string s_myLibraries_BDllPath = Path.Combine(s_myLibrariesRootPath, "B.dll");
229protected static readonly string s_myLibraries_CDllPath = Path.Combine(s_myLibrariesRootPath, "C.dll");
230protected static readonly string s_myLibraries_TDllPath = Path.Combine(s_myLibrariesRootPath, "T.dll");
232protected static readonly string s_myLibraries_V1_DDllPath = Path.Combine(s_myLibraries_V1Path, "D.dll");
233protected static readonly string s_myLibraries_V1_E_EDllPath = Path.Combine(s_myLibraries_V1_EPath, "E.dll");
234protected static readonly string s_myLibraries_V2_DDllPath = Path.Combine(s_myLibraries_V2Path, "D.dll");
235protected static readonly string s_myLibraries_V1_GDllPath = Path.Combine(s_myLibraries_V1Path, "G.dll");
236protected static readonly string s_myLibraries_V2_GDllPath = Path.Combine(s_myLibraries_V2Path, "G.dll");
241protected static readonly string s_regress444809RootPath = Path.Combine(s_rootPathPrefix, "Regress444809");
242protected static readonly string s_regress444809_ADllPath = Path.Combine(s_regress444809RootPath, "A.dll");
243protected static readonly string s_regress444809_BDllPath = Path.Combine(s_regress444809RootPath, "B.dll");
244protected static readonly string s_regress444809_CDllPath = Path.Combine(s_regress444809RootPath, "C.dll");
245protected static readonly string s_regress444809_DDllPath = Path.Combine(s_regress444809RootPath, "D.dll");
247protected static readonly string s_regress444809_V2RootPath = Path.Combine(s_regress444809RootPath, "v2");
248protected static readonly string s_regress444809_V2_ADllPath = Path.Combine(s_regress444809_V2RootPath, "A.dll");
250protected static readonly string s_regress442570_RootPath = Path.Combine(s_rootPathPrefix, "Regress442570");
251protected static readonly string s_regress442570_ADllPath = Path.Combine(s_regress442570_RootPath, "A.dll");
252protected static readonly string s_regress442570_BDllPath = Path.Combine(s_regress442570_RootPath, "B.dll");
254protected static readonly string s_myAppRootPath = Path.Combine(s_rootPathPrefix, "MyApp");
255protected static readonly string s_myApp_V05Path = Path.Combine(s_myAppRootPath, "v0.5");
256protected static readonly string s_myApp_V10Path = Path.Combine(s_myAppRootPath, "v1.0");
257protected static readonly string s_myApp_V20Path = Path.Combine(s_myAppRootPath, "v2.0");
258protected static readonly string s_myApp_V30Path = Path.Combine(s_myAppRootPath, "v3.0");
273protected static readonly string s_assemblyFolder_RootPath = Path.Combine(s_rootPathPrefix, "AssemblyFolder");
274protected static readonly string s_assemblyFolder_SomeAssemblyDllPath = Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.dll");
375Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"),
376Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"),
377Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"),
378Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"),
379Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"),
380Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"),
381Path.Combine(Path.GetTempPath(), @"RawFileNameRelative\System.Xml.dll"),
382Path.Combine(Path.GetTempPath(), @"RelativeAssemblyFiles\System.Xml.dll"),
383Path.Combine(s_myVersion20Path, "System.Data.dll"),
384Path.Combine(s_myVersion20Path, "System.Xml.dll"),
385Path.Combine(s_myVersion20Path, "System.Xml.pdb"),
386Path.Combine(s_myVersion20Path, "System.Xml.xml"),
394Path.Combine(s_rootPathPrefix, s_myPrivateAssemblyRelPath),
395Path.Combine(s_myProjectPath, "MyCopyLocalAssembly.dll"),
396Path.Combine(s_myProjectPath, "MyDontCopyLocalAssembly.dll"),
397Path.Combine(s_myVersion20Path, "BadImage.dll"), // An assembly that will give a BadImageFormatException from GetAssemblyName
398Path.Combine(s_myVersion20Path, "BadImage.pdb"),
399Path.Combine(s_myVersion20Path, "MyGacAssembly.dll"),
400Path.Combine(s_myVersion20Path, "MyGacAssembly.pdb"),
402Path.Combine(s_myVersion20Path, "System.dll"),
403Path.Combine(s_myVersion40Path, "System.dll"),
404Path.Combine(s_myVersion90Path, "System.dll"),
405Path.Combine(s_myVersion20Path, "mscorlib.dll"),
406Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"),
408Path.Combine(s_myProjectPath, "mscorlib.dll"), // This is an mscorlib.dll that has no metadata (i.e. GetAssemblyName returns null)
409Path.Combine(s_myProjectPath, "System.Data.dll"), // This is a System.Data.dll that has the wrong pkt, it shouldn't be matched.
410Path.Combine(s_myComponentsRootPath, "MyGrid.dll"), // A vendor component that we should find in the registry.
428Path.Combine(s_myComponentsV30Path, "MyControlWithFutureTargetNDPVersion.dll"), // The future version of a component.
429Path.Combine(s_myComponentsV20Path, "MyControlWithFutureTargetNDPVersion.dll"), // The current version of a component.
430Path.Combine(s_myComponentsV10Path, "MyNDP1Control.dll"), // A control that only has an NDP 1.0 version
431Path.Combine(s_myComponentsV20Path, "MyControlWithPastTargetNDPVersion.dll"), // The current version of a component.
432Path.Combine(s_myComponentsV10Path, "MyControlWithPastTargetNDPVersion.dll"), // The past version of a component.
436Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), // A devices mscorlib.
453Path.Combine(s_myAppRootPath, "DependsOnSimpleA.dll"),
501Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.pdb"),
502Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.xml"),
503Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.pri"),
504Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.licenses"),
505Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.config"),
514Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"),
515Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"),
516Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"),
517Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"),
518Path.Combine(s_myAppRootPath, "DependsOnWeaklyNamedUnified.dll"),
519Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"),
525Path.Combine(s_myComponentsMiscPath, "DependsOnOnlyv4Assemblies.dll"), // Only depends on 4.0.0 assemblies
526Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), // Is in redist list and is a 9.0 assembly
527Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), // Depends on 9.0 assemblies
528Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), // Depends on 9.0 assemblies
529Path.Combine(s_myComponents10Path, "DependsOn9.dll"), // Depends on 9.0 assemblies
530Path.Combine(s_myComponents20Path, "DependsOn9.dll"), // Depends on 9.0 assemblies
548Path.Combine(s_myComponentsRootPath, "V.dll"),
549Path.Combine(s_myComponents2RootPath, "W.dll"),
550Path.Combine(s_myComponentsRootPath, "X.dll"),
551Path.Combine(s_myComponentsRootPath, "X.pdb"),
552Path.Combine(s_myComponentsRootPath, "Y.dll"),
553Path.Combine(s_myComponentsRootPath, "Z.dll"),
555Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"),
556Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"),
912Path.Combine(path, "en"), Path.Combine(path, "en-GB"), Path.Combine(path, "xx")
921Path.Combine(path, "en"), Path.Combine(path, "en-GB"), Path.Combine(path, "xx")
1075String.Equals(path, Path.Combine(s_myVersion20Path, "BadImage.dll"), StringComparison.OrdinalIgnoreCase))
1077throw new System.BadImageFormatException(@"The format of the file '" + Path.Combine(s_myVersion20Path, "BadImage.dll") + "' is invalid");
1082String.Equals(path, Path.Combine(s_myProjectPath, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1083|| String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1084|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
1092String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1093|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
1104if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1109if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1114if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1202if (String.Equals(path, Path.Combine(Path.GetTempPath(), @"RawFileNameRelative\System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1207if (String.Equals(path, Path.Combine(Path.GetTempPath(), @"RelativeAssemblyFiles\System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1212if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.XML.dll"), StringComparison.OrdinalIgnoreCase))
1219if (String.Equals(path, Path.Combine(s_myProjectPath, "System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1226if (String.Equals(path, Path.Combine(s_myProjectPath, "System.Data.dll"), StringComparison.OrdinalIgnoreCase))
1232if (path.EndsWith(Path.Combine(s_myVersion20Path, "MyGacAssembly.dll")))
1238if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1244if (String.Equals(path, Path.Combine(s_myVersion40Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1250if (String.Equals(path, Path.Combine(s_myVersion90Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1258String.Equals(path, Path.Combine(s_myVersion20Path, "System.Data.dll"), StringComparison.OrdinalIgnoreCase))
1299if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"), StringComparison.OrdinalIgnoreCase))
1304if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1319if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1324if (String.Equals(path, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1329if (String.Equals(path, Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1380if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), StringComparison.OrdinalIgnoreCase))
1386if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1392if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), StringComparison.OrdinalIgnoreCase))
1397if (String.Equals(path, Path.Combine(s_myComponents10Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1402if (String.Equals(path, Path.Combine(s_myComponents20Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1437if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.pdb"), StringComparison.OrdinalIgnoreCase))
1485if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "V.dll"), StringComparison.OrdinalIgnoreCase))
1489if (String.Equals(path, Path.Combine(s_myComponents2RootPath, "W.dll"), StringComparison.OrdinalIgnoreCase))
1493if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.dll"), StringComparison.OrdinalIgnoreCase))
1498if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Z.dll"), StringComparison.OrdinalIgnoreCase))
1503if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Y.dll"), StringComparison.OrdinalIgnoreCase))
1508if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"), StringComparison.OrdinalIgnoreCase))
1513if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"), StringComparison.OrdinalIgnoreCase))
1822if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1826else if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1830else if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1834else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1838else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1842else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1857if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1865if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1873if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1995if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2091String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
2092|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
2102if (String.Equals(path, Path.Combine(s_myAppRootPath, "DependsOnSimpleA.dll"), StringComparison.OrdinalIgnoreCase))
2150if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "MyGrid.dll"), StringComparison.OrdinalIgnoreCase))
2211if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnWeaklyNamedUnified.dll"), StringComparison.OrdinalIgnoreCase))
2219if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"), StringComparison.OrdinalIgnoreCase))
2227if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2235if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2243if (String.Equals(path, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2251if (String.Equals(path, Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2275if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), StringComparison.OrdinalIgnoreCase))
2285if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2295if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), StringComparison.OrdinalIgnoreCase))
2303if (String.Equals(path, Path.Combine(s_myComponents10Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2311if (String.Equals(path, Path.Combine(s_myComponents20Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2344if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "V.dll"), StringComparison.OrdinalIgnoreCase))
2352if (String.Equals(path, Path.Combine(s_myComponents2RootPath, "W.dll"), StringComparison.OrdinalIgnoreCase))
2357if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.dll"), StringComparison.OrdinalIgnoreCase))
2365if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Z.dll"), StringComparison.OrdinalIgnoreCase))
2370if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Y.dll"), StringComparison.OrdinalIgnoreCase))
2378if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"), StringComparison.OrdinalIgnoreCase))
2383if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"), StringComparison.OrdinalIgnoreCase))
2391if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2400if (String.Equals(path, Path.Combine(s_myVersion40Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2409if (String.Equals(path, Path.Combine(s_myVersion90Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2989string redistListPath = Path.Combine(tempPath, Guid.NewGuid() + ".xml");
2990string rarCacheFile = Path.Combine(tempPath, Guid.NewGuid() + ".RarCache");
AssemblyDependency\SuggestedRedirects.cs (2)
205warningMessage.ShouldContain(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.FourSpaceIndent", ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.ReferenceDependsOn", "D, Version=1.0.0.0, CulTUre=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa", Path.Combine(s_myLibraries_V1Path, "D.dll"))));
250warningMessage.ShouldContain(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.FourSpaceIndent", ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.ReferenceDependsOn", "D, Version=1.0.0.0, CulTUre=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa", Path.Combine(s_myLibraries_V1Path, "D.dll"))));
Copy_Tests.cs (60)
226Directory.Exists(Path.Combine(destinationFolder.Path, "source0")).ShouldBeTrue();
227Directory.Exists(Path.Combine(destinationFolder.Path, "source1")).ShouldBeTrue();
971string destinationFolder = Path.Combine(Path.GetTempPath(), "2A333ED756AF4dc392E728D0F874A398");
972string destination1 = Path.Combine(destinationFolder, Path.GetFileName(source1));
973string destination2 = Path.Combine(destinationFolder, Path.GetFileName(source2));
1599string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A392");
1600string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A393");
1602string validOutFile = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A394");
1688string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
1761string file = Path.Combine(currdir, filename);
1814string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
1815string invalidFile = NativeMethodsShared.IsUnixLike ? Path.Combine(temp, "!@#$%^&*()|") : "!@#$%^&*()|";
1880string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
1881string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
1953string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
1954string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2017new TaskItem(Path.Combine(tempPath, "a.cs")),
2018new TaskItem(Path.Combine(tempPath, "b.cs")),
2019new TaskItem(Path.Combine(tempPath, "a.cs")),
2020new TaskItem(Path.Combine(tempPath, "a.cs")),
2039DestinationFolder = new TaskItem(Path.Combine(tempPath, "foo")),
2075new TaskItem(Path.Combine(tempPath, "a.cs")),
2076new TaskItem(Path.Combine(tempPath, "b.cs")),
2077new TaskItem(Path.Combine(tempPath, "a.cs")),
2078new TaskItem(Path.Combine(tempPath, "a.cs")),
2079new TaskItem(Path.Combine(tempPath, "a.cs")),
2092new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs
2093new TaskItem(Path.Combine(tempPath, @"xa.cs")), // b.cs -> xa.cs should copy because it's a different source
2094new TaskItem(Path.Combine(tempPath, @"xb.cs")), // a.cs -> xb.cs should copy because it's a different destination
2095new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs should copy because it's a different source from the b.cs copy done previously
2096new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs should not copy because it's the same source
2126string xaPath = Path.Combine(tempPath, "xa.cs");
2129Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[0].Key.Path);
2130Assert.Equal(Path.Combine(tempPath, "b.cs"), xaCopies[1].Key.Path);
2131Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[2].Key.Path);
2133string xbPath = Path.Combine(tempPath, "xb.cs");
2136Assert.Equal(Path.Combine(tempPath, "a.cs"), xbCopies[0].Key.Path);
2150string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2151string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A399");
2152string outFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A400");
2605string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2606string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2676string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2677string destFile1 = Path.Combine(destFolder, Path.GetFileName(sourceFile1));
2678string destFile2 = Path.Combine(destFolder, Path.GetFileName(sourceFile2));
2683string nothingFile = Path.Combine(destFolder, "nothing.txt");
2781string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2782string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2810string destLink = Path.Combine(destFolder, Path.GetFileNameWithoutExtension(sourceFile) + "." + n);
2864string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2865string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2931string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2932string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
3002string destFile = Path.Combine(destFolder.Path, "The Destination");
3164string tempDir = Path.Combine(tempPath, "CopyTestDir" + Guid.NewGuid().ToString("N"));
3175string lowercaseDir = Path.Combine(outputDir, "cs");
3182string sourceFile1 = Path.Combine(sourceDir, "apphost");
3183string sourceFile2 = Path.Combine(sourceDir, "app.dll");
3188string destFile1 = Path.Combine(outputDir, "CS");
3189string destFile2 = Path.Combine(outputDir, "app.dll");
GetSDKReference_Tests.cs (69)
49string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "FakeSDKForReferenceAssemblies");
50sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
51string referenceAssemblyDirectoryConfigx86 = Path.Combine(sdkDirectory, "References\\Retail\\X86");
52string referenceAssemblyDirectoryConfigx64 = Path.Combine(sdkDirectory, "References\\Retail\\X64");
53string referenceAssemblyDirectoryConfigNeutral = Path.Combine(sdkDirectory, "References\\Retail\\Neutral");
54string referenceAssemblyDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\Neutral");
55string referenceAssemblyDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\X86");
56string referenceAssemblyDirectoryCommonConfigX64 = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\X64");
58string redistDirectoryConfigx86 = Path.Combine(sdkDirectory, "Redist\\Retail\\X86");
59string redistDirectoryConfigx64 = Path.Combine(sdkDirectory, "Redist\\Retail\\X64");
60string redistDirectoryConfigNeutral = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
61string redistDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
62string redistDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\X86");
63string redistDirectoryCommonConfigX64 = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\X64");
65string designTimeDirectoryConfigx86 = Path.Combine(sdkDirectory, "DesignTime\\Retail\\X86");
66string designTimeDirectoryConfigNeutral = Path.Combine(sdkDirectory, "DesignTime\\Retail\\Neutral");
67string designTimeDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "DesignTime\\CommonConfiguration\\Neutral");
68string designTimeDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "DesignTime\\CommonConfiguration\\X86");
83Directory.CreateDirectory(Path.Combine(redistDirectoryConfigNeutral, "ASubDirectory\\TwoDeep"));
93string testWinMD = Path.Combine(referenceAssemblyDirectoryConfigx86, "A.winmd");
94string testWinMD64 = Path.Combine(referenceAssemblyDirectoryConfigx64, "A.winmd");
95string testWinMDNeutral = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "B.winmd");
96string testWinMDNeutralWinXML = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "B.xml");
97string testWinMDCommonConfigurationx86 = Path.Combine(referenceAssemblyDirectoryCommonConfigX86, "C.winmd");
98string testWinMDCommonConfigurationx64 = Path.Combine(referenceAssemblyDirectoryCommonConfigX64, "C.winmd");
99string testWinMDCommonConfigurationNeutral = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "D.winmd");
100string testWinMDCommonConfigurationNeutralDupe = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "A.winmd");
102string testRA = Path.Combine(referenceAssemblyDirectoryConfigx86, "E.dll");
103string testRA64 = Path.Combine(referenceAssemblyDirectoryConfigx64, "E.dll");
104string testRANeutral = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "F.dll");
105string testRACommonConfigurationx86 = Path.Combine(referenceAssemblyDirectoryCommonConfigX86, "G.dll");
106string testRACommonConfigurationx64 = Path.Combine(referenceAssemblyDirectoryCommonConfigX64, "G.dll");
107string testRACommonConfigurationNeutral = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "H.dll");
109string testRACommonConfigurationNeutralDupe = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "A.dll");
111string redist = Path.Combine(redistDirectoryConfigx86, "A.dll");
112string redist64 = Path.Combine(redistDirectoryConfigx64, "A.dll");
113string redistNeutral = Path.Combine(redistDirectoryConfigNeutral, "ASubDirectory\\TwoDeep\\B.dll");
114string redistNeutralPri = Path.Combine(redistDirectoryConfigNeutral, "B.pri");
115string redistCommonConfigurationx86 = Path.Combine(redistDirectoryCommonConfigX86, "C.dll");
116string redistCommonConfigurationx64 = Path.Combine(redistDirectoryCommonConfigX64, "C.dll");
117string redistCommonConfigurationNeutral = Path.Combine(redistDirectoryCommonConfigNeutral, "D.dll");
118string redistCommonConfigurationNeutralDupe = Path.Combine(redistDirectoryCommonConfigNeutral, "A.dll");
153string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "FakeSDKForReferenceAssemblies");
154sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\AnotherSDK\\2.0\\");
155string referenceAssemblyDirectoryConfigx86 = Path.Combine(sdkDirectory, "References\\Retail\\X86");
156string redistDirectoryConfigx86 = Path.Combine(sdkDirectory, "Redist\\Retail\\X86");
164string testWinMD = Path.Combine(referenceAssemblyDirectoryConfigx86, "B.winmd");
165string redist = Path.Combine(redistDirectoryConfigx86, "B.pri");
166string redist2 = Path.Combine(redistDirectoryConfigx86, "B.dll");
189private readonly string _cacheDirectory = Path.Combine(Path.GetTempPath(), "GetSDKReferenceFiles");
298Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]);
299Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]);
304Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]);
305Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]);
310Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\X86\\"), sdkFolders[0]);
311Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[1]);
312Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\X86\\"), sdkFolders[2]);
313Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[3]);
432string winmd = Path.Combine(_sdkDirectory, "References\\Retail\\X86\\A.winmd");
1235string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\B.pri");
1236string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.pri");
1237string referenceWinner = Path.Combine(_sdkDirectory, "References\\Retail\\Neutral\\B.WinMD");
1238string referenceVictim = Path.Combine(_sdkDirectory2, "References\\Retail\\X86\\B.WinMD");
1281string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\ASubDirectory\\TwoDeep\\B.dll");
1282string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.dll");
1324string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\B.pri");
1325string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.pri");
1326string referenceWinner = Path.Combine(_sdkDirectory, "References\\Retail\\Neutral\\B.WinMD");
1327string referenceVictim = Path.Combine(_sdkDirectory2, "References\\Retail\\X86\\B.WinMD");
ManifestTaskEnvironmentTests.cs (11)
54var subFolder = Path.Combine(folder.Path, "sub");
57var resxPath = Path.Combine(subFolder, "Test.resx");
60var csPath = Path.Combine(subFolder, "Test.cs");
84var subFolder = Path.Combine(folder.Path, "Resources");
87var resxPath = Path.Combine(subFolder, "Strings.resx");
113var resxPath = Path.Combine(subFolder, "Test.resx");
158var validPath = Path.Combine(folder.Path, "Valid.resx");
162var valid2Path = Path.Combine(folder.Path, "Valid2.resx");
195var resxPath = Path.Combine(deepFolder, "Test.resx");
215var spaceFolder = Path.Combine(folder.Path, "My Resources");
218var resxPath = Path.Combine(spaceFolder, "My Strings.resx");
Move_Tests.cs (10)
428string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A392");
429string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A393");
431string validOutFile = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A394");
606string file = Path.Combine(currdir, filename);
649string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
695string destFolder = Path.Combine(temp, "2A333ED756AF4d1392E728D0F864A398");
696string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
750string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
751string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A399");
752string outFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A400");
ResolveNonMSBuildProjectOutput_Tests.cs (44)
136projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
142projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
144projectOutputs, true, Path.Combine("obj", "correct.dll"));
148projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
149projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
150projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
156projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
157projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
158projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
159projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
161projectOutputs, true, Path.Combine("obj", "correct.dll"));
223projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-000000000000}", Path.Combine("obj", "managed.dll"));
224projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "unmanaged.dll"));
226TestUnresolvedReferencesHelper(projectRefs, projectOutputs, path => (path == Path.Combine("obj", "managed.dll")), out unresolvedOutputs, out resolvedOutputs);
229Assert.True(resolvedOutputs.Contains(Path.Combine("obj", "managed.dll")));
230Assert.True(resolvedOutputs.Contains(Path.Combine("obj", "unmanaged.dll")));
231Assert.Equal("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "managed.dll")]).GetMetadata("ManagedAssembly"));
232Assert.NotEqual("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "unmanaged.dll")]).GetMetadata("ManagedAssembly"));
249projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
250projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
251projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
264projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
265projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
266projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
267projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
272Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
278projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
279projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
280projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
281projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
282projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-000000000000}", Path.Combine("obj", "correct2.dll"));
287Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
288Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct2.dll")));
293projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
294projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
295projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
306projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
307projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
308projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
309projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
315Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
320projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
321projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
322projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
ResolveSDKReference_Tests.cs (157)
123string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "TestMaxPlatformVersionWithTargetFrameworkVersion");
176string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
462string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyDependsOnWarningFromManifest");
484string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
577string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit1");
588string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
632string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit2");
643string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
690string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit3");
701string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
745string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit4");
756string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
800string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit5");
811string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
855string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit6");
866string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
912string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit7");
923string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
967string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit8");
977string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1021string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "Prefer32bit9");
1032string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1491string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SDKFoundButBadlyFormattedSDKManifestWarnings");
1498string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1550string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SDKFoundButBadlyFormattedSDKManifestErrors");
1551string testDirectory = Path.Combine(testDirectoryRoot, "BadTestSDK\\2.0\\");
1557string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1601string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "TestMaxPlatformVersionWithTargetFrameworkVersion");
1654string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1707string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "EmptySDKManifestAttributes");
1734string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1792string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestAttributes");
1816string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1890string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GoodManifestMatchingConfigAndArch");
1911string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
1963string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GoodManifestMatchingConfigOnly");
1982string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2032string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "NoCopyOnPlatformIdentityFound");
2047string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2099string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GoodManifestMatchingConfigOnly");
2120string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2173string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ManifestOnlyHasArmLocation");
2189string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2241string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ManifestArmLocationWithOthers");
2259string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2312string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MatchNoNamesButNamesExistWarning");
2330string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2384string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MatchNoNamesButNamesExistError");
2402string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2453string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SingleSupportedArchitectureMatchesProject");
2472string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2526string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ProductFamilySetInManifest");
2546string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2591string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ProductFamilySetInManifestAndMetadata");
2611string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2658string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SupportsMultipleVersionsNotInManifest");
2678string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2722string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SupportsMultipleVersionsBadMetadata");
2743string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2790string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameProductFamilySameName");
2821string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2822string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
2823string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
2888string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameProductFamilyDiffName");
2919string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
2920string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
2921string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
2986string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameProductFamilyDiffName");
3024string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3025string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
3026string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
3027string sdkManifestFile4 = Path.Combine(testDirectory4, "SDKManifest.xml");
3099string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "ConflictsBetweenSameSDKName");
3130string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3131string sdkManifestFile2 = Path.Combine(testDirectory2, "SDKManifest.xml");
3132string sdkManifestFile3 = Path.Combine(testDirectory3, "SDKManifest.xml");
3205string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SupportsMultipleVersionsVerifyManifestReading");
3226string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3279string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestWithMetadata");
3300string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3356string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestWithMetadataButMetadataDoesNotMatch");
3376string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3422string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "OverrideManifestWithMetadata");
3444string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3500string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "SingleSupportedArchitectureDoesNotMatchProject");
3520string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3564string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MultipleSupportedArchitectureMatchesProject");
3583string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3636string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "MultipleSupportedArchitectureMatchesProject");
3657string sdkManifestFile = Path.Combine(testDirectory, "SDKManifest.xml");
3704string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GatherSDKOutputGroupsWithFramework");
3705string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
3706string archRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\x86");
3707string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
3708string archCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\x86");
3709string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
3711string sdkDirectory3 = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\FrameworkSDkWithManifest\\2.0\\");
3712string archRedist3 = Path.Combine(sdkDirectory3, "Redist\\Retail\\x64");
3713string archRedist33 = Path.Combine(sdkDirectory3, "Redist\\Retail\\Neutral");
3714string archCommonRedist3 = Path.Combine(sdkDirectory3, "Redist\\CommonConfiguration\\x64");
3785string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
3786string sdkManifestFile2 = Path.Combine(sdkDirectory3, "SDKManifest.xml");
3787string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3794string redist1 = Path.Combine(archRedist, "A.dll");
3795string redist2 = Path.Combine(neutralRedist, "B.dll");
3796string redist3 = Path.Combine(archCommonRedist, "C.dll");
3797string redist4 = Path.Combine(neutralCommonRedist, "D.dll");
3798string redist5 = Path.Combine(archRedist33, "A.dll");
3799string redist6 = Path.Combine(archCommonRedist3, "B.dll");
3847string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GatherSDKOutputGroupsWithFramework");
3848string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
3849string archRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\x86");
3850string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
3851string archCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\x86");
3852string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
3854string sdkDirectory3 = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\FrameworkSDkWithManifest\\2.0\\");
3855string archRedist3 = Path.Combine(sdkDirectory3, "Redist\\Retail\\x64");
3856string archRedist33 = Path.Combine(sdkDirectory3, "Redist\\Retail\\Neutral");
3857string archCommonRedist3 = Path.Combine(sdkDirectory3, "Redist\\CommonConfiguration\\x64");
3926string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
3927string sdkManifestFile2 = Path.Combine(sdkDirectory3, "SDKManifest.xml");
3928string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3935string redist1 = Path.Combine(archRedist, "A.dll");
3936string redist2 = Path.Combine(neutralRedist, "B.dll");
3937string redist3 = Path.Combine(archCommonRedist, "C.dll");
3938string redist4 = Path.Combine(neutralCommonRedist, "D.dll");
3939string redist5 = Path.Combine(archRedist3, "D.dll");
3940string redist6 = Path.Combine(archRedist33, "A.dll");
3941string redist7 = Path.Combine(archCommonRedist3, "B.dll");
3991string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "GatherSDKOutputGroupsTargetArchitectureDoesNotExists");
3992string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
3993string x86Redist = Path.Combine(sdkDirectory, "Redist\\Retail\\x86");
3994string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
3995string x86CommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\x86");
3996string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
4043string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
4044string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4050string redist1 = Path.Combine(x86CommonRedist, "A.dll");
4051string redist2 = Path.Combine(x86Redist, "B.dll");
4052string redist3 = Path.Combine(neutralRedist, "C.dll");
4053string redist4 = Path.Combine(neutralCommonRedist, "D.dll");
4100string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "CheckDefaultingOfTargetConfigAndArchitecture");
4101string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
4102string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
4103string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
4145string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
4146string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4151string redist1 = Path.Combine(neutralRedist, "B.dll");
4152string redist2 = Path.Combine(neutralCommonRedist, "C.dll");
4220string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "CheckDefaultingOfTargetConfigAndArchitecture");
4221string sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\v8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
4222string neutralRedist = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
4223string neutralCommonRedist = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
4284string redist1 = Path.Combine(neutralRedist, "B.dll");
4285string redist2 = Path.Combine(neutralCommonRedist, "C.dll");
4292string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4295string sdkManifestFile = Path.Combine(sdkDirectory, "SDKManifest.xml");
ResourceHandling\GenerateResource_Tests.cs (9)
111string expectedOutFile0 = Path.Combine(Path.GetTempPath(), Path.ChangeExtension(resxFile0, ".resources"));
112string expectedOutFile1 = Path.Combine(Path.GetTempPath(), "resx1.foo.resources");
113string expectedOutFile2 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
114string expectedOutFile3 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
3261dir = Path.Combine(Path.GetTempPath(), "directory");
3480t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
3629t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
3942env.CreateFolder(Path.Combine(env.DefaultTestDirectory.Path, "tmp_dir")),
4430Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, "System.dll");
RoslynCodeTaskFactory_Tests.cs (9)
130string output = RunnerUtilities.ExecMSBuild(assemblyProj.Path + $" /p:OutDir={Path.Combine(folder.Path, "subFolder")} /restore", out bool success);
1240TransientTestFolder project1Folder = env.CreateFolder(Path.Combine(rootFolder.Path, "Project1"), createFolder: true);
1241TransientTestFolder project2Folder = env.CreateFolder(Path.Combine(rootFolder.Path, "Project2"), createFolder: true);
1332string projectFilePath = Path.Combine(testFolder.Path, "test.proj");
1382string projectFilePath = Path.Combine(projectFolder.Path, "test.proj");
1427TransientTestFolder projectFolder = env.CreateFolder(Path.Combine(rootFolder.Path, "Project"), createFolder: true);
1428string projectFilePath = Path.Combine(projectFolder.Path, "test.proj");
1443string relativePath = Path.Combine("..", "SharedTask.cs");
1544string projectFilePath = Path.Combine(testFolder.Path, "test.proj");
Unzip_Tests.cs (15)
90_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
91_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
136_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
137_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
140Directory.Exists(Path.Combine(destination.Path, "emptyDir"));
249SourceFiles = new ITaskItem[] { new TaskItem(Path.Combine(testEnvironment.DefaultTestDirectory.Path, "foo.zip")), },
284_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
285_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
314_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
315_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
349_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file1.js"), customMessage: _mockEngine.Log);
350_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "file1.js.map"), customMessage: _mockEngine.Log);
351_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file2.js"), customMessage: _mockEngine.Log);
352_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "readme.txt"), customMessage: _mockEngine.Log);
501string unzippedFilePath = Path.Combine(destination.Path, executableName);
WriteCodeFragment_Tests.cs (10)
94string file = Path.Combine(Path.GetTempPath(), "CombineFileDirectory.tmp");
113string expectedFile = Path.Combine(folder.ItemSpec, file.ItemSpec);
132TaskItem file = new TaskItem(Path.Combine(env.CreateFolder(folderPath: null, createFolder: false).Path, "File.tmp"));
182string folder = Path.Combine(Path.GetTempPath(), "foo" + Path.DirectorySeparatorChar);
183string file = Path.Combine(folder, "CombineFileDirectory.tmp");
204string file = Path.Combine(Path.GetTempPath(), "NoAttributesShouldEmitNoFile.tmp");
232string file = Path.Combine(Path.GetTempPath(), "NoAttributesShouldEmitNoFile.tmp");
297string file = Path.Combine(Path.GetTempPath(), "OneAttribute.tmp");
461string absoluteOutputFile = Path.Combine(Path.GetDirectoryName(absoluteFolder), task.OutputFile.ItemSpec);
479string file = Path.Combine(Path.GetTempPath(), "OneAttribute.tmp");
XslTransformation_Tests.cs (20)
864var testingDocsDir = Path.Combine("TestDocuments", "Fdl2Proto");
866xmlPaths = new TaskItem[] { new TaskItem(Path.Combine(testingDocsDir, "sila.xml")) };
867xslPath = new TaskItem(Path.Combine(testingDocsDir, "fdl2proto.xsl"));
884using (StreamReader sr = new StreamReader(Path.Combine(testingDocsDir, "expected.proto")))
951var otherXmlPath = new TaskItem(Path.Combine(dir, Guid.NewGuid().ToString()));
1052var otherXslPath = new TaskItem(Path.Combine(dir, Guid.NewGuid().ToString() + ".xslt"));
1059var myXmlPath1 = new TaskItem(Path.Combine(dir, "a.xml"));
1066var myXmlPath2 = new TaskItem(Path.Combine(dir, "b.xml"));
1109dir = Path.Combine(Path.GetTempPath(), DateTime.Now.Ticks.ToString());
1113xmlPaths = new TaskItem[] { new TaskItem(Path.Combine(dir, "doc.xml")) };
1114xslPath = new TaskItem(Path.Combine(dir, "doc.xslt"));
1115xslCompiledPath = new TaskItem(Path.Combine(dir, "doc.dll"));
1116outputPaths = new TaskItem[] { new TaskItem(Path.Combine(dir, "testout.xml")) };
1268string dir = Path.Combine(Path.GetTempPath(), DateTime.Now.Ticks.ToString());
1275string xmlPath1 = Path.Combine(dir, "doc1.xml");
1282string xmlPath3 = Path.Combine(dir, "doc3.xml");
1290string xslPath = Path.Combine(dir, "doc.xslt");
1298string outputPath1 = Path.Combine(dir, "testout1.xml");
1299string outputPath2 = Path.Combine(dir, "testout2.xml");
1300string outputPath3 = Path.Combine(dir, "testout3.xml");
Microsoft.Build.UnitTests.Shared (20)
ObjectModelHelpers.cs (10)
146expectedInclude = expectedInclude.Select(i => Path.Combine(testProject.TestRoot, i)).ToArray();
578Assert.True(FileSystems.Default.FileExists(Path.Combine(TempProjectDir, fileRelativePath)), message);
738project.FullPath = Path.Combine(TempProjectDir, "Temporary" + guid.ToString("N") + ".csproj");
842s_tempProjectDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
904string fullFilePath = Path.Combine(TempProjectDir, fileRelativePath);
981string projectFileFullPath = Path.Combine(TempProjectDir, projectFileRelativePath);
1016string projectFileFullPath = Path.Combine(TempProjectDir, projectFileRelativePath);
1628var projectDir = Path.Combine(root, relativePathFromRootToProject);
1631createdProjectFile = Path.Combine(projectDir, "build.proj");
1641return Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Microsoft.Build.Utilities.Core (47)
ToolLocationHelper.cs (37)
664string legacyWindowsMetadataLocation = Path.Combine(sdkRoot, "Windows Metadata");
1224return Path.Combine(sdkLocation, folderName);
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")))
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");
3115string redistListFolder = Path.Combine(path, "RedistList");
3116string redistFilePath = Path.Combine(redistListFolder, "FrameworkList.xml");
3200pathToReturn = Path.Combine(pathToReturn, includeFramework);
3349pathToSdk = Path.Combine(pathToSdk, "x64");
3352pathToSdk = Path.Combine(pathToSdk, "ia64");
3360string filePath = Path.Combine(pathToSdk, fileName);
3476pathToSdk = Path.Combine(pathToSdk, "bin");
3517pathToSdk = Path.Combine(pathToSdk, "x86");
3520pathToSdk = Path.Combine(pathToSdk, "x64");
3528string filePath = Path.Combine(pathToSdk, fileName);
3591toolPath = Path.Combine(toolPath, fileName);
3621return pathToFx == null ? null : Path.Combine(pathToFx, fileName);
3629public static string GetPathToSystemFile(string fileName) => Path.Combine(PathToSystem, fileName);
3861string frameworkIdentifierPath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3919string frameworkProfilePath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3920frameworkProfilePath = Path.Combine(frameworkProfilePath, frameworkVersion);
3921frameworkProfilePath = Path.Combine(frameworkProfilePath, "Profiles");
3966string dotNextFx30RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
3973string dotNextFx35RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
Microsoft.Build.Utilities.UnitTests (155)
ToolLocationHelper_Tests.cs (135)
63string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
71string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
72string referenceDirectory = Path.Combine(tempDirectory, Path.Combine("References", "Foo", "Bar"));
77File.WriteAllText(Path.Combine(referenceDirectory, "One.winmd"), "First");
78File.WriteAllText(Path.Combine(referenceDirectory, "Two.winmd"), "Second");
79File.WriteAllText(Path.Combine(referenceDirectory, "Three.winmd"), "Third");
95string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
102File.WriteAllText(Path.Combine(referenceDirectory, "One.winmd"), "First");
130returnValue.ShouldBe(Path.Combine(sdkRootPath, @"DesignTime\CommonConfiguration\Neutral"));
156returnValue.ShouldBe(Path.Combine(sdkRootPath, "UnionMetadata"));
163string platformRootFolder = Path.Combine(Path.GetTempPath(), @"MockSDK");
164string sdkRootFolder = Path.Combine(platformRootFolder, @"Windows Kits\10");
165string platformFolder = Path.Combine(sdkRootFolder, @"Platforms\UAP\10.0.14944.0");
166string platformFilePath = Path.Combine(platformFolder, "Platform.xml");
167string sdkManifestFilePath = Path.Combine(sdkRootFolder, "SDKManifest.xml");
224string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
249string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
274string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
280File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "");
300string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
306File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "Garbaggggge");
328string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSFN40");
329string temp35Directory = Path.Combine(tempDirectory, "bin");
330string temp40Directory = Path.Combine(temp35Directory, "NETFX 4.0 Tools");
331string toolPath = Path.Combine(temp35Directory, "MyTool.exe");
332string toolPath40 = Path.Combine(temp40Directory, "MyTool.exe");
396string testPath = Path.Combine(tempPath, "HighestVersionOfTargetFrameworkIdentifierRootNoVersions");
415string testPath = Path.Combine(tempPath, "HighestVersionOfTargetFrameworkIdentifierRootMultipleVersions");
447string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSF40");
448string temp35Directory = Path.Combine(tempDirectory, "bin");
449string temp40Directory = Path.Combine(temp35Directory, "NETFX 4.0 Tools");
450string toolPath = Path.Combine(temp35Directory, "MyTool.exe");
451string toolPath40 = Path.Combine(temp40Directory, "MyTool.exe");
535path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86dbg"));
547Path.Combine("{runtime-base}", "v1.3.x86dbg"), // Simulate "Orcas" as the current runtime.}
552path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86fre"));
564Path.Combine("{runtime-base}", "v1.1.x86dbg"), // Simulate "Everett" as the current runtime.
570path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86fre"));
582Path.Combine(@"{runtime-base}", "v1.1"), // Simulate "everett" as the current runtime
600string fakeWhidbeyPath = Path.Combine(tempPath, "v2.0.50224");
601string fakeEverettPath = Path.Combine(tempPath, "v1.1.43225");
688string tv12path = Path.Combine(ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).ToolsPath, Constants.MSBuildExecutableName);
711string tv12path = Path.Combine(Path.GetFullPath(toolsPath32.EvaluatedValue), Constants.MSBuildExecutableName);
912string pathToSdk35InstallRoot = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v7.0A\");
913string pathToSdkV4InstallRootOnVS10 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v7.0A\");
914string pathToSdkV4InstallRootOnVS11 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v8.0A\");
918if (!Directory.Exists(Path.Combine(pathToSdkV4InstallRootOnVS11, "bin")))
924string pathToSdkV4InstallRootOnVS12 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v8.1A\");
932string pathToSdkV4InstallRootOnVS14 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v10.0A\");
1269string expectedPath = Path.Combine(targetFrameworkRootPath, targetFrameworkIdentifier);
1270expectedPath = Path.Combine(expectedPath, "v" + targetFrameworkVersion);
1271expectedPath = Path.Combine(expectedPath, "Profile");
1272expectedPath = Path.Combine(expectedPath, targetFrameworkProfile);
1287string expectedPath = Path.Combine(targetFrameworkRootPath, targetFrameworkIdentifier);
1288expectedPath = Path.Combine(expectedPath, "v" + targetFrameworkVersion);
1389string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsChain");
1392string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1394string redist40 = Path.Combine(redist40Directory, "FrameworkList.xml");
1402string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1404string expectedChainedPath = Path.Combine(tempDirectory, "v4.0");
1431string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoInclude");
1434string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1439string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1461string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoInclude");
1464string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1469string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1491string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoFileList");
1494string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1499string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1520string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsBadFile");
1523string redist40 = Path.Combine(redist40Directory, "FrameworkList.xml");
1529string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.0"));
1551string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistPointsToInvalidInclude");
1554string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1555string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1587string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistInvalidPathChars");
1590string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1591string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1621string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistPathTooLong");
1624string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1625string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1664string tempDirectory = Path.Combine(Path.GetTempPath(), "GetPathToReferenceAssembliesWithRootGoodWithChain");
1667string framework41redistDirectory = Path.Combine(framework41Directory, "RedistList");
1668string framework41RedistList = Path.Combine(framework41redistDirectory, "FrameworkList.xml");
1671string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1672string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1675string framework39redistDirectory = Path.Combine(framework39Directory, "RedistList");
1676string framework39RedistList = Path.Combine(framework39redistDirectory, "FrameworkList.xml");
1729string tempDirectory = Path.Combine(Path.GetTempPath(), "DisplayNameGeneration");
1733string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1734string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1738string framework39redistDirectory = Path.Combine(framework39Directory, "RedistList");
1739string framework39RedistList = Path.Combine(framework39redistDirectory, "FrameworkList.xml");
1786string tempDirectory = Path.Combine(Path.GetTempPath(), "GetPathToReferenceAssembliesWithRootCircularReference");
1790string framework41redistDirectory = Path.Combine(framework41Directory, "RedistList");
1791string framework41RedistList = Path.Combine(framework41redistDirectory, "FrameworkList.xml");
1795string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1796string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1968string combinedPath = Path.Combine(programFiles32, pathToCombineWith);
2500string rootDir = Path.Combine(env.DefaultTestDirectory.Path, "framework-root");
2529string customFrameworkRootPath = Path.Combine(env.DefaultTestDirectory.Path, "framework-root");
2552string rootDir = Path.Combine(env.CreateFolder().Path, "framework-root");
2553string fallbackPath = Path.Combine(env.CreateFolder().Path, "framework-root");
2583string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2596string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2613string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2630string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2645string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2662string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2725File.WriteAllText(Path.Combine(redistPath, "FrameworkList.xml"), string.Format(frameworkListXml, frameworkName));
2726File.WriteAllText(Path.Combine(asmPath, "mscorlib.dll"), string.Empty);
3127string frameworkPath = Path.Combine(tmpRootDirectory, frameworkPathPattern);
3128string manifestFile = Path.Combine(frameworkPath, "SDKManifest.xml");
3130string frameworkPath2 = Path.Combine(tmpRootDirectory, frameworkPathPattern2);
3131string manifestFile2 = Path.Combine(frameworkPath, "SDKManifest.xml");
3274string manifestPath = Path.Combine(Path.GetTempPath(), "ManifestTmp");
3280string manifestFile = Path.Combine(manifestPath, "SDKManifest.xml");
3409string manifestPath = Path.Combine(Path.GetTempPath(), "ManifestTmp");
3415string manifestFile = Path.Combine(manifestPath, "SDKManifest.xml");
3539string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetInstalledSDKLocations");
3571File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), "HI");
3572File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "HI");
3573string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3608string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetInstalledSDKLocations2");
3643File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), platformSDKManifestContents);
3644File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "HI");
3645string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4103string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyFindRootFolderWhereAllFilesExist");
4104string[] rootDirectories = new string[] { Path.Combine(testDirectoryRoot, "Root1"), Path.Combine(testDirectoryRoot, "Root2") };
4109string subdir = Path.Combine(rootDirectories[i], "Subdir");
4112File.Create(Path.Combine(rootDirectories[i], "file1.txt")).Close();
4113File.Create(Path.Combine(subdir, fileInSubDir)).Close();
4415string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory");
4538string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory2");
ToolTask_Tests.cs (13)
42_fullToolName = Path.Combine(
169t.FullToolName = Path.Combine(systemPath, NativeMethodsShared.IsWindows ? "attrib.exe" : "ps");
428t.PathToToolUsed.ShouldBe(Path.Combine(systemPath, shellName));
434t.PathToToolUsed.ShouldBe(Path.Combine(systemPath, copyName));
479Path.Combine(systemPath, toolName));
732string directoryNamedSameAsTool = Directory.CreateDirectory(Path.Combine(tempDirectory, toolName)).FullName;
764expectedCmdPath = new[] { Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe").ToUpperInvariant() };
1136: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "ping.exe");
1353string expected = Path.Combine(projectDir, "subdir");
1459File.WriteAllText(Path.Combine(tempDir, toolName), "dummy");
1479result.ShouldBe(Path.Combine(tempDir, toolName));
1489string fullPath = Path.Combine(projectDir, fileName);
1562string toolFullPath = Path.Combine(toolDir, toolName);
Microsoft.Cci.Extensions (2)
Microsoft.CodeAnalysis (21)
Microsoft.CodeAnalysis.Analyzers (5)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (25)
src\Analyzers\CSharp\Tests\MatchFolderAndNamespace\CSharpMatchFolderAndNamespaceTests.cs (25)
35=> Path.Combine(Directory, Path.Combine(folders));
39var filePath = Path.Combine(directory ?? Directory, fileName);
385(Path.Combine(folder, "ABClass1.cs"), code1),
386(Path.Combine(folder, "ABClass2.cs"), code2),
399var folder = Path.Combine("B", "C");
532(Path.Combine(folder, "Class1.cs"), code1),
538(Path.Combine(folder, "Class1.cs"), fixed1),
640(Path.Combine(folder, "Class1.cs"), code1),
646(Path.Combine(folder, "Class1.cs"), fixed1),
750(Path.Combine(folder1, "Class1.cs"), code1),
751(Path.Combine(folder2, "Class2.cs"), code2),
752(Path.Combine(folder3, "Class3.cs"), code3),
757(Path.Combine(folder1, "Class1.cs"), fixed1),
758(Path.Combine(folder2, "Class2.cs"), fixed2),
759(Path.Combine(folder3, "Class3.cs"), fixed3),
901(Path.Combine(folder1, "Class1.cs"), code1),
902(Path.Combine(folder2, "Class2.cs"), code2),
903(Path.Combine(folder3, "Class3.cs"), code3),
910Sources = { (Path.Combine(project2folder, "P.cs"), project2Source) },
911AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
919(Path.Combine(folder1, "Class1.cs"), fixed1),
920(Path.Combine(folder2, "Class2.cs"), fixed2),
921(Path.Combine(folder3, "Class3.cs"), fixed3),
928Sources = { (Path.Combine(project2folder, "P.cs"), project2FixedSource) },
929AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (183)
CommandLineTests.cs (162)
64var cscDllPath = Path.Combine(
66Path.Combine("dependency", "csc.dll"));
77s_CSharpScriptExecutable = s_CSharpCompilerExecutable.Replace("csc.dll", Path.Combine("csi", "csi.dll"));
154string exePath = Path.Combine(dir.Path, "temp.exe");
174var xmlPath = Path.Combine(dir.Path, docName);
410var result = ProcessUtilities.Run(Path.Combine(dir.Path, "sjis.exe"), arguments: "", workingDirectory: dir.Path);
412Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932)));
430var result = ProcessUtilities.Run(Path.Combine(dir.Path, "sjis.exe"), arguments: "", workingDirectory: dir.Path);
432Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932)));
462AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "a.cs"), Path.Combine(WorkingDirectory, "b.cs") }, cmd.Arguments.SourceFiles.Select(file => file.Path));
479Func<string, string> prependBasePath = fileName => Path.Combine(basePath, fileName);
491{ Path.Combine(dirSubDir.Path, @"b.rsp"), @"
499{ Path.Combine(Path.GetPathRoot(basePath), @"d.rsp"), @"
1533Diagnostic(ErrorCode.ERR_OpenResponseFile).WithArguments(Path.Combine(WorkingDirectory, @"roslyn_test_non_existing_file")));
2013Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2026Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2033Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2100Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath);
2101Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2105Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath);
2106Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2113Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2117Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2152Assert.Equal(Path.Combine(Path.GetPathRoot(WorkingDirectory), @"MyFolder\MyPdb.pdb"), parsedArgs.PdbPath);
2216Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink);
2220Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink);
2224Assert.Equal(Path.Combine(WorkingDirectory, "s l.json"), parsedArgs.SourceLink);
2258var peStream = File.OpenRead(Path.Combine(dir.Path, "a.exe"));
2290var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
2319var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
2338new[] { "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2344new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2350new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2356new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2362new[] { "a,b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2368new[] { "a.txt", "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2482using (var peReader = new PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe"))))
2489MetadataReaderProvider.FromPortablePdbStream(File.OpenRead(Path.Combine(dir.Path, "embed.pdb"))))
2517symReader = SymReaderFactory.CreateReader(File.OpenRead(Path.Combine(dir.Path, "embed.pdb")));
2888Diagnostic(ErrorCode.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah"), "File not found."));
2889Assert.Equal(expected: Path.Combine(TempRoot.Root, "blah"), actual: parsedArgs.RuleSetPath);
2893Diagnostic(ErrorCode.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah;blah.ruleset"), "File not found."));
2894Assert.Equal(expected: Path.Combine(TempRoot.Root, "blah;blah.ruleset"), actual: parsedArgs.RuleSetPath);
3596" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(40,13): error CS0103: The name 'Goo' does not exist in the current context
3597" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(50,13): error CS0103: The name 'Goo' does not exist in the current context
3619" + Path.Combine(dir.Path, @"a.cs") + @"(8,13): error CS0103: The name 'Goo' does not exist in the current context
3623" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(40,13): error CS0103: The name 'Goo' does not exist in the current context
3624" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(50,13): error CS0103: The name 'Goo' does not exist in the current context
3631" + Path.Combine(dir.Path, @"a.cs") + @"(32,13): error CS0103: The name 'Goo' does not exist in the current context
3799Assert.Equal(Path.Combine(baseDirectory, "MyBinary.dll"), parsedArgs.GetOutputFilePath(parsedArgs.OutputFileName));
4110Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.DocumentationPath);
4214Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.ErrorLogOptions.Path);
4505using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, "aa.exe"))))
5661Assert.Equal(Path.Combine(WorkingDirectory, "test.snk"), parsedArgs.CompilationOptions.CryptoKeyFile);
6075var assemblyName = AssemblyName.GetAssemblyName(Path.Combine(tempDir, name));
7095using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, expectedOutputName))))
7834IntPtr lib = LoadLibraryEx(Path.Combine(dir.Path, outputFileName), IntPtr.Zero, 0x00000002);
8270Assert.True(File.Exists(Path.Combine(dir.ToString(), "a.xml")));
8462CleanupAllGeneratedFiles(Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(source)), Path.GetFileName(source)));
8554exitCode = CreateCSharpCompiler(null, baseDir, new[] { "/nologo", "/preferreduilang:en", Path.Combine(baseDir, "nonexistent.cs"), source.ToString() }).Run(outWriter);
8556Assert.Equal("error CS2001: Source file '" + Path.Combine(baseDir, "nonexistent.cs") + "' could not be found.", outWriter.ToString().Trim());
8718System.IO.File.Delete(System.IO.Path.Combine(baseDir, "goo.dll"));
8997var exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe");
9019var exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe");
9042var xmlPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.xml");
9066var sourceLinkPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.json");
9094string exePath = Path.Combine(Path.GetDirectoryName(sourcePath), "test.exe");
9119string exePath = Path.Combine(Path.GetDirectoryName(sourcePath), "test.exe");
9145string xmlPath = Path.Combine(WorkingDirectory, "Test.xml");
9248string xmlPath = Path.Combine(WorkingDirectory, "Test.xml");
9952Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles.Single().Path);
9957Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9958Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9963Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9964Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[1].Path);
9968Assert.Equal(Path.Combine(WorkingDirectory, "..\\web.config"), args.AdditionalFiles.Single().Path);
9978Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles[0].Path);
9979Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles[1].Path);
9980Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles[2].Path);
9985Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9986Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9991Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9992Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9997Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9998Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
10003Assert.Equal(Path.Combine(WorkingDirectory, "web.config,app.manifest"), args.AdditionalFiles[0].Path);
10008Assert.Equal(Path.Combine(WorkingDirectory, "web.config:app.manifest"), args.AdditionalFiles[0].Path);
10024Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths.Single());
10029Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
10030Assert.Equal(Path.Combine(WorkingDirectory, "subdir\\.editorconfig"), args.AnalyzerConfigPaths[1]);
10035Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
10036Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[1]);
10040Assert.Equal(Path.Combine(WorkingDirectory, "..\\.editorconfig"), args.AnalyzerConfigPaths.Single());
10045Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
10046Assert.Equal(Path.Combine(WorkingDirectory, "subdir\\.editorconfig"), args.AnalyzerConfigPaths[1]);
11446Assert.True(File.Exists(Path.Combine(dir.ToString(), "doc.xml")));
11461using (var reader = new StreamReader(Path.Combine(dir.ToString(), "doc.xml")))
11467output = ProcessUtilities.RunAndGetOutput(Path.Combine(dir.ToString(), "out.exe"), startFolder: dir.ToString());
11484Assert.Equal(Path.Combine(baseDirectory, @"a.pdb"), args.PdbPath);
11517AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11521AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "@script.csx") }, args.SourceFiles.Select(f => f.Path));
11525AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "-script.csx") }, args.SourceFiles.Select(f => f.Path));
11529AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11533AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11537AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11542AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11547AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11552AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "--") }, args.SourceFiles.Select(f => f.Path));
11671var dir = Path.Combine(WorkingDirectory, "a");
11674Assert.Equal(Path.Combine(dir, @"data.pdb"), parsedArgs.PdbPath);
11697var exePath = Path.Combine(dir.Path, "a.exe");
11709var pdbPath = Path.Combine(dir.Path, "a.pdb");
11716var pdbPath = Path.Combine(dir.Path, "a.pdb");
11723var pdbPath = Path.Combine(dir.Path, "a.pdb");
11731var pdbPath = Path.Combine(dir.Path, @"pdb\a.pdb");
11739var pdbPath = Path.Combine(dir.Path, "a.pdb");
11746var pdbPath = Path.Combine(dir.Path, "a.pdb");
11753var pdbPath = Path.Combine(dir.Path, "a.pdb");
11817dir.CopyFile(Path.Combine(Path.GetDirectoryName(s_CSharpCompilerExecutable), "csc.rsp"));
11878var exe = Path.Combine(dir.Path, "a.exe");
11887var doc = Path.Combine(dir.Path, "doc.xml");
11911var refDll = Path.Combine(refDir.Path, "a.dll");
11942var dll = Path.Combine(dir.Path, "a.dll");
11945var refDll = Path.Combine(dir.Path, Path.Combine("ref", "a.dll"));
11994var refDll = Path.Combine(dir.Path, "a.dll");
12005var pdb = Path.Combine(dir.Path, "a.pdb");
12008var doc = Path.Combine(dir.Path, "doc.xml");
12326var cscCopy = Path.Combine(dir.Path, "csc.exe");
12370var exePath = Path.Combine(dir.Path, "a.exe");
13558string binaryPath = Path.Combine(dir.Path, "temp.dll");
13561string pdbPath = Path.Combine(dir.Path, pdbName);
13564string xmlDocFilePath = Path.Combine(dir.Path, docName);
13604string binaryPath = Path.Combine(dir.Path, "temp.dll");
13607string pdbPath = Path.Combine(dir.Path, pdbName);
13610string xmlDocFilePath = Path.Combine(dir.Path, docName);
13654string binaryPath = Path.Combine(dir.Path, "temp.dll");
13657string pdbPath = Path.Combine(dir.Path, pdbName);
13660string xmlDocFilePath = Path.Combine(dir.Path, docName);
13685string binaryPath = Path.Combine(dir.Path, "temp.dll");
14125using (Stream peStream = File.OpenRead(Path.Combine(dir.Path, "checksum.exe")), pdbStream = File.OpenRead(Path.Combine(dir.Path, "checksum.pdb")))
14167using (Stream peStream = File.OpenRead(Path.Combine(dir.Path, "checksum.exe")), pdbStream = File.OpenRead(Path.Combine(dir.Path, "checksum.pdb")))
14238ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource1 } } } });
14245ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource2 } } } });
14308var generatedPath = Path.Combine(subdir, generatedFileName);
14347var path = Path.Combine(dir.Path, Guid.NewGuid().ToString() + ".dll");
14403var generatedDirPath = Path.Combine(dir.Path, "noexist");
14431ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource } } } });
14458Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory);
14462Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory);
14466Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory);
14470Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory);
14472var absPath = Path.Combine(root, "outdir");
14481absPath = Path.Combine(root, "generated files");
14525string[] writtenText = File.ReadAllLines(Path.Combine(dir.Path, "touched.write"));
15520var generatorPath = Path.Combine(directory.Path, "generator.dll");
15556Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(srcDirectory.Path, additionalFilePath1)));
15557Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(srcDirectory.Path, additionalFilePath2)));
15563string path2 = additionalFile2?.Path ?? Path.Combine(srcDirectory.Path, additionalFilePath2);
SarifErrorLoggerTests.cs (10)
43var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
74var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
108var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
140var errorLogFile = Path.Combine(outputDir.Path, "ErrorLog.txt");
141var outputFilePath = Path.Combine(outputDir.Path, "test.dll");
177var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
212var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
247var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
282var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
315var errorLogFile = Path.Combine(errorLogDir.Path, "ErrorLog.txt");
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (63)
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (32)
46File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
80File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
118File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
155var dllFilePath = Path.Combine(path, "implementation.dll");
156var sourceCodePath = Path.Combine(path, "implementation.cs");
157var pdbFilePath = Path.Combine(path, "implementation.pdb");
163var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
203var dllFilePath = Path.Combine(path, "implementation.dll");
204var sourceCodePath = Path.Combine(path, "implementation.cs");
205var pdbFilePath = Path.Combine(path, "implementation.pdb");
219var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
260var dllFilePath = Path.Combine(path, "implementation.dll");
261var sourceCodePath = Path.Combine(path, "implementation.cs");
262var pdbFilePath = Path.Combine(path, "implementation.pdb");
276var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
311var dllFilePath = Path.Combine(path, "implementation.dll");
312var sourceCodePath = Path.Combine(path, "implementation.cs");
313var pdbFilePath = Path.Combine(path, "implementation.pdb");
327var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
358var dllFilePath = Path.Combine(path, "implementation.dll");
359var sourceCodePath = Path.Combine(path, "implementation.cs");
360var pdbFilePath = Path.Combine(path, "implementation.pdb");
374var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
416var dllFilePath = Path.Combine(path, "implementation.dll");
417var sourceCodePath = Path.Combine(path, "implementation.cs");
418var pdbFilePath = Path.Combine(path, "implementation.pdb");
432var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
478var dllFilePath = Path.Combine(path, "implementation.dll");
479var sourceCodePath = Path.Combine(path, "implementation.cs");
480var pdbFilePath = Path.Combine(path, "implementation.pdb");
494var typeForwardDllFilePath = Path.Combine(path, "typeforward.dll");
502var realImplementationDllFilePath = Path.Combine(path, "realimplementation.dll");
PdbSourceDocument\PdbSourceDocumentTests.cs (15)
323Directory.CreateDirectory(Path.Combine(path, "ref"));
324Directory.CreateDirectory(Path.Combine(path, "lib"));
328var (project, symbol) = await CompileAndFindSymbolAsync(Path.Combine(path, "ref"), Location.Embedded, Location.OnDisk, sourceText, c => c.GetMember("C.E"), buildReferenceAssembly: true);
331CompileTestSource(Path.Combine(path, "lib"), sourceText, project, Location.Embedded, Location.Embedded, buildReferenceAssembly: false, windowsPdb: false);
360File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
401File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
439var implementationDllFilePath = Path.Combine(sharedDir, "implementation.dll");
440var sourceCodePath = Path.Combine(sharedDir, "implementation.cs");
441var pdbFilePath = Path.Combine(sharedDir, "implementation.pdb");
447var typeForwardDllFilePath = Path.Combine(sharedDir, "reference.dll");
448sourceCodePath = Path.Combine(sharedDir, "reference.cs");
449pdbFilePath = Path.Combine(sharedDir, "reference.pdb");
459File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
841CompileTestSource(dllFilePath, [Path.Combine(path, "source1.cs"), Path.Combine(path, "source2.cs")], pdbFilePath, "reference", [sourceText1, sourceText2], project, Location.Embedded, Location.Embedded, buildReferenceAssembly: false, windowsPdb: false);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (1)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (31)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (5)
41AddTestDocument(source, path: Path.Combine(TempRoot.Root, "test.cs")).Project.Solution;
457AddTestDocument(source, path: Path.Combine(TempRoot.Root, "test.cs")).Project.Solution;
661var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs"));
707var newSolution = oldSolution.AddDocument(newDocId, "goo.cs", SourceText.From(source2), filePath: Path.Combine(TempRoot.Root, "goo.cs"));
734var filePath = Path.Combine(TempRoot.Root, "src.cs");
src\Analyzers\CSharp\Tests\MatchFolderAndNamespace\CSharpMatchFolderAndNamespaceTests.cs (25)
35=> Path.Combine(Directory, Path.Combine(folders));
39var filePath = Path.Combine(directory ?? Directory, fileName);
385(Path.Combine(folder, "ABClass1.cs"), code1),
386(Path.Combine(folder, "ABClass2.cs"), code2),
399var folder = Path.Combine("B", "C");
532(Path.Combine(folder, "Class1.cs"), code1),
538(Path.Combine(folder, "Class1.cs"), fixed1),
640(Path.Combine(folder, "Class1.cs"), code1),
646(Path.Combine(folder, "Class1.cs"), fixed1),
750(Path.Combine(folder1, "Class1.cs"), code1),
751(Path.Combine(folder2, "Class2.cs"), code2),
752(Path.Combine(folder3, "Class3.cs"), code3),
757(Path.Combine(folder1, "Class1.cs"), fixed1),
758(Path.Combine(folder2, "Class2.cs"), fixed2),
759(Path.Combine(folder3, "Class3.cs"), fixed3),
901(Path.Combine(folder1, "Class1.cs"), code1),
902(Path.Combine(folder2, "Class2.cs"), code2),
903(Path.Combine(folder3, "Class3.cs"), code3),
910Sources = { (Path.Combine(project2folder, "P.cs"), project2Source) },
911AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
919(Path.Combine(folder1, "Class1.cs"), fixed1),
920(Path.Combine(folder2, "Class2.cs"), fixed2),
921(Path.Combine(folder3, "Class3.cs"), fixed3),
928Sources = { (Path.Combine(project2folder, "P.cs"), project2FixedSource) },
929AnalyzerConfigFiles = { (Path.Combine(project2Directory, ".editorconfig"), project2EditorConfig) },
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.ExternalAccess.HotReload.UnitTests (13)
HotReloadMSBuildWorkspaceTests.cs (12)
36filePath: Path.Combine(TempRoot.Root, "P1.csproj"),
37outputFilePath: Path.Combine(TempRoot.Root, "P1.dll"),
45filePath: Path.Combine(TempRoot.Root, "A.cs"),
59generatedFilesOutputDirectory: Path.Combine(TempRoot.Root, "obj")));
73filePath: Path.Combine(TempRoot.Root, "P1.csproj"),
74outputFilePath: Path.Combine(TempRoot.Root, "P1.dll"),
82filePath: Path.Combine(TempRoot.Root, "A.cs"),
87filePath: Path.Combine(TempRoot.Root, "B.cs"),
101generatedFilesOutputDirectory: Path.Combine(TempRoot.Root, "obj")));
115Assert.Equal(Path.Combine(TempRoot.Root, "P1.csproj"), project2.FilePath);
116Assert.Equal(Path.Combine(TempRoot.Root, "P1.dll"), project2.OutputFilePath);
121Assert.Equal(Path.Combine(TempRoot.Root, "obj"), project2.CompilationOutputInfo.GeneratedFilesOutputDirectory);
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (3)
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (5)
Microsoft.CodeAnalysis.Features (15)
Microsoft.CodeAnalysis.Features.Test.Utilities (7)
Microsoft.CodeAnalysis.Features.UnitTests (22)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (18)
122AddDocument(CreateDesignTimeOnlyDocument(projectPId, name: "dt1.cs", path: Path.Combine(dir.Path, "dt1.cs"))).
238var sourceFilePath = Path.Combine(TempRoot.Root, "test");
250filePath: Path.Combine(TempRoot.Root, "dummy.proj"))
680var newRefOutPath = Path.Combine(TempRoot.Root, "newRef");
982var designTimeOnlyFilePath = Path.Combine(dir.Path, designTimeOnlyFileName);
2286var pathA = Path.Combine(TempRoot.Root, "A.cs");
2287var pathB = Path.Combine(TempRoot.Root, "B.cs");
2288var pathC = Path.Combine(TempRoot.Root, "C.cs");
2289var pathD = Path.Combine(TempRoot.Root, "D.cs");
2290var pathX = Path.Combine(TempRoot.Root, "X");
2291var pathY = Path.Combine(TempRoot.Root, "Y");
2292var pathCommon = Path.Combine(TempRoot.Root, "Common.cs");
2364var pathX = Path.Combine(TempRoot.Root, "X.cs");
2365var pathA = Path.Combine(TempRoot.Root, "A.cs");
2545var pathA = Path.Combine(TempRoot.Root, "A.txt");
2623var sourcePath = Path.Combine(TempRoot.Root, "A.cs");
4367AddDocument("DocB", source1, filePath: Path.Combine(TempRoot.Root, "DocB.cs")).Project;
4874var filePath = withPath ? Path.Combine(TempRoot.Root, "test.cs") : null;
EditAndContinue\EmitSolutionUpdateResultsTests.cs (3)
71var razorPath2 = Path.Combine(TempRoot.Root, "a.razor");
76AddDocument(sourcePath, SourceText.From("class C {}", Encoding.UTF8), filePath: Path.Combine(TempRoot.Root, sourcePath));
109DiagnosticDataLocation.TestAccessor.Create(new(sourcePath, new(0, 0), new(0, 5)), document.Id, new(Path.Combine("..", "a.razor"), new(10, 10), new(10, 15)), forceMappedPath: true),
Microsoft.CodeAnalysis.InteractiveHost (5)
Microsoft.CodeAnalysis.LanguageServer (9)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (25)
Diagnostics\AdditionalFileDiagnosticsTests.cs (16)
38var projFilePath = Path.Combine(testRoot, "CSProj1.csproj");
39var csFilePath = Path.Combine(testRoot, "C.cs");
40var xamlFilePath = Path.Combine(testRoot, "Test.xaml");
69var projFilePath = Path.Combine(testRoot, "CSProj1.csproj");
70var csFilePath = Path.Combine(testRoot, "C.cs");
71var txtFilePath = Path.Combine(testRoot, "Test.txt");
102var projFilePath = Path.Combine(testRoot, "CSProj1.csproj");
103var csFilePath = Path.Combine(testRoot, "C.cs");
104var txtFilePath = Path.Combine(testRoot, "Test.txt");
142var projFilePath = Path.Combine(testRoot, "CSProj1.csproj");
143var csFilePathA = Path.Combine(testRoot, "A.cs");
144var csFilePathB = Path.Combine(testRoot, "B.cs");
145var txtFilePath = Path.Combine(testRoot, "Test.txt");
182var projFilePath = Path.Combine(testRoot, "CSProj1.csproj");
183var csFilePath = Path.Combine(testRoot, "C.cs");
184var additionaFilePath = Path.Combine(testRoot, "File.razor");
Microsoft.CodeAnalysis.LanguageServer.UnitTests (126)
DefaultFileChangeWatcherTests.cs (44)
119var filePath = Path.Combine(tempDirectory.Path, "test.cs");
134var filePath = Path.Combine(otherDir.Path, "test.cs");
148var filePath = Path.Combine(tempDirectory.Path, "test.txt");
163var filePath = Path.Combine(tempDirectory.Path, "test.cs");
183using var watchedFile1 = context.EnqueueWatchingFile(Path.Combine(tempDirectory.Path, "a.cs"));
184using var watchedFile2 = context.EnqueueWatchingFile(Path.Combine(tempDirectory.Path, "b.cs"));
199var filePath = Path.Combine(tempDirectory.Path, "multi.txt");
218var filePath = Path.Combine(subDirectory.Path, "nested.cs");
243var csFilePath = Path.Combine(tempDirectory.Path, "test.cs");
244var vbFilePath = Path.Combine(tempDirectory.Path, "test.vb");
245var txtFilePath = Path.Combine(tempDirectory.Path, "test.txt");
269var filePath = Path.Combine(level3.Path, "deep.cs");
285var filePath = Path.Combine(siblingDir.Path, "test.cs");
300var filePath = Path.Combine(rootDir.Path, "test.cs");
314var filePath = Path.Combine(tempDirectory.Path, "test.txt");
341context.EnqueueWatchingFile(Path.Combine(seed.Path, "seed.cs"));
344context.EnqueueWatchingFile(Path.Combine(pairA.Path, "one.cs"));
345context.EnqueueWatchingFile(Path.Combine(pairB.Path, "two.cs"));
346context.EnqueueWatchingFile(Path.Combine(other.Path, "three.cs"));
365var file1 = context1.EnqueueWatchingFile(Path.Combine(root.Path, "extra.txt"));
366var file2 = context2.EnqueueWatchingFile(Path.Combine(root.Path, "extra2.log"));
387_ = context.EnqueueWatchingFile(Path.Combine(root.Path, "extra.txt"));
436var filePath = Path.Combine(tempDirectory.Path, "created.cs");
456var filePath = Path.Combine(tempDirectory.Path, "modified.cs");
476var filePath = Path.Combine(tempDirectory.Path, "deleted.cs");
496var filePath = Path.Combine(tempDirectory.Path, "filtered.cs");
513var txtFilePath = Path.Combine(tempDirectory.Path, "filtered.txt");
534var filePath = Path.Combine(subDirectory.Path, "nested.cs");
551var filePath = Path.Combine(tempDirectory.Path, "individual.txt");
572var filePath = Path.Combine(tempDirectory.Path, "individual_modify.txt");
596var csharpFilePath = Path.Combine(tempDirectory.Path, "created.cs");
597var visualBasicFilePath = Path.Combine(tempDirectory.Path, "created.vb");
622var filePath = Path.Combine(tempDirectory.Path, "disposed.txt");
654var file1 = Path.Combine(tempDirectory.Path, "file1.cs");
655var file2 = Path.Combine(tempDirectory.Path, "file2.cs");
656var file3 = Path.Combine(tempDirectory.Path, "file3.cs");
680var nonExistentDir = Path.Combine(root.Path, "not_yet_created");
681var filePath = Path.Combine(nonExistentDir, "new_file.cs");
710var originalPath = Path.Combine(tempDirectory.Path, "original.cs");
711var renamedPath = Path.Combine(tempDirectory.Path, "renamed.cs");
730var originalPath = Path.Combine(tempDirectory.Path, "original.cs");
731var renamedPath = Path.Combine(tempDirectory.Path, "renamed.cs");
813var filePath = Path.Combine(tempDirectory.Path, "test.cs");
836var filePath = Path.Combine(tempDirectory.Path, "test.cs");
FileBasedProgramsEntryPointDiscoveryTests.cs (70)
354Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub1"));
355File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/File1.cs"), FbaContent);
356File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/File2.cs"), OrdinaryCsContent);
362File.Move(Path.Combine(tempDir.Path, @"sub1/File1.cs"), Path.Combine(tempDir.Path, @"sub1/File4.cs"));
363File.Move(Path.Combine(tempDir.Path, @"sub1/File2.cs"), Path.Combine(tempDir.Path, @"sub1/File1.cs"));
388Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub1"));
389File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/File1.cs"), OrdinaryCsContent);
390File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/File2.cs"), FbaContent);
396File.Move(Path.Combine(tempDir.Path, @"sub1/File1.cs"), Path.Combine(tempDir.Path, @"sub1/File4.cs"));
397File.Move(Path.Combine(tempDir.Path, @"sub1/File2.cs"), Path.Combine(tempDir.Path, @"sub1/File1.cs"));
422Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub1"));
423Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub2"));
424File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/File1.cs"), FbaContent);
425File.WriteAllText(Path.Combine(tempDir.Path, @"sub2/File1.cs"), OrdinaryCsContent);
431Directory.Move(Path.Combine(tempDir.Path, @"sub1"), Path.Combine(tempDir.Path, @"sub4"));
432Directory.Move(Path.Combine(tempDir.Path, @"sub2"), Path.Combine(tempDir.Path, @"sub1"));
457Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub1"));
458Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub2"));
459File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/File1.cs"), OrdinaryCsContent);
460File.WriteAllText(Path.Combine(tempDir.Path, @"sub2/File1.cs"), FbaContent);
466Directory.Move(Path.Combine(tempDir.Path, @"sub1"), Path.Combine(tempDir.Path, @"sub4"));
467Directory.Move(Path.Combine(tempDir.Path, @"sub2"), Path.Combine(tempDir.Path, @"sub1"));
491File.WriteAllText(Path.Combine(tempDir.Path, @"Fba0.cs"), FbaContent);
492File.WriteAllText(Path.Combine(tempDir.Path, @"Fba1.cs"), FbaContent);
493File.WriteAllText(Path.Combine(tempDir.Path, @"Ordinary2.cs"), OrdinaryCsContent);
499File.WriteAllText(Path.Combine(tempDir.Path, @"New102.csproj"), CsprojContent);
500File.Delete(Path.Combine(tempDir.Path, @"Fba0.cs"));
501File.WriteAllText(Path.Combine(tempDir.Path, @"NewOrd22.cs"), OrdinaryCsContent);
502File.WriteAllText(Path.Combine(tempDir.Path, @"Ordinary2.cs"), OrdinaryCsContent);
503File.WriteAllText(Path.Combine(tempDir.Path, @"Ordinary2.cs"), FbaContent);
504File.WriteAllText(Path.Combine(tempDir.Path, @"NewOrd5.cs"), OrdinaryCsContent);
505File.WriteAllText(Path.Combine(tempDir.Path, @"New79.csproj"), CsprojContent);
529File.WriteAllText(Path.Combine(tempDir.Path, @"Fba0.cs"), FbaContent);
530Directory.CreateDirectory(Path.Combine(tempDir.Path, @"deep/nested"));
531File.WriteAllText(Path.Combine(tempDir.Path, @"deep/nested/Fba1.cs"), FbaContent);
532Directory.CreateDirectory(Path.Combine(tempDir.Path, @"deep/nested"));
533File.WriteAllText(Path.Combine(tempDir.Path, @"deep/nested/Project2.csproj"), CsprojContent);
534File.WriteAllText(Path.Combine(tempDir.Path, @"Project3.csproj"), CsprojContent);
535Directory.CreateDirectory(Path.Combine(tempDir.Path, @"deep/nested/sub3"));
541File.WriteAllText(Path.Combine(tempDir.Path, @"NewOrd40.cs"), OrdinaryCsContent);
542File.WriteAllText(Path.Combine(tempDir.Path, @"deep/nested/sub3/New52.csproj"), CsprojContent);
543File.WriteAllText(Path.Combine(tempDir.Path, @"deep/nested/NewOrd20.cs"), OrdinaryCsContent);
544File.WriteAllText(Path.Combine(tempDir.Path, @"deep/nested/Fba1.cs"), OrdinaryCsContent);
568Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub1"));
569Directory.CreateDirectory(Path.Combine(tempDir.Path, @"sub1/sub3"));
570File.WriteAllText(Path.Combine(tempDir.Path, @"Project0.csproj"), CsprojContent);
571File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/sub3/Fba1.cs"), FbaContent);
572File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/Fba2.cs"), FbaContent);
573File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/Fba3.cs"), FbaContent);
574File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/Ordinary4.cs"), OrdinaryCsContent);
580File.Delete(Path.Combine(tempDir.Path, @"Project0.csproj"));
581File.WriteAllText(Path.Combine(tempDir.Path, @"sub1/sub3/NewFba64.cs"), FbaContent);
674public string FullPath(string relativePath) => Path.Combine(_rootPath, relativePath);
723var relativePath = parentDir.Length == 0 ? name : Path.Combine(parentDir, name);
7320 => new FuzzOp.WriteFbaFile(Path.Combine(dir, $"Fba{fileIndex}.cs")),
7331 => new FuzzOp.WriteOrdinaryCs(Path.Combine(dir, $"Ordinary{fileIndex}.cs")),
7342 => new FuzzOp.WriteCsproj(Path.Combine(dir, $"Project{fileIndex}.csproj")),
735_ => new FuzzOp.WriteFbaFile(Path.Combine(dir, $"Fba{fileIndex}.cs")),
758var newPath = Path.Combine(dir, "moved_" + Path.GetFileName(oldPath));
765return new FuzzOp.WriteFbaFile(Path.Combine(dirList[random.Next(dirList.Length)], $"NewFba{workspace.Files.Count + random.Next(100)}.cs"));
768return new FuzzOp.WriteOrdinaryCs(Path.Combine(dirList[random.Next(dirList.Length)], $"NewOrd{workspace.Files.Count + random.Next(100)}.cs"));
771return new FuzzOp.WriteCsproj(Path.Combine(dirList[random.Next(dirList.Length)], $"New{workspace.Files.Count + random.Next(100)}.csproj"));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
Microsoft.CodeAnalysis.PublicApiAnalyzers.UnitTests (2)
Microsoft.CodeAnalysis.Razor.Workspaces (7)
Microsoft.CodeAnalysis.Rebuild.UnitTests (7)
RebuildCommandLineTests.cs (7)
26internal static string OutputDirectory { get; } = Path.Combine(TestableCompiler.RootDirectory, "output");
38FilePathToStreamMap.Add(Path.Combine(BuildPaths.WorkingDirectory, filePath), new TestableFile(content));
45filePath = Path.Combine(OutputDirectory, filePath);
194AddSourceFile(Path.Combine("dir1", "lib1.cs"), @"
228Permutate(new CommandInfo($"lib4.cs {Path.Combine("dir1", "lib1.cs")} /target:library", "test.dll", null),
390AddSourceFile(Path.Combine("dir1", "lib1.vb"), @"
424new CommandInfo(@$"lib2.vb {Path.Combine("dir1", "lib1.vb")} /target:library /debug:embedded", "test.dll", null),
Microsoft.CodeAnalysis.Remote.Razor (3)
Microsoft.CodeAnalysis.Remote.Razor.UnitTests (4)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Microsoft.CodeAnalysis.Remote.Workspaces (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Microsoft.CodeAnalysis.Scripting (12)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (2)
Microsoft.CodeAnalysis.Scripting.TestUtilities (2)
Microsoft.CodeAnalysis.Test.Utilities (31)
TestableCompiler.cs (8)
51clientDir: Path.Combine(RootDirectory, "compiler"),
52workingDir: Path.Combine(RootDirectory, "source"),
53sdkDir: Path.Combine(RootDirectory, "sdk"),
78filePath = Path.Combine(BuildPaths.WorkingDirectory, filePath);
86filePath = Path.Combine(BuildPaths.SdkDirectory!, filePath);
94filePath = Path.Combine(BuildPaths.WorkingDirectory, filePath);
174args.Add($@"-vbruntime:""{Path.Combine(buildPaths.SdkDirectory, "Microsoft.VisualBasic.dll")}""");
217fileSystem.Map[Path.Combine(sdkPath, referenceInfo.FileName)] = new TestableFile(referenceInfo.ImageBytes);
Microsoft.CodeAnalysis.UnitTests (15)
FileSystem\PathUtilitiesTests.cs (4)
123: Path.Combine(expectedParentPath, directoryName);
392Assert.Equal(Path.Combine(path1, path2), PathUtilities.CombinePaths(path1, path2));
409Assert.Equal(Path.Combine(path1, path2), PathUtilities.CombinePaths(path1, path2));
421Assert.Equal(Path.Combine(path1, path2), PathUtilities.CombinePaths(path1, path2));
Microsoft.CodeAnalysis.Workspaces (17)
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (3)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (17)
ProjectGuardFiles.cs (5)
19File.WriteAllText(Path.Combine(Path.GetTempPath(), "global.json"),
26File.WriteAllText(Path.Combine(Path.GetTempPath(), "Directory.Build.props"),
44File.WriteAllText(Path.Combine(Path.GetTempPath(), "Directory.Build.rsp"),
49File.WriteAllText(Path.Combine(Path.GetTempPath(), "Directory.Build.targets"),
58File.WriteAllText(Path.Combine(Path.GetTempPath(), "NuGet.Config"),
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (58)
SolutionTests\SolutionTests.cs (43)
57.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")))
58.AddDocument(DocumentId.CreateNewId(projectId), "goo.cs", SourceText.From("public class Goo { }", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "goo.cs"))
60.AddAnalyzerConfigDocument(DocumentId.CreateNewId(projectId), "editorcfg", SourceText.From(editorConfig ?? "#empty", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"))));
1103.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")).WithChecksumAlgorithm(SourceHashAlgorithm.Sha1))
1104.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, "proj2", "proj2", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj2.dll")))
1105.AddDocument(d1, "d1.cs", SourceText.From("class D1;", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "d1.cs"))
1106.AddDocument(d2, "d2.cs", SourceText.From("class D2;", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "d2.cs"))
1109.AddAnalyzerConfigDocument(c1, "c1", SourceText.From("#empty1", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"))
1110.AddAnalyzerConfigDocument(c2, "c2", SourceText.From("#empty2", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"));
1120loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1121filePath: Path.Combine(s_projectDir, "newD1.cs"),
1129loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD3;", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1130filePath: Path.Combine(s_projectDir, "newD3.cs"),
1139loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1140filePath: Path.Combine(s_projectDir, "newA1.txt"),
1148loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1149filePath: Path.Combine(s_projectDir, "newA3.txt"),
1158loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1159filePath: Path.Combine(s_projectDir, "newC1"),
1167loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1168filePath: Path.Combine(s_projectDir, "newC3"),
1175var generatedOutputDir = Path.Combine(TempRoot.Root, "obj");
1322var docPath = Path.Combine(s_projectDir, "d.cs");
1325.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "P1", "P1", LanguageNames.CSharp, Path.Combine(s_projectDir, "P1.dll"), parseOptions: parseOptionsA, compilationOptions: compilationOptions))
1336projectId, VersionStamp.Default, "P2", "P2", LanguageNames.CSharp, Path.Combine(s_projectDir, "P2.dll"), parseOptions: parseOptionsB, compilationOptions: compilationOptions,
1359.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1394.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1429.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1464.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1542var objDir = Path.Combine(TempRoot.Root, "obj");
1543var binDir = Path.Combine(TempRoot.Root, "bin");
1544var otherDir = Path.Combine(TempRoot.Root, "other");
1553.WithOutputFilePath(Path.Combine(binDir, "output.dll"))
1555assemblyPath: Path.Combine(objDir, "output.dll"),
2394var sourcePathOptions = project2.State.GetAnalyzerOptionsForPath(Path.Combine(s_projectDir, "x.cs"), CancellationToken.None);
2454var filePath = Path.Combine(TempRoot.Root, "x.cs");
2485var filePath = Path.Combine(TempRoot.Root, "x.cs");
2642var filePath = Path.Combine(TempRoot.Root, "x.cs");
2671var filePath = Path.Combine(TempRoot.Root, "x.cs");
5711projectPath = string.IsNullOrEmpty(projectPath) ? projectPath : Path.Combine(TempRoot.Root, projectPath);
5712configPath = Path.Combine(TempRoot.Root, configPath);
5713sourcePath = string.IsNullOrEmpty(sourcePath) ? sourcePath : Path.Combine(TempRoot.Root, sourcePath);
5945.WithCompilationOutputInfo(new CompilationOutputInfo(assemblyPath: Path.Combine(TempRoot.Root, "assembly.dll"), generatedFilesOutputDirectory: null));
Microsoft.Data.Analysis.Tests (2)
Microsoft.DotNet.Arcade.Sdk (6)
Microsoft.DotNet.Arcade.Sdk.Tests (12)
Microsoft.DotNet.ArcadeAzureIntegration (1)
Microsoft.DotNet.Baselines.Tasks (1)
Microsoft.DotNet.Build.Manifest.Tests (6)
Microsoft.DotNet.Build.Tasks.Feed (15)
src\PublishArtifactsInManifestBase.cs (10)
499string localSymbolPath = Path.Combine(temporarySymbolsDirectory, symbolPackageName);
558int result = await helper.AddPackagesToRequest(requestName, symbolPackages.Select(x => Path.Combine(BlobAssetsBasePath, x.Id)));
800FileInfo pdbStagingPath = new(Path.Combine(pdbStagePath, subPath));
828FileInfo looseFileStagePath = new(Path.Combine(pdbStagePath, relativePath));
1230Path.Combine(PackageAssetsBasePath, $"{package.Id}.{package.Version}.nupkg");
1273Path.GetFullPath(Path.Combine(ArtifactsBasePath, Guid.NewGuid().ToString()));
1275string localPackagePath = Path.Combine(temporaryPackageDirectory, packageFilename);
1585Path.GetFullPath(Path.Combine(ArtifactsBasePath, Guid.NewGuid().ToString()));
1668var localBlobPath = Path.Combine(temporaryBlobDirectory, fileName);
1748var localBlobPath = Path.Combine(BlobAssetsBasePath, fileName);
Microsoft.DotNet.Build.Tasks.Feed.Tests (14)
Microsoft.DotNet.Build.Tasks.Installers (30)
src\CreateWixBuildWixpack.cs (20)
114string destPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(projectPath));
147OutputFile = Path.Combine(OutputFolder, $"{_installerFilename}{_packageExtension}");
182CopyDirectoryRecursive(fullSourceDir, Path.Combine(WixpackWorkingDir, randomDirName));
201var tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
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));
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));
597var filePath = Path.Combine(dir, Path.GetFileName(source));
1016var destDir = Path.Combine(WixpackWorkingDir, fileId);
1023var destPath = Path.Combine(destDir, Path.GetFileName(source));
1042Extensions[i] = new TaskItem(Path.Combine(filename, filename));
1085LocalizationFiles[i] = new TaskItem(Path.Combine(filename, filename));
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 (8)
67OutputFile = Path.Combine(OutputFolder, $"{Path.GetFileName(InstallerFile)}{_packageExtension}");
81string commandFilename = Path.Combine(packageDropOutputFolder, $"create.cmd");
144string newWixSrcFilePath = Path.Combine(packageDropOutputFolder, Path.GetFileName(wixSrcFile.ItemSpec));
176var destinationPath = Path.Combine(packageDropOutputFolder, Path.GetFileName(locItem.ItemSpec));
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 (4)
Microsoft.DotNet.Build.Tasks.Packaging.Tests (1)
Microsoft.DotNet.Build.Tasks.Templating.Tests (6)
Microsoft.DotNet.Build.Tasks.VisualStudio (6)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (30)
OptProf\GenerateTrainingInputFilesTests.cs (23)
137var dir = Path.Combine(temp, Guid.NewGuid().ToString());
140var configPath = Path.Combine(dir, "OptProf.json");
143var insertionDir = Path.Combine(dir, "Insertion");
145CreateVsix(Path.Combine(insertionDir, "Setup.vsix"), manifestContent: s_manifestJson);
147var outputDir = Path.Combine(dir, "Output");
161Path.Combine(outputDir, @"DDRIT.RPS.CSharp"),
162Path.Combine(outputDir, @"TeamEng"),
163Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations"),
164Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging"),
165Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner"),
166Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.0.IBC.json"),
167Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.1.IBC.json"),
168Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\xyzMicrosoft.CodeAnalysis.0.IBC.json"),
169Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner\xyzMicrosoft.CodeAnalysis.CSharp.0.IBC.json"),
170Path.Combine(outputDir, @"TeamEng\Configurations"),
171Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble"),
172Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.0.IBC.json"),
173Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.CSharp.0.IBC.json"),
174Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.VisualBasic.0.IBC.json")
178var json = File.ReadAllText(Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.0.IBC.json"));
189json = File.ReadAllText(Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.BuildAndDebugging\System.Collections.Immutable.1.IBC.json"));
200json = File.ReadAllText(Path.Combine(outputDir, @"DDRIT.RPS.CSharp\Configurations\DDRIT.RPS.CSharp.CSharpTest.EditingAndDesigner\xyzMicrosoft.CodeAnalysis.CSharp.0.IBC.json"));
210json = File.ReadAllText(Path.Combine(outputDir, @"TeamEng\Configurations\TeamEng.OptProfTest.vs_debugger_start_no_build_cs_scribble\xyzMicrosoft.CodeAnalysis.VisualBasic.0.IBC.json"));
Microsoft.DotNet.Build.Tasks.Workloads (33)
Microsoft.DotNet.Build.Tasks.Workloads.Tests (47)
MsiTests.cs (9)
23string packageRootDirectory = Path.Combine(PackageRootDirectory, Guid.NewGuid().ToString("N"));
35ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"),
36msiOutputPath: Path.Combine(MsiOutputPath, "mrec"));
48ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
52ITaskItem msi604 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.4.nupkg"));
82string packageRootDirectory = Path.Combine(PackageRootDirectory, Guid.NewGuid().ToString("N"));
83TaskItem packageItem = new(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
112string packageRootDirectory = Path.Combine(PackageRootDirectory, Guid.NewGuid().ToString("N"));
113string packagePath = Path.Combine(TestAssetsPath, "microsoft.ios.templates.15.2.302-preview.14.122.nupkg");
SwixComponentTests.cs (12)
31string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
35string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
60string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
65string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
89string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
94string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
115string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
129string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
158string componentResSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.res.swr"));
174string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
189string componentSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(swixProj), "component.swr"));
199File.OpenRead(Path.Combine(TestAssetsPath, filename)), filename);
Microsoft.DotNet.CMake.Sdk (5)
Microsoft.DotNet.GenAPI (1)
Microsoft.DotNet.GenFacades (3)
Microsoft.DotNet.Helix.Sdk (7)
Microsoft.DotNet.Helix.Sdk.Tests (2)
Microsoft.DotNet.Internal.SymbolHelper (9)
Microsoft.DotNet.MacOsPkg.Core (4)
Microsoft.DotNet.MacOsPkg.Tests (5)
UnpackPackTests.cs (5)
44(Path.Combine("Payload", "Sample.txt"), nonExecutableFileMode),
51(Path.Combine("Payload", "test.app"), nonExecutableFileMode),
56(Path.Combine("Contents", "Info.plist"), nonExecutableFileMode),
136string componentPkgPath = Path.Combine(unpackInstallerPath, "Simple.pkg");
155string componentPkgPath = Path.Combine(unpackInstallerPath, "WithApp.pkg");
Microsoft.DotNet.NuGetRepack.Tasks (6)
Microsoft.DotNet.NuGetRepack.Tests (34)
VersionUpdaterTests.cs (31)
59var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
63File.WriteAllBytes(a_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameA), TestResources.DailyBuildPackages.TestPackageA);
64File.WriteAllBytes(b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
65File.WriteAllBytes(c_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameC), TestResources.DailyBuildPackages.TestPackageC);
66File.WriteAllBytes(d_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameD), TestResources.DailyBuildPackages.TestPackageD);
67File.WriteAllBytes(g_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameG), TestResources.DailyBuildPackages.TestPackageG);
69var a_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameA);
70var b_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameB);
71var c_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameC);
72var d_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameD);
73var g_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameG);
75var a_rel = Path.Combine(dir, TestResources.ReleasePackages.NameA);
76var b_rel = Path.Combine(dir, TestResources.ReleasePackages.NameB);
77var c_rel = Path.Combine(dir, TestResources.ReleasePackages.NameC);
78var d_rel = Path.Combine(dir, TestResources.ReleasePackages.NameD);
79var g_rel = Path.Combine(dir, TestResources.ReleasePackages.NameG);
102var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
106File.WriteAllBytes(e_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameE), TestResources.DailyBuildPackages.TestPackageE);
107File.WriteAllBytes(f_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameF), TestResources.DailyBuildPackages.TestPackageF);
109var e_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameE);
110var f_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameF);
112var e_rel = Path.Combine(dir, TestResources.ReleasePackages.NameE);
113var f_rel = Path.Combine(dir, TestResources.ReleasePackages.NameF);
130var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
134File.WriteAllBytes(a_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameA), TestResources.DailyBuildPackages.TestPackageA);
135File.WriteAllBytes(b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
136File.WriteAllBytes(c_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameC), TestResources.DailyBuildPackages.TestPackageC);
169var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
170var outputDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
174File.WriteAllBytes(dotnet_tool = Path.Combine(dir, TestResources.MiscPackages.NameDotnetTool), TestResources.MiscPackages.DotnetTool);
176File.WriteAllBytes(normal_package_b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
Microsoft.DotNet.Open.Api.Tools.Tests (26)
Microsoft.DotNet.RemoteExecutor (5)
Microsoft.DotNet.SetupNugetSources.Tests (24)
Microsoft.DotNet.SharedFramework.Sdk (3)
Microsoft.DotNet.SignCheckLibrary (23)
Verification\MsiVerifier.cs (4)
43string targetPath = Path.Combine(svr.TempPath, name);
57SignatureVerificationResult packageFileResult = VerifyFile(installPackage.Files[key].TargetPath, svr.Filename, Path.Combine(svr.VirtualPath, originalFiles[key]), containerPath: null);
84string binaryFilePath = Path.Combine(svr.TempPath, binaryFile);
86SignatureVerificationResult binaryStreamResult = VerifyFile(binaryFilePath, svr.Filename, Path.Combine(svr.VirtualPath, binaryFile), containerPath: null);
Microsoft.DotNet.SignCheckTask (3)
Microsoft.DotNet.SignTool (37)
Microsoft.DotNet.SignTool.Tests (61)
Microsoft.DotNet.SourceBuild.Tasks (3)
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.XliffTasks (15)
Tasks\TransformTemplates.cs (8)
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);
108File.Copy(Path.Combine(TranslatedOutputDirectory, localizedFileName), templateItemDestinationPath, overwrite: true);
Microsoft.DotNet.XliffTasks.Tests (5)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.Abstractions.Tests (23)
Contents\DataContentTests.cs (23)
316string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.json");
343string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.bin");
370string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.unknownextension");
396string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.png");
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");
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 (3)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Microsoft.Extensions.AI.Templates.Tests (11)
Microsoft.Extensions.ApiDescription.Client (1)
Microsoft.Extensions.ApiDescription.Client.Tests (38)
GetOpenApiReferenceMetadataTest.cs (10)
25var outputPath = Path.Combine("obj", "NSwagClient.cs");
80var outputPath = Path.Combine("obj", $"NSwagClient.cs");
140var outputPath = Path.Combine("obj", "NSwagClient.cs");
200var outputPath = Path.Combine(Path.GetTempPath(), $"{className}.cs");
306var error = Resources.FormatDuplicateFileOutputPaths(Path.Combine("obj", "NSwagClient.cs"));
353var expectedOutputPath = Path.Combine("bin", outputPath);
417var expectedOutputPath = Path.Combine("bin", outputPath);
483var outputPath1 = Path.Combine("obj", $"{className12}.cs");
484var outputPath2 = Path.Combine("obj", $"{className12}.ts");
485var outputPath3 = Path.Combine("obj", $"{className3}.cs");
TargetTest.cs (24)
37var directory = new DirectoryInfo(Path.Combine(_assemblyLocation, "build"));
40file.CopyTo(Path.Combine(build.Root, file.Name), overwrite: true);
45file.CopyTo(Path.Combine(build.Root, file.Name), overwrite: true);
52file.CopyTo(Path.Combine(files.Root, file.Name), overwrite: true);
59file.CopyTo(Path.Combine(tasks.Root, file.Name), overwrite: true);
80Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
102Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
103Assert.Contains($"TypeScriptCompile: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
125Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
126Assert.Contains($"FileWrites: {Path.Combine("obj", "NSwagClient.cs")}", process.Output);
127Assert.Contains($"FileWrites: {Path.Combine("obj", "swashbuckleClient.cs")}", process.Output);
179$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
204$"Options: '--an-option' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
229$"Options: '' OutputPath: '{Path.Combine("generated", "azureMonitorClient.cs")}'",
256$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
281$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.ts")}'",
306$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
331$"Options: '--an-option' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
358$"Options: '' OutputPath: '{Path.Combine("obj", "Custom.cs")}'",
382$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
388$"Options: '' OutputPath: '{Path.Combine("obj", "NSwagClient.cs")}'",
394$"Options: '' OutputPath: '{Path.Combine("obj", "swashbuckleClient.cs")}'",
423$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
429$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.ts")}'",
Microsoft.Extensions.ApiDescription.Tool.Tests (39)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.DataIngestion.MarkItDown (1)
Microsoft.Extensions.DataIngestion.Tests (5)
Microsoft.Extensions.DependencyModel (7)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.FileProviders.Embedded.Tests (4)
Microsoft.Extensions.FileProviders.Physical (6)
Microsoft.Extensions.FileSystemGlobbing (6)
Microsoft.Extensions.Hosting (1)
Microsoft.Extensions.Localization.Tests (5)
Microsoft.Extensions.Logging.AzureAppServices (2)
Microsoft.Extensions.ML.Tests (2)
Microsoft.Extensions.SecretManager.Tools.Tests (16)
Microsoft.Extensions.ServiceDiscovery.Dns (3)
Microsoft.Extensions.Validation.GeneratorTests (1)
Microsoft.Gen.BuildMetadata (1)
Microsoft.Gen.BuildMetadata.Unit.Tests (2)
Microsoft.Gen.ComplianceReports (2)
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Logging.Unit.Tests (6)
Microsoft.Gen.MetadataExtractor (4)
Microsoft.Gen.MetadataExtractor.Unit.Tests (7)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.Metrics.Unit.Tests (2)
Microsoft.Gen.MetricsReports (2)
Microsoft.Gen.MetricsReports.Unit.Tests (7)
Microsoft.Maui (1)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Resizetizer (32)
Microsoft.McpServer.ProjectTemplates.Tests (11)
Microsoft.ML.AutoML (3)
Microsoft.ML.AutoML.Samples (2)
Microsoft.ML.AutoML.Tests (16)
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");
Microsoft.ML.CodeGenerator (9)
Microsoft.ML.Core (17)
Microsoft.ML.Core.Tests (16)
UnitTests\TestEntryPoints.cs (3)
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.Data (4)
Microsoft.ML.DnnImageFeaturizer.AlexNet (1)
Microsoft.ML.DnnImageFeaturizer.ResNet101 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet18 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet50 (1)
Microsoft.ML.Ensemble (2)
Microsoft.ML.GenAI.Core.Tests (1)
Microsoft.ML.GenAI.Mistral (1)
Microsoft.ML.GenAI.Phi (2)
Microsoft.ML.GenAI.Samples (8)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Maml (2)
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.PerformanceTests (12)
Microsoft.ML.Predictor.Tests (8)
CompareBaselines.cs (8)
66string dir1 = Path.Combine(root1, rel);
67string dir2 = Path.Combine(root2, rel);
74string relCur = Path.Combine(rel, name);
89log.WriteLine("*** Missing left file: '{0}'", Path.Combine(rel, kvp.Key));
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.Samples (30)
Microsoft.ML.Samples.GPU (26)
Microsoft.ML.SamplesUtils (8)
SamplesDatasetUtils.cs (8)
27while (!Directory.Exists(Path.Combine(directory, ".git")) && directory != null)
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 (2)
Microsoft.ML.TensorFlow (5)
Microsoft.ML.TensorFlow.Tests (20)
TensorflowTests.cs (20)
36tempFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
37assetsPath = Path.Combine(tempFolder, "assets");
38parentWorkspacePath = Path.Combine(assetsPath, "cached");
76_fullImagesetFolderPath = Path.Combine(
766var varDir = Path.Combine(modelLocation, "variables");
1449if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName))
1450&& File.Exists(Path.Combine(workspacePath, validationSetBottleneckCachedValuesFileName)))
1465string workspacePath = Path.Combine(TensorFlowScenariosTestsFixture.parentWorkspacePath, finalImagesFolderName + "_" + (int)arch);
1750Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.TrainSetBottleneckCachedValuesFileName)));
1751Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.ValidationSetBottleneckCachedValuesFileName)));
1850string fullImagesetFolderPath = Path.Combine(
1958UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1960if (!Directory.Exists(Path.Combine(imagesDownloadFolder, filenameAlias)))
1961Directory.Move(Path.Combine(imagesDownloadFolder, Path.GetFileNameWithoutExtension(fileName)), Path.Combine(imagesDownloadFolder, "FPTSUT"));
1971UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1983string relativeFilePath = Path.Combine(destDir, destFileName);
2012if (File.Exists(Path.Combine(destFolder, flag)))
2016File.Create(Path.Combine(destFolder, flag));
2039string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.ML.TestFramework (9)
Microsoft.ML.TestFrameworkCommon (6)
Microsoft.ML.Tests (11)
Microsoft.ML.TimeSeries.Tests (4)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (32)
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 (6)
Microsoft.ML.Transforms (2)
Microsoft.ML.Vision (18)
DnnRetrainTransform.cs (9)
118var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(DnnRetrainTransformer) + "_" + Guid.NewGuid()));
130string fullFilePath = Path.Combine(tempDirPath, relativeFile);
409var path = Path.Combine(modelDir, DefaultModelFileNames.TmpMlnetModel);
416var variablesPath = Path.Combine(modelDir, DefaultModelFileNames.VariablesFolder);
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),
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.Sdk.Razor.SourceGenerators.UnitTests (1)
Microsoft.VisualBasic.Core (4)
Microsoft.VisualStudio.Extensibility.Testing.Xunit (10)
Microsoft.VisualStudio.LanguageServices (13)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (20)
Microsoft.VisualStudio.LanguageServices.Implementation (5)
Microsoft.VisualStudio.LanguageServices.Razor (3)
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (10)
Microsoft.VisualStudio.Razor.IntegrationTests (19)
Microsoft.VisualStudio.RazorExtension (3)
Microsoft.VisualStudioCode.Razor.IntegrationTests (25)
Microsoft.VisualStudioCode.RazorExtension (2)
Microsoft.VisualStudioCode.RazorExtension.UnitTests (5)
MSBuild (13)
MSBuild.Benchmarks (11)
DefiningProjectModifiersBenchmark.cs (8)
35string srcDir = Path.Combine(_tempDir, "src");
41File.WriteAllText(Path.Combine(srcDir, $"File{i}.cs"), string.Empty);
50root.FullPath = Path.Combine(_tempDir, "SingleProject.csproj");
55itemGroup.AddItem("Compile", Path.Combine(srcDir, $"File{i}.cs"));
69importRoot.FullPath = Path.Combine(_tempDir, "Imported.props");
73importItemGroup.AddItem("Compile", Path.Combine(srcDir, $"File{i}.cs"));
80mainRoot.FullPath = Path.Combine(_tempDir, "MainProject.csproj");
85mainItemGroup.AddItem("Compile", Path.Combine(srcDir, $"File{i}.cs"));
MSBuildTaskHost (6)
NonDISample (1)
Pipelines.Library (2)
PrepareTests (15)
MinimizeUtil.cs (12)
27var duplicateDirectory = Path.Combine(destinationDirectory, duplicateDirectoryName);
38var outputPath = Path.Combine(destinationDirectory, individualFile);
40CreateHardLink(outputPath, Path.Combine(sourceDirectory, individualFile));
53var artifactsDir = Path.Combine(sourceDirectory, "artifacts/bin");
56Path.Combine(sourceDirectory, "eng"),
82var currentOutputDirectory = Path.Combine(destinationDirectory, currentRelativeDirectory);
95RelativePath: Path.Combine(currentRelativeDirectory, fileName),
101var destFilePath = Path.Combine(currentOutputDirectory, fileName);
109RelativePath: Path.Combine(currentRelativeDirectory, fileName),
133var destFilePath = Path.Combine(destinationDirectory, item.RelativePath);
141string getPeFilePath(Guid mvid) => Path.Combine(duplicateDirectory, getPeFileName(mvid));
199File.WriteAllText(Path.Combine(destinationDirectory, rehydrateAllFilename), rehydrateAllBuilder.ToString());
PresentationBuildTasks (4)
PresentationCore (4)
PresentationFramework (2)
PresentationUI (2)
Replay (14)
RepoTasks (8)
Roslyn.Compilers.Extension (2)
Roslyn.Diagnostics.Analyzers (5)
Roslyn.Test.Performance.Utilities (27)
Roslyn.VisualStudio.Next.UnitTests (13)
Remote\SnapshotSerializationTests.cs (6)
59.AddAnalyzerReference(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path1"), new TestAnalyzerAssemblyLoader()))
63.WithAnalyzerReferences([new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path2"), new TestAnalyzerAssemblyLoader())])
392var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
406var reference = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
504var analyzer = new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing_reference"), new MissingAnalyzerLoader());
538var analyzer = serializer.CreateChecksum(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing"), new MissingAnalyzerLoader()), CancellationToken.None);
Services\ServiceHubServicesTests.cs (6)
451assemblyPath: Path.Combine(TempRoot.Root, "Test.dll"),
774assemblyPath: Path.Combine(TempRoot.Root, "Test.dll"),
1511assemblyPath: Path.Combine(TempRoot.Root, "Test.dll"),
1596assemblyPath: Path.Combine(TempRoot.Root, "Test.dll"),
1675assemblyPath: Path.Combine(TempRoot.Root, "Test.dll"),
1759assemblyPath: Path.Combine(TempRoot.Root, "Test.dll"),
RulesetToEditorconfigConverter (2)
RulesetToEditorconfigConverter.UnitTests (4)
RunTests (28)
HelixTestRunner.cs (15)
65var payloadsDir = Path.Combine(options.ArtifactsDirectory, "payloads");
80var helixFilePath = Path.Combine(options.ArtifactsDirectory, "helix.proj");
83var arguments = $"build -bl:{Path.Combine(logsDir, "helix.binlog")} {helixFilePath}";
98File.Copy(helixFilePath, Path.Combine(logsDir, "helix.proj"));
150var duplicateDir = Path.Combine(Path.GetDirectoryName(artifactsDir)!, ".duplicate");
196var workItemPayloadDir = Path.Combine(payloadsDir, helixWorkItem.DisplayName);
199var binDir = Path.Combine(artifactsDir, "bin");
207var targetDir = Path.Combine(workItemPayloadDir, name);
208var sourceDir = Path.Combine(binDir, name);
215Path.Combine(workItemPayloadDir, rspFileName),
219path: Path.Combine(workItemPayloadDir, "eng"),
222path: Path.Combine(workItemPayloadDir, "global.json"),
226File.WriteAllText(Path.Combine(workItemPayloadDir, commandFileName), commandContent);
229File.WriteAllText(Path.Combine(workItemPayloadDir, postCommandFileName), postCommandContent);
489var destinationPath = Path.Combine(logsDir, relativePath);
SemanticSearch.BuildTask (2)
ServerComparison.FunctionalTests (2)
Sockets.BindTests (2)
Sockets.FunctionalTests (2)
StaticFilesAuth (4)
Stress.ApiService (2)
System.CodeDom (1)
System.ComponentModel.Composition (1)
System.Configuration.ConfigurationManager (12)
System.Diagnostics.Process (4)
System.Diagnostics.TextWriterTraceListener (1)
System.Formats.Tar (1)
System.IO.Compression.ZipFile (1)
System.IO.IsolatedStorage (2)
System.IO.MemoryMappedFiles (1)
System.IO.Packaging (1)
System.IO.Pipes (1)
System.Net.Mail (1)
System.Net.Ping (2)
System.Net.Quic (1)
System.Private.CoreLib (22)
System.Private.Xml (3)
System.Reflection.MetadataLoadContext (1)
System.Security.Cryptography (4)
System.Text.RegularExpressions (1)
Templates.Blazor.Tests (43)
BlazorWasmTemplateTest.cs (8)
31var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
32Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
107var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
111Assert.False(File.Exists(Path.Combine(publishDir, "service-worker.published.js")), "service-worker.published.js should not be published");
112Assert.True(File.Exists(Path.Combine(publishDir, "service-worker.js")), "service-worker.js should be published");
113Assert.True(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "service-worker-assets.js should be published");
129var fullPath = Path.Combine(basePath, path);
133return File.ReadAllText(Path.Combine(basePath, path));
WebWorkerTemplateE2ETest.cs (10)
105var workerLibDir = Path.Combine(parentDir, "WorkerLib");
125var workerLibDir = Path.Combine(parentDir, "WorkerLib");
179var csprojPath = Path.Combine(hostProject.TemplateOutputDir, $"{hostProject.ProjectName}.csproj");
204var testComponentSource = Path.Combine(TestAssetsPath, "WebWorkerTest.razor");
210pagesDir = Path.Combine(hostProject.TemplateOutputDir, "Pages");
213Path.Combine(pagesDir, "WebWorkerTest.razor"),
219var workerMethodsSource = Path.Combine(TestAssetsPath, "TestWorkerMethods.cs");
220File.Copy(workerMethodsSource, Path.Combine(workerLibDir, "TestWorkerMethods.cs"), overwrite: true);
229var objDirectory = Path.Combine(hostProject.TemplateOutputDir, "obj");
260var endpointsManifest = Path.Combine(outputDir,
Templates.Blazor.WebAssembly.Auth.Tests (27)
Templates.Blazor.WebAssembly.Tests (35)
BlazorWasmTemplateTest.cs (8)
35var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
36Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
45var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
46Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
55var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
56Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
65var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
66Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
Templates.Mvc.Tests (30)
Templates.Tests (36)
Test.Utilities (4)
TestDiscoveryWorker (1)
TestProject.AppHost (1)
TestTasks (1)
Text.Analyzers (5)
ThreadSafeTaskAnalyzer.Tests (1)
vbc (8)
VBCSCompiler (25)
src\Compilers\Server\VBCSCompiler\CompilationCache.cs (16)
150var cachedAssemblyPath = Path.Combine(entryDir, AssemblyFileName);
202return !File.Exists(Path.Combine(entryDir, cachedFileName));
212File.Copy(Path.Combine(entryDir, cachedFileName), targetPath, overwrite: true);
233var dllCacheDir = Path.Combine(_cachePath, dllName);
259var keyPath = Path.Combine(entryPath, dllName + ".key");
293var dllCacheDir = Path.Combine(_cachePath, dllName);
313stagingDir = Path.Combine(dllCacheDir, hashKey + "." + Guid.NewGuid().ToString("N") + ".tmp");
316File.Copy(outputFiles.AssemblyPath, Path.Combine(stagingDir, AssemblyFileName), overwrite: false);
318tryCopyOptional(outputFiles.PdbPath, Path.Combine(stagingDir, PdbFileName));
319tryCopyOptional(outputFiles.RefAssemblyPath, Path.Combine(stagingDir, RefAssemblyFileName));
320tryCopyOptional(outputFiles.XmlDocPath, Path.Combine(stagingDir, XmlDocFileName));
322File.WriteAllText(Path.Combine(stagingDir, dllName + ".key"), deterministicKey, Encoding.UTF8);
323File.WriteAllText(Path.Combine(stagingDir, CreatedFileName), DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture));
448var path = Path.Combine(entryDir, LastUsedFileName);
544var lastUsedPath = Path.Combine(entryDir, LastUsedFileName);
572var createdPath = Path.Combine(entryDir, CreatedFileName);
VBCSCompiler.UnitTests (120)
CompilationCacheBehaviorTests.cs (17)
59File.Delete(Path.Combine(workingDirectory.Path, outputFileName));
65Assert.True(File.Exists(Path.Combine(workingDirectory.Path, outputFileName)));
77var touchedFilesBase = Path.Combine(workingDirectory.Path, "touched");
97File.Delete(Path.Combine(workingDirectory.Path, outputFileName));
139File.Delete(Path.Combine(workingDirectory.Path, outputFileName));
208File.Delete(Path.Combine(workingDirectory.Path, consumerOutputFileName));
223var generatedFilesDirectory = Path.Combine(workingDirectory.Path, "generated");
246File.Delete(Path.Combine(workingDirectory.Path, outputFileName));
288Assert.True(File.Exists(Path.Combine(workingDirectory.Path, keyFileName)));
290File.Delete(Path.Combine(workingDirectory.Path, outputFileName));
291File.Delete(Path.Combine(workingDirectory.Path, pdbFileName));
292File.Delete(Path.Combine(workingDirectory.Path, keyFileName));
297Assert.True(File.Exists(Path.Combine(workingDirectory.Path, outputFileName)));
298Assert.True(File.Exists(Path.Combine(workingDirectory.Path, pdbFileName)));
299Assert.False(File.Exists(Path.Combine(workingDirectory.Path, keyFileName)));
413var path = Path.Combine(directory.Path, assemblyName + ".dll");
443var filePath = Path.Combine(currentDirectory.Path, "netstandard.dll");
CompilationCacheTests.cs (84)
102AssemblyPath = Path.Combine(outputDir, "Util.dll"),
123File.WriteAllBytes(Path.Combine(entryDir, "assembly"), [1, 2, 3]);
127AssemblyPath = Path.Combine(outputDir, dllName),
149File.WriteAllBytes(Path.Combine(entryDir, "assembly"), [1]);
150File.WriteAllBytes(Path.Combine(entryDir, "pdb"), [2]);
151File.WriteAllBytes(Path.Combine(entryDir, "refassembly"), [3]);
152File.WriteAllBytes(Path.Combine(entryDir, "xmldoc"), [4]);
156AssemblyPath = Path.Combine(outputDir, dllName),
157PdbPath = Path.Combine(outputDir, "MyLib.pdb"),
159XmlDocPath = Path.Combine(outputDir, "MyLib.xml"),
162Directory.CreateDirectory(Path.Combine(outputDir, "ref"));
185File.WriteAllBytes(Path.Combine(entryDir, "assembly"), [10]);
189AssemblyPath = Path.Combine(outputDir, dllName),
190PdbPath = Path.Combine(outputDir, "MyLib.pdb"),
215File.WriteAllBytes(Path.Combine(entryDir, "assembly"), [1, 2, 3]);
219AssemblyPath = Path.Combine(outputDir, dllName),
241Directory.CreateDirectory(Path.Combine(cacheDir, dllName));
245AssemblyPath = Path.Combine(outputDir, dllName),
267var assemblyPath = Path.Combine(outputDir, dllName);
268var pdbPath = Path.Combine(outputDir, "MyLib.pdb");
270var xmlPath = Path.Combine(outputDir, "MyLib.xml");
271Directory.CreateDirectory(Path.Combine(outputDir, "ref"));
288Assert.Equal([10, 20, 30], File.ReadAllBytes(Path.Combine(entryDir, "assembly")));
289Assert.Equal([40, 50], File.ReadAllBytes(Path.Combine(entryDir, "pdb")));
290Assert.Equal([60], File.ReadAllBytes(Path.Combine(entryDir, "refassembly")));
291Assert.Equal([70, 80, 90], File.ReadAllBytes(Path.Combine(entryDir, "xmldoc")));
292Assert.Equal(deterministicKey, File.ReadAllText(Path.Combine(entryDir, dllName + ".key"), Encoding.UTF8));
305var assemblyPath = Path.Combine(outputDir, dllName);
319Assert.True(File.Exists(Path.Combine(entryDir, "assembly")));
320Assert.False(File.Exists(Path.Combine(entryDir, "pdb")));
321Assert.False(File.Exists(Path.Combine(entryDir, "refassembly")));
322Assert.False(File.Exists(Path.Combine(entryDir, "xmldoc")));
350var assemblyPath = Path.Combine(outputDir, dllName);
368Assert.Equal([10, 20, 30], File.ReadAllBytes(Path.Combine(entryDir, "assembly")));
387var assemblyPath = Path.Combine(outputDir, dllName);
393AssemblyPath = Path.Combine(restoreDir, dllName),
436File.WriteAllText(Path.Combine(oldEntryDir, dllName + ".key"), oldKeyContent, Encoding.UTF8);
438File.WriteAllBytes(Path.Combine(oldEntryDir, "assembly"), [1]);
463File.WriteAllBytes(Path.Combine(entryDir, "assembly"), [1, 2, 3]);
467AssemblyPath = Path.Combine(outputDir, dllName),
474var lastUsedPath = Path.Combine(entryDir, "last-used");
487var assemblyPath = Path.Combine(outputDir, dllName);
495var lastUsedPath = Path.Combine(entryDir, "last-used");
508var assemblyPath = Path.Combine(outputDir, dllName);
515var createdPath = Path.Combine(entryDir, "created");
532File.WriteAllBytes(Path.Combine(entry1, "assembly"), [1]);
533File.WriteAllText(Path.Combine(entry1, "created"), now.AddHours(-1).ToString("O"));
534File.WriteAllText(Path.Combine(entry1, "last-used"), now.AddSeconds(1).ToString("O"));
538File.WriteAllBytes(Path.Combine(entry2, "assembly"), [2]);
539File.WriteAllText(Path.Combine(entry2, "created"), now.AddSeconds(1).ToString("O"));
540File.WriteAllText(Path.Combine(entry2, "last-used"), now.AddSeconds(1).ToString("O"));
544File.WriteAllBytes(Path.Combine(entry3, "assembly"), [3]);
545File.WriteAllText(Path.Combine(entry3, "created"), now.AddHours(-2).ToString("O"));
546File.WriteAllText(Path.Combine(entry3, "last-used"), now.AddHours(-1).ToString("O"));
565File.WriteAllBytes(Path.Combine(entry, "assembly"), [1]);
566File.WriteAllText(Path.Combine(entry, "created"), now.AddHours(-2).ToString("O"));
567File.WriteAllText(Path.Combine(entry, "last-used"), now.ToString("O"));
587File.WriteAllBytes(Path.Combine(entry, "assembly"), [1]);
588File.WriteAllText(Path.Combine(entry, "created"), now.AddHours(-2).ToString("O"));
589File.WriteAllText(Path.Combine(entry, "last-used"), now.ToString("O"));
607File.WriteAllBytes(Path.Combine(oldEntry, "assembly"), [1, 2, 3]);
608File.WriteAllText(Path.Combine(oldEntry, "last-used"), DateTimeOffset.UtcNow.AddHours(-2).ToString("O"));
612File.WriteAllBytes(Path.Combine(newEntry, "assembly"), [4, 5, 6]);
613File.WriteAllText(Path.Combine(newEntry, "last-used"), DateTimeOffset.UtcNow.ToString("O"));
631File.WriteAllBytes(Path.Combine(entry1, "assembly"), [1]);
632File.WriteAllText(Path.Combine(entry1, "last-used"), DateTimeOffset.UtcNow.ToString("O"));
634File.WriteAllBytes(Path.Combine(entry2, "assembly"), [2]);
635File.WriteAllText(Path.Combine(entry2, "last-used"), DateTimeOffset.UtcNow.ToString("O"));
650var dllDir = Path.Combine(cacheDir, "Orphan.dll");
651var entryDir = Path.Combine(dllDir, "hash_orphan");
653File.WriteAllBytes(Path.Combine(entryDir, "assembly"), [1]);
654File.WriteAllText(Path.Combine(entryDir, "last-used"), DateTimeOffset.UtcNow.AddHours(-2).ToString("O"));
667var dllDir = Path.Combine(cacheDir, "Lib.dll");
668var stagingDir = Path.Combine(dllDir, "somehash.abc123.tmp");
671var usedDir = Path.Combine(dllDir, "hash_used");
673File.WriteAllBytes(Path.Combine(usedDir, "assembly"), [1]);
674File.WriteAllText(Path.Combine(usedDir, "last-used"), DateTimeOffset.UtcNow.ToString("O"));
687var dllDir = Path.Combine(cacheDir, "Lib.dll");
688var oldEntry = Path.Combine(dllDir, "hash_old");
690File.WriteAllBytes(Path.Combine(oldEntry, "assembly"), [1]);
691File.WriteAllText(Path.Combine(oldEntry, "last-used"), DateTimeOffset.UtcNow.AddHours(-2).ToString("O"));
693var newEntry = Path.Combine(dllDir, "hash_current");
695File.WriteAllBytes(Path.Combine(newEntry, "assembly"), [2]);
696File.WriteAllText(Path.Combine(newEntry, "last-used"), DateTimeOffset.UtcNow.ToString("O"));
CompilerServerTests.cs (15)
97var filePath = Path.Combine(currentDirectory.Path, "netstandard.dll");
224return new DisposableFile(Path.Combine(directory.Path, resultFileName));
418var compilerServerExecutable = Path.Combine(basePath, "VBCSCompiler.exe");
526Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
556Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
573Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe")));
591Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
616Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe")));
634Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe")));
663Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hellovb.exe")));
692Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe")));
1030$"src1.cs /shared:{serverData.PipeName} /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"),
1081$"src1.vb /shared:{serverData.PipeName} /vbruntime* /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"),
1364var tmp = Path.Combine(_tempDirectory.Path, "Temp");
1398var tmp = Path.Combine(_tempDirectory.Path, "Temp");
WindowsBase.Tests (1)
xunit.console (9)
Yarp.AppHost (1)