10525 references to Combine
AnalyzerRunner (1)
ArgumentForwarding.Tests (3)
aspire (27)
Aspire.Cli.Tests (210)
Commands\RunCommandTests.cs (12)
178new FileInfo(Path.Combine(searchDirectory, "AppHost1.csproj")),
179new FileInfo(Path.Combine(searchDirectory, "AppHost2.csproj"))
187new FileInfo(Path.Combine(searchDirectory, "AppHost1.csproj")),
188new FileInfo(Path.Combine(searchDirectory, "AppHost2.csproj"))
428var appHostProjectPath = Path.Combine(appHostDirectory.FullName, "MyApp.AppHost.csproj");
772var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
828var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
880var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
936var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
987var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1039var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1091var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
DotNet\DotNetCliRunnerTests.cs (26)
34var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
83var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
121var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
169var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
216var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
266var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
362var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
410var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
460var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
515var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
570var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
634var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
703var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
776var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
781var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj"));
785var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj"));
832var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
835var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj"));
874var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
932var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
989var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1043var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1106var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1164var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1221var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1266var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Packaging\NuGetConfigMergerSnapshotTests.cs (11)
46var path = Path.Combine(dir.FullName, "NuGet.config");
86var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
92var hivePath = Path.Combine(hivesDir.FullName, channelName);
148var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
154var hivePath = Path.Combine(hivesDir.FullName, channelName);
209var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
215var hivePath = Path.Combine(hivesDir.FullName, channelName);
268var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
274var hivePath = Path.Combine(hivesDir.FullName, channelName);
332var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
338var hivePath = Path.Combine(hivesDir.FullName, channelName);
Packaging\NuGetConfigMergerTests.cs (16)
23var path = Path.Combine(dir.FullName, "NuGet.config");
65var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
89var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
133var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
172var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
212var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
322var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
372var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
441var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
507var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
580var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
610var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
660var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
682var originalContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "NuGet.config"));
703var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
725var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
Projects\ProjectLocatorTests.cs (47)
36var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
59var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
63var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
67var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
98var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
102var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
106var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
134var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
139var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
177var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
180var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
200var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
203var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
252var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
271var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
293var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
334var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
362var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
392var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs"));
402var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj"));
407var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs"));
443var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
467var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj"));
472var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs"));
515var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
543var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
568var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
579var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj"));
602var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt"));
626var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
631var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
736var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
766var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
797var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
856var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj"));
858var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj"));
894var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs"));
926var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs"));
964var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj"));
998var exeProjectFile = new FileInfo(Path.Combine(exeProjectDir.FullName, "ExeProject.csproj"));
1003var libProjectFile = new FileInfo(Path.Combine(libProjectDir.FullName, "LibProject.csproj"));
1039var winExeProjectFile = new FileInfo(Path.Combine(winExeProjectDir.FullName, "WinExeProject.csproj"));
1074var lib1File = new FileInfo(Path.Combine(lib1Dir.FullName, "Lib1.csproj"));
1078var lib2File = new FileInfo(Path.Combine(lib2Dir.FullName, "Lib2.csproj"));
1130var exe1File = new FileInfo(Path.Combine(exe1Dir.FullName, "Exe1.csproj"));
1134var exe2File = new FileInfo(Path.Combine(exe2Dir.FullName, "Exe2.csproj"));
1138var winExeFile = new FileInfo(Path.Combine(winExeDir.FullName, "WinExe.csproj"));
Projects\ProjectUpdaterTests.cs (36)
29var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
32var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
35var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
139var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
142var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
145var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
276var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
279var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
282var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
432var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj"));
435var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj"));
438var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj"));
441var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj"));
565var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
568var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
570var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
701var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
703var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
803var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
805var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
936var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
938var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1049var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1051var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1173var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1175var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1287var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1289var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1398var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1492var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1494var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1594var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1673var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1755var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
1838var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
1920var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
Templating\DotNetTemplateFactoryTests.cs (17)
54var path = Path.Combine(dir.FullName, "NuGet.config");
79var nugetConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
111var nugetConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
124var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
149var parentConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
155var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
168var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
191var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
205var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
218var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
222var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
235var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
244var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
245var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
256var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
265var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
266var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
Utils\FileSystemHelperTests.cs (29)
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");
Aspire.Components.Common.TestUtilities (1)
Aspire.Dashboard.Tests (9)
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 />");
151File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
152string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
330workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
334var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
337var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
Aspire.Hosting (26)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (12)
Aspire.Hosting.Azure.Functions (1)
Aspire.Hosting.Azure.Kusto.Tests (3)
Aspire.Hosting.Azure.Tests (21)
Aspire.Hosting.Containers.Tests (12)
Aspire.Hosting.DevTunnels (3)
Aspire.Hosting.Docker (5)
Aspire.Hosting.Docker.Tests (23)
DockerComposePublisherTests.cs (17)
97var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
98var envPath = Path.Combine(tempDir.Path, ".env");
130var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
131var envPath = Path.Combine(tempDir.Path, ".env");
158var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
193var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
242var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
244var envPath = Path.Combine(tempDir.Path, ".env");
255var envFilePath = Path.Combine(tempDir.Path, ".env");
286var envFilePath = Path.Combine(tempDir.Path, ".env");
341var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
367var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
393var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
421var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
453var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
478var dockerfilePath = Path.Combine(tempDir.Path, "testcontainer.Dockerfile");
502var composePath = Path.Combine(tempDir.Path, "docker-compose.yaml");
Aspire.Hosting.Garnet.Tests (2)
Aspire.Hosting.Kafka.Tests (2)
Aspire.Hosting.Keycloak.Tests (4)
Aspire.Hosting.Kubernetes (5)
Aspire.Hosting.Kubernetes.Tests (10)
Aspire.Hosting.Milvus.Tests (1)
Aspire.Hosting.MongoDB.Tests (5)
Aspire.Hosting.MySql.Tests (4)
Aspire.Hosting.NodeJs (2)
Aspire.Hosting.NodeJs.Tests (3)
Aspire.Hosting.Oracle.Tests (2)
Aspire.Hosting.PostgreSQL.Tests (5)
Aspire.Hosting.Python (3)
Aspire.Hosting.Python.Tests (26)
AddPythonAppTests.cs (24)
24var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
62var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
259var projectDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
282var scriptPath = Path.Combine(projectDirectory, "main.py");
285var requirementsPath = Path.Combine(projectDirectory, "requirements.txt");
289var dockerFilePath = Path.Combine(projectDirectory, "Dockerfile");
403var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
526var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
681var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
715var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
749var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, tempDir.Path));
961File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
962File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
963File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
965var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
984var scriptDockerfilePath = Path.Combine(outputDir.Path, "script-app.Dockerfile");
987var moduleDockerfilePath = Path.Combine(outputDir.Path, "module-app.Dockerfile");
990var executableDockerfilePath = Path.Combine(outputDir.Path, "executable-app.Dockerfile");
1011var appDirectory = Path.Combine(tempDir.Path, "myapp");
1013var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
1043var appDirectory = Path.Combine(tempDir.Path, "myapp");
1045var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
1074var appDirectory = Path.Combine(tempDir.Path, "myapp");
1076var virtualEnvironmentPath = Path.Combine(tempDir.Path, ".venv");
Aspire.Hosting.Qdrant.Tests (1)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.Seq.Tests (2)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Testing (1)
Aspire.Hosting.Testing.Tests (3)
Aspire.Hosting.Tests (58)
Dashboard\DashboardLifecycleHookTests.cs (10)
202var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
203var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
295var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard.exe");
296var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
297var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
367var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard"); // No extension for Unix
368var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
369var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
439var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
440var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
MSBuildTests.cs (16)
22var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
25File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
53File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
78var appHostDirectory = Path.Combine(tempDirectory.Path, "AppHost");
81File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
108File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
119var appHostMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "_AppHost.ProjectMetadata.g.cs"));
120var appMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "App.ProjectMetadata.g.cs"));
141File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
151File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
162var libraryDirectory = Path.Combine(basePath, name);
165File.WriteAllText(Path.Combine(libraryDirectory, $"{name}.csproj"),
177File.WriteAllText(Path.Combine(libraryDirectory, "Class1.cs"),
189var appDirectory = Path.Combine(basePath, name);
192File.WriteAllText(Path.Combine(appDirectory, $"{name}.csproj"),
203File.WriteAllText(Path.Combine(appDirectory, "Program.cs"),
Schema\SchemaTests.cs (9)
49var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
51var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
61var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
63var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
79var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
81var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
112var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
208var relativePath = Path.Combine("Schema", "aspire-8.0.json");
221var builder = TestDistributedApplicationBuilder.Create(["--publisher", "manifest", "--output-path", Path.Combine(manifestDir, "not-used.json")]);
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (3)
Aspire.Playground.Tests (1)
Aspire.Templates.Tests (43)
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 />");
151File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
152string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
330workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
334var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
337var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
Aspire.TestUtilities (1)
AspireWithNode.AppHost (3)
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)
containerize.UnitTests (1)
Crossgen2Tasks (2)
csc (8)
CSharpSyntaxGenerator (4)
csi (1)
CustomEncryptorSample (1)
dotnet (126)
Commands\Workload\Install\FileBasedInstaller.cs (8)
133var tempExtractionDir = Path.Combine(_tempPackagesDir.Value, $"{WorkloadManifestUpdater.WorkloadSetManifestId}-{workloadSetPackageVersion}-extracted");
175var packagePath = Path.Combine(offlineCache.Value.Value, $"{packInfo.ResolvedPackageId}.{packInfo.Version}.nupkg");
203var tempExtractionDir = Path.Combine(_tempPackagesDir.Value, $"{packInfo.ResolvedPackageId}-{packInfo.Version}-extracted");
317packagePath = Path.Combine(offlineCache.Value.Value, $"{packageId}.{packageVersion}.nupkg");
327tempBackupDir = Path.Combine(_tempPackagesDir.Value, $"{packageId} - {packageVersion}-backup");
589string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, _workloadRootDir), "default.json");
633string logFile = Path.Combine(historyDirectory, $"{workloadHistoryRecord.TimeStarted:yyyy'-'MM'-'dd'T'HHmmss}_{workloadHistoryRecord.CommandName}.json");
678FileAccessRetrier.RetryOnMoveAccessFailure(() => DirectoryPath.MoveDirectory(Path.Combine(extractionPath, "data"), targetPath));
Commands\Workload\Install\MsiInstallerBase.cs (11)
121string dotNetHome = Path.Combine(Environment.GetFolderPath(programFiles), "dotnet");
200string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
228string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
383string logFile = Path.Combine(historyDirectory, $"{workloadHistoryRecord.TimeStarted:yyyy'-'MM'-'dd'T'HHmmss}_{workloadHistoryRecord.CommandName}.json");
410return Path.Combine(Path.GetDirectoryName(Log.LogPath),
422return Path.Combine(Path.GetDirectoryName(Log.LogPath),
434return Path.Combine(Path.GetDirectoryName(Log.LogPath),
445return Path.Combine(Path.GetDirectoryName(Log.LogPath),
457return Path.Combine(Path.GetDirectoryName(Log.LogPath),
546string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
583string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
Commands\Workload\Install\WorkloadManifestUpdater.cs (8)
130string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json");
183var workloadSetVersionFilePath = Path.Combine(advertisedPath, Constants.workloadSetVersionFileName);
344File.WriteAllText(Path.Combine(adManifestPath, "AdvertisedManifestFeatureBand.txt"), band.ToString());
357File.WriteAllText(Path.Combine(adManifestPath, Constants.workloadSetVersionFileName), workloadSetVersion);
413var manifestPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "WorkloadManifest.json");
423var adManifestFeatureBandPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "AdvertisedManifestFeatureBand.txt");
521private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}");
525private static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}");
Telemetry\PersistenceChannel\StorageService.cs (9)
92_storageDirectoryPath = Path.Combine(CliFolderPathCalculator.DotnetUserProfileFolderPath,
163File.Delete(Path.Combine(StorageFolder, item.FileName));
219File.Move(Path.Combine(StorageFolder, tempFileName), Path.Combine(StorageFolder, newFileName));
231using (Stream stream = File.OpenWrite(Path.Combine(StorageFolder, file)))
251using (Stream stream = File.OpenRead(Path.Combine(StorageFolder, file)))
300using (FileStream stream = File.OpenRead(Path.Combine(StorageFolder, file)))
339DateTime creationTime = File.GetCreationTimeUtc(Path.Combine(StorageFolder, file));
343File.Delete(Path.Combine(StorageFolder, file));
ToolPackage\ToolPackageDownloaderBase.cs (5)
57_runtimeJsonPath = runtimeJsonPathForTests ?? Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "RuntimeIdentifierGraph.json");
281CreateAssetFile(packageId, packageVersion, packageDownloadDir, Path.Combine(assetFileDirectory.Value, ToolPackageInstance.AssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
291CreateAssetFile(ridSpecificPackage, packageVersion, packageDownloadDir, Path.Combine(assetFileDirectory.Value, ToolPackageInstance.RidSpecificPackageAssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
308CreateAssetFile(packageId, packageVersion, _localToolDownloadDir, Path.Combine(_localToolAssetDir.Value, ToolPackageInstance.AssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
318Path.Combine(_localToolAssetDir.Value, ToolPackageInstance.RidSpecificPackageAssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
dotnet.Tests (658)
CommandTests\New\DotnetAddPostActionTests.cs (21)
38string projFileFullPath = Path.Combine(targetBasePath, "MyApp.proj");
52string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj");
67string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj");
82string fooprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fooproj");
85string barprojFileFullPath = Path.Combine(targetBasePath, "MyApp.barproj");
88string csprojFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
91string fsprojFileFullPath = Path.Combine(targetBasePath, "MyApp.fsproj");
106string projFileFullPath = Path.Combine(targetBasePath, "MyApp.xproj");
122string projFileFullPathOne = Path.Combine(targetBasePath, "MyApp.anysproj");
125string projFileFullPathTwo = Path.Combine(targetBasePath, "MyApp2.someproj");
139string projFileFullPathOne = Path.Combine(targetBasePath, "MyApp.fooproj");
142string projFileFullPathTwo = Path.Combine(targetBasePath, "MyApp2.barproj");
159string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
160string referencedProjFileFullPath = Path.Combine(targetBasePath, "NewName.csproj");
187string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
188string referencedProjFileFullPath = Path.Combine(targetBasePath, "Reference.csproj");
216string existingProjectPath = Path.Combine(targetBasePath, existingProjectFolder);
219string existingProjectFileFullPath = Path.Combine(existingProjectPath, existingProjectFile);
222string referencedProjectFileFullPath = Path.Combine(targetBasePath, "Reference.csproj");
257string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
283string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
CommandTests\New\DotnetSlnPostActionTests.cs (19)
24string solutionFileFullPath = Path.Combine(targetBasePath, "MySln.sln");
39string solutionFileFullPath = Path.Combine(targetBasePath, "MySln.slnx");
54string slnFileFullPath = Path.Combine(targetBasePath, "MySln.sln");
55string slnxFileFullPath = Path.Combine(targetBasePath, "MySln.slnx");
153string outputFileFullPath0 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[0].Path);
154string dontFindMeFullPath1 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[1].Path);
155string outputFileFullPath2 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[2].Path);
183string outputFileFullPath0 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[0].Path);
184string outputFileFullPath1 = Path.Combine(outputBasePath, creationResult.PrimaryOutputs[1].Path);
200string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
201string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
229string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
230string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
258string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
259string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
290string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
291string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
322string slnFileFullPath = Path.Combine(targetBasePath, "MyApp.sln");
323string projFileFullPath = Path.Combine(targetBasePath, "MyApp.csproj");
CommandTests\Pack\PackTests.cs (16)
44var outputDir = new DirectoryInfo(Path.Combine(testInstance.Path, "bin2"));
217var outputPackage = new FileInfo(Path.Combine(outputDir.FullName, "TestLibraryWithConfiguration.1.0.0.nupkg"));
235var rootPath = Path.Combine(_testAssetsManager.CreateTestDirectory().Path, "TestProject");
259new DirectoryInfo(Path.Combine(rootPath, "bin"))
300string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec");
312var nupkgPath = Path.Combine(testInstance.Path, "PackNoCsproj.1.2.3.nupkg");
329string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec");
344string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec");
355var nupkgPath = Path.Combine(testInstance.Path, "CustomID.1.0.0.nupkg");
375string nuspecPath = Path.Combine(testInstance.Path, "TestingPackWithConfig.nuspec");
379File.WriteAllText(Path.Combine(configDir, "libraryclass.cs"), "// dummy source file for test");
386var outputPackage = new FileInfo(Path.Combine(testInstance.Path, "TestPackWithConfig.1.0.0.nupkg"));
402string nuspecPath = Path.Combine(testInstance.Path, "PackNoCsproj.nuspec");
403string outputDirPath = Path.Combine(testInstance.Path, "output");
414var nupkgPath = Path.Combine(outputDirPath, "PackNoCsproj.1.0.0.nupkg");
426string nuspecPath = Path.Combine(testInstance.Path, "NonExistent.nuspec");
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (9)
39var outputDll = Path.Combine(OutputPathCalculator.FromProject(testProjectDirectory).GetPublishDirectory(configuration: configuration), $"{testAppName}.dll");
70string projectDirectory = Path.Combine(testInstance.Path, "MultiTFMTestApp");
124var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
139var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
183.WithWorkingDirectory(Path.Combine(testAsset.Path, "MainProject"))
229var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}");
258.Execute(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll"))
322var outputProgram = Path.Combine(OutputPathCalculator.FromProject(rootDir).GetPublishDirectory(configuration: configuration), $"TestAppSimple.dll");
374var outputProgram = Path.Combine(OutputPathCalculator.FromProject(rootPath).GetPublishDirectory(configuration: configuration, runtimeIdentifier: rid), $"TestAppSimple.dll");
CommandTests\Reference\Add\GivenDotnetAddReference.cs (16)
145string brokenFolder = Path.Combine(setup.TestRoot, "Broken");
147string brokenProjectPath = Path.Combine(brokenFolder, "Broken.csproj");
172var workingDir = Path.Combine(setup.TestRoot, "MoreThanOne");
197var invalidProjDirectory = Path.Combine(_testAssetsManager.CreateTestDirectory().Path, "InvalidProj");
198var invalidProjPath = Path.Combine(invalidProjDirectory, "InvalidProj.csproj");
368var proj = new ProjDir(Path.Combine(setup.TestRoot, "WithExistingRefCondOnItem"));
403var proj = new ProjDir(Path.Combine(setup.TestRoot, "WithExistingRefCondWhitespaces"));
418var proj = new ProjDir(Path.Combine(setup.TestRoot, "WithRefNoCondNonUniform"));
433var proj = new ProjDir(Path.Combine(setup.TestRoot, "WithRefNoCondNonUniform"));
450var proj = new ProjDir(Path.Combine(setup.TestRoot, "WithRefCondNonUniform"));
465var proj = new ProjDir(Path.Combine(setup.TestRoot, "WithRefCondNonUniform"));
482var proj = new ProjDir(Path.Combine(setup.TestRoot, "EmptyItemGroup"));
625var net45lib = new ProjDir(Path.Combine(setup.TestRoot, "Net45Lib"));
642var net452netcoreapp10lib = new ProjDir(Path.Combine(setup.TestRoot, "Net452AndNetCoreApp10Lib"));
664var net45lib = new ProjDir(Path.Combine(setup.TestRoot, "Net45Lib"));
682var net45lib = new ProjDir(Path.Combine(setup.TestRoot, "Net45Lib"));
CommandTests\Reference\Remove\GivenDotnetRemoveP2P.cs (14)
190string brokenFolder = Path.Combine(setup.TestRoot, "Broken");
192string brokenProjectPath = Path.Combine(brokenFolder, "Broken.csproj");
218var workingDir = Path.Combine(setup.TestRoot, "MoreThanOne");
253cmd.StdOut.Should().Be(string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName)));
272cmd.StdOut.Should().Be(string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName)));
292cmd.StdOut.Should().Be(string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName)));
348cmd.StdOut.Should().Be(string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName)));
373cmd.StdOut.Should().Be(string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName)));
398cmd.StdOut.Should().Be(string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName)));
411var proj = new ProjDir(Path.Combine(setup.TestRoot, "WithDoubledRef"));
495string outputText = $@"{string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName))}
547result.StdOut.Should().Be(string.Format(CliStrings.ProjectReferenceRemoved, Path.Combine("Lib", setup.LibCsprojName)));
565result.StdErr.Should().Be(string.Format(CliStrings.CouldNotFindAnyProjectInDirectory, Path.Combine(setup.TestRoot, reference)));
582result.StdErr.Should().Be(string.Format(CliStrings.MoreThanOneProjectInDirectory, Path.Combine(setup.TestRoot, reference)));
CommandTests\Solution\Add\GivenDotnetSlnAdd.cs (52)
121var projectToAdd = Path.Combine("Lib", "Lib.csproj");
126cmd.StdErr.Should().Match(string.Format(CliStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, $"InvalidSolution{solutionExtension}"), "*"));
147var solutionPath = Path.Combine(projectDirectory, $"InvalidSolution{solutionExtension}");
187var solutionPath = Path.Combine(projectDirectory, "App");
206var projectToAdd = Path.Combine("Lib", "Lib.csproj");
234var slnPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
275projectToAdd = Path.Combine("foo", "bar");
345var slnPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
366var slnFullPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
377Path.Combine(projectDirectory, directoryToAdd)));
395var slnFullPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
406Path.Combine(projectDirectory, directoryToAdd)));
424var projectToAdd = Path.Combine("Lib", "Lib.csproj");
430ISolutionSerializer serializer = SolutionSerializers.GetSerializerByMoniker(Path.Combine(projectDirectory, $"App{solutionExtension}"));
431SolutionModel solution = await serializer.OpenAsync(Path.Combine(projectDirectory, $"App{solutionExtension}"), CancellationToken.None);
452var projectToAdd = Path.Combine("Shared", "Shared.shproj");
485ISolutionSerializer serializer = SolutionSerializers.GetSerializerByMoniker(Path.Combine(projectDirectory, $"App{solutionExtension}"));
486SolutionModel solution = await serializer.OpenAsync(Path.Combine(projectDirectory, $"App{solutionExtension}"), CancellationToken.None);
528var slnPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
558var projectPath = Path.Combine("Lib", "Lib.csproj");
585using (var stream = new FileStream(Path.Combine(projectDirectory, "App.sln"), FileMode.Open))
627ISolutionSerializer serializer = SolutionSerializers.GetSerializerByMoniker(Path.Combine(projectDirectory, $"App{solutionExtension}"));
628SolutionModel solution = await serializer.OpenAsync(Path.Combine(projectDirectory, $"App{solutionExtension}"), CancellationToken.None);
639solution = await serializer.OpenAsync(Path.Combine(projectDirectory, $"App{solutionExtension}"), CancellationToken.None);
665var slnPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
704var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
705var projectToAdd = Path.Combine("Lib", "Lib.csproj");
725var slnFullPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
728var projectToAdd = Path.Combine("Lib", "Lib.csproj");
749var slnFullPath = Path.Combine(projectDirectory, "App.sln");
752var projectToAdd = Path.Combine("UnknownProject", "UnknownProject.unknownproj");
787var projectToAdd = Path.Combine(projectDir, projectName);
795ISolutionSerializer serializer = SolutionSerializers.GetSerializerByMoniker(Path.Combine(projectDirectory, "App.sln"));
796SolutionModel solution = await serializer.OpenAsync(Path.Combine(projectDirectory, "App.sln"), CancellationToken.None);
814var solutionPath = Path.Combine(solutionDirectory, $"App{solutionExtension}");
817var projectToAdd = Path.Combine("UnknownProject", "UnknownProject.unknownproj");
825Path.Combine(solutionDirectory, projectToAdd)));
871ISolutionSerializer serializer = SolutionSerializers.GetSerializerByMoniker(Path.Combine(projectDirectory, $"App{solutionExtension}"));
872SolutionModel solution = await serializer.OpenAsync(Path.Combine(projectDirectory, $"App{solutionExtension}"), CancellationToken.None);
888var slnFullPath = Path.Combine(slnDirectory, $"App{solutionExtension}");
913var slnFullPath = Path.Combine(slnDirectory, $"App{solutionExtension}");
938var slnFullPath = Path.Combine(slnDirectory, $"App{solutionExtension}");
963var projectToAdd = Path.Combine("MultitargetedCS", "MultitargetedCS.csproj");
986var projectToAdd = Path.Combine("MultitargetedVB", "MultitargetedVB.vbproj");
1009var slnFullPath = Path.Combine(solutionDirectory, "App.sln");
1010var projectToAdd = Path.Combine("MultitargetedFS", "MultitargetedFS.fsproj");
1038var slnPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
1066var slnPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
1088var solutionPath = Path.Combine(solutionDirectory, $"App{solutionExtension}");
1126var slnPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
1174var projectToAdd = Path.Combine("A", "A.csproj");
1295var projectArg = Path.Combine("Lib", "Lib.csproj");
CommandTests\Solution\List\GivenDotnetSlnList.cs (8)
102string.Format(CliStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, "InvalidSolution.sln"), "").TrimEnd('.'));
122var solutionFullPath = Path.Combine(projectDirectory, $"InvalidSolution{solutionExtension}");
142var solutionDir = Path.Combine(projectDirectory, "App");
197{Path.Combine("App", "App.csproj")}
198{Path.Combine("Lib", "Lib.csproj")}";
221{Path.Combine("App", "App.csproj")}
222{Path.Combine("Lib", "Lib.csproj")}";
229var slnFileName = Path.Combine(projectDirectory, $"App{solutionExtension}");
CommandTests\Solution\Remove\GivenDotnetSlnRemove.cs (39)
102var projectToRemove = Path.Combine("Lib", "Lib.csproj");
107cmd.StdErr.Should().Match(string.Format(CliStrings.InvalidSolutionFormatString, Path.Combine(projectDirectory, $"InvalidSolution{solutionExtension}"), "*"));
127var solutionPath = Path.Combine(projectDirectory, $"InvalidSolution{solutionExtension}");
128var projectToRemove = Path.Combine("Lib", "Lib.csproj");
167var solutionPath = Path.Combine(projectDirectory, "App");
186var projectToRemove = Path.Combine("Lib", "Lib.csproj");
207var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
230var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
237var projectToRemove = Path.Combine("Lib", "Lib.csproj");
246solution.SolutionProjects.Single().FilePath.Should().Be(Path.Combine("App", "App.csproj"));
261var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
273cmd.StdOut.Should().Be(string.Format(CliStrings.ProjectRemovedFromTheSolution, Path.Combine(projectToRemove, "Lib.csproj")));
277solution.SolutionProjects.Single().FilePath.Should().Be(Path.Combine("App", "App.csproj"));
292var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
294var projectToRemove = Path.Combine("ConsoleApp1", "ConsoleApp1.csproj");
317var solutionPath = Path.Combine(projectDirectory, "App.sln");
322var projectToRemove = Path.Combine("Lib", "Lib.csproj");
334solution.SolutionProjects.Single().FilePath.Should().Be(Path.Combine("App", "App.csproj"));
349var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
356var projectToRemove = Path.Combine("Lib", "Lib.csproj");
370solution.SolutionProjects.Single().FilePath.Should().Be(Path.Combine("App", "App.csproj"));
385var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
392var projectToRemove = Path.Combine("Lib", "Lib.csproj");
415var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
452Path.Combine(projectDirectory, directoryToRemove)));
476Path.Combine(projectDirectory, directoryToRemove)));
492var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
499var projectToRemove = Path.Combine("Lib", "Lib.csproj");
517var outputCalculator = OutputPathCalculator.FromProject(Path.Combine(projectDirectory, "App"));
536var projectToRemove = Path.Combine("Lib", "Lib.csproj");
544using (var stream = new FileStream(Path.Combine(projectDirectory, "App.sln"), FileMode.Open))
579var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
585var appPath = Path.Combine("App", "App.csproj");
586var libPath = Path.Combine("Lib", "Lib.csproj");
609var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
634var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
659var solutionPath = Path.Combine(projectDirectory, $"App{solutionExtension}");
661var projectToRemove = Path.Combine("Second", "Second.csproj");
684var projectArg = Path.Combine("Lib", "Lib.csproj");
CommandTests\Store\GivenDotnetStoresAndPublishesProjects.cs (10)
27var localAssemblyCache = Path.Combine(testProjectDirectory, "localAssemblyCache");
28var intermediateWorkingDirectory = Path.Combine(testProjectDirectory, "workingDirectory");
30var profileProject = Path.Combine(profileProjectPath, $"{profileProjectName}.xml");
78var profileFilter = Path.Combine(profileProjectPath, targetManifestFileName);
115var localAssemblyCache = Path.Combine(testProjectDirectory, "lAC");
116var intermediateWorkingDirectory = Path.Combine(testProjectDirectory, "workingDirectory");
119var profileProject = Path.Combine(profileProjectPath, $"{profileProjectName}.xml");
120var profileFilter = Path.Combine(profileProjectPath, "NewtonsoftFilterProfile.xml");
123var profileProject1 = Path.Combine(profileProjectPath1, $"{profileProjectName1}.xml");
124var profileFilter1 = Path.Combine(profileProjectPath1, "FluentFilterProfile.xml");
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsproj.cs (10)
165string trxLoggerDirectory = Path.Combine(testProjectDirectory, "RD");
261string trxLoggerDirectory = Path.Combine(testProjectDirectory, "RD");
439string resultsDirectory = Path.Combine(testProjectDirectory, "RD");
447var settingsPath = Path.Combine(AppContext.BaseDirectory, "CollectCodeCoverage.runsettings");
456File.WriteAllText(Path.Combine(testProjectDirectory, "output.txt"),
480string resultsDirectory = Path.Combine(testProjectDirectory, "RD");
516string resultsDirectory = Path.Combine(testProjectDirectory, "RD");
552string resultsDirectory = Path.Combine(testProjectDirectory, "RD");
719var pathWithComma = Path.Combine(AppContext.BaseDirectory, "a,b");
767string flagDirectory = Path.Combine(testProjectDirectory, "flag-dir");
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (9)
56_toolsDirectory = Path.Combine(_temporaryDirectory, "tools");
57_pathToPlaceShim = Path.Combine(_temporaryDirectory, "pathToPlace");
98_fileSystem.File.WriteAllText(Path.Combine(_temporaryDirectory, "nuget.config"), _nugetConfigWithInvalidSources);
109_fileSystem.File.Delete(Path.Combine(_temporaryDirectory, "nuget.config"));
121nugetConfig: new FilePath(Path.Combine(testAsset.Path, "NuGet.config")),
283_fileSystem.Directory.Exists(Path.Combine(_pathToPlacePackages, PackageId)).Should().BeFalse();
306_fileSystem.Directory.Exists(Path.Combine(_pathToPlacePackages, PackageId)).Should().BeFalse();
799_fileSystem.Directory.Exists(Path.Combine(_pathToPlacePackages, PackageId)).Should().BeFalse();
934return Path.Combine(
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (16)
49_pathToPlacePackages = Path.Combine(_temporaryDirectory, "pathToPlacePackage");
78new DirectoryPath(Path.Combine(_temporaryDirectory, "cache")),
81_manifestFilePath = Path.Combine(_temporaryDirectory, "dotnet-tools.json");
82_fileSystem.File.WriteAllText(Path.Combine(_temporaryDirectory, _manifestFilePath), _jsonContent);
91new DirectoryPath(Path.Combine(_temporaryDirectory, "cache")),
105_fileSystem.File.WriteAllText(Path.Combine(_temporaryDirectory, "nuget.config"), _nugetConfigWithInvalidSources);
117_fileSystem.File.Delete(Path.Combine(_temporaryDirectory, "nuget.config"));
179_fileSystem.Directory.CreateDirectory(Path.Combine(_temporaryDirectory, "subdirectory"));
323var configDirectory = Path.Combine(_temporaryDirectory, ".config");
325var configManifestPath = Path.Combine(configDirectory, "dotnet-tools.json");
431_fileSystem.Directory.CreateDirectory(Path.Combine(_temporaryDirectory, ".git"));
450_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue();
472_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue();
478_fileSystem.Directory.CreateDirectory(Path.Combine(_temporaryDirectory, "test1.sln"));
497_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue();
519_fileSystem.File.Exists(Path.Combine(_temporaryDirectory, "dotnet-tools.json")).Should().BeTrue();
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (11)
56_temporaryDirectory = Path.Combine(_temporaryDirectoryParent, "sub");
58_pathToPlacePackages = Path.Combine(_temporaryDirectory, "pathToPlacePackage");
98new DirectoryPath(Path.Combine(_temporaryDirectory, "cache")),
101_manifestFilePath = Path.Combine(_temporaryDirectory, "dotnet-tools.json");
102_fileSystem.File.WriteAllText(Path.Combine(_temporaryDirectory, _manifestFilePath), _jsonContent);
147_fileSystem.File.WriteAllText(Path.Combine(_temporaryDirectory, "nuget.config"), _nugetConfigWithInvalidSources);
159_fileSystem.File.Delete(Path.Combine(_temporaryDirectory, "nuget.config"));
227_fileSystem.File.WriteAllText(Path.Combine(_temporaryDirectory, _manifestFilePath), _jsonEmptyContent);
249_fileSystem.Directory.CreateDirectory(Path.Combine(_temporaryDirectory, "subdirectory"));
315var parentManifestFilePath = Path.Combine(_temporaryDirectoryParent, "dotnet-tools.json");
332var parentManifestFilePath = Path.Combine(_temporaryDirectoryParent, "dotnet-tools.json");
CommandTests\Workload\Install\GivenDotnetWorkloadInstall.cs (37)
28_manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "Sample.json");
110var dotnetRoot = Path.Combine(testDirectory, "dotnet");
148var dotnetRoot = Path.Combine(testDirectory, "dotnet");
181var dotnetRoot = Path.Combine(testDirectory, "dotnet");
246var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: AppendForUserLocal("mockCache_", userLocal) + sdkVersion).Path,
271var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: AppendForUserLocal("mockCache_", userLocal) + sdkVersion).Path, "mockCachePath");
329var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "UnsupportedPlatform.json");
331var dotnetRoot = Path.Combine(testDirectory, "dotnet");
352var dotnetRoot = Path.Combine(testDirectory, "dotnet");
353var userProfileDir = Path.Combine(testDirectory, "user-profile");
354var tmpDir = Path.Combine(testDirectory, "tmp");
355var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "MockWorkloadsSample.json");
387File.Exists(Path.Combine(installRecordPath, existingWorkload))
391var installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
399var dotnetRoot = Path.Combine(testDirectory, "dotnet");
400var userProfileDir = Path.Combine(testDirectory, "user-profile");
401var tmpDir = Path.Combine(testDirectory, "tmp");
402var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "MockWorkloadsSample.json");
440File.Exists(Path.Combine(prev7InstallRecordPath, existingWorkload))
445File.Exists(Path.Combine(rc1InstallRecordPath, existingWorkload))
451var installPacks = Directory.GetDirectories(Path.Combine(dotnetRoot, "packs"));
473var dotnetRoot = Path.Combine(testDirectory, "dotnet");
474var userProfileDir = Path.Combine(testDirectory, "user-profile");
505var dotnetRoot = Path.Combine(testDirectory, "dotnet");
506var userProfileDir = Path.Combine(testDirectory, "user-profile");
507var tmpDir = Path.Combine(testDirectory, "tmp");
508var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "MockWorkloadsSample.json");
513var rollbackFilePath = Path.Combine(testDirectory, "rollback.json");
531var dotnetRoot = Path.Combine(testDirectory, "dotnet");
532var userProfileDir = Path.Combine(testDirectory, "user-profile");
533var tmpDir = Path.Combine(testDirectory, "tmp");
534var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "MockWorkloadsSample.json");
539var rollbackFilePath = Path.Combine(testDirectory, "rollback.json");
555var dotnetRoot = Path.Combine(testDirectory, "dotnet");
556var userProfileDir = Path.Combine(testDirectory, "user-profile");
557var tmpDir = Path.Combine(testDirectory, "tmp");
558var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "MockWorkloadsSample.json");
CommandTests\Workload\Install\GivenFileBasedWorkloadInstall.cs (9)
28_manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "Sample2.json");
83File.Create(Path.Combine(path, "6.0.100")).Close();
119File.WriteAllText(Path.Combine(net6Path, workload), string.Empty);
123File.WriteAllText(Path.Combine(net7Path, workloads.First()), string.Empty);
361File.Create(Path.Combine(workloadsRecordPath, "android-sdk-workload")).Close();
383var cachePath = Path.Combine(dotnetRoot, "MockCache");
387var nupkgPath = Path.Combine(cachePath, $"{packId}.{packVersion}.nupkg");
412var cachePath = Path.Combine(dotnetRoot, "MockCache");
425var dotnetRoot = Path.Combine(testDirectory, "dotnet");
CommandTests\Workload\Install\GivenWorkloadManifestUpdater.cs (50)
99var dotnetRoot = Path.Combine(testDir, "dotnet");
112Directory.CreateDirectory(Path.Combine(installedManifestDir, manifestUpdate.ManifestId.ToString()));
114Directory.CreateDirectory(Path.Combine(adManifestDir, manifestUpdate.ManifestId.ToString()));
119Directory.CreateDirectory(Path.Combine(installedManifestDir, manifest.ToString()));
121Directory.CreateDirectory(Path.Combine(adManifestDir, manifest.ToString()));
133var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, userProfileDir: Path.Combine(testDir, ".dotnet"), installationRepo, new MockPackWorkloadInstaller(dotnetRoot));
145var dotnetRoot = Path.Combine(testDir, "dotnet");
163Directory.CreateDirectory(Path.Combine(installedManifestDir, manifestUpdate.ManifestId.ToString()));
166var AdManifestPath = Path.Combine(adManifestDir, manifestUpdate.ManifestId.ToString());
168File.WriteAllText(Path.Combine(AdManifestPath, _manifestFileName), GetManifestContent(manifestUpdate.NewVersion));
169File.WriteAllText(Path.Combine(AdManifestPath, "AdvertisedManifestFeatureBand.txt"), manifestUpdate.NewFeatureBand);
180Directory.CreateDirectory(Path.Combine(installedManifestDir, manifest.ToString()));
183var AdManifestPath = Path.Combine(adManifestDir, manifest.ToString());
185File.WriteAllText(Path.Combine(AdManifestPath, _manifestFileName), GetManifestContent(new ManifestVersion("5.0.0")));
186File.WriteAllText(Path.Combine(AdManifestPath, "AdvertisedManifestFeatureBand.txt"), currentFeatureBand);
202var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, userProfileDir: Path.Combine(testDir, ".dotnet"), installationRepo, new MockPackWorkloadInstaller(dotnetRoot));
222var dotnetRoot = Path.Combine(testDir, "dotnet");
230Directory.CreateDirectory(Path.Combine(installedManifestDir6_0_200, testManifestName));
244var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, Path.Combine(testDir, ".dotnet"), installationRepo, new MockPackWorkloadInstaller(dotnetRoot));
249offlineCacheDir = Path.Combine(testDir, "offlineCache");
251File.Create(Path.Combine(offlineCacheDir, $"{testManifestName}.Manifest-6.0.200.nupkg")).Close();
301var dotnetRoot = Path.Combine(testDir, "dotnet");
310Directory.CreateDirectory(Path.Combine(emptyInstalledManifestsDir, testManifestName));
321var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, Path.Combine(testDir, ".dotnet"), installationRepo, new MockPackWorkloadInstaller(dotnetRoot));
326offlineCacheDir = Path.Combine(testDir, "offlineCache");
367var dotnetRoot = Path.Combine(testDir, "dotnet");
376Directory.CreateDirectory(Path.Combine(emptyInstalledManifestsDir, testManifestName));
387var manifestUpdater = new WorkloadManifestUpdater(_reporter, workloadResolver, nugetDownloader, Path.Combine(testDir, ".dotnet"), installationRepo, new MockPackWorkloadInstaller(dotnetRoot));
392offlineCacheDir = Path.Combine(testDir, "offlineCache");
423var dotnetRoot = Path.Combine(testDir, "dotnet");
435Directory.CreateDirectory(Path.Combine(installedManifestDir, manifestUpdate.ManifestId.ToString()));
440var rollbackDefPath = Path.Combine(testDir, "testRollbackDef.txt");
461var dotnetRoot = Path.Combine(testDir, "dotnet");
473Directory.CreateDirectory(Path.Combine(installedManifestDir, manifestId.ToString()));
478Directory.CreateDirectory(Path.Combine(installedManifestDir, "test-manifest-3"));
482var rollbackDefPath = Path.Combine(testDir, "testRollbackDef.txt");
504var dotnetRoot = Path.Combine(testDir, "dotnet");
516Directory.CreateDirectory(Path.Combine(installedManifestDir, manifestId.ToString()));
525var rollbackDefPath = Path.Combine(testDir, "testRollbackDef.txt");
547var dotnetRoot = Path.Combine(testDir, "dotnet");
553Directory.CreateDirectory(Path.Combine(installedManifestDir, manifestId));
557var offlineCache = Path.Combine(testDir, "cache");
559File.Create(Path.Combine(offlineCache, $"{manifestId}.manifest-{featureBand}.2.0.0.nupkg")).Close();
560File.Create(Path.Combine(offlineCache, $"{manifestId}.manifest-{featureBand}.3.0.0.nupkg")).Close();
572installer.ExtractCallParams[0].Item1.Should().Be(Path.Combine(offlineCache, $"{manifestId}.manifest-{featureBand}.3.0.0.nupkg"));
586Directory.CreateDirectory(Path.Combine(testInstance.Path, ".dotnet"));
624Directory.CreateDirectory(Path.Combine(testInstance.Path, ".dotnet"));
703var dotnetRoot = Path.Combine(testDir, "dotnet");
712Directory.CreateDirectory(Path.Combine(installedManifestDir, manifest.ToString()));
728var sentinelPath = Path.Combine(testDir, _manifestSentinelFileName + featureBand);
CommandTests\Workload\Uninstall\GivenDotnetWorkloadUninstall.cs (17)
23var dotnetRoot = Path.Combine(testDirectory, "dotnet");
24var userProfileDir = Path.Combine(testDirectory, "user-profile");
35var installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
49_manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "MockWorkloadsSample.json");
74var installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
103var dotnetRoot = Path.Combine(testDirectory, "dotnet");
104var userProfileDir = Path.Combine(testDirectory, "user-profile");
119var installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
131installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
147var dotnetRoot = Path.Combine(testDirectory, "dotnet");
148var userProfileDir = Path.Combine(testDirectory, "user-profile");
175var installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
191installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
203var dotnetRoot = Path.Combine(testDirectory, "dotnet");
204var userProfileDir = Path.Combine(testDirectory, "user-profile");
218var dotnetRoot = Path.Combine(testDirectory, "dotnet");
219var userProfileDir = Path.Combine(testDirectory, "user-profile");
CommandTests\Workload\Update\GivenDotnetWorkloadUpdate.cs (25)
34_manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "Sample.json");
79Path.Combine(Path.GetTempPath(), "dotnetTestPath"),
116var dotnetRoot = Path.Combine(testDirectory, "dotnet");
117var userProfileDir = Path.Combine(testDirectory, "user-profile");
139var installPacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
163new MockManifestProvider(new[] { Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleUpdatedManifest"), "Sample.json") }),
173var updatePacks = Directory.GetDirectories(Path.Combine(installRoot, "packs"));
202var dotnetRoot = Path.Combine(testDirectory, "dotnet");
203var userProfileDir = Path.Combine(testDirectory, "user-profile");
204var manifestPath = Path.Combine(_testAssetsManager.GetAndValidateTestProjectDirectory("SampleManifest"), "BasicSample.json");
247var installStatePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(new SdkFeatureBand(sdkFeatureVersion), installRoot), "default.json");
296string dotnetDir = Path.Combine(testDir.Path, "dotnet");
297string userProfileDir = Path.Combine(testDir.Path, "userProfileDir");
380new WorkloadManifestInfo("Microsoft.NET.Sdk.iOS", "17.4.3", Path.Combine(testDirectory, "iosManifest"), "9.0.100"),
381new WorkloadManifestInfo("Microsoft.NET.Sdk.macOS", "14.4.3", Path.Combine(testDirectory, "macosManifest"), "9.0.100"),
382new WorkloadManifestInfo("Microsoft.NET.Sdk.Maui", "14.4.3", Path.Combine(testDirectory, "mauiManifest"), "9.0.100")
389workloadResolverFactory: new MockWorkloadResolverFactory(Path.Combine(testDirectory, "dotnet"), "9.0.100", resolver, userProfileDir: testDirectory),
421var cachePath = Path.Combine(_testAssetsManager.CreateTestDirectory(identifier: "cachePath").Path, "mockCachePath");
487var dotnetRoot = Path.Combine(testDirectory, "dotnet");
488var userProfileDir = Path.Combine(testDirectory, "user-profile");
588var dotnetRoot = Path.Combine(testDirectory, "dotnet");
589var userProfileDir = Path.Combine(testDirectory, "user-profile");
593var rollbackFilePath = Path.Combine(testDirectory, "rollback.json");
626var dotnetRoot = Path.Combine(testDirectory, "dotnet");
637var copiedManifestFile = Path.Combine(copiedManifestFolder, "WorkloadManifest.json");
ShellShimTests\ShellShimRepositoryTests.cs (8)
102var shellShimRepository = new ShellShimRepository(new DirectoryPath(Path.Combine(testFolder, extraNonExistDirectory)), GetAppHostTemplateFromStage2());
365var dummyShimPath = Path.Combine(packagedShimFolder, shellCommandName);
394var dummyShimPath = Path.Combine(packagedShimFolder, shellCommandName);
438File.WriteAllText(Path.Combine(pathToPlaceShim, shellCommandName), string.Empty);
447var file = Path.Combine(cleanFolderUnderTempRoot, shellCommandName + ".exe");
457var file = Path.Combine(cleanFolderUnderTempRoot, shellCommandName);
492Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "AppHostTemplate");
512return new FilePath(Path.Combine(outputDirectory.FullName, $"{testAppName}.dll"));
ToolManifestTests\ToolManifestEditorTests.cs (11)
29string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
72string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
100string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
128string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
148string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
172string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
186string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
213string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
232string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
253string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
271string manifestFile = Path.Combine(_testDirectoryRoot, _manifestFilename);
ToolManifestTests\ToolManifestFinderTests.cs (57)
48_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContent);
63var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
64_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContent);
79var dotnetconfigDirectory = Path.Combine(_testDirectoryRoot, ".config");
81_fileSystem.File.WriteAllText(Path.Combine(dotnetconfigDirectory, _manifestFilename), _jsonContent);
101var dotnetconfigDirectory = Path.Combine(rootDirectory.Value, ".config");
103_fileSystem.File.WriteAllText(Path.Combine(dotnetconfigDirectory, _manifestFilename), _jsonContent);
139var dotnetconfigDirectory = Path.Combine(rootDirectory.Value, ".config");
141_fileSystem.File.WriteAllText(Path.Combine(dotnetconfigDirectory, _manifestFilename), _jsonContent);
162var dotnetconfigDirectory = Path.Combine(rootDirectory.Value, ".config");
164_fileSystem.File.WriteAllText(Path.Combine(dotnetconfigDirectory, _manifestFilename), _jsonContent);
203_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename),
222_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, customFileName), _jsonContent);
230toolManifest.Find(new FilePath(Path.Combine(_testDirectoryRoot, customFileName)));
255Action a = () => toolManifest.Find(new FilePath(Path.Combine(_testDirectoryRoot, "non-exists")));
258Path.Combine(_testDirectoryRoot, "non-exists"),
279_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonWithMissingField);
290Path.Combine(_testDirectoryRoot, _manifestFilename),
299_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonWithInvalidField);
316Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonWithInvalidType);
333Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonInvalidJsonInterger);
348var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
350_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename),
352_fileSystem.File.WriteAllText(Path.Combine(subdirectoryOfTestRoot, _manifestFilename),
392var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
394string manifestFileInParentDirectory = Path.Combine(_testDirectoryRoot, _manifestFilename);
397string manifestFileInSubDirectory = Path.Combine(subdirectoryOfTestRoot, _manifestFilename);
429var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
446var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
448_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename),
450_fileSystem.File.WriteAllText(Path.Combine(subdirectoryOfTestRoot, _manifestFilename),
466_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContentHigherVersion);
483_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContentIsRootMissing);
498_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContent);
518_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContent);
538var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
539_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContent);
571_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonWithMissingField);
585_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonWithInvalidField);
599_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename), _jsonContentInvalidJson);
613var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
615_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename),
617_fileSystem.File.WriteAllText(Path.Combine(subdirectoryOfTestRoot, _manifestFilename),
638var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
640_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename),
642_fileSystem.File.WriteAllText(Path.Combine(subdirectoryOfTestRoot, _manifestFilename),
658string manifestFilePath = Path.Combine(_testDirectoryRoot, _manifestFilename);
676_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename),
692string manifestPath = Path.Combine(_testDirectoryRoot, _manifestFilename);
708string manifestPath = Path.Combine(_testDirectoryRoot, _manifestFilename);
739var subdirectoryOfTestRoot = Path.Combine(_testDirectoryRoot, "sub");
741_fileSystem.File.WriteAllText(Path.Combine(_testDirectoryRoot, _manifestFilename),
743_fileSystem.File.WriteAllText(Path.Combine(subdirectoryOfTestRoot, _manifestFilename),
752.SourceManifest.Value.Should().Be(Path.Combine(_testDirectoryRoot, _manifestFilename));
778createdManifest.Value.Should().Be(Path.Combine(_testDirectoryRoot, "dotnet-tools.json"));
779_fileSystem.File.Exists(Path.Combine(_testDirectoryRoot, "dotnet-tools.json")).Should().BeTrue();
780_fileSystem.Directory.Exists(Path.Combine(_testDirectoryRoot, ".config")).Should().BeFalse("New manifests should not create .config directories");
dotnet-dev-certs (8)
dotnet-format (5)
dotnet-format.UnitTests (35)
dotnet-getdocument (5)
dotnet-MsiInstallation.Tests (9)
dotnet-new.IntegrationTests (105)
DotnetNewInstallTests.cs (9)
47string path = Path.Combine(Path.GetTempPath(), "repro@4");
52new DotnetCommand(_log, "add", "package", "--project", Path.Combine(path, "myconsole.csproj"), "Microsoft.Azure.Functions.Worker.ProjectTemplates", "-v", "4.0.5086", "--package-directory", path).Execute().Should().Pass();
53new DotnetCommand(_log, "new", "install", Path.Combine(path, "microsoft.azure.functions.worker.projecttemplates/4.0.5086/microsoft.azure.functions.worker.projecttemplates.4.0.5086.nupkg")).Execute().Should().Pass();
518.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "ConfigurationKitchenSink"))
519.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateResolution"))
520.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateWithSourceName"))
521.And.HaveStdOutContaining($"Success: {Path.Combine(testTemplateLocationAbsolute, "ConfigurationKitchenSink")} installed the following templates:")
522.And.HaveStdOutContaining($"Success: {Path.Combine(testTemplateLocationAbsolute, "TemplateResolution")} installed the following templates:")
523.And.HaveStdOutContaining($"Success: {Path.Combine(testTemplateLocationAbsolute, "TemplateWithSourceName")} installed the following templates:")
DotnetNewInstantiateTests.cs (11)
73new DirectoryInfo(Path.Combine(workingDirectory, "no-alias")).EnumerateFileSystemInfos().Select(fi => fi.Name),
74new DirectoryInfo(Path.Combine(workingDirectory, "alias")).EnumerateFileSystemInfos().Select(fi => fi.Name));
164string sourceImage = Path.Combine(templateLocation, "image.png");
165string targetImage = Path.Combine(workingDirectory, "image.png");
191string sourceImage = Path.Combine(templateLocation, "image.png");
192string targetImage = Path.Combine(workingDirectory, "image.png");
272string testFile = Path.Combine(workingDirectory, fileName);
286testFile = Path.Combine(workingDirectory, fileName);
300testFile = Path.Combine(workingDirectory, fileName);
324string testFile = Path.Combine(workingDirectory, expectedFileName);
340Path.Combine(DotnetNewTestPackagesBasePath, nugetFileName),
DotnetNewUninstallTests.cs (15)
174Directory.CreateDirectory(Path.Combine(workingDir, packageNameToUnisntall));
400.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "ConfigurationKitchenSink"))
401.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateResolution"))
402.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateWithSourceName"))
403.And.HaveStdOutContaining($"Success: {Path.Combine(testTemplateLocationAbsolute, "ConfigurationKitchenSink")} installed the following templates:")
404.And.HaveStdOutContaining($"Success: {Path.Combine(testTemplateLocationAbsolute, "TemplateResolution")} installed the following templates:")
405.And.HaveStdOutContaining($"Success: {Path.Combine(testTemplateLocationAbsolute, "TemplateWithSourceName")} installed the following templates:")
415.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "ConfigurationKitchenSink"))
416.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateResolution"))
417.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateWithSourceName"));
424.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "ConfigurationKitchenSink"))
425.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateResolution"))
426.And.HaveStdOutContaining(Path.Combine(testTemplateLocationAbsolute, "TemplateWithSourceName"));
483string testFolderWithSpace = Path.Combine(workingDirectory, "My Test Folder");
489string testFolderWithoutSpace = Path.Combine(workingDirectory, "MyTestFolder");
PostActionTests.cs (29)
50.WithWorkingDirectory(Path.Combine(workingDirectory, targetSubfolder))
80.And.HaveStdOutContaining(Path.Combine(outputDirectory, "MyProject.csproj"));
82Assert.True(File.Exists(Path.Combine(outputDirectory, $"MyProject.csproj")));
83Assert.True(File.Exists(Path.Combine(outputDirectory, $"Program.cs")));
122.WithWorkingDirectory(Path.Combine(workingDirectory, outputDirectory))
153Assert.True(File.Exists(Path.Combine(workingDirectory, $"MyAwesomeTestProject.csproj")));
154Assert.True(File.Exists(Path.Combine(workingDirectory, $"Program.cs")));
188Assert.True(File.Exists(Path.Combine(workingDirectory, $"src/TemplateApplication/TemplateApplication.csproj")));
189Assert.True(File.Exists(Path.Combine(workingDirectory, $"test/TemplateApplication.Tests/TemplateApplication.Tests.csproj")));
230Assert.True(File.Exists(Path.Combine(workingDirectory, $"TemplateApplication.UI/TemplateApplication.UI.csproj")));
231Assert.True(File.Exists(Path.Combine(workingDirectory, $"TemplateApplication.Tests/TemplateApplication.Tests.csproj")));
477.And.HaveStdOutContaining(Path.Combine(outputDirectory, "MyProject.csproj"));
479new DotnetBuildCommand(_log, Path.Combine(outputDirectory, "MyProject.csproj"))
510new DotnetBuildCommand(_log, Path.Combine("output", "MyProject.csproj"))
608string src = Path.Combine(workingDirectory, "src");
778Assert.Contains("MyProject.csproj", File.ReadAllText(Path.Combine(workingDirectory, "MySolution.slnx")));
811.And.HaveStdOutContaining(Path.Combine(outputDirectory, "MySolution.sln"))
812.And.HaveStdOutContaining(Path.Combine(outputDirectory, "MyProject.csproj"));
814Assert.Contains("MyProject.csproj", File.ReadAllText(Path.Combine(outputDirectory, "MySolution.slnx")));
847.And.HaveStdOutContaining(Path.Combine(outputDirectory, "MySolution.sln"))
848.And.HaveStdOutContaining(Path.Combine(outputDirectory, "MyProject.csproj"));
850Assert.Contains("MyProject.csproj", File.ReadAllText(Path.Combine(outputDirectory, "MySolution.slnx")));
919Assert.True(File.Exists(Path.Combine(workingDirectory, "MySolution.slnx")));
920Assert.True(File.Exists(Path.Combine(workingDirectory, "Server/Server.csproj")));
921Assert.True(File.Exists(Path.Combine(workingDirectory, "Client/Client.csproj")));
923string solutionFileContents = File.ReadAllText(Path.Combine(workingDirectory, "MySolution.slnx"));
1126string jsonFileContents = File.ReadAllText(Path.Combine(workingDirectory, "testfile.json"));
1157string jsonFileContents = File.ReadAllText(Path.Combine(workingDirectory, "testfile.json"));
1201string jsonFileLocation = Path.Combine(workingDirectory, "testfile.json");
dotnet-openapi (2)
dotnet-razorpagegenerator (1)
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}\\**")),
876outputPath = Path.Combine(this.DirectoryPath, outputPath.Trim(new char[] { '\"' }));
880Path.Combine(outputPath, $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json") :
914dependency = 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)
76Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
99File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.cs"), Path.Combine(this_TestCaseOutputDir, "FullFramework.cs"), true);
100File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.csproj"), Path.Combine(this_TestCaseOutputDir, "FullFramework.csproj"), true);
103var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
120this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
122this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
123this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
124this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
127File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, "Program.cs"), Path.Combine(this_TestCaseOutputDir, "Program.cs"), true);
128File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, $"{testCaseName}.csproj"), Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), true);
129this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None);
135var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
148this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testClientFolder);
151this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
152this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{this_TestCaseName}.log");
153this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testClientFolder);
156FileUtil.CopyDirectory(Path.Combine(g_TestCasesDir, this_TestCaseName), this_TestGroupOutputDir, true);
157this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None);
165var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
187var 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));
dotnet-user-jwts (11)
dotnet-user-secrets (5)
dotnet-watch (12)
dotnet-watch.Tests (135)
FileWatcher\FileWatcherTests.cs (31)
101var dirA = Path.Combine(root, "A");
102var dirB = Path.Combine(root, "B");
103var dirBC = Path.Combine(dirB, "C");
104var a1 = Path.Combine(dirA, "a1");
105var a2 = Path.Combine(dirA, "a2");
106var a3 = Path.Combine(dirA, "a3");
107var a4 = Path.Combine(dirA, "a4");
108var b1 = Path.Combine(dirB, "b1");
109var b2 = Path.Combine(dirB, "b2");
110var bc1 = Path.Combine(dirBC, "bc1");
154var file = Path.Combine(dir, "file");
186var dir1 = Path.Combine(dir, "dir1");
187var dir2 = nested ? Path.Combine(dir1, "dir2") : dir1;
188var fileInSubdir = Path.Combine(dir2, "file_in_subdir");
223var file = Path.Combine(dir, "file");
239var srcFile = Path.Combine(dir, "file");
240var dstFile = Path.Combine(dir, "file2");
270var subdir = Path.Combine(dir, "subdir");
273var fileInDir = Path.Combine(dir, "file_in_dir");
276var fileInSubdir = Path.Combine(subdir, "file_in_subdir");
330var testFileFullPath = Path.Combine(dir, "foo");
356var file = Path.Combine(dir, "file");
376var file1 = Path.Combine(dir, "a1");
377var file2 = Path.Combine(dir, "a2");
378var file3 = Path.Combine(dir, "a3");
379var file4 = Path.Combine(dir, "a4");
420var expectedPath = Path.Combine(directory, Path.GetRandomFileName());
464var subdir = Path.Combine(dir, "subdir");
467var f1 = Path.Combine(subdir, "foo1");
468var f2 = Path.Combine(subdir, "foo2");
469var f3 = Path.Combine(subdir, "foo3");
HotReload\ApplyDeltaTests.cs (44)
20var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
27UpdateSourceFile(Path.Combine(dependencyDir, "AnotherLib.cs"), """
38UpdateSourceFile(Path.Combine(dependencyDir, "Foo.cs"), """
55var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
69UpdateSourceFile(Path.Combine(dependencyDir, "Foo.cs"), newSrc);
80var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
87Path.Combine(testAsset.Path, "Directory.Build.props"),
106UpdateSourceFile(Path.Combine(dependencyDir, "Foo.cs"), newSrc);
121var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
122var libSourcePath = Path.Combine(dependencyDir, "Foo.cs");
123var buildFilePath = isDirectoryProps ? Path.Combine(testAsset.Path, "Directory.Build.props") : Path.Combine(dependencyDir, "Dependency.csproj");
160var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
161var libSourcePath = Path.Combine(dependencyDir, "Foo.cs");
162var directoryBuildProps = Path.Combine(testAsset.Path, "Directory.Build.props");
203var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
204var libSourcePath = Path.Combine(dependencyDir, "Foo.cs");
205var directoryBuildProps = Path.Combine(testAsset.Path, "Directory.Build.props");
251var appDataFilePath = Path.Combine(appDataDir, "ShouldBeIgnored.cs");
289var binDirFilePath = Path.Combine(binDir, "ShouldBeIgnored.cs");
292var objDirFilePath = Path.Combine(objDir, "ShouldBeIgnored.cs");
316var programPath = Path.Combine(testAsset.Path, "Program.cs");
317var projectPath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj");
353var projectPath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj");
354var logDir = Path.Combine(testAsset.Path, "logs");
355var binLogPath = Path.Combine(logDir, "Test.binlog");
420var programPath = Path.Combine(testAsset.Path, "Program.cs");
449var programPath = Path.Combine(testAsset.Path, "Program.cs");
504var programPath = Path.Combine(testAsset.Path, "Program.cs");
538var programPath = Path.Combine(testAsset.Path, "Program.cs");
565UpdateSourceFile(Path.Combine(testAsset.Path, "Program.fs"), content => content.Replace("Hello World!", "<Updated>"));
590var sourcePath = Path.Combine(testAsset.Path, "Program.fs");
646var sourcePath = Path.Combine(testAsset.Path, "Program.cs");
679var sourcePath = Path.Combine(testAsset.Path, "Program.cs");
727var programPath = Path.Combine(testAsset.Path, "Program.cs");
1017var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
1018var oldFilePath = Path.Combine(dependencyDir, "Foo.cs");
1019var newFilePath = Path.Combine(dependencyDir, "Renamed.cs");
1069var dependencyDir = Path.Combine(testAsset.Path, "Dependency");
1070var oldSubdir = Path.Combine(dependencyDir, "Subdir");
1071var newSubdir = Path.Combine(dependencyDir, "NewSubdir");
1089File.Delete(Path.Combine(dependencyDir, "Foo.cs"));
1091File.WriteAllText(Path.Combine(oldSubdir, "Foo.cs"), source);
1106File.WriteAllText(Path.Combine(newSubdir, "Foo.cs"), source);
HotReload\RuntimeProcessLauncherTests.cs (38)
153var hostDir = Path.Combine(testAsset.Path, "Host");
154var hostProject = Path.Combine(hostDir, "Host.csproj");
155var serviceDirA = Path.Combine(testAsset.Path, "ServiceA");
156var serviceSourceA1 = Path.Combine(serviceDirA, "A1.cs");
157var serviceSourceA2 = Path.Combine(serviceDirA, "A2.cs");
158var serviceProjectA = Path.Combine(serviceDirA, "A.csproj");
159var serviceDirB = Path.Combine(testAsset.Path, "ServiceB");
160var serviceProjectB = Path.Combine(serviceDirB, "B.csproj");
161var libDir = Path.Combine(testAsset.Path, "Lib");
162var libProject = Path.Combine(libDir, "Lib.csproj");
163var libSource = Path.Combine(libDir, "Lib.cs");
318var hostDir = Path.Combine(testAsset.Path, "Host");
319var hostProject = Path.Combine(hostDir, "Host.csproj");
320var serviceDirA = Path.Combine(testAsset.Path, "ServiceA");
321var serviceProjectA = Path.Combine(serviceDirA, "A.csproj");
322var serviceDirB = Path.Combine(testAsset.Path, "ServiceB");
323var serviceProjectB = Path.Combine(serviceDirB, "B.csproj");
324var libDir = Path.Combine(testAsset.Path, "Lib");
325var libProject = Path.Combine(libDir, "Lib.csproj");
326var libSource = Path.Combine(libDir, "Lib.cs");
412var hostDir = Path.Combine(testAsset.Path, "Host");
413var hostProject = Path.Combine(hostDir, "Host.csproj");
414var hostProgram = Path.Combine(hostDir, "Program.cs");
501var hostDir = Path.Combine(testAsset.Path, "Host");
502var hostProject = Path.Combine(hostDir, "Host.csproj");
503var serviceDirA = Path.Combine(testAsset.Path, "ServiceA");
504var serviceSourceA2 = Path.Combine(serviceDirA, "A2.cs");
505var serviceProjectA = Path.Combine(serviceDirA, "A.csproj");
570dir = Path.Combine(workingDirectory, ".dir");
582var path = Path.Combine(dir, "File" + extension);
590var project = Path.Combine(workingDirectory, "WatchNoDepsApp.csproj");
654var projectPath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj");
655var programPath = Path.Combine(testAsset.Path, "Program.cs");
707var appProjDir = Path.Combine(testAsset.Path, "AppWithDeps");
708var appProjFile = Path.Combine(appProjDir, "App.WithDeps.csproj");
709var appFile = Path.Combine(appProjDir, "Program.cs");
769var projFilePath = Path.Combine(testAsset.Path, "WatchHotReloadApp.csproj");
770var programFilePath = Path.Combine(testAsset.Path, "Program.cs");
EndToEnd.Tests (13)
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 (12)
Program.cs (12)
260var fileWithPath = Path.Combine(directory.FullName, propsFileName);
269fileWithPath = Path.Combine(directory.FullName, propsFileToDisableNetAnalyzersInNuGetPackageName);
341var fileWithPath = Path.Combine(directory.FullName, analyzerDocumentationFileName);
436var fileWithPath = Path.Combine(directory.FullName, tempAnalyzerSarifFileName);
530Validate(Path.Combine(directory.FullName, analyzerSarifFileName), File.ReadAllText(fileWithPath), fileNamesWithValidationFailures);
566var fileWithPath = Path.Combine(directory.FullName, "RulesMissingDocumentation.md");
871return Path.Combine(assemblyDir, assembly);
902var rulesetFilePath = Path.Combine(directory.FullName, rulesetFileName);
966var directory = Directory.CreateDirectory(Path.Combine(analyzerEditorconfigsDir, editorconfigFolder));
967var editorconfigFilePath = Path.Combine(directory.FullName, ".editorconfig");
1185var configFilePath = Path.Combine(directory.FullName, fileName.ToLowerInvariant());
1397var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
GenerateRulesMissingDocumentation (1)
GetDocument.Insider (1)
HelixTasks (2)
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, "W3SVC1");
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, "W3SVC1");
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)
106using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
124using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
178File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (14)
213Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
214Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
280Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
281Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
345File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
405File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
446File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
623parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
647parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
686parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.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, "W3SVC1");
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)
106using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
124using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
178File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (14)
213Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
214Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
280Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
281Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
345File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
405File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
446File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
623parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
647parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
686parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
IIS.NewShim.FunctionalTests (29)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (8)
71return Path.Combine(folder, result.DeploymentParameters.SiteName);
75return Path.Combine(folder, "W3SVC1");
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)
106using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
124using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
178File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (14)
213Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
214Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
280Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
281Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
345File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
405File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
446File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
623parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
647parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
686parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.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);
149var deleteDirPath = Path.Combine(deploymentResult.ContentRoot, "wwwroot/deletethis");
151File.WriteAllText(Path.Combine(deleteDirPath, "file.dll"), "");
180DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
207DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "1"), copySubDirs: true);
219Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "0")), "Expected 0 shadow copy directory to be skipped");
230Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "2")), "Expected 2 shadow copy directory");
247DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "1"), copySubDirs: true);
248DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "3"), copySubDirs: true);
249DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "10"), copySubDirs: true);
261Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "0")), "Expected 0 shadow copy directory to be skipped");
272Assert.True(Directory.Exists(Path.Combine(directory.DirectoryPath, "11")), "Expected 11 shadow copy directory");
278Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "1")), "Expected 1 shadow copy directory to be deleted");
279Assert.False(Directory.Exists(Path.Combine(directory.DirectoryPath, "3")), "Expected 3 shadow copy directory to be deleted");
291DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
304Assert.True(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy")));
321DirectoryCopy(deploymentResult.ContentRoot, Path.Combine(directory.DirectoryPath, "0"), copySubDirs: true);
334Assert.True(Directory.Exists(Path.Combine(deploymentResult.ContentRoot, "ShadowCopy")));
346var directoryPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
414string tempPath = Path.Combine(destDirName, file.Name);
427string 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, "W3SVC1");
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, "W3SVC1");
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)
106using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
124using (var stream = File.Open(Path.Combine(deploymentResult.ContentRoot, "app_offline.htm"), FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
178File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "Microsoft.AspNetCore.Server.IIS.dll"), "");
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (14)
213Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));
214Assert.False(File.Exists(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll")));
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
280Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"),
281Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"),
345File.WriteAllText(Path.Combine(deploymentResult.ContentRoot, "hostfxr.dll"), "");
405File.Delete(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll"));
446File.Delete(Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll"));
623parameters.TransformArguments((arguments, root) => Path.Combine(pathWithSpace, arguments));
647parameters.TransformArguments((arguments, root) => Path.Combine("bin", arguments) + " \"extra argument\"");
686parameters.TransformPath((path, root) => Path.Combine(pathWithSpace, path));
741var applicationDll = Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.dll");
742var handlerDll = Path.Combine(deploymentResult.ContentRoot, "aspnetcorev2_inprocess.dll");
961deploymentParameters.EnvironmentVariables["ANCM_LAUNCHER_ARGS"] = Path.ChangeExtension(Path.Combine(publishedApp.Path, deploymentParameters.ApplicationPublisher.ApplicationPath), ".dll");
illink (11)
Infrastructure.Common (1)
InMemory.FunctionalTests (2)
InProcessWebSite (1)
installer.tasks (1)
InteractiveHost.UnitTests (3)
Interop.FunctionalTests (4)
IOperationGenerator (2)
KeyManagementSample (1)
Metrics (3)
Metrics.Legacy (3)
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 (8)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
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 (9)
Repositories\FileSystemXmlRepositoryTests.cs (9)
19? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ASP.NET")
20: Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".aspnet");
21var expectedDir = new DirectoryInfo(Path.Combine(baseDir, "DataProtection-Keys")).FullName;
205var filePath1 = Path.Combine(dirInfo.FullName, "friendly1.xml");
206var filePath2 = Path.Combine(dirInfo.FullName, "friendly2.xml");
207var filePath3 = Path.Combine(dirInfo.FullName, "friendly3.xml");
222fileLock2 = new FileStream(Path.Combine(dirInfo.FullName, "friendly2.xml"), FileMode.Open, FileAccess.ReadWrite, FileShare.None);
255var filePath = Path.Combine(dirInfo.FullName, "friendly1.xml");
318string 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.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
Microsoft.AspNetCore.Server.IntegrationTesting (17)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (13)
IISDeployer.cs (7)
185var file = Path.Combine(DeploymentParameters.PublishedApplicationRootPath, debugLogLocation);
308_configPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("D"));
309_applicationHostConfig = Path.Combine(_configPath, "applicationHost.config");
510HelixHelper.PreserveFile(Path.Combine(DeploymentParameters.PublishedApplicationRootPath, "web.config"), fileNamePrefix + ".web.config");
511HelixHelper.PreserveFile(Path.Combine(_configPath, "applicationHost.config"), fileNamePrefix + ".applicationHost.config");
512HelixHelper.PreserveFile(Path.Combine(Environment.SystemDirectory, @"inetsrv\config\ApplicationHost.config"), fileNamePrefix + ".inetsrv.applicationHost.config");
513HelixHelper.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)
806certificateFilePath = Path.Combine(tempDir, $"test{extension}");
807certificateKeyPath = Path.Combine(tempDir, "test.key");
1220var oldDir = Directory.CreateDirectory(Path.Combine(tempDir, "old"));
1221var newDir = Directory.CreateDirectory(Path.Combine(tempDir, "new"));
1222var oldCertPath = Path.Combine(oldDir.FullName, "tls.key");
1223var newCertPath = Path.Combine(newDir.FullName, "tls.key");
1225var dirLink = Directory.CreateSymbolicLink(Path.Combine(tempDir, "link"), "./old");
1226var fileLink = File.CreateSymbolicLink(Path.Combine(tempDir, "tls.key"), "./link/tls.key");
1271dirLink = Directory.CreateSymbolicLink(Path.Combine(tempDir, "link"), "./new");
2146return Path.Combine(basePath, $"TestApplication.pfx");
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SpaProxy (5)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets (3)
Microsoft.AspNetCore.StaticAssets.Tests (9)
StaticAssetsIntegrationTests.cs (9)
325var filePath = Path.Combine(webRoot, "sample.txt");
382File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Hello, World! Modified");
435File.WriteAllText(Path.Combine(webRoot, "sample.txt"), "Hello, World! Modified");
444Assert.Equal(GetGzipEtag(Path.Combine(webRoot, "sample.txt")), response.Headers.ETag.Tag);
473var contentRoot = Path.Combine(AppContext.BaseDirectory, appName);
474var webRoot = Path.Combine(contentRoot, "wwwroot");
482var manifestPath = Path.Combine(AppContext.BaseDirectory, $"{appName}.staticwebassets.endpoints.json");
491var filePath = Path.Combine(webRoot, resource.Path);
514var compressedFilePath = Path.Combine(webRoot, resource.Path + ".gz");
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");
170var 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.Watch.BrowserRefresh.Tests (1)
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
Microsoft.AspNetCore.WebUtilities (2)
Microsoft.Build (122)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (7)
429return isX64 ? Path.Combine(GetOrInitializeX64Clr2Path(toolName), toolName) : Path.Combine(GetOrInitializeX32Clr2Path(toolName), toolName);
434return Path.Combine(s_pathToX64Clr4 ??= s_baseTaskHostPath64, toolName);
439return Path.Combine(s_pathToArm64Clr4 ??= s_baseTaskHostPathArm64, toolName);
442return Path.Combine(s_pathToX32Clr4 ??= s_baseTaskHostPath, toolName);
556string fullPath = Path.Combine(envPath, toolName);
639string.Format(commandLineArgsPlaceholder, Path.Combine(msbuildAssemblyPath, Constants.MSBuildAssemblyName), NodeReuseIsEnabled(hostContext), ComponentHost.BuildParameters.LowPriority),
BackEnd\Components\Scheduler\Scheduler.cs (5)
2679using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerTrace_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2707shouldWriteHeader = !FileSystems.Default.FileExists(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId));
2710using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2834using StreamWriter file = FileUtilities.OpenWrite(string.Format(CultureInfo.CurrentCulture, Path.Combine(_debugDumpPath, "SchedulerState_{0}.txt"), EnvironmentUtilities.CurrentProcessId), append: true);
2874using 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);
FileUtilities.cs (9)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
492return NormalizePath(Path.Combine(directory, file));
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
812string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
890var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1338return paths.Aggregate(root, Path.Combine);
1510string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
FrameworkLocationHelper.cs (17)
443? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
453? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
463? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV30)
473? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV35)
483? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV40)
493? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV45)
503? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
513? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
594Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
814var frameworkPath = Path.Combine(NativeMethodsShared.FrameworkBasePath, prefix ?? string.Empty);
824return Path.Combine(complusInstallRoot, complusVersion);
965? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
966: Path.Combine(NativeMethodsShared.FrameworkBasePath, "xbuild-frameworks");
1125string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1435(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, NativeMethodsShared.IsWindows ? "MSBuild.exe" : "mcs.exe")) &&
1436!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1468frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
Microsoft.Build.BuildCheck.UnitTests (38)
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 (24)
40private static string TestAssetsRootPath { get; } = Path.Combine(AssemblyLocation, "TestAssets");
165CopyFilesRecursively(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
172_env.SetCurrentDirectory(Path.Combine(workFolder.Path, entryProjectName));
179string[] depsFiles = Directory.GetFiles(Path.Combine(workFolder.Path, entryProjectName), $"{entryProjectName}.deps.json", SearchOption.AllDirectories);
275CopyFilesRecursively(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
277_env.SetCurrentDirectory(Path.Combine(workFolder.Path, entryProjectName));
380CopyFilesRecursively(Path.Combine(TestAssetsRootPath, testAssetsFolderName), workFolder.Path);
381ReplaceStringInFile(Path.Combine(workFolder.Path, $"{projectName}.csproj"),
596$"{logFile} -flp:logfile={Path.Combine(projectDirectory!, "logFile.log")};verbosity=diagnostic",
662string checkCandidatePath = Path.Combine(TestAssetsRootPath, "CheckCandidate");
668string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
678$"{Path.Combine(checkCandidatePath, $"CheckCandidate.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool success, timeoutMilliseconds: 1200_0000);
707$"{logFile} -flp:logfile={Path.Combine(projectDirectory!, "logFile.log")};verbosity=diagnostic {(checkRequested ? "-check" : string.Empty)}",
842var checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
846$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n",
875string checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
879string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
886$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool _, timeoutMilliseconds: timeoutInMilliseconds);
904string checkCandidatePath = Path.Combine(TestAssetsRootPath, checkCandidate);
908string editorConfigName = Path.Combine(checkCandidatePath, EditorConfigFileName);
915$"{Path.Combine(checkCandidatePath, $"{checkCandidate}.csproj")} /m:1 -nr:False -restore -check -verbosity:n", out bool success, timeoutMilliseconds: timeoutInMilliseconds);
975var nugetTemplatePath = Path.Combine(checkCandidatePath, "nugetTemplate.config");
984string checksPackagesPath = Path.Combine(Directory.GetParent(AssemblyLocation)?.Parent?.FullName ?? string.Empty, "CustomChecks");
997doc.Save(Path.Combine(checkCandidatePath, "nuget.config"));
Microsoft.Build.CommandLine.UnitTests (49)
XMake_Tests.cs (40)
91private static string TestAssetsRootPath { get; } = Path.Combine(Path.Combine(Path.GetDirectoryName(typeof(XMakeAppTests).Assembly.Location) ?? AppContext.BaseDirectory), "TestAssets");
1033var newPathToMSBuildExe = Path.Combine(startDirectory, msbuildExeName);
1034var pathToConfigFile = Path.Combine(startDirectory, msbuildExeName + ".config");
1060var pathToProjectFile = Path.Combine(startDirectory, "foo.proj");
1145string projectFileName = Path.Combine(tempdir, "msbEnvironmenttest.proj");
1183string projectFileName = Path.Combine(tempdir, "msbLoggertest.proj");
1184string logFile = Path.Combine(tempdir, "logFile");
1230? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "notepad.exe")
1305string projectPath = Path.Combine(directory, "my.proj");
1306string rspPath = Path.Combine(directory, AutoResponseFileName);
1412directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
1414string projectPath = Path.Combine(directory, "my.proj");
1415string rspPath = Path.Combine(directory, AutoResponseFileName);
1418string exePath = Path.Combine(exeDirectory, MSBuildExeName);
1419string mainRspPath = Path.Combine(exeDirectory, AutoResponseFileName);
1456string projectPath = Path.Combine(directory, "my.proj");
1457string rspPath = Path.Combine(directory, AutoResponseFileName);
1458string exePath = Path.Combine(directory, MSBuildExeName);
2031string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName;
2054string projectDirectory = Directory.CreateDirectory(Path.Combine(ObjectModelHelpers.TempProjectDir, Guid.NewGuid().ToString("N"))).FullName;
2172distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2185distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"{fileLoggerParameters[0]};logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2198distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($"{fileLoggerParameters[0]};logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2211distributedLoggerRecords[0].ForwardingLoggerDescription.LoggerSwitchParameters.ShouldBe($";Parameter1;logFile={Path.Combine(Directory.GetCurrentDirectory(), "MSBuild.log")}", StringCompareShould.IgnoreCase); // "Expected parameter in logger to match parameter passed in"
2228fileLoggerParameters = new[] { "Parameter1", "verbosity=Normal;logfile=" + Path.Combine("..", "cat.log") + ";Parameter1" };
2244distributedLoggerRecords[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"
2564var dllFilePath = Path.Combine(tempDir.Path, expectedLoggerName);
2589$"\"{Path.Combine(tempLoggerProjDir, "CustomLogger.csproj")}\" -restore -verbosity:n", out bool success);
2616$"{Path.Combine(tempLoggerProjDir, $"FaultyLogger.csproj")} -restore -verbosity:n", out bool success);
2844string binlogPath = Path.Combine(testProject.TestRoot, match.Groups[1] + ".binlog");
2871string binlogPath = Path.Combine(testProject.TestRoot, match.Groups[1] + ".binlog");
2903var preprocessFile = Path.Combine(testProject.TestRoot, "Preprocess.xml");
2962dest = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
2983File.Copy(file, Path.Combine(dest, Path.GetFileName(file)));
2989string destSubDir = Path.Combine(dest, dirName);
3028File.WriteAllText(Path.Combine(testProject.TestRoot, item.Key), item.Value);
3047var testAssetsPath = Path.Combine(TestAssetsRootPath, folderName);
3048var loggerProjDir = Path.Combine(testAssetsPath, "LoggerProject");
3052var tempLoggerProjDir = Path.Combine(tempDir.Path, "LoggerProject");
3058var destPath = Path.Combine(tempLoggerProjDir, relativePath);
Microsoft.Build.Engine.OM.UnitTests (110)
Construction\ProjectRootElement_Tests.cs (10)
159Assert.Equal(project.FullPath, Path.Combine(Directory.GetCurrentDirectory(), "X"));
188projectXml1.FullPath = Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc");
206ProjectRootElement projectXml2 = ProjectRootElement.Open(Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc"));
225ProjectRootElement projectXml2 = ProjectRootElement.Open(Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc"));
242projectXml1.FullPath = Path.Combine(Directory.GetCurrentDirectory(), @"xyz\abc");
535string path = Path.Combine(toolsPath, target);
634directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
636string path = Path.Combine(directory, file);
667string path = Path.Combine(curDir, file);
668directory = 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)
685project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
686projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
690project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
691projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
1730testFileRoot = Path.Combine(Path.GetTempPath(), "foodir");
1736string filePath = Path.Combine(testFileRoot, fileName);
1742projectConstruction.AddItem("foo", Path.Combine(testFileRoot, "*.foo"));
2490directory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
2491string subdirectory = Path.Combine(directory, "sub");
2494string projectPath = Path.Combine(subdirectory, "a.proj");
2495string targetsPath = Path.Combine(directory, "b.targets");
2603ProjectRootElement one = ProjectRootElement.Create(Path.Combine(myTempDir, "1.targets"));
2607ProjectRootElement two = ProjectRootElement.Create(Path.Combine(myTempDir, "2.targets"));
2611ProjectRootElement zero = ProjectRootElement.Create(Path.Combine(myTempDir, "0.targets"));
2615zero.AddImport(Path.Combine(myTempDir, "*.targets"));
3294var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.ProjectFile), "1.foo");
3772var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.ProjectFile), "a.cs");
4111string importPath = Path.Combine(pre.DirectoryPath, Guid.NewGuid().ToString());
4154string 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.
FileUtilities.cs (9)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
492return NormalizePath(Path.Combine(directory, file));
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
812string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
890var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1338return paths.Aggregate(root, Path.Combine);
1510string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
Instance\ProjectInstance_Tests.cs (16)
285directory = Path.Combine(Path.GetTempPath(), "WildcardsInsideTargets");
287file1 = Path.Combine(directory, "a.exe");
288file2 = Path.Combine(directory, "b.exe");
289file3 = Path.Combine(directory, "c.bat");
294string path = Path.Combine(directory, "*.exe");
420projA.FullPath = Path.Combine(Path.GetTempPath(), "a.proj");
421projB.FullPath = Path.Combine(Path.GetTempPath(), "b.proj");
456projA.FullPath = Path.Combine(Path.GetTempPath(), "a.proj");
457projB.FullPath = Path.Combine(Path.GetTempPath(), "b.proj");
502File.Create(Path.Combine(tempDir, "aItem.cs")).Dispose();
504projA.FullPath = Path.Combine(tempDir, "a.proj");
505projB.FullPath = Path.Combine(tempDir, "b.proj");
530string projectA = Path.Combine(ObjectModelHelpers.TempProjectDir, "a.proj");
531string projectB = Path.Combine(ObjectModelHelpers.TempProjectDir, "b.proj");
533string includeFileA = Path.Combine(ObjectModelHelpers.TempProjectDir, "aaa4.cs");
534string includeFileB = Path.Combine(ObjectModelHelpers.TempProjectDir, "bbb4.cs");
Microsoft.Build.Engine.UnitTests (510)
BackEnd\SdkResolverLoader_Tests.cs (22)
62var d1 = Directory.CreateDirectory(Path.Combine(root, "Resolver1"));
65var f1 = Path.Combine(d1.FullName, "Resolver1.dll");
68var f2 = Path.Combine(d1.FullName, "Dependency.dll");
69var f3 = Path.Combine(d1.FullName, "InvalidName.dll");
70var f4 = Path.Combine(d1.FullName, "NoResolver.txt");
95var testFolder = Directory.CreateDirectory(Path.Combine(root, "MyTestResolver"));
97var wrongResolverDll = Path.Combine(testFolder.FullName, "MyTestResolver.dll");
98var resolverManifest = Path.Combine(testFolder.FullName, "MyTestResolver.xml");
99var assemblyToLoad = Path.Combine(root, "SomeOtherResolver.dll");
221var resolverPath = Path.Combine(root, "MyTestResolver");
222var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
246var resolverPath = Path.Combine(root, "MyTestResolver");
247var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
273var resolverPath = Path.Combine(root, "MyTestResolver");
274var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
297var resolverPath = Path.Combine(root, "MyTestResolver");
313var resolverPath = Path.Combine(root, "MyTestResolver");
314var resolverManifest = Path.Combine(resolverPath, "MyTestResolver.xml");
372Directory.CreateDirectory(Path.Combine(testRoot, resolver1));
374Directory.CreateDirectory(Path.Combine(additionalRoot, resolver1));
378Directory.CreateDirectory(Path.Combine(testRoot, resolver2));
382Directory.CreateDirectory(Path.Combine(additionalRoot, resolver3));
BinaryLogger_Tests.cs (12)
345RunnerUtilities.ExecMSBuild($"{_logFile} -flp:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic", out success);
348string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log"));
402RunnerUtilities.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);
407string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log"));
411string text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile2.log"));
414RunnerUtilities.ExecMSBuild($"{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile3.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile4.log")};verbosity=normal", out success);
416text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile3.log"));
420text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile4.log"));
465string symlinkPath = Path.Combine(testFolder2.Path, symlinkName);
466string symlinkLvl2Path = Path.Combine(testFolder2.Path, symlinkLvl2Name);
BuildEnvironmentHelper_Tests.cs (19)
27string expectedMSBuildPath = Path.Combine(msbuildPath, MSBuildExeName).ToLowerInvariant();
45var msBuildPath = Path.Combine(path, MSBuildExeName);
46var msBuildConfig = Path.Combine(path, $"{MSBuildExeName}.config");
72var msBuildPath = Path.Combine(msbuildBinDirectory, MSBuildExeName);
73var msBuildConfig = Path.Combine(msbuildBinDirectory, $"{MSBuildExeName}.config");
74var vsMSBuildDirectory = Path.Combine(env.TempFolderRoot, "MSBuild");
364BuildEnvironmentHelper.Instance.MSBuildToolsDirectory64.ShouldBe(Path.Combine(env.BuildDirectory, "amd64"));
380BuildEnvironmentHelper.Instance.MSBuildToolsDirectory64.ShouldBe(Path.Combine(env.BuildDirectory, "amd64"));
405var entryProcess = Path.Combine(Path.GetTempPath(), "foo.exe");
421var msBuildAssembly = Path.Combine(env.BuildDirectory, "Microsoft.Build.dll");
438var msBuildAssembly = Path.Combine(env.BuildDirectory64, "Microsoft.Build.dll");
463public string MSBuildExePath64 => Path.Combine(BuildDirectory64, MSBuildExeName);
471BuildDirectory64 = Path.Combine(BuildDirectory, "amd64");
478File.WriteAllText(Path.Combine(BuildDirectory, file), string.Empty);
484File.WriteAllText(Path.Combine(BuildDirectory64, file), string.Empty);
506public string MSBuildExePath => Path.Combine(BuildDirectory, MSBuildExeName);
517TempFolderRoot = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
518BuildDirectory = Path.Combine(TempFolderRoot, "MSBuild");
528Directory.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 (17)
54TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "ClassLibrary"), createFolder: true);
55TransientTestFolder classLibSubFolder = testEnvironment.CreateFolder(Path.Combine(classLibFolder.Path, "ClassLibrary"), createFolder: true);
64TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "SimpleProject"), createFolder: true);
65TransientTestFolder simpleProjectSubFolder = testEnvironment.CreateFolder(Path.Combine(simpleProjectFolder.Path, "SimpleProject"), createFolder: true);
232TransientTestFolder src = testEnvironment.CreateFolder(Path.Combine(folder.Path, "src"), createFolder: true);
244Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build"", """ + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)) + @""", ""{69BE05E2-CBDA-4D27-9733-44E12B0F5627}""
246Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""MSBuild"", """ + Path.Combine("src", Path.GetFileName(msbuild.Path)) + @""", ""{6F92CA55-1D15-4F34-B1FE-56C0B7EB455E}""
248Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.CommandLine.UnitTests"", """ + Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)) + @""", ""{0ADDBC02-0076-4159-B351-2BF33FAA46B2}""
250Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.Tasks.UnitTests"", """ + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)) + @""", ""{CF999BDE-02B3-431B-95E6-E88D621D9CBF}""
270""" + Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!).Replace("\\", "\\\\") + @""",
271""" + Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!).Replace("\\", "\\\\") + @"""
276sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(microsoftBuild.Path)!)).ShouldBeTrue();
277sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(tasksUnitTests.Path)!)).ShouldBeTrue();
280(sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(commandLineUnitTests.Path)!))
281|| sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(msbuild.Path)!))
282|| sp.ProjectShouldBuild(Path.Combine("src", "notAProject.csproj")))
293folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, $"test@folder%special$symbols"), createFolder: true);
Construction\SolutionProjectGenerator_Tests.cs (18)
122TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
132TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
167TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
183TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
242TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true);
258TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
910<ProjectConfiguration Project="{786E302A-96CE-43DC-B640-D6B6CC9BF6C0}" AbsolutePath="##temp##{{Path.Combine("Project1", "A.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU</ProjectConfiguration>
911<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>
912<ProjectConfiguration Project="{4A727FF8-65F2-401E-95AD-7C8BBFBE3167}" AbsolutePath="##temp##{{Path.Combine("Project3", "C.csproj")}}" BuildProjectInSolution="True">Debug|AnyCPU</ProjectConfiguration>
2600string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2620ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"),
2659string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2679ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"after.{Path.GetFileName(solutionFilePath)}.targets"),
2737string solutionFilePath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, $"{Guid.NewGuid():N}.sln"),
2757string projectPath = ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, projectName),
2769ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, "Directory.Solution.props"),
2778ObjectModelHelpers.CreateFileInTempProjectDirectory(Path.Combine(baseDirectory, "Directory.Solution.targets"),
2847projectInSolution.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)),
EscapingInProjects_Tests.cs (15)
638string path = Path.Combine(Path.GetTempPath(), projectRelativePath);
639string projectAbsolutePath = Path.Combine(path, projectName);
1015logger.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\a;b'c\ClassLibrary16.dll")));
1080logger.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\a;b'c\ClassLibrary16.dll")));
1140log.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\Debug\Class;Library16.dll")));
1200log.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\Debug\Class;Library16.dll")));
1260log.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\Debug\Class$(prop)Library16.dll")));
1320log.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\Debug\Class$(prop)Library16.dll")));
1380log.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\Debug\ClassLibrary16.dll")));
1440log.AssertLogContains(String.Format("foo -> {0}", Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\Debug\ClassLibrary16.dll")));
1611Assert.True(File.Exists(Path.Combine(ObjectModelHelpers.TempProjectDir, @"SLN;!@(foo)'^1\Console;!@(foo)'^(Application1\bin\debug\Console;!@(foo)'^(Application1.exe"))); // @"Did not find expected file Console;!@(foo)'^(Application1.exe"
1782Assert.True(File.Exists(Path.Combine(ObjectModelHelpers.TempProjectDir, @"SLN;!@(foo)'^1\Console;!@(foo)'^(Application1\bin\debug\Console;!@(foo)'^(Application1.exe"))); // @"Did not find expected file Console;!@(foo)'^(Application1.exe"
1805File.WriteAllText(Path.Combine(ObjectModelHelpers.TempProjectDir, "a.weirdo"), String.Empty);
1806File.WriteAllText(Path.Combine(ObjectModelHelpers.TempProjectDir, "b.weirdo"), String.Empty);
1807File.WriteAllText(Path.Combine(ObjectModelHelpers.TempProjectDir, "c.weirdo"), String.Empty);
Evaluation\Evaluator_Tests.cs (112)
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");
2564string msbuildPath = NativeMethodsShared.IsWindows ? Path.Combine(expected, "MSBuild") : "MSBuild";
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");
4441string projectDirectory = Path.Combine(Path.GetTempPath(), "VerifyDTDProcessingIsDisabled2");
4456string 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 (30)
267Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"seconddirectory"), itemsDir[0].EvaluatedInclude);
287Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude);
343Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, result);
660Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude);
719Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"secondd;rectory"), items[5].EvaluatedInclude);
720Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"someo;herplace"), items[6].EvaluatedInclude);
763pi.SetMetadata("Meta9", Path.Combine("seconddirectory", "file.ext"));
764pi.SetMetadata("Meta10", String.Format(";{0};{1};", Path.Combine("someo%3bherplace", "foo.txt"), Path.Combine("secondd%3brectory", "file.ext")));
2181pg.Set(ProjectPropertyInstance.Create("PathRoot", Path.Combine(s_rootPathPrefix, "goo")));
2182pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar));
2316pg.Set(ProjectPropertyInstance.Create("PathRoot", Path.Combine(s_rootPathPrefix, "goo")));
2317pg.Set(ProjectPropertyInstance.Create("PathRoot2", Path.Combine(s_rootPathPrefix, "goop") + Path.DirectorySeparatorChar));
2534pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo", "file.txt")));
2679pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo", "file.txt")));
2700Path.Combine(s_rootPathPrefix, "foo goo") + "`, `$(File)`))",
2713pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo bar", "baz.txt")));
2718Path.Combine(s_rootPathPrefix, "foo baz") + @"`, `$(File)`))",
2731pg.Set(ProjectPropertyInstance.Create("File", Path.Combine("foo bar", "baz.txt")));
2736Path.Combine(s_rootPathPrefix, "foo baz") + @" `, `$(File)`))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance);
3389string directoryStart = Path.Combine(tempPath, "one\\two\\three\\four\\five");
3619$"{Path.GetFullPath(Path.Combine("one", "two"))}{Path.DirectorySeparatorChar}",
4344string path = Path.Combine("foo", "bar");
4899var expectedAlphaSquigglePath = Path.Combine("Alpha", ".squiggle");
4900var expectedBetaSquigglePath = Path.Combine("Beta", ".squiggle");
4946var alphaOnePath = Path.Combine("alpha", "One.cs");
4947var alphaThreePath = Path.Combine("alpha", "Three.cs");
4987var alphaBetaPath = Path.Combine("alpha", "beta");
4988var alphaDeltaPath = Path.Combine("alpha", "delta");
5170string reflectionInfoPath = Path.Combine(Directory.GetCurrentDirectory(), "PropertyFunctionsRequiringReflection");
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (35)
50extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), GetExtensionTargetsFileContent1());
55projColln.ResetToolsetsForTests(WriteConfigFileAndGetReader("MSBuildExtensionsPath", extnDir1, Path.Combine("tmp", "nonexistent")));
92string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContentWithCondition);
95CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { extnDir1, Path.Combine("tmp", "nonexistent") },
128string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
129string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn2.proj"),
133new string[] { extnDir2, Path.Combine("tmp", "nonexistent"), extnDir1 },
158string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
196string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
198string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"),
204new[] { extnDir1, Path.Combine("tmp", "nonexistent"), extnDir2 },
246string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("circularwildcardtest", "extn.proj"),
248string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("circularwildcardtest", "extn.proj"),
250string extnDir3 = GetNewExtensionsPathAndCreateFile("extensions3", Path.Combine("circularwildcardtest", "extn3.proj"),
283string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
286CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { Path.Combine("tmp", "nonexistent"), extnDir1 },
300extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent);
305Path.Combine("tmp", "nonexistent")));
355string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
356string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"), extnTargetsFileContent2);
359CreateAndBuildProjectForImportFromExtensionsPath(mainProjectPath, "MSBuildExtensionsPath", new string[] { extnDir2, Path.Combine("tmp", "nonexistent"), extnDir1 },
399string extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"), extnTargetsFileContent1);
400string extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("foo", "extn.proj"), extnTargetsFileContent2);
407projColln.ResetToolsetsForTests(WriteConfigFileAndGetReader("MSBuildExtensionsPath", Path.Combine("tmp", "non-existent"), extnDir1));
486extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
488extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("bar", "extn2.proj"),
490extnDir3 = GetNewExtensionsPathAndCreateFile("extensions3", Path.Combine("xyz", "extn3.proj"),
566extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
627extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
837logger.AssertLogContains(@"MSB4226: The imported project """ + Path.Combine("$(UndefinedProperty)", "filenotfound.props")
889extnDir1 = GetNewExtensionsPathAndCreateFile("extensions1", Path.Combine("foo", "extn.proj"),
891extnDir2 = GetNewExtensionsPathAndCreateFile("extensions2", Path.Combine("bar", "extn2.proj"),
999var extnDir = Path.Combine(ObjectModelHelpers.TempProjectDir, extnDirName);
1000Directory.CreateDirectory(Path.Combine(extnDir, Path.GetDirectoryName(relativeFilePath)));
1001File.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 (18)
130string projectPath = Path.Combine(_testFolder, "project.proj");
163string projectPath = Path.Combine(_testFolder, "project.proj");
193Path.Combine(_testFolder, "Sdk"),
200new[] { Path.Combine(_testFolder, "Sdk") },
225string projectPath = Path.Combine(_testFolder, "project.proj");
236Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
288Path.Combine(_testFolder, "Sdk1"),
289Path.Combine(_testFolder, "Sdk2")
313string projectPath = Path.Combine(_testFolder, "project.proj");
324Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk1"));
335Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk2"));
389new[] { Path.Combine(_testFolder, "Sdk") },
405string projectPath = Path.Combine(_testFolder, "project.proj");
416Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
482string projectPath = Path.Combine(_testFolder, "project.proj");
503factory.IndicateSuccess(Path.Combine(_testFolder, "Sdk"), "1.0.0", null, null, null, environmentVariablesToAdd: new Dictionary<string, string>
523string projectPath = Path.Combine(_testFolder, "project.proj");
529Directory.CreateDirectory(Path.Combine(_testFolder, "Sdk"));
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"));
FileMatcher_Tests.cs (21)
65File.WriteAllBytes(Path.Combine(testFolder.Path, file), new byte[1]);
104foreach (string fullPath in GetFilesComplexGlobbingMatchingInfo.FilesToCreate.Select(i => Path.Combine(testFolder.Path, i.ToPlatformSlash())))
618return new string[] { Path.Combine(path, "LongDirectoryName") };
625return new string[] { Path.Combine(path, "LongSubDirectory") };
632return new string[] { Path.Combine(path, "LongFileName.txt") };
639return new string[] { Path.Combine(path, "pomegranate") };
995ValidateFileMatch(Path.Combine(".", "File.txt"), Path.Combine(".", "File.txt"), false);
996ValidateNoFileMatch(Path.Combine(".", "File.txt"), Path.Combine(".", "File.bin"), false);
1020ValidateFileMatch(Path.Combine("**", "*.cs"), Path.Combine("dir1", "dir2", "file.cs"), true);
1021ValidateFileMatch(Path.Combine("**", "*.cs"), "file.cs", true);
1250string workingPathSubfolder = Path.Combine(workingPath, "SubDir");
1251string offendingPattern = Path.Combine(workingPath, @"*\..\bar");
1264string fileName = Path.Combine(workingPath, "MyFile.txt");
1265string offendingPattern = Path.Combine(workingPath, @"**\**");
1281string workingPathSubdir = Path.Combine(workingPath, "subdir");
1282string workingPathSubdirBing = Path.Combine(workingPathSubdir, "bing");
1284string offendingPattern = Path.Combine(workingPath, @"**\sub*\*.");
2136if (normalizedCandidate == Path.Combine(path, pattern))
2486return new string[] { Path.Combine(path, pattern) };
FileUtilities_Tests.cs (5)
418Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath)));
432Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath)));
793string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "subfolder");
952Assert.Equal(Path.Combine(root, "1"), FileUtilities.GetFolderAbove(path, 4));
966Path.Combine(root, "path1"),
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);
TargetsFile_Test.cs (11)
846string outputPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
906string outputPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
914string subProjectDirectory = Path.Combine(Path.GetDirectoryName(files[0]), "SubFolder");
917string classPath = Path.Combine(subProjectDirectory, "Class1.cs");
918string textFilePath = Path.Combine(subProjectDirectory, "File1.txt");
919string contentPath = Path.Combine(subProjectDirectory, "Content1.foo");
983string outputPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
991string subProjectDirectory = Path.Combine(Path.GetDirectoryName(files[0]), "SubFolder");
994string classPath = Path.Combine(subProjectDirectory, "Class1.cs");
995string textFilePath = Path.Combine(subProjectDirectory, "File1.txt");
996string contentPath = Path.Combine(subProjectDirectory, "Content1.foo");
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.UnitTests (6)
Microsoft.Build.Tasks.CodeAnalysis (11)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (10)
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (1)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (26)
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");
151DotNetPath = Path.Combine(DotNetInstallDir, DotNetExeName);
153var sdksDir = Path.Combine(DotNetSdkPath ?? string.Empty, "Sdks");
174var csharpCoreTargets = Path.Combine(testBinDirectory, "Microsoft.CSharp.Core.targets");
175var visualBasicCoreTargets = Path.Combine(testBinDirectory, "Microsoft.VisualBasic.Core.targets");
196Assert.True(File.Exists(Path.Combine(ObjDir.Path, "project.assets.json")));
197Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.props")));
198Assert.True(File.Exists(Path.Combine(ObjDir.Path, ProjectFileName + ".nuget.g.targets")));
221var evaluationResultsFile = Path.Combine(OutDir.Path, "EvaluationResult.txt");
Microsoft.Build.Tasks.Core (138)
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(
FileUtilities.cs (9)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
492return NormalizePath(Path.Combine(directory, file));
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
812string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
890var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1338return paths.Aggregate(root, Path.Combine);
1510string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
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 (871)
AssemblyDependency\Miscellaneous.cs (100)
106ITaskItem x = new TaskItem(Path.Combine(s_myComponentsRootPath, "X.dll"));
107ITaskItem xpdb = new TaskItem(Path.Combine(s_myComponentsRootPath, "X.pdb"));
492if (String.Equals(item.ItemSpec, Path.Combine(s_myVersion20Path, "System.XML.dll"), StringComparison.OrdinalIgnoreCase))
503else if (item.ItemSpec.EndsWith(Path.Combine("v2.0.MyVersion", "System.Data.dll")))
511else if (item.ItemSpec.EndsWith(Path.Combine("v2.0.MyVersion", "MyGacAssembly.dll")))
525else if (item.ItemSpec.EndsWith(Path.Combine("MyProject", "MyCopyLocalAssembly.dll")))
532else if (item.ItemSpec.EndsWith(Path.Combine("MyProject", "MyDontCopyLocalAssembly.dll")))
551else if (String.Equals(item.ItemSpec, Path.Combine(s_myProjectPath, "System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
557else if (String.Equals(item.ItemSpec, Path.Combine(s_myProjectPath, "System.Data.dll"), StringComparison.OrdinalIgnoreCase))
572if (item.ItemSpec.EndsWith(Path.Combine("v2.0.MyVersion", "SysTem.dll")))
580else if (item.ItemSpec.EndsWith(Path.Combine("v2.0.MyVersion", "mscorlib.dll")))
731Path.Combine("MyProject", "MyCopyLocalAssembly.dll"), // MyCopyLocalAssembly
732Path.Combine("MyProject", "MyDontCopyLocalAssembly.dll"), // MyDontCopyLocalAssembly
852Assert.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.dll"), t.ResolvedFiles[0].ItemSpec);
863if (item.ItemSpec.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.pdb")))
867if (item.ItemSpec.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.xml")))
871if (item.ItemSpec.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.pri")))
917Assert.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.dll"), t.ResolvedFiles[0].ItemSpec);
952Assert.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.dll"), t.ResolvedFiles[0].ItemSpec);
961if (item.ItemSpec.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.licenses")))
965if (item.ItemSpec.EndsWith(Path.Combine("AssemblyFolder", "SomeAssembly.xml")))
1287Assert.Equal(Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), t.ResolvedFiles[0].ItemSpec);
1850Assert.Equal(Path.Combine(s_myComponentsV20Path, "MyControlWithFutureTargetNDPVersion.dll"), t.ResolvedFiles[0].ItemSpec);
1869Assert.Equal(Path.Combine(s_myComponentsV10Path, "MyNDP1Control.dll"), t.ResolvedFiles[0].ItemSpec);
1888Assert.Equal(Path.Combine(s_myComponentsV20Path, "MyControlWithPastTargetNDPVersion.dll"), t.ResolvedFiles[0].ItemSpec);
2354t.CandidateAssemblyFiles = new string[] { Path.Combine(s_myVersion20Path, "System.Xml.dll") };
2359Assert.Equal(Path.Combine(s_myVersion20Path, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
2375t.CandidateAssemblyFiles = new string[] { Path.Combine(s_myVersion20Path, "System.Xml.dll") };
2395t.CandidateAssemblyFiles = new string[] { Path.Combine(s_myVersion20Path, "System.Xml.dll") };
2400Assert.Equal(Path.Combine(s_myVersion20Path, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
2420Path.Combine(s_myVersion20Path, "System.Xml.dll")
2427Assert.Equal(Path.Combine(s_myVersion20Path, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
2456t.Assemblies = new ITaskItem[] { new TaskItem(Path.Combine(s_myVersion20Path, "System.Xml.dll")) };
2472Assert.Equal(Path.Combine(s_myVersion20Path, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
2948string testPath = Path.Combine(Path.GetTempPath(), @"RawFileNameRelative");
2960Assert.Equal(Path.Combine(testPath, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
2984string testPath = Path.Combine(Path.GetTempPath(), @"RawFileNameRelative");
2996Assert.Equal(Path.Combine(testPath, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
3019string testPath = Path.Combine(Path.GetTempPath(), @"RawFileNameRelative");
3034Assert.Equal(Path.Combine(testPath, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
3056ITaskItem taskItem = new TaskItem(Path.Combine(s_myVersion20Path, "System.Xml.dll"));
3068Assert.Equal(Path.Combine(s_myVersion20Path, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
3081ITaskItem taskItem = new TaskItem(Path.Combine(s_myVersion20Path, "System.Xml.dll"));
3093Assert.Equal(Path.Combine(s_myVersion20Path, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
3108new TaskItem(Path.Combine(s_myVersion20Path, "System.Xml.dll")),
3120Assert.Equal(Path.Combine(s_myVersion20Path, "System.Data.dll"), t.ResolvedFiles[0].ItemSpec);
3137item.SetMetadata("HintPath", Path.Combine(s_myVersion20Path, "System.Data.dll"));
3372Assert.Equal(Path.Combine(s_myVersion20Path, "System.Data.dll"), t.ResolvedFiles[0].ItemSpec);
3394Assert.Equal(Path.Combine(s_myVersion20Path, "System.Data.dll"), t.ResolvedFiles[0].ItemSpec);
3623warningMessage.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"))));
3699warningMessage.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"))));
3704warningMessage.ShouldContain(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.FourSpaceIndent", ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ResolveAssemblyReference.ReferenceDependsOn", "G, Version=1.0.0.0, CulTUre=neutral, PublicKeyToken=aaaaaaaaaaaaaaaa", Path.Combine(s_myLibraries_V1Path, "G.dll"))));
3919Assert.Equal(Path.Combine(s_myVersion20Path, "System.XML.dll"), t.ResolvedFiles[0].ItemSpec);
4658string testPath = Path.Combine(Path.GetTempPath(), @"RelativeAssemblyFiles");
4684Assert.Equal(Path.Combine(testPath, "System.Xml.dll"), t.ResolvedFiles[0].ItemSpec);
5825string microsoftBuildEnginePath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\Microsoft.Build.Engine.dll");
5826string systemXmlPath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\System.Xml.dll");
6141string frameworkDirectory = Path.Combine(ObjectModelHelpers.TempProjectDir, "SubsetListsTestExists");
6142string subsetDirectory = Path.Combine(frameworkDirectory, SubsetListFinder.SubsetListFolder);
6143string clientXml = Path.Combine(subsetDirectory, "Client.xml");
6144string fooXml = Path.Combine(subsetDirectory, "Foo.xml");
6169string frameworkDirectory = Path.Combine(ObjectModelHelpers.TempProjectDir, "SubsetListsTestExistsNotXml");
6170string subsetDirectory = Path.Combine(frameworkDirectory, SubsetListFinder.SubsetListFolder);
6171string clientXml = Path.Combine(subsetDirectory, "Clent.Notxml");
6172string fooXml = Path.Combine(subsetDirectory, "Foo.Notxml");
6206t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
6213string microsoftBuildEnginePath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\Microsoft.Build.Engine");
6220string systemXmlPath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\System.Xml.dll");
7112t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
7118string microsoftBuildEnginePath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\Microsoft.Build.Engine.dll");
7119string systemXmlPath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\System.Xml.dll");
7194t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
7209string microsoftBuildEnginePath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\Microsoft.Build.Engine.dll");
7210string systemXmlPath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\System.Xml.dll");
7277t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
7283string microsoftBuildEnginePath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\Microsoft.Build.Engine.dll");
7284string systemXmlPath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\System.Xml.dll");
7319t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
7351t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
7386t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
7422t.TargetFrameworkDirectories = new string[] { Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5") };
7423string microsoftBuildEnginePath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\Microsoft.Build.Engine");
7424string systemXmlPath = Path.Combine(ObjectModelHelpers.TempProjectDir, "v3.5\\System.Xml.dll");
8132string fullFrameworkDirectory = Path.Combine(Path.GetTempPath(), "Verifyp2pAndProfile");
8150t.AssemblyFiles = new ITaskItem[] { new TaskItem(Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll")) };
8162string warningMessage = t.Log.FormatResourceString("ResolveAssemblyReference.FailBecauseDependentAssemblyInExclusionList", Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), "System, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", t.TargetFrameworkMoniker);
8180string fullFrameworkDirectory = Path.Combine(Path.GetTempPath(), "Verifyp2pAndProfile");
8198TaskItem item = new TaskItem(Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"));
8211string warningMessage = t.Log.FormatResourceString("ResolveAssemblyReference.FailBecauseDependentAssemblyInExclusionList", Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), "System, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "Client");
8230string fullFrameworkDirectory = Path.Combine(Path.GetTempPath(), "VerifyClientProfileRedistListAndProfileList");
8250string microsoftBuildEnginePath = Path.Combine(fullFrameworkDirectory, "Microsoft.Build.Engine.dll");
8251string systemXmlPath = Path.Combine(targetFrameworkDirectory, "System.Xml.dll");
8277string fullFrameworkDirectory = Path.Combine(Path.GetTempPath(), "VerifyClientProfileRedistListAndProfileList2");
8300string microsoftBuildEnginePath = Path.Combine(fullFrameworkDirectory, "Microsoft.Build.Engine.dll");
8301string systemXmlPath = Path.Combine(targetFrameworkDirectory, "System.Xml.dll");
8325string fullFrameworkDirectory = Path.Combine(Path.GetTempPath(), "VerifyAssemblyInGacButNotInProfileIsNotResolved");
8379string fullFrameworkDirectory = Path.Combine(Path.GetTempPath(), "VerifyProfileErrorsAreLogged");
8408string microsoftBuildEnginePath = Path.Combine(fullFrameworkDirectory, "Microsoft.Build.Engine.dll");
8409string systemXmlPath = Path.Combine(targetFrameworkDirectory, "System.Xml.dll");
8459string refPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (189)
190protected static readonly string s_myProjectPath = Path.Combine(s_rootPathPrefix, "MyProject");
199protected static readonly string s_myMissingAssemblyRelPath = Path.Combine("MyProject", "MyMissingAssembly.dll");
200protected static readonly string s_myPrivateAssemblyRelPath = Path.Combine("MyProject", "MyPrivateAssembly.exe");
202protected static readonly string s_frameworksPath = Path.Combine(s_rootPathPrefix, "Frameworks");
204protected static readonly string s_myComponents2RootPath = Path.Combine(s_rootPathPrefix, "MyComponents2");
205protected static readonly string s_myComponentsRootPath = Path.Combine(s_rootPathPrefix, "MyComponents");
206protected static readonly string s_myComponents10Path = Path.Combine(s_myComponentsRootPath, "1.0");
207protected static readonly string s_myComponents20Path = Path.Combine(s_myComponentsRootPath, "2.0");
208protected static readonly string s_myComponentsMiscPath = Path.Combine(s_myComponentsRootPath, "misc");
210protected static readonly string s_myComponentsV05Path = Path.Combine(s_myComponentsRootPath, "v0.5");
211protected static readonly string s_myComponentsV10Path = Path.Combine(s_myComponentsRootPath, "v1.0");
212protected static readonly string s_myComponentsV20Path = Path.Combine(s_myComponentsRootPath, "v2.0");
213protected static readonly string s_myComponentsV30Path = Path.Combine(s_myComponentsRootPath, "v3.0");
215protected static readonly string s_unifyMeDll_V05Path = Path.Combine(s_myComponentsV05Path, "UnifyMe.dll");
216protected static readonly string s_unifyMeDll_V10Path = Path.Combine(s_myComponentsV10Path, "UnifyMe.dll");
217protected static readonly string s_unifyMeDll_V20Path = Path.Combine(s_myComponentsV20Path, "UnifyMe.dll");
218protected static readonly string s_unifyMeDll_V30Path = Path.Combine(s_myComponentsV30Path, "UnifyMe.dll");
220protected static readonly string s_myComponents40ComponentPath = Path.Combine(s_myComponentsRootPath, "4.0Component");
221protected static readonly string s_40ComponentDependsOnOnlyv4AssembliesDllPath = Path.Combine(s_myComponents40ComponentPath, "DependsOnOnlyv4Assemblies.dll");
223protected static readonly string s_myLibrariesRootPath = Path.Combine(s_rootPathPrefix, "MyLibraries");
224protected static readonly string s_myLibraries_V1Path = Path.Combine(s_myLibrariesRootPath, "v1");
225protected static readonly string s_myLibraries_V2Path = Path.Combine(s_myLibrariesRootPath, "v2");
226protected static readonly string s_myLibraries_V1_EPath = Path.Combine(s_myLibraries_V1Path, "E");
228protected static readonly string s_myLibraries_ADllPath = Path.Combine(s_myLibrariesRootPath, "A.dll");
229protected static readonly string s_myLibraries_BDllPath = Path.Combine(s_myLibrariesRootPath, "B.dll");
230protected static readonly string s_myLibraries_CDllPath = Path.Combine(s_myLibrariesRootPath, "C.dll");
231protected static readonly string s_myLibraries_TDllPath = Path.Combine(s_myLibrariesRootPath, "T.dll");
233protected static readonly string s_myLibraries_V1_DDllPath = Path.Combine(s_myLibraries_V1Path, "D.dll");
234protected static readonly string s_myLibraries_V1_E_EDllPath = Path.Combine(s_myLibraries_V1_EPath, "E.dll");
235protected static readonly string s_myLibraries_V2_DDllPath = Path.Combine(s_myLibraries_V2Path, "D.dll");
236protected static readonly string s_myLibraries_V1_GDllPath = Path.Combine(s_myLibraries_V1Path, "G.dll");
237protected static readonly string s_myLibraries_V2_GDllPath = Path.Combine(s_myLibraries_V2Path, "G.dll");
242protected static readonly string s_regress444809RootPath = Path.Combine(s_rootPathPrefix, "Regress444809");
243protected static readonly string s_regress444809_ADllPath = Path.Combine(s_regress444809RootPath, "A.dll");
244protected static readonly string s_regress444809_BDllPath = Path.Combine(s_regress444809RootPath, "B.dll");
245protected static readonly string s_regress444809_CDllPath = Path.Combine(s_regress444809RootPath, "C.dll");
246protected static readonly string s_regress444809_DDllPath = Path.Combine(s_regress444809RootPath, "D.dll");
248protected static readonly string s_regress444809_V2RootPath = Path.Combine(s_regress444809RootPath, "v2");
249protected static readonly string s_regress444809_V2_ADllPath = Path.Combine(s_regress444809_V2RootPath, "A.dll");
251protected static readonly string s_regress442570_RootPath = Path.Combine(s_rootPathPrefix, "Regress442570");
252protected static readonly string s_regress442570_ADllPath = Path.Combine(s_regress442570_RootPath, "A.dll");
253protected static readonly string s_regress442570_BDllPath = Path.Combine(s_regress442570_RootPath, "B.dll");
255protected static readonly string s_myAppRootPath = Path.Combine(s_rootPathPrefix, "MyApp");
256protected static readonly string s_myApp_V05Path = Path.Combine(s_myAppRootPath, "v0.5");
257protected static readonly string s_myApp_V10Path = Path.Combine(s_myAppRootPath, "v1.0");
258protected static readonly string s_myApp_V20Path = Path.Combine(s_myAppRootPath, "v2.0");
259protected static readonly string s_myApp_V30Path = Path.Combine(s_myAppRootPath, "v3.0");
274protected static readonly string s_assemblyFolder_RootPath = Path.Combine(s_rootPathPrefix, "AssemblyFolder");
275protected static readonly string s_assemblyFolder_SomeAssemblyDllPath = Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.dll");
376Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"),
377Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"),
378Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"),
379Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"),
380Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"),
381Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"),
382Path.Combine(Path.GetTempPath(), @"RawFileNameRelative\System.Xml.dll"),
383Path.Combine(Path.GetTempPath(), @"RelativeAssemblyFiles\System.Xml.dll"),
384Path.Combine(s_myVersion20Path, "System.Data.dll"),
385Path.Combine(s_myVersion20Path, "System.Xml.dll"),
386Path.Combine(s_myVersion20Path, "System.Xml.pdb"),
387Path.Combine(s_myVersion20Path, "System.Xml.xml"),
395Path.Combine(s_rootPathPrefix, s_myPrivateAssemblyRelPath),
396Path.Combine(s_myProjectPath, "MyCopyLocalAssembly.dll"),
397Path.Combine(s_myProjectPath, "MyDontCopyLocalAssembly.dll"),
398Path.Combine(s_myVersion20Path, "BadImage.dll"), // An assembly that will give a BadImageFormatException from GetAssemblyName
399Path.Combine(s_myVersion20Path, "BadImage.pdb"),
400Path.Combine(s_myVersion20Path, "MyGacAssembly.dll"),
401Path.Combine(s_myVersion20Path, "MyGacAssembly.pdb"),
403Path.Combine(s_myVersion20Path, "System.dll"),
404Path.Combine(s_myVersion40Path, "System.dll"),
405Path.Combine(s_myVersion90Path, "System.dll"),
406Path.Combine(s_myVersion20Path, "mscorlib.dll"),
407Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"),
409Path.Combine(s_myProjectPath, "mscorlib.dll"), // This is an mscorlib.dll that has no metadata (i.e. GetAssemblyName returns null)
410Path.Combine(s_myProjectPath, "System.Data.dll"), // This is a System.Data.dll that has the wrong pkt, it shouldn't be matched.
411Path.Combine(s_myComponentsRootPath, "MyGrid.dll"), // A vendor component that we should find in the registry.
429Path.Combine(s_myComponentsV30Path, "MyControlWithFutureTargetNDPVersion.dll"), // The future version of a component.
430Path.Combine(s_myComponentsV20Path, "MyControlWithFutureTargetNDPVersion.dll"), // The current version of a component.
431Path.Combine(s_myComponentsV10Path, "MyNDP1Control.dll"), // A control that only has an NDP 1.0 version
432Path.Combine(s_myComponentsV20Path, "MyControlWithPastTargetNDPVersion.dll"), // The current version of a component.
433Path.Combine(s_myComponentsV10Path, "MyControlWithPastTargetNDPVersion.dll"), // The past version of a component.
437Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), // A devices mscorlib.
454Path.Combine(s_myAppRootPath, "DependsOnSimpleA.dll"),
502Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.pdb"),
503Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.xml"),
504Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.pri"),
505Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.licenses"),
506Path.Combine(s_assemblyFolder_RootPath, "SomeAssembly.config"),
515Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"),
516Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"),
517Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"),
518Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"),
519Path.Combine(s_myAppRootPath, "DependsOnWeaklyNamedUnified.dll"),
520Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"),
526Path.Combine(s_myComponentsMiscPath, "DependsOnOnlyv4Assemblies.dll"), // Only depends on 4.0.0 assemblies
527Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), // Is in redist list and is a 9.0 assembly
528Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), // Depends on 9.0 assemblies
529Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), // Depends on 9.0 assemblies
530Path.Combine(s_myComponents10Path, "DependsOn9.dll"), // Depends on 9.0 assemblies
531Path.Combine(s_myComponents20Path, "DependsOn9.dll"), // Depends on 9.0 assemblies
549Path.Combine(s_myComponentsRootPath, "V.dll"),
550Path.Combine(s_myComponents2RootPath, "W.dll"),
551Path.Combine(s_myComponentsRootPath, "X.dll"),
552Path.Combine(s_myComponentsRootPath, "X.pdb"),
553Path.Combine(s_myComponentsRootPath, "Y.dll"),
554Path.Combine(s_myComponentsRootPath, "Z.dll"),
556Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"),
557Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"),
913Path.Combine(path, "en"), Path.Combine(path, "en-GB"), Path.Combine(path, "xx")
922Path.Combine(path, "en"), Path.Combine(path, "en-GB"), Path.Combine(path, "xx")
1076String.Equals(path, Path.Combine(s_myVersion20Path, "BadImage.dll"), StringComparison.OrdinalIgnoreCase))
1078throw new System.BadImageFormatException(@"The format of the file '" + Path.Combine(s_myVersion20Path, "BadImage.dll") + "' is invalid");
1083String.Equals(path, Path.Combine(s_myProjectPath, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1084|| String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1085|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
1093String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
1094|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
1105if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1110if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1115if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1203if (String.Equals(path, Path.Combine(Path.GetTempPath(), @"RawFileNameRelative\System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1208if (String.Equals(path, Path.Combine(Path.GetTempPath(), @"RelativeAssemblyFiles\System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1213if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.XML.dll"), StringComparison.OrdinalIgnoreCase))
1220if (String.Equals(path, Path.Combine(s_myProjectPath, "System.Xml.dll"), StringComparison.OrdinalIgnoreCase))
1227if (String.Equals(path, Path.Combine(s_myProjectPath, "System.Data.dll"), StringComparison.OrdinalIgnoreCase))
1233if (path.EndsWith(Path.Combine(s_myVersion20Path, "MyGacAssembly.dll")))
1239if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1245if (String.Equals(path, Path.Combine(s_myVersion40Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1251if (String.Equals(path, Path.Combine(s_myVersion90Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
1259String.Equals(path, Path.Combine(s_myVersion20Path, "System.Data.dll"), StringComparison.OrdinalIgnoreCase))
1300if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"), StringComparison.OrdinalIgnoreCase))
1305if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1320if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1325if (String.Equals(path, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1330if (String.Equals(path, Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
1381if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), StringComparison.OrdinalIgnoreCase))
1387if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1393if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), StringComparison.OrdinalIgnoreCase))
1398if (String.Equals(path, Path.Combine(s_myComponents10Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1403if (String.Equals(path, Path.Combine(s_myComponents20Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
1438if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.pdb"), StringComparison.OrdinalIgnoreCase))
1486if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "V.dll"), StringComparison.OrdinalIgnoreCase))
1490if (String.Equals(path, Path.Combine(s_myComponents2RootPath, "W.dll"), StringComparison.OrdinalIgnoreCase))
1494if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.dll"), StringComparison.OrdinalIgnoreCase))
1499if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Z.dll"), StringComparison.OrdinalIgnoreCase))
1504if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Y.dll"), StringComparison.OrdinalIgnoreCase))
1509if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"), StringComparison.OrdinalIgnoreCase))
1514if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"), StringComparison.OrdinalIgnoreCase))
1823if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1827else if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1831else if (String.Equals(path, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1835else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1839else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1843else if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1858if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"), StringComparison.OrdinalIgnoreCase))
1866if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"), StringComparison.OrdinalIgnoreCase))
1874if (String.Equals(path, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"), StringComparison.OrdinalIgnoreCase))
1996if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2092String.Equals(path, Path.Combine(s_myVersion20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase)
2093|| String.Equals(path, Path.Combine(s_myVersionPocket20Path, "mscorlib.dll"), StringComparison.OrdinalIgnoreCase))
2103if (String.Equals(path, Path.Combine(s_myAppRootPath, "DependsOnSimpleA.dll"), StringComparison.OrdinalIgnoreCase))
2151if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "MyGrid.dll"), StringComparison.OrdinalIgnoreCase))
2212if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnWeaklyNamedUnified.dll"), StringComparison.OrdinalIgnoreCase))
2220if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnEverettSystem.dll"), StringComparison.OrdinalIgnoreCase))
2228if (String.Equals(path, Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2236if (String.Equals(path, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2244if (String.Equals(path, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2252if (String.Equals(path, Path.Combine(s_myApp_V30Path, "DependsOnUnified.dll"), StringComparison.OrdinalIgnoreCase))
2276if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), StringComparison.OrdinalIgnoreCase))
2286if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2296if (String.Equals(path, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"), StringComparison.OrdinalIgnoreCase))
2304if (String.Equals(path, Path.Combine(s_myComponents10Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2312if (String.Equals(path, Path.Combine(s_myComponents20Path, "DependsOn9.dll"), StringComparison.OrdinalIgnoreCase))
2345if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "V.dll"), StringComparison.OrdinalIgnoreCase))
2353if (String.Equals(path, Path.Combine(s_myComponents2RootPath, "W.dll"), StringComparison.OrdinalIgnoreCase))
2358if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "X.dll"), StringComparison.OrdinalIgnoreCase))
2366if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Z.dll"), StringComparison.OrdinalIgnoreCase))
2371if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Y.dll"), StringComparison.OrdinalIgnoreCase))
2379if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "Microsoft.Build.dll"), StringComparison.OrdinalIgnoreCase))
2384if (String.Equals(path, Path.Combine(s_myComponentsRootPath, "DependsOnMSBuild12.dll"), StringComparison.OrdinalIgnoreCase))
2392if (String.Equals(path, Path.Combine(s_myVersion20Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2401if (String.Equals(path, Path.Combine(s_myVersion40Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2410if (String.Equals(path, Path.Combine(s_myVersion90Path, "System.dll"), StringComparison.OrdinalIgnoreCase))
2990string redistListPath = Path.Combine(tempPath, Guid.NewGuid() + ".xml");
2991string rarCacheFile = Path.Combine(tempPath, Guid.NewGuid() + ".RarCache");
AssemblyDependency\StronglyNamedDependencyAppConfig.cs (5)
82String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAppConfig"), "1.0.0.0", appConfigFile, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
154String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAppConfig"), "1.0.0.0", appConfigFile, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
262String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAppConfig"), "1.0.0.0", appConfigFile, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
324String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAppConfig"), "1.0.0.0", appConfigFile, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
380String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAppConfig"), "0.5.0.0", appConfigFile, Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll")));
AssemblyDependency\StronglyNamedDependencyAutoUnify.cs (13)
91String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAutoUnify"), "1.0.0.0", Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
154Assert.Contains(Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"), t.ResolvedFiles[0].ItemSpec); // "Expected the ItemSpec of the resolved file to be the item spec of the 1.0.0.0 assembly");
163String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAutoUnify"), "1.0.0.0", Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll")));
241String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAppConfig"), "1.0.0.0", appConfigFile, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
312Assert.False(ContainsItem(t.ResolvedFiles, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"))); // "Expected the ItemSpec of the resolved file to not be the item spec of the 1.0.0.0 assembly");
313Assert.False(ContainsItem(t.ResolvedFiles, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"))); // "Expected the ItemSpec of the resolved file to not be the item spec of the 2.0.0.0 assembly"
386Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll"))); // "Expected the ItemSpec of the resolved file to be the item spec of the 1.0.0.0 assembly");
387Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll"))); // "Expected the ItemSpec of the resolved file to be the item spec of the 2.0.0.0 assembly");
395String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAutoUnify"), "1.0.0.0", Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
398String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAutoUnify"), "2.0.0.0", Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll")));
449String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAutoUnify"), "1.0.0.0", Path.Combine(s_myApp_V10Path, "DependsOnUnified.dll")));
452String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAutoUnify"), "2.0.0.0", Path.Combine(s_myApp_V20Path, "DependsOnUnified.dll")));
496String.Format(AssemblyResources.GetString("ResolveAssemblyReference.UnificationByAutoUnify"), "0.5.0.0", Path.Combine(s_myApp_V05Path, "DependsOnUnified.dll")));
AssemblyDependency\SuggestedRedirects.cs (2)
206warningMessage.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"))));
251warningMessage.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"))));
AssemblyDependency\VerifyIgnoreVersionForFrameworkReference.cs (4)
52Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to find assembly, but didn't."
105Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to find assembly, but didn't."
158Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to find assembly, but didn't."
171item.SetMetadata("HintPath", Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"));
AssemblyDependency\VerifyTargetFrameworkAttribute.cs (14)
48Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"))); // "Expected to find assembly, but didn't."
75Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"))); // "Expected to find assembly, but didn't."
102Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"))); // "Expected to find assembly, but didn't."
132Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"))); // "Expected to find assembly, but didn't."
160Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo35Framework.dll"))); // "Expected to find assembly, but didn't."
161Assert.True(ContainsItem(t.ResolvedDependencyFiles, Path.Combine(s_frameworksPath, "DependsOnFoo35Framework.dll"))); // "Expected to find assembly, but didn't."
189Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo4Framework.dll"))); // "Expected to find assembly, but didn't."
190Assert.True(ContainsItem(t.ResolvedDependencyFiles, Path.Combine(s_frameworksPath, "DependsOnFoo4Framework.dll"))); // "Expected to find assembly, but didn't."
221Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"))); // "Expected to find assembly, but didn't."
222Assert.True(ContainsItem(t.ResolvedDependencyFiles, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"))); // "Expected to find assembly, but didn't."
283Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "IndirectDependsOnFoo45Framework.dll"))); // "Expected to find assembly, but didn't."
284Assert.True(ContainsItem(t.ResolvedDependencyFiles, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"))); // "Expected to find assembly, but didn't."
315Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"))); // "Expected to find assembly, but didn't."
398Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_frameworksPath, "DependsOnFoo45Framework.dll"))); // "Expected to find assembly, but didn't."
AssemblyDependency\VerifyTargetFrameworkHigherThanRedist.cs (10)
49Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOnOnlyv4Assemblies.dll"))); // "Expected to find assembly, but didn't."
95Assert.Equal(Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"), t.ResolvedFiles[0].ItemSpec);
230Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "ReferenceVersion9.dll"))); // "Expected to find assembly, but didn't."
343Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to find assembly, but didn't."
376Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to not find assembly, but did."
377Assert.False(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"))); // "Expected to find assembly, but didn't."
410Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to find assembly, but didn't."
411Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9Also.dll"))); // "Expected to find assembly, but didn't."
481Assert.True(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to find assembly, but didn't."
522Assert.False(ContainsItem(t.ResolvedFiles, Path.Combine(s_myComponentsMiscPath, "DependsOn9.dll"))); // "Expected to find assembly, but didn't."
Copy_Tests.cs (63)
223Directory.Exists(Path.Combine(destinationFolder.Path, "source0")).ShouldBeTrue();
224Directory.Exists(Path.Combine(destinationFolder.Path, "source1")).ShouldBeTrue();
952string destinationFolder = Path.Combine(Path.GetTempPath(), "2A333ED756AF4dc392E728D0F874A398");
953string destination1 = Path.Combine(destinationFolder, Path.GetFileName(source1));
954string destination2 = Path.Combine(destinationFolder, Path.GetFileName(source2));
1403string tempDirectory = Path.Combine(Path.GetTempPath(), "DoNotRetryWhenDestinationLockedDueToAcl");
1404string destinationFile = Path.Combine(tempDirectory, "DestinationFile.txt");
1405string sourceFile = Path.Combine(tempDirectory, "SourceFile.txt");
1569string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A392");
1570string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A393");
1572string validOutFile = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A394");
1657string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
1728string file = Path.Combine(currdir, filename);
1780string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
1781string invalidFile = NativeMethodsShared.IsUnixLike ? Path.Combine(temp, "!@#$%^&*()|") : "!@#$%^&*()|";
1845string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
1846string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
1917string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
1918string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
1980new TaskItem(Path.Combine(tempPath, "a.cs")),
1981new TaskItem(Path.Combine(tempPath, "b.cs")),
1982new TaskItem(Path.Combine(tempPath, "a.cs")),
1983new TaskItem(Path.Combine(tempPath, "a.cs")),
2001DestinationFolder = new TaskItem(Path.Combine(tempPath, "foo")),
2037new TaskItem(Path.Combine(tempPath, "a.cs")),
2038new TaskItem(Path.Combine(tempPath, "b.cs")),
2039new TaskItem(Path.Combine(tempPath, "a.cs")),
2040new TaskItem(Path.Combine(tempPath, "a.cs")),
2041new TaskItem(Path.Combine(tempPath, "a.cs")),
2054new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs
2055new TaskItem(Path.Combine(tempPath, @"xa.cs")), // b.cs -> xa.cs should copy because it's a different source
2056new TaskItem(Path.Combine(tempPath, @"xb.cs")), // a.cs -> xb.cs should copy because it's a different destination
2057new 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
2058new TaskItem(Path.Combine(tempPath, @"xa.cs")), // a.cs -> xa.cs should not copy because it's the same source
2087string xaPath = Path.Combine(tempPath, "xa.cs");
2090Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[0].Key.Name);
2091Assert.Equal(Path.Combine(tempPath, "b.cs"), xaCopies[1].Key.Name);
2092Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[2].Key.Name);
2094string xbPath = Path.Combine(tempPath, "xb.cs");
2097Assert.Equal(Path.Combine(tempPath, "a.cs"), xbCopies[0].Key.Name);
2111string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2112string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A399");
2113string outFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A400");
2549string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2550string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2619string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2620string destFile1 = Path.Combine(destFolder, Path.GetFileName(sourceFile1));
2621string destFile2 = Path.Combine(destFolder, Path.GetFileName(sourceFile2));
2626string nothingFile = Path.Combine(destFolder, "nothing.txt");
2723string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2724string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2751string destLink = Path.Combine(destFolder, Path.GetFileNameWithoutExtension(sourceFile) + "." + n);
2805string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2806string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2871string destFolder = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
2872string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
2940string destFile = Path.Combine(destFolder.Path, "The Destination");
3099string tempDir = Path.Combine(tempPath, "CopyTestDir" + Guid.NewGuid().ToString("N"));
3110string lowercaseDir = Path.Combine(outputDir, "cs");
3117string sourceFile1 = Path.Combine(sourceDir, "apphost");
3118string sourceFile2 = Path.Combine(sourceDir, "app.dll");
3123string destFile1 = Path.Combine(outputDir, "CS");
3124string destFile2 = Path.Combine(outputDir, "app.dll");
GetReferencePaths_Tests.cs (23)
45string tempDirectory = Path.Combine(Path.GetTempPath(), "TestGeneralFrameworkMonikerGoodWithRoot");
46string framework41Directory = Path.Combine(tempDirectory, Path.Combine("MyFramework", "v4.1") + Path.DirectorySeparatorChar);
47string redistListDirectory = Path.Combine(framework41Directory, "RedistList");
48string redistListFile = Path.Combine(redistListDirectory, "FrameworkList.xml");
91string tempDirectory = Path.Combine(Path.GetTempPath(), "TestGeneralFrameworkMonikerGoodWithRootWithProfile");
92string framework41Directory = Path.Combine(tempDirectory, Path.Combine("MyFramework", "v4.1", "Profile", "Client"));
93string redistListDirectory = Path.Combine(framework41Directory, "RedistList");
94string redistListFile = Path.Combine(redistListDirectory, "FrameworkList.xml");
193string tempDirectory = Path.Combine(Path.GetTempPath(), "TestGeneralFrameworkMonikerGoodWithInvalidIncludePath");
194string framework41Directory = Path.Combine(tempDirectory, Path.Combine("MyFramework", "v4.1") + Path.DirectorySeparatorChar);
195string redistListDirectory = Path.Combine(framework41Directory, "RedistList");
196string redistListFile = Path.Combine(redistListDirectory, "FrameworkList.xml");
240string tempDirectory = Path.Combine(Path.GetTempPath(), "TestGeneralFrameworkMonikerGoodWithInvalidCharInIncludePath");
241string framework41Directory = Path.Combine(tempDirectory, Path.Combine("MyFramework", "v4.1") + Path.DirectorySeparatorChar);
242string redistListDirectory = Path.Combine(framework41Directory, "RedistList");
243string redistListFile = Path.Combine(redistListDirectory, "FrameworkList.xml");
301string frameworkRootDir = Path.Combine(env.DefaultTestDirectory.Path, "framework-root");
302var framework41Directory = env.CreateFolder(Path.Combine(frameworkRootDir, Path.Combine("MyFramework", "v4.1") + Path.DirectorySeparatorChar));
303var redistListDirectory = env.CreateFolder(Path.Combine(framework41Directory.Path, "RedistList"));
GetSDKReference_Tests.cs (69)
50string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "FakeSDKForReferenceAssemblies");
51sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\SDkWithManifest\\2.0\\");
52string referenceAssemblyDirectoryConfigx86 = Path.Combine(sdkDirectory, "References\\Retail\\X86");
53string referenceAssemblyDirectoryConfigx64 = Path.Combine(sdkDirectory, "References\\Retail\\X64");
54string referenceAssemblyDirectoryConfigNeutral = Path.Combine(sdkDirectory, "References\\Retail\\Neutral");
55string referenceAssemblyDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\Neutral");
56string referenceAssemblyDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\X86");
57string referenceAssemblyDirectoryCommonConfigX64 = Path.Combine(sdkDirectory, "References\\CommonConfiguration\\X64");
59string redistDirectoryConfigx86 = Path.Combine(sdkDirectory, "Redist\\Retail\\X86");
60string redistDirectoryConfigx64 = Path.Combine(sdkDirectory, "Redist\\Retail\\X64");
61string redistDirectoryConfigNeutral = Path.Combine(sdkDirectory, "Redist\\Retail\\Neutral");
62string redistDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\Neutral");
63string redistDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\X86");
64string redistDirectoryCommonConfigX64 = Path.Combine(sdkDirectory, "Redist\\CommonConfiguration\\X64");
66string designTimeDirectoryConfigx86 = Path.Combine(sdkDirectory, "DesignTime\\Retail\\X86");
67string designTimeDirectoryConfigNeutral = Path.Combine(sdkDirectory, "DesignTime\\Retail\\Neutral");
68string designTimeDirectoryCommonConfigNeutral = Path.Combine(sdkDirectory, "DesignTime\\CommonConfiguration\\Neutral");
69string designTimeDirectoryCommonConfigX86 = Path.Combine(sdkDirectory, "DesignTime\\CommonConfiguration\\X86");
84Directory.CreateDirectory(Path.Combine(redistDirectoryConfigNeutral, "ASubDirectory\\TwoDeep"));
94string testWinMD = Path.Combine(referenceAssemblyDirectoryConfigx86, "A.winmd");
95string testWinMD64 = Path.Combine(referenceAssemblyDirectoryConfigx64, "A.winmd");
96string testWinMDNeutral = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "B.winmd");
97string testWinMDNeutralWinXML = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "B.xml");
98string testWinMDCommonConfigurationx86 = Path.Combine(referenceAssemblyDirectoryCommonConfigX86, "C.winmd");
99string testWinMDCommonConfigurationx64 = Path.Combine(referenceAssemblyDirectoryCommonConfigX64, "C.winmd");
100string testWinMDCommonConfigurationNeutral = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "D.winmd");
101string testWinMDCommonConfigurationNeutralDupe = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "A.winmd");
103string testRA = Path.Combine(referenceAssemblyDirectoryConfigx86, "E.dll");
104string testRA64 = Path.Combine(referenceAssemblyDirectoryConfigx64, "E.dll");
105string testRANeutral = Path.Combine(referenceAssemblyDirectoryConfigNeutral, "F.dll");
106string testRACommonConfigurationx86 = Path.Combine(referenceAssemblyDirectoryCommonConfigX86, "G.dll");
107string testRACommonConfigurationx64 = Path.Combine(referenceAssemblyDirectoryCommonConfigX64, "G.dll");
108string testRACommonConfigurationNeutral = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "H.dll");
110string testRACommonConfigurationNeutralDupe = Path.Combine(referenceAssemblyDirectoryCommonConfigNeutral, "A.dll");
112string redist = Path.Combine(redistDirectoryConfigx86, "A.dll");
113string redist64 = Path.Combine(redistDirectoryConfigx64, "A.dll");
114string redistNeutral = Path.Combine(redistDirectoryConfigNeutral, "ASubDirectory\\TwoDeep\\B.dll");
115string redistNeutralPri = Path.Combine(redistDirectoryConfigNeutral, "B.pri");
116string redistCommonConfigurationx86 = Path.Combine(redistDirectoryCommonConfigX86, "C.dll");
117string redistCommonConfigurationx64 = Path.Combine(redistDirectoryCommonConfigX64, "C.dll");
118string redistCommonConfigurationNeutral = Path.Combine(redistDirectoryCommonConfigNeutral, "D.dll");
119string redistCommonConfigurationNeutralDupe = Path.Combine(redistDirectoryCommonConfigNeutral, "A.dll");
154string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "FakeSDKForReferenceAssemblies");
155sdkDirectory = Path.Combine(testDirectoryRoot, "MyPlatform\\8.0\\ExtensionSDKs\\AnotherSDK\\2.0\\");
156string referenceAssemblyDirectoryConfigx86 = Path.Combine(sdkDirectory, "References\\Retail\\X86");
157string redistDirectoryConfigx86 = Path.Combine(sdkDirectory, "Redist\\Retail\\X86");
165string testWinMD = Path.Combine(referenceAssemblyDirectoryConfigx86, "B.winmd");
166string redist = Path.Combine(redistDirectoryConfigx86, "B.pri");
167string redist2 = Path.Combine(redistDirectoryConfigx86, "B.dll");
190private readonly string _cacheDirectory = Path.Combine(Path.GetTempPath(), "GetSDKReferenceFiles");
299Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]);
300Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]);
305Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]);
306Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]);
311Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\X86\\"), sdkFolders[0]);
312Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[1]);
313Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\X86\\"), sdkFolders[2]);
314Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[3]);
433string winmd = Path.Combine(_sdkDirectory, "References\\Retail\\X86\\A.winmd");
1236string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\B.pri");
1237string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.pri");
1238string referenceWinner = Path.Combine(_sdkDirectory, "References\\Retail\\Neutral\\B.WinMD");
1239string referenceVictim = Path.Combine(_sdkDirectory2, "References\\Retail\\X86\\B.WinMD");
1282string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\ASubDirectory\\TwoDeep\\B.dll");
1283string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.dll");
1325string redistWinner = Path.Combine(_sdkDirectory, "Redist\\Retail\\Neutral\\B.pri");
1326string redistVictim = Path.Combine(_sdkDirectory2, "Redist\\Retail\\X86\\B.pri");
1327string referenceWinner = Path.Combine(_sdkDirectory, "References\\Retail\\Neutral\\B.WinMD");
1328string referenceVictim = Path.Combine(_sdkDirectory2, "References\\Retail\\X86\\B.WinMD");
Move_Tests.cs (10)
420string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A392");
421string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A393");
423string validOutFile = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A394");
594string file = Path.Combine(currdir, filename);
636string file = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A395");
681string destFolder = Path.Combine(temp, "2A333ED756AF4d1392E728D0F864A398");
682string destFile = Path.Combine(destFolder, Path.GetFileName(sourceFile));
735string inFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A398");
736string inFile2 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A399");
737string outFile1 = Path.Combine(temp, "2A333ED756AF4dc392E728D0F864A400");
ResolveNonMSBuildProjectOutput_Tests.cs (44)
137projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
143projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
145projectOutputs, true, Path.Combine("obj", "correct.dll"));
149projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
150projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
151projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
157projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
158projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
159projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
160projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
162projectOutputs, true, Path.Combine("obj", "correct.dll"));
224projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-000000000000}", Path.Combine("obj", "managed.dll"));
225projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "unmanaged.dll"));
227TestUnresolvedReferencesHelper(projectRefs, projectOutputs, path => (path == Path.Combine("obj", "managed.dll")), out unresolvedOutputs, out resolvedOutputs);
230Assert.True(resolvedOutputs.Contains(Path.Combine("obj", "managed.dll")));
231Assert.True(resolvedOutputs.Contains(Path.Combine("obj", "unmanaged.dll")));
232Assert.Equal("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "managed.dll")]).GetMetadata("ManagedAssembly"));
233Assert.NotEqual("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "unmanaged.dll")]).GetMetadata("ManagedAssembly"));
250projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
251projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
252projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
265projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
266projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
267projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
268projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
273Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
279projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
280projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
281projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
282projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
283projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-000000000000}", Path.Combine("obj", "correct2.dll"));
288Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
289Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct2.dll")));
294projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
295projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
296projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
307projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
308projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
309projectOutputs.Add("{11111111-1111-1111-1111-111111111113}", Path.Combine("obj", "wrong3.dll"));
310projectOutputs.Add("{2F6BBCC3-7111-4116-A68B-34CFC76F37C5}", Path.Combine("obj", "correct.dll"));
316Assert.True(resolvedOutputs.ContainsKey(Path.Combine("obj", "correct.dll")));
321projectOutputs.Add("{11111111-1111-1111-1111-111111111111}", Path.Combine("obj", "wrong.dll"));
322projectOutputs.Add("{11111111-1111-1111-1111-111111111112}", Path.Combine("obj", "wrong2.dll"));
323projectOutputs.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 (8)
112string expectedOutFile0 = Path.Combine(Path.GetTempPath(), Path.ChangeExtension(resxFile0, ".resources"));
113string expectedOutFile1 = Path.Combine(Path.GetTempPath(), "resx1.foo.resources");
114string expectedOutFile2 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
115string expectedOutFile3 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
2992dir = Path.Combine(Path.GetTempPath(), "directory");
3211t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
3360t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
3673env.CreateFolder(Path.Combine(env.DefaultTestDirectory.Path, "tmp_dir")),
ResourceHandling\GenerateResourceOutOfProc_Tests.cs (13)
82string expectedOutFile0 = Path.Combine(Path.GetTempPath(), Path.ChangeExtension(resxFile0, ".resources"));
83string expectedOutFile1 = Path.Combine(Path.GetTempPath(), "resx1.foo.resources");
84string expectedOutFile2 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
85string expectedOutFile3 = Path.Combine(Path.GetTempPath(), Utilities.GetTempFileName(".resources"));
2491dir = Path.Combine(Path.GetTempPath(), "directory");
2621string p2pReference = Path.Combine(ObjectModelHelpers.TempProjectDir, @"bin\debug\lib1.dll");
2714t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
2861t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) };
3063if (net35 != null && Directory.Exists(Path.Combine(net35, "MSBuild")) && net35sdk != null && Directory.Exists(Path.Combine(net35sdk, "bin")))
3065sdkToolsPath = Path.Combine(net35sdk, "bin");
3128string tempFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "temp");
3184string resgenFile = Path.Combine(pathName, fileName + ".resx");
SdkToolsPathUtility_Tests.cs (9)
88string expectedPath = Path.Combine(_defaultSdkToolsPath, _toolName);
107string expectedPath = Path.Combine(_defaultSdkToolsPath, "x64");
108expectedPath = Path.Combine(expectedPath, _toolName);
123string expectedPath = Path.Combine(_defaultSdkToolsPath, _toolName);
140string expectedPath = Path.Combine(_defaultSdkToolsPath, "ia64");
141expectedPath = Path.Combine(expectedPath, _toolName);
156string expectedPath = Path.Combine(_defaultSdkToolsPath, _toolName);
321return string.Equals(Path.GetDirectoryName(filePath), Path.Combine(_sdkToolsPath, "x64"), StringComparison.OrdinalIgnoreCase);
329return string.Equals(Path.GetDirectoryName(filePath), Path.Combine(_sdkToolsPath, "ia64"), StringComparison.OrdinalIgnoreCase);
Unzip_Tests.cs (15)
87_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
88_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
131_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
132_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
135Directory.Exists(Path.Combine(destination.Path, "emptyDir"));
236SourceFiles = new ITaskItem[] { new TaskItem(Path.Combine(testEnvironment.DefaultTestDirectory.Path, "foo.zip")), }
269_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
270_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
298_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log);
299_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log);
332_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file1.js"), customMessage: _mockEngine.Log);
333_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "file1.js.map"), customMessage: _mockEngine.Log);
334_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file2.js"), customMessage: _mockEngine.Log);
335_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "readme.txt"), customMessage: _mockEngine.Log);
479string unzippedFilePath = Path.Combine(destination.Path, executableName);
WriteCodeFragment_Tests.cs (9)
89string file = Path.Combine(Path.GetTempPath(), "CombineFileDirectory.tmp");
108string expectedFile = Path.Combine(folder.ItemSpec, file.ItemSpec);
127TaskItem file = new TaskItem(Path.Combine(env.CreateFolder(folderPath: null, createFolder: false).Path, "File.tmp"));
175string folder = Path.Combine(Path.GetTempPath(), "foo" + Path.DirectorySeparatorChar);
176string file = Path.Combine(folder, "CombineFileDirectory.tmp");
197string file = Path.Combine(Path.GetTempPath(), "NoAttributesShouldEmitNoFile.tmp");
224string file = Path.Combine(Path.GetTempPath(), "NoAttributesShouldEmitNoFile.tmp");
286string file = Path.Combine(Path.GetTempPath(), "OneAttribute.tmp");
415string file = Path.Combine(Path.GetTempPath(), "OneAttribute.tmp");
XslTransformation_Tests.cs (14)
863var testingDocsDir = Path.Combine("TestDocuments", "Fdl2Proto");
865xmlPaths = new TaskItem[] { new TaskItem(Path.Combine(testingDocsDir, "sila.xml")) };
866xslPath = new TaskItem(Path.Combine(testingDocsDir, "fdl2proto.xsl"));
883using (StreamReader sr = new StreamReader(Path.Combine(testingDocsDir, "expected.proto")))
911string doubleTypePath = Path.Combine(dir, "double.dll");
950var otherXmlPath = new TaskItem(Path.Combine(dir, Guid.NewGuid().ToString()));
1051var otherXslPath = new TaskItem(Path.Combine(dir, Guid.NewGuid().ToString() + ".xslt"));
1058var myXmlPath1 = new TaskItem(Path.Combine(dir, "a.xml"));
1065var myXmlPath2 = new TaskItem(Path.Combine(dir, "b.xml"));
1108dir = Path.Combine(Path.GetTempPath(), DateTime.Now.Ticks.ToString());
1112xmlPaths = new TaskItem[] { new TaskItem(Path.Combine(dir, "doc.xml")) };
1113xslPath = new TaskItem(Path.Combine(dir, "doc.xslt"));
1114xslCompiledPath = new TaskItem(Path.Combine(dir, "doc.dll"));
1115outputPaths = new TaskItem[] { new TaskItem(Path.Combine(dir, "testout.xml")) };
Microsoft.Build.UnitTests.Shared (23)
ObjectModelHelpers.cs (10)
147expectedInclude = expectedInclude.Select(i => Path.Combine(testProject.TestRoot, i)).ToArray();
579Assert.True(FileSystems.Default.FileExists(Path.Combine(TempProjectDir, fileRelativePath)), message);
739project.FullPath = Path.Combine(TempProjectDir, "Temporary" + guid.ToString("N") + ".csproj");
843s_tempProjectDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
905string fullFilePath = Path.Combine(TempProjectDir, fileRelativePath);
982string projectFileFullPath = Path.Combine(TempProjectDir, projectFileRelativePath);
1017string projectFileFullPath = Path.Combine(TempProjectDir, projectFileRelativePath);
1629var projectDir = Path.Combine(root, relativePathFromRootToProject);
1632createdProjectFile = Path.Combine(projectDir, "build.proj");
1642return Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Microsoft.Build.Utilities.Core (98)
FileUtilities.cs (9)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
492return NormalizePath(Path.Combine(directory, file));
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
812string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
890var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1338return paths.Aggregate(root, Path.Combine);
1510string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
FrameworkLocationHelper.cs (17)
443? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
453? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
463? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV30)
473? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV35)
483? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV40)
493? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV45)
503? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
513? Path.Combine(NativeMethodsShared.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
594Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
814var frameworkPath = Path.Combine(NativeMethodsShared.FrameworkBasePath, prefix ?? string.Empty);
824return Path.Combine(complusInstallRoot, complusVersion);
965? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
966: Path.Combine(NativeMethodsShared.FrameworkBasePath, "xbuild-frameworks");
1125string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1435(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, NativeMethodsShared.IsWindows ? "MSBuild.exe" : "mcs.exe")) &&
1436!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1468frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
ToolLocationHelper.cs (37)
663string legacyWindowsMetadataLocation = Path.Combine(sdkRoot, "Windows Metadata");
1223return Path.Combine(sdkLocation, folderName);
1237: Path.Combine(matchingSdk.Path, folderName);
1435var folders = string.IsNullOrEmpty(subFolder) ? vsInstallFolders : vsInstallFolders.Select(i => Path.Combine(i, subFolder));
1500string fullPath = Path.Combine(root, file);
1765if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
1839if (legacyMsCorlib20Path != null && FileSystems.Default.FileExists(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll")))
1856if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
2552string pathToSDKManifest = Path.Combine(sdkVersionDirectory.FullName, "SDKManifest.xml");
2627string platformSDKDirectory = Path.Combine(rootPathWithIdentifier.FullName, version);
2628string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2651string sdkFolderPath = Path.Combine(platformSDKDirectory, "ExtensionSDKs");
2746string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2824string sdkManifestFileLocation = Path.Combine(directoryName, "SDKManifest.xml");
2902string localAppdataFolder = Path.Combine(userLocalAppData, "Microsoft SDKs");
2909string defaultProgramFilesLocation = Path.Combine(
3027string platformsRoot = Path.Combine(sdk.Path, platformsFolderName);
3055string pathToPlatformManifest = Path.Combine(platformVersion.FullName, "Platform.xml");
3114string redistListFolder = Path.Combine(path, "RedistList");
3115string redistFilePath = Path.Combine(redistListFolder, "FrameworkList.xml");
3199pathToReturn = Path.Combine(pathToReturn, includeFramework);
3348pathToSdk = Path.Combine(pathToSdk, "x64");
3351pathToSdk = Path.Combine(pathToSdk, "ia64");
3359string filePath = Path.Combine(pathToSdk, fileName);
3475pathToSdk = Path.Combine(pathToSdk, "bin");
3516pathToSdk = Path.Combine(pathToSdk, "x86");
3519pathToSdk = Path.Combine(pathToSdk, "x64");
3527string filePath = Path.Combine(pathToSdk, fileName);
3590toolPath = Path.Combine(toolPath, fileName);
3620return pathToFx == null ? null : Path.Combine(pathToFx, fileName);
3628public static string GetPathToSystemFile(string fileName) => Path.Combine(PathToSystem, fileName);
3860string frameworkIdentifierPath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3918string frameworkProfilePath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3919frameworkProfilePath = Path.Combine(frameworkProfilePath, frameworkVersion);
3920frameworkProfilePath = Path.Combine(frameworkProfilePath, "Profiles");
3965string dotNextFx30RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
3972string dotNextFx35RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
Microsoft.Build.Utilities.UnitTests (1451)
ToolLocationHelper_Tests.cs (157)
70string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
78string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
79string referenceDirectory = Path.Combine(tempDirectory, Path.Combine("References", "Foo", "Bar"));
84File.WriteAllText(Path.Combine(referenceDirectory, "One.winmd"), "First");
85File.WriteAllText(Path.Combine(referenceDirectory, "Two.winmd"), "Second");
86File.WriteAllText(Path.Combine(referenceDirectory, "Three.winmd"), "Third");
102string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
109File.WriteAllText(Path.Combine(referenceDirectory, "One.winmd"), "First");
137returnValue.ShouldBe(Path.Combine(sdkRootPath, @"DesignTime\CommonConfiguration\Neutral"));
163returnValue.ShouldBe(Path.Combine(sdkRootPath, "UnionMetadata"));
170string platformRootFolder = Path.Combine(Path.GetTempPath(), @"MockSDK");
171string sdkRootFolder = Path.Combine(platformRootFolder, @"Windows Kits\10");
172string platformFolder = Path.Combine(sdkRootFolder, @"Platforms\UAP\10.0.14944.0");
173string platformFilePath = Path.Combine(platformFolder, "Platform.xml");
174string sdkManifestFilePath = Path.Combine(sdkRootFolder, "SDKManifest.xml");
231string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
256string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
281string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
287File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "");
307string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
313File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "Garbaggggge");
335string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSFN40");
336string temp35Directory = Path.Combine(tempDirectory, "bin");
337string temp40Directory = Path.Combine(temp35Directory, "NETFX 4.0 Tools");
338string toolPath = Path.Combine(temp35Directory, "MyTool.exe");
339string toolPath40 = Path.Combine(temp40Directory, "MyTool.exe");
403string testPath = Path.Combine(tempPath, "HighestVersionOfTargetFrameworkIdentifierRootNoVersions");
422string testPath = Path.Combine(tempPath, "HighestVersionOfTargetFrameworkIdentifierRootMultipleVersions");
454string tempDirectory = Path.Combine(Path.GetTempPath(), "VGPTDNFSF40");
455string temp35Directory = Path.Combine(tempDirectory, "bin");
456string temp40Directory = Path.Combine(temp35Directory, "NETFX 4.0 Tools");
457string toolPath = Path.Combine(temp35Directory, "MyTool.exe");
458string toolPath40 = Path.Combine(temp40Directory, "MyTool.exe");
542path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86dbg"));
554Path.Combine("{runtime-base}", "v1.3.x86dbg"), // Simulate "Orcas" as the current runtime.}
559path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86fre"));
571Path.Combine("{runtime-base}", "v1.1.x86dbg"), // Simulate "Everett" as the current runtime.
577path.ShouldBe(Path.Combine("{runtime-base}", "v1.2.x86fre"));
589Path.Combine(@"{runtime-base}", "v1.1"), // Simulate "everett" as the current runtime
607string fakeWhidbeyPath = Path.Combine(tempPath, "v2.0.50224");
608string fakeEverettPath = Path.Combine(tempPath, "v1.1.43225");
695string tv12path = Path.Combine(ProjectCollection.GlobalProjectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion).ToolsPath, MSBuildExeName);
718string tv12path = Path.Combine(Path.GetFullPath(toolsPath32.EvaluatedValue), "msbuild.exe");
919string pathToSdk35InstallRoot = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v7.0A\");
920string pathToSdkV4InstallRootOnVS10 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v7.0A\");
921string pathToSdkV4InstallRootOnVS11 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v8.0A\");
925if (!Directory.Exists(Path.Combine(pathToSdkV4InstallRootOnVS11, "bin")))
931string pathToSdkV4InstallRootOnVS12 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v8.1A\");
939string pathToSdkV4InstallRootOnVS14 = Path.Combine(FrameworkLocationHelper.programFiles32, @"Microsoft SDKs\Windows\v10.0A\");
1276string expectedPath = Path.Combine(targetFrameworkRootPath, targetFrameworkIdentifier);
1277expectedPath = Path.Combine(expectedPath, "v" + targetFrameworkVersion);
1278expectedPath = Path.Combine(expectedPath, "Profile");
1279expectedPath = Path.Combine(expectedPath, targetFrameworkProfile);
1294string expectedPath = Path.Combine(targetFrameworkRootPath, targetFrameworkIdentifier);
1295expectedPath = Path.Combine(expectedPath, "v" + targetFrameworkVersion);
1396string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsChain");
1399string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1401string redist40 = Path.Combine(redist40Directory, "FrameworkList.xml");
1409string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1411string expectedChainedPath = Path.Combine(tempDirectory, "v4.0");
1438string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoInclude");
1441string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1446string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1468string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoInclude");
1471string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1476string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1498string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsNoFileList");
1501string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1506string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.1"));
1527string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistExistsBadFile");
1530string redist40 = Path.Combine(redist40Directory, "FrameworkList.xml");
1536string path = ToolLocationHelper.ChainReferenceAssemblyPath(Path.Combine(tempDirectory, "v4.0"));
1558string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistPointsToInvalidInclude");
1561string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1562string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1594string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistInvalidPathChars");
1597string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1598string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1628string tempDirectory = Path.Combine(Path.GetTempPath(), "ChainReferenceAssembliesRedistPathTooLong");
1631string redist41 = Path.Combine(redist41Directory, "FrameworkList.xml");
1632string tempDirectoryPath = Path.Combine(tempDirectory, "v4.1");
1671string tempDirectory = Path.Combine(Path.GetTempPath(), "GetPathToReferenceAssembliesWithRootGoodWithChain");
1674string framework41redistDirectory = Path.Combine(framework41Directory, "RedistList");
1675string framework41RedistList = Path.Combine(framework41redistDirectory, "FrameworkList.xml");
1678string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1679string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1682string framework39redistDirectory = Path.Combine(framework39Directory, "RedistList");
1683string framework39RedistList = Path.Combine(framework39redistDirectory, "FrameworkList.xml");
1736string tempDirectory = Path.Combine(Path.GetTempPath(), "DisplayNameGeneration");
1740string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1741string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1745string framework39redistDirectory = Path.Combine(framework39Directory, "RedistList");
1746string framework39RedistList = Path.Combine(framework39redistDirectory, "FrameworkList.xml");
1793string tempDirectory = Path.Combine(Path.GetTempPath(), "GetPathToReferenceAssembliesWithRootCircularReference");
1797string framework41redistDirectory = Path.Combine(framework41Directory, "RedistList");
1798string framework41RedistList = Path.Combine(framework41redistDirectory, "FrameworkList.xml");
1802string framework40redistDirectory = Path.Combine(framework40Directory, "RedistList");
1803string framework40RedistList = Path.Combine(framework40redistDirectory, "FrameworkList.xml");
1975string combinedPath = Path.Combine(programFiles32, pathToCombineWith);
2507string rootDir = Path.Combine(env.DefaultTestDirectory.Path, "framework-root");
2536string customFrameworkRootPath = Path.Combine(env.DefaultTestDirectory.Path, "framework-root");
2559string rootDir = Path.Combine(env.CreateFolder().Path, "framework-root");
2560string fallbackPath = Path.Combine(env.CreateFolder().Path, "framework-root");
2590string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2603string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2620string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2637string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2652string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2669string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
2732File.WriteAllText(Path.Combine(redistPath, "FrameworkList.xml"), string.Format(frameworkListXml, frameworkName));
2733File.WriteAllText(Path.Combine(asmPath, "mscorlib.dll"), string.Empty);
3134string frameworkPath = Path.Combine(tmpRootDirectory, frameworkPathPattern);
3135string manifestFile = Path.Combine(frameworkPath, "SDKManifest.xml");
3137string frameworkPath2 = Path.Combine(tmpRootDirectory, frameworkPathPattern2);
3138string manifestFile2 = Path.Combine(frameworkPath, "SDKManifest.xml");
3281string manifestPath = Path.Combine(Path.GetTempPath(), "ManifestTmp");
3287string manifestFile = Path.Combine(manifestPath, "SDKManifest.xml");
3416string manifestPath = Path.Combine(Path.GetTempPath(), "ManifestTmp");
3422string manifestFile = Path.Combine(manifestPath, "SDKManifest.xml");
3546string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetInstalledSDKLocations");
3578File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), "HI");
3579File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "HI");
3580string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3615string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetInstalledSDKLocations2");
3650File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), platformSDKManifestContents);
3651File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "HI");
3652string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
3685string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetInstalledSDKLocations3");
3728folderKey.SetValue("", Path.Combine(testDirectoryRoot, sdkDirectory));
3731folderKey.SetValue("", Path.Combine(testDirectoryRoot, platformDirectory));
3741File.WriteAllText(Path.Combine(sdkDirectory, "SDKManifest.xml"), "HI");
3742File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), platformSDKManifestContents);
3744string testProjectFile = Path.Combine(testDirectoryRoot, "testproject.csproj");
4110string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyFindRootFolderWhereAllFilesExist");
4111string[] rootDirectories = new string[] { Path.Combine(testDirectoryRoot, "Root1"), Path.Combine(testDirectoryRoot, "Root2") };
4116string subdir = Path.Combine(rootDirectories[i], "Subdir");
4119File.Create(Path.Combine(rootDirectories[i], "file1.txt")).Close();
4120File.Create(Path.Combine(subdir, fileInSubDir)).Close();
4139string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetPreOneCoreSDKPropsLocation");
4178File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), "Test");
4215string testDirectoryRoot = Path.Combine(Path.GetTempPath(), "VerifyGetOneCoreSDKPropsLocation");
4256File.WriteAllText(Path.Combine(platformDirectory, "SDKManifest.xml"), "Test");
4257File.WriteAllText(Path.Combine(platformDirectory2, "Platform.xml"), "Test");
4422string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory");
4545string tempPath = Path.Combine(Path.GetTempPath(), "FakeSDKDirectory2");
4680return Path.Combine(_fakeStructureRoot, "Windows\\v1.0\\ExtensionSDKs\\MyAssembly\\1.0");
4686return Path.Combine(_fakeStructureRoot, "Windows\\v1.0\\ExtensionSDKs\\MyAssembly\\1.0");
4691return Path.Combine(_fakeStructureRoot, "Windows\\1.0\\ExtensionSDKs\\MyAssembly\\2.0");
4702return Path.Combine(_fakeStructureRoot, "MyPlatform\\5.0");
4707return Path.Combine(_fakeStructureRoot, "SomeOtherPlace\\MyPlatformOtherLocation\\4.0");
4712return Path.Combine(_fakeStructureRoot, "Windows Kits\\6.0");
4717return Path.Combine(_fakeStructureRoot, "MyPlatform\\9.0");
4722return Path.Combine(_fakeStructureRoot, "SomeOtherPlace\\MyPlatformOtherLocation\\4.0\\ExtensionSDKs\\MyAssembly\\1.0");
4727return Path.Combine(_fakeStructureRoot, "Windows\\1.0");
4735return Path.Combine(_fakeStructureRoot, "Windows\\2.0\\ExtensionSDKs\\MyAssembly\\3.0");
4740return Path.Combine(_fakeStructureRoot, "Windows\\2.0");
TrackedDependencies\FileTrackerTests.cs (52)
119string testDirectory = Path.Combine(Directory.GetCurrentDirectory(), "FileTrackerNoUIDll");
120string testTrackerPath = Path.Combine(testDirectory, Path.GetFileName(s_defaultTrackerPath));
897string localLowApplicationDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "AppData\\LocalLow");
923testFile = Path.Combine(applicationDataPath, "blah.log");
927testFile = Path.Combine(localApplicationDataPath, "blah.log");
931testFile = Path.Combine(localLowApplicationDataPath, "blah.log");
935testFile = Path.Combine(tempShortPath, "blah.log");
939testFile = Path.Combine(tempLongPath, "blah.log");
1424string appName = Path.Combine(Environment.SystemDirectory, "findstr.exe");
1723string testDir = Path.Combine(Path.GetTempPath(), "CreateFileDoesntRecordWriteIfNotWrittenTo");
1724string readFile = Path.Combine(testDir, "readfile.txt");
1750FileTrackerTestHelper.AssertFoundStringInTLog(readFile.ToUpperInvariant(), Path.Combine(testDir, tlogRootName + ".read.1.tlog"));
1751FileTrackerTestHelper.AssertDidntFindStringInTLog(readFile.ToUpperInvariant(), Path.Combine(testDir, tlogRootName + ".write.1.tlog"));
1766string testDir = Path.Combine(Path.GetTempPath(), "CopyAlwaysRecordsWrites");
1768string copyFromFile = Path.Combine(testDir, "copyFrom.txt");
1769string copyToFile = Path.Combine(testDir, "copyTo.txt");
1770string tlogReadFile = Path.Combine(testDir, tlogRootName + ".read.1.tlog");
1771string tlogWriteFile = Path.Combine(testDir, tlogRootName + ".write.1.tlog");
1835string testDir = Path.Combine(Path.GetTempPath(), "MoveAlwaysRecordsWrites");
1837string moveFromFile = Path.Combine(testDir, "MoveFrom.txt");
1838string moveToFile = Path.Combine(testDir, "MoveTo.txt");
1839string moveToFile2 = Path.Combine(testDir, "MoveTo2.txt");
1840string tlogDeleteFile = Path.Combine(testDir, tlogRootName + ".delete.1.tlog");
1841string tlogWriteFile = Path.Combine(testDir, tlogRootName + ".write.1.tlog");
1908string testDir = Path.Combine(Path.GetTempPath(), "LaunchMultipleOfSameTool_SameCommand");
1915string originalFindstrPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "findstr.exe");
1916string destinationFindstrPath = Path.Combine(testDir, "abc.exe");
1919string tempFilePath = Path.Combine(testDir, "bar.txt");
1949string testDir = Path.Combine(Path.GetTempPath(), "LaunchMultipleOfSameTool_DifferentCommands1");
1955string originalFindstrPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "findstr.exe");
1956string destinationFindstrPath = Path.Combine(testDir, "abc.exe");
1959string tempFilePath = Path.Combine(testDir, "bar.txt");
1990string testDir = Path.Combine(Path.GetTempPath(), "LaunchMultipleOfSameTool_DifferentCommands2");
2001string tempFilePath = Path.Combine(testDir, "bar.txt");
2004string originalFindstrPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "findstr.exe");
2005string destinationFindstrPath = Path.Combine(testDir, "abc.exe");
2040string testDir = Path.Combine(Path.GetTempPath(), "LaunchMultipleOfSameTool_DifferentCommands3");
2051string originalFindstrPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "findstr.exe");
2052string destinationFindstrPath = Path.Combine(testDir, "findstr.exe");
2055string tempFilePath = Path.Combine(testDir, "bar.txt");
2092string testDir = Path.Combine(Path.GetTempPath(), "LaunchMultipleOfSameTool_DifferentCommands4");
2104string tempFilePath = Path.Combine(testDir, "bar.txt");
2107string originalFindstrPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "findstr.exe");
2108string destinationFindstrPath = Path.Combine(testDir, "abc.exe");
2146string testDir = Path.Combine(Path.GetTempPath(), "LaunchMultipleDifferentTools");
2156string tempFilePath = Path.Combine(testDir, "bar.txt");
2159string originalFindstrPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "findstr.exe");
2160string destinationFindstrPath = Path.Combine(testDir, "abc.exe");
2195string testDir = Path.Combine(Path.GetTempPath(), "LaunchMultipleOfSameTool_DifferentContexts");
2201string originalFindstrPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "findstr.exe");
2202string destinationFindstrPath = Path.Combine(testDir, "abc.exe");
2205string tempFilePath = Path.Combine(testDir, "bar.txt");
TrackedDependencies\TrackedDependenciesTests.cs (1230)
30string tempTestFilesPath = Path.Combine(tempPath, "TestFiles");
89Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.[ID]-cvtres.write.[ID].tlog")
94Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.[ID]-cvtres.read.[ID].tlog")
99Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.[ID]-cvtres.write.[ID].tlog")
104Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.[ID].write.[ID].tlog").ToUpperInvariant()
108Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.[ID].read.[ID].tlog").ToUpperInvariant()
112Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.[ID].write.[ID].tlog").ToUpperInvariant()
116Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link2345.write.[ID].tlog").ToUpperInvariant()
120Path.Combine(Directory.GetCurrentDirectory(), "link.[ID].write.[ID].tlog").ToUpperInvariant()
124Path.Combine(Directory.GetCurrentDirectory(), "Debug\\a.1234.b\\link.[ID].write.[ID].tlog")
129Path.Combine(Directory.GetCurrentDirectory(), "link.write.tlog").ToUpperInvariant()
133Path.Combine(Directory.GetCurrentDirectory(), "link with spaces.write.[ID].tlog").ToUpperInvariant()
137Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link2345.write.[ID].tlog")
139Path.Combine(Directory.GetCurrentDirectory(), "link.write.tlog").ToUpperInvariant()
143Path.Combine(Directory.GetCurrentDirectory(), "link.write.tlog1234").ToUpperInvariant()
147Path.Combine(Directory.GetCurrentDirectory(), "1234link.write.tlog").ToUpperInvariant()
151Path.Combine(Directory.GetCurrentDirectory(), "link-1234.write.tlog").ToUpperInvariant()
159Path.Combine(Directory.GetCurrentDirectory(), "a\\").ToUpperInvariant()
163Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.45\\67.write.[ID].tlog")
168Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.4567.write.1.tlog\\").ToUpperInvariant()
178Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.write.[ID].tlog").ToUpperInvariant() +
180Path.Combine(Directory.GetCurrentDirectory(),
182Path.Combine(Directory.GetCurrentDirectory(), "Debug\\link.[ID].write.[ID].tlog").ToUpperInvariant()
190Path.Combine(Directory.GetCurrentDirectory(), "cl.write.[ID].tlog").ToUpperInvariant() + "|" +
191Path.Combine(Directory.GetCurrentDirectory(), "link.[ID]-write.[ID].tlog").ToUpperInvariant()
199Path.Combine(Directory.GetCurrentDirectory(), "cl.write.[ID].tlog").ToUpperInvariant() + "|" +
200Path.Combine(Directory.GetCurrentDirectory(), "link.[ID]-write.[ID].tlog").ToUpperInvariant()
208Path.Combine(Directory.GetCurrentDirectory(), "a\\link.[ID]-write.[ID].tlog")
210Path.Combine(Directory.GetCurrentDirectory(), "b\\link.[ID]-write.[ID].tlog")
212Path.Combine(Directory.GetCurrentDirectory(), "cl.write.[ID].tlog").ToUpperInvariant()
216Path.Combine(Directory.GetCurrentDirectory(), "foo\\.tlog").ToUpperInvariant()
220Path.Combine(Directory.GetCurrentDirectory(), "foo\\1.tlog").ToUpperInvariant()
224Path.Combine(Path.GetPathRoot(Directory.GetCurrentDirectory()), "1.tlog").ToUpperInvariant()
228Path.Combine(Directory.GetCurrentDirectory(), ".[ID].tlog").ToUpperInvariant()
232Path.Combine(Directory.GetCurrentDirectory(), "-2").ToUpperInvariant()
236Path.Combine(Directory.GetCurrentDirectory(), ".2").ToUpperInvariant()
240Path.Combine(Directory.GetCurrentDirectory(), "2-").ToUpperInvariant()
244Path.Combine(Directory.GetCurrentDirectory(), "2").ToUpperInvariant()
248Path.Combine(Path.GetPathRoot(Directory.GetCurrentDirectory()), ".[ID].tlog").ToUpperInvariant()
299DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
300DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
301DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
303File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
305Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
306Path.GetFullPath(Path.Combine("TestFiles", "oNe.h")),
311DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
315DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
316DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
318DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
333DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
334DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
335DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
338File.Delete(Path.Combine("TestFiles", "one.tlog"));
342DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
343DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
345DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
352Assert.Equal(outofdate[0].ItemSpec, Path.Combine("TestFiles", "one.cpp"));
361DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
362DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
363DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
364DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tlog"), "");
368DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
369DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
371DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
378Assert.Equal(outofdate[0].ItemSpec, Path.Combine("TestFiles", "one.cpp"));
415DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
416DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
417DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
419File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "", "^FOO" });
424DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
425DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
427DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
441DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
442DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
443DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
445File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "^FOO", "", "FOO" });
450DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
451DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
453DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
467DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
468DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
469DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
471File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "^FOO", "FOO", "", "^BAR", "BAR" });
476DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
477DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
479DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
493DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
494DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
495DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
497File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "^", "FOO" });
502DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
503DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
505DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
561File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] { "", "^FOO" });
566DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
578File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] { "^FOO", "", "FOO" });
583DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
595File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] { "^FOO", "FOO", "", "^BAR", "BAR" });
600DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
612File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] { "^", "FOO" });
617DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
628DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
629DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
630DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
634File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
636Path.GetFullPath(Path.Combine("TestFiles", "foo.cpp")),
637Path.GetFullPath(Path.Combine("TestFiles", "foo.h")),
643DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
647DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
648DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
650DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
657Assert.Equal(outofdate[0].ItemSpec, Path.Combine("TestFiles", "one.cpp"));
665DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
666DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
667DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
668DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
669DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
671File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
673Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
674Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
675Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
676Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
681DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
685DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
686DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
688DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
695Assert.Equal(outofdate[0].ItemSpec, Path.Combine("TestFiles", "one.cpp"));
703DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
704DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
705DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
706DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
707DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
709File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
711"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
712Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
713Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
714Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
717File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
719"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
720Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
721Path.GetFullPath(Path.Combine("TestFiles", "sometempfile.obj"))
724CanonicalTrackedOutputFiles compactOutputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
725compactOutputs.RemoveDependenciesFromEntryIfMissing(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
731DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
732DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
738compactInputs.RemoveDependenciesFromEntryIfMissing(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
742DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
746DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
747DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
763DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
764DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
765DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
766DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
767DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
769File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
771"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
772Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
773Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
774Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
775"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
776Path.GetFullPath(Path.Combine("TestFiles", "two1.h")),
777Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
780File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
782"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
783Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
784Path.GetFullPath(Path.Combine("TestFiles", "sometempfile.obj")),
785"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
786Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
787Path.GetFullPath(Path.Combine("TestFiles", "sometempfile2.obj"))
790CanonicalTrackedOutputFiles compactOutputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
791compactOutputs.RemoveDependenciesFromEntryIfMissing(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
796DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
797DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
803compactInputs.RemoveDependenciesFromEntryIfMissing(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
807DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
811DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
812DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
818Assert.Single(writtenOutputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))]);
819Assert.Equal(4, writtenInputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].Count);
821Assert.Equal(2, writtenOutputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Count);
822Assert.Equal(3, writtenInputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Count);
830DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
831DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
832DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
833DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
834DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
835DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tlh"), "");
836DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tli"), "");
838File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
840"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
841Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
842Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
843Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
844Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")),
845Path.GetFullPath(Path.Combine("TestFiles", "one3.tlh")),
846Path.GetFullPath(Path.Combine("TestFiles", "one3.tli")),
849File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
851"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
852Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
853Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
854Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
855Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")),
856Path.GetFullPath(Path.Combine("TestFiles", "one3.tlh")),
857Path.GetFullPath(Path.Combine("TestFiles", "one3.tli")),
860CanonicalTrackedOutputFiles compactOutputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
861compactOutputs.RemoveDependencyFromEntry(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
865DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
867Assert.False(writtenOutputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
871DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
872DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
878compactInputs.RemoveDependencyFromEntry(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
883DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
884DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
890Assert.False(writtenInputs.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
898DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
899DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
900DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
901DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
902DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
903DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tlh"), "");
904DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tli"), "");
907string rootingMarker = Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"));
909File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
912Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
913Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
914Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
915Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")),
916Path.GetFullPath(Path.Combine("TestFiles", "one3.tlh")),
917Path.GetFullPath(Path.Combine("TestFiles", "one3.tli")),
920File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
923Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
924Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
925Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
926Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")),
927Path.GetFullPath(Path.Combine("TestFiles", "one3.tlh")),
928Path.GetFullPath(Path.Combine("TestFiles", "one3.tli")),
931CanonicalTrackedOutputFiles compactOutputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
932compactOutputs.RemoveDependencyFromEntry(new[] { new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) }, new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
936DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
938Assert.False(writtenOutputs.DependencyTable[rootingMarker].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
942DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
943new[] { new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) },
949compactInputs.RemoveDependencyFromEntry(new[] { new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) }, new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
954DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
955new[] { new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))), new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) },
961Assert.False(writtenInputs.DependencyTable[rootingMarker].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one3.obj"))));
969DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
970DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
971DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
972DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
973DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
974DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tlh"), "");
975DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tli"), "");
978string rootingMarker1 = Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"));
979string rootingMarker2 = Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"));
980string rootingMarker3 = Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"));
982File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
985Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
986Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
987Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
989Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")),
990Path.GetFullPath(Path.Combine("TestFiles", "one3.tlh")),
991Path.GetFullPath(Path.Combine("TestFiles", "one3.tli")),
993Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
994Path.GetFullPath(Path.Combine("TestFiles", "one2.obj")),
997CanonicalTrackedOutputFiles outputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
1003outputs.RemoveRootsWithSharedOutputs(new ITaskItem[] { new TaskItem(Path.Combine("TestFiles", "one.cpp")), new TaskItem(Path.Combine("TestFiles", "three.cpp")), new TaskItem(Path.Combine("TestFiles", "two.cpp")) });
1015DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1016DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1017DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1018DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1019DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1020DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tlh"), "");
1021DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.tli"), "");
1024string rootingMarker1 = Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"));
1025string rootingMarker2 = Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"));
1026string rootingMarker3 = Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"));
1028File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
1031Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1032Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1033Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1035Path.GetFullPath(Path.Combine("TestFiles", "one3.obj")),
1036Path.GetFullPath(Path.Combine("TestFiles", "one3.tlh")),
1037Path.GetFullPath(Path.Combine("TestFiles", "one3.tli")),
1039Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1040Path.GetFullPath(Path.Combine("TestFiles", "one2.obj")),
1043CanonicalTrackedOutputFiles outputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
1049outputs.RemoveRootsWithSharedOutputs(new ITaskItem[] { new TaskItem(Path.Combine("TestFiles", "four.cpp")), new TaskItem(Path.Combine("TestFiles", "one.cpp")), new TaskItem(Path.Combine("TestFiles", "three.cpp")), new TaskItem(Path.Combine("TestFiles", "two.cpp")) });
1061DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1062DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1063DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1064DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1065DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1067File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1069"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1070Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1071Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1072Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1076string missing = Path.GetFullPath(Path.Combine("TestFiles", "one2.h"));
1081DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1082DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1084DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1093Assert.True(d.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(missing));
1103DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1104DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1106DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1116Assert.False(d.DependencyTable.ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
1124DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1125DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1126DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1127DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1128DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
1130DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1131DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
1133File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
1135"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1136Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1137Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1138Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1139"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
1140Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1141Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1144File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
1146"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1147Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
1148"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
1149Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
1150Path.GetFullPath(Path.Combine("TestFiles", "sometempfile2.obj"))
1153string missing = Path.GetFullPath(Path.Combine("TestFiles", "sometempfile2.obj"));
1155CanonicalTrackedOutputFiles compactOutputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
1165compactOutputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
1169DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
1170new[] { new TaskItem(Path.Combine("TestFiles", "one.cpp")), new TaskItem(Path.Combine("TestFiles", "two.cpp")) },
1187DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1188DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1189DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1190DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1191DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1193File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1195"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1196Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1197Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1198Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1202string missing = Path.GetFullPath(Path.Combine("TestFiles", "one2.h"));
1207DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1208DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1210DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1219Assert.True(d.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))].ContainsKey(missing));
1232DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1233DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1235DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1249DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1250DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1251DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1252DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1253DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1255DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
1256DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1257DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
1258DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
1259DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
1262File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1264"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1265Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1266Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1267Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1268"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
1269Path.GetFullPath(Path.Combine("TestFiles", "two1.h")),
1270Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
1271Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
1276DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1278DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1282DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1284new TaskItem(Path.Combine("TestFiles", "one.cpp")),
1285new TaskItem(Path.Combine("TestFiles", "two.cpp")),
1289new TaskItem(Path.Combine("TestFiles", "one.obj")),
1290new TaskItem(Path.Combine("TestFiles", "two.obj")),
1298Assert.True((outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp") && outofdate[1].ItemSpec == Path.Combine("TestFiles", "two.cpp")) ||
1299(outofdate[1].ItemSpec == Path.Combine("TestFiles", "one.cpp") && outofdate[0].ItemSpec == Path.Combine("TestFiles", "two.cpp")));
1314DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1315DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1316DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1317DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1318DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1320DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
1321DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1322DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
1323DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
1324DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
1327File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1329"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1330Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1331Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1332Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1333"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
1334Path.GetFullPath(Path.Combine("TestFiles", "two1.h")),
1335Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
1336Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
1341DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1343DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1347DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1349new TaskItem(Path.Combine("TestFiles", "one.cpp")),
1350new TaskItem(Path.Combine("TestFiles", "two.cpp")),
1354new TaskItem(Path.Combine("TestFiles", "one.obj")),
1355new TaskItem(Path.Combine("TestFiles", "two.obj")),
1363Assert.True((outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp") && outofdate[1].ItemSpec == Path.Combine("TestFiles", "two.cpp")) ||
1364(outofdate[1].ItemSpec == Path.Combine("TestFiles", "one.cpp") && outofdate[0].ItemSpec == Path.Combine("TestFiles", "two.cpp")));
1377DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1378DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1379DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1380DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1381DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1383DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
1384DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
1385DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
1386DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
1389File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1391Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1392Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1393Path.GetFullPath(Path.Combine("TestFiles", "one2.h")), // the shared dependency
1394Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1395Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
1396Path.GetFullPath(Path.Combine("TestFiles", "two1.h")),
1397Path.GetFullPath(Path.Combine("TestFiles", "one2.h")), // the shared dependency
1398Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
1403DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1407DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1409new TaskItem(Path.Combine("TestFiles", "one.cpp")),
1410new TaskItem(Path.Combine("TestFiles", "two.cpp")),
1414new TaskItem(Path.Combine("TestFiles", "one.obj")),
1415new TaskItem(Path.Combine("TestFiles", "two.obj")),
1423Assert.True((outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp") && outofdate[1].ItemSpec == Path.Combine("TestFiles", "two.cpp")) ||
1424(outofdate[1].ItemSpec == Path.Combine("TestFiles", "one.cpp") && outofdate[0].ItemSpec == Path.Combine("TestFiles", "two.cpp")));
1432DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1433DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1434DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1435DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1436DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1438File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1440Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1441Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1443Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1444Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1445Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1450DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1454DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1455DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1457DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1464Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
1472DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1473DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1474DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1475DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1476DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1478File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1480Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1481Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1483Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1484Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1485Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1490DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1494DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1495DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1497DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1504Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
1512DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1513DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1514DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1515DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
1516DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1517DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
1518DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
1521File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1523"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1524Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1526"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")), // this root marker represents the end of the dependencies for one.cpp
1527Path.GetFullPath(Path.Combine("TestFiles", "two1.h")),
1528Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
1529Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
1534DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1538DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1539DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1541DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1555DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1556DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1557DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1558DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1559DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1561File.WriteAllLines(Path.Combine("TestFiles", "one1.tlog"), new[] {
1563"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1564Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1567File.WriteAllLines(Path.Combine("TestFiles", "one2.tlog"), new[] {
1569"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1570Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1571Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1576DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1579new TaskItem(Path.Combine("TestFiles", "one1.tlog")),
1580new TaskItem(Path.Combine("TestFiles", "one2.tlog"))
1586DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1588DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1595Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
1603DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1604DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1605DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1606DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1607DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1609File.WriteAllLines(Path.Combine("TestFiles", "one1.tlog"), new[] {
1611Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1612Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1615File.WriteAllLines(Path.Combine("TestFiles", "one2.tlog"), new[] {
1617Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1618Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1619Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1624DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1627new TaskItem(Path.Combine("TestFiles", "one1.tlog")),
1628new TaskItem(Path.Combine("TestFiles", "one2.tlog"))
1634DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1636DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1643Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
1651DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
1652DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1653DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1655File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1657"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1658Path.GetFullPath(Path.Combine("TestFiles", "one.h")),
1663DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
1667DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
1668DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1670DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1677Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
1685DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1686DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1687DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1688DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1689DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1691File.WriteAllLines(Path.Combine("TestFiles", "one1.tlog"), new[] {
1693"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1694Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1697File.WriteAllLines(Path.Combine("TestFiles", "one2.tlog"), new[] {
1699"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1700Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1701Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1706DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1709new TaskItem(Path.Combine("TestFiles", "one1.tlog")),
1710new TaskItem(Path.Combine("TestFiles", "one2.tlog"))
1716DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1718DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1725Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
1733DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1734DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1735DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1736DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1737DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1738DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
1739DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1740DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
1741DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
1744File.WriteAllLines(Path.Combine("TestFiles", "one1.tlog"), new[] {
1746"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1747Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1749"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
1750Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
1751Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
1756DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1759new TaskItem(Path.Combine("TestFiles", "one1.tlog")),
1760new TaskItem(Path.Combine("TestFiles", "one2.tlog"))
1766DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "two.cpp"))),
1768DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1775Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "two.cpp"));
1783DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1784DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1785DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1786DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1787DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1788DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
1789DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1790DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
1791DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
1794File.WriteAllLines(Path.Combine("TestFiles", "one1.tlog"), new[] {
1796"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1797Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1799"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")), // this root marker represents the end of the dependencies for one.cpp
1800Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
1801Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
1806DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
1809new TaskItem(Path.Combine("TestFiles", "one1.tlog"))
1815DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1817DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1831DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
1832DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1833DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
1834DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
1835DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
1837File.WriteAllLines(Path.Combine("TestFiles", "one1.tlog"), new[] {
1839"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1840Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
1843File.WriteAllLines(Path.Combine("TestFiles", "one2.tlog"), new[] {
1845"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1846Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
1847Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
1852DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
1855new TaskItem(Path.Combine("TestFiles", "one1.tlog")),
1856new TaskItem(Path.Combine("TestFiles", "one2.tlog"))
1862DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
1864DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
1871Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
1880File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1882"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1883Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
1887DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
1889ITaskItem[] outputs = d.OutputsForSource(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
1892Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
1901File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1903"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1904Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
1907File.WriteAllLines(Path.Combine("TestFiles", "two.tlog"), new[] {
1909"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
1910Path.GetFullPath(Path.Combine("TestFiles", "one.pch")),
1914new TaskItem(Path.Combine("TestFiles", "one.tlog")),
1915new TaskItem(Path.Combine("TestFiles", "two.tlog"))
1921ITaskItem[] outputs = d.OutputsForSource(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
1924Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
1925Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "one.pch")));
1934File.Delete(Path.Combine("TestFiles", "one.tlog"));
1937DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
1939ITaskItem[] outputs = d.OutputsForSource(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
1950new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
1951new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
1952new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
1956File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1959Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
1960Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
1961Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
1965DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
1970Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
1971Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
1972Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
1982new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
1983new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
1984new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
1986new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
1987new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
1988new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))),
1989new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "four.cpp"))),
1990new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "five.cpp"))) };
1994File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
1997Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
1998Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
1999Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2001Path.GetFullPath(Path.Combine("TestFiles", "fOUr.obj")),
2002Path.GetFullPath(Path.Combine("TestFiles", "fIve.obj")),
2003Path.GetFullPath(Path.Combine("TestFiles", "sIx.obj")),
2004Path.GetFullPath(Path.Combine("TestFiles", "sEvEn.obj")),
2005Path.GetFullPath(Path.Combine("TestFiles", "EIght.obj")),
2009DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
2014Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fOUr.obj")));
2015Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fIve.obj")));
2016Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sIx.obj")));
2017Assert.True(outputs[3].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sEvEn.obj")));
2018Assert.True(outputs[4].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "EIght.obj")));
2023Assert.True(outputs2[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2024Assert.True(outputs2[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2025Assert.True(outputs2[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2026Assert.True(outputs2[3].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fOUr.obj")));
2027Assert.True(outputs2[4].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fIve.obj")));
2028Assert.True(outputs2[5].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sIx.obj")));
2029Assert.True(outputs2[6].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sEvEn.obj")));
2030Assert.True(outputs2[7].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "EIght.obj")));
2036Assert.True(outputs3[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2037Assert.True(outputs3[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2038Assert.True(outputs3[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2039Assert.True(outputs3[3].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fOUr.obj")));
2040Assert.True(outputs3[4].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fIve.obj")));
2041Assert.True(outputs3[5].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sIx.obj")));
2042Assert.True(outputs3[6].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sEvEn.obj")));
2043Assert.True(outputs3[7].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "EIght.obj")));
2048Assert.True(outputs4[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2049Assert.True(outputs4[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2050Assert.True(outputs4[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2060new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2061new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2062new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
2064new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2065new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2066new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "four.cpp"))),
2067new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "five.cpp"))) };
2069new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2070new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "four.cpp"))),
2071new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2072new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "five.cpp"))) };
2074new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2075new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2076new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "eight.cpp"))),
2077new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
2083File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
2086Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
2087Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2088Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2090Path.GetFullPath(Path.Combine("TestFiles", "fOUr.obj")),
2091Path.GetFullPath(Path.Combine("TestFiles", "fIve.obj")),
2092Path.GetFullPath(Path.Combine("TestFiles", "sIx.obj")),
2093Path.GetFullPath(Path.Combine("TestFiles", "sEvEn.obj")),
2094Path.GetFullPath(Path.Combine("TestFiles", "EIght.obj")),
2098DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
2103Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fOUr.obj")));
2104Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fIve.obj")));
2105Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sIx.obj")));
2106Assert.True(outputs[3].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sEvEn.obj")));
2107Assert.True(outputs[4].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "EIght.obj")));
2112Assert.True(outputs2[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fOUr.obj")));
2113Assert.True(outputs2[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "fIve.obj")));
2114Assert.True(outputs2[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sIx.obj")));
2115Assert.True(outputs2[3].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "sEvEn.obj")));
2116Assert.True(outputs2[4].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "EIght.obj")));
2121Assert.True(outputs3[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2122Assert.True(outputs3[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2123Assert.True(outputs3[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2136new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2137new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2138new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
2152File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
2155Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
2156Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2157Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2161DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
2169Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2170Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2171Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2180new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2181new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2182new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
2186File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
2189Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
2192File.WriteAllLines(Path.Combine("TestFiles", "two.tlog"), new[] {
2195Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2196Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2200new TaskItem(Path.Combine("TestFiles", "one.tlog")),
2201new TaskItem(Path.Combine("TestFiles", "two.tlog"))
2210Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2211Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2212Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2221new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2222new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2223new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
2227File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
2230Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
2231Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2232Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2236DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
2238ITaskItem[] outputs = d.OutputsForSource(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))));
2241Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2242Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2243Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2253File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
2255"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")),
2256Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
2257Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2258Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2262DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))));
2264ITaskItem[] outputs = d.OutputsForSource(new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "four.cpp"))));
2275DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
2276DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
2277DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
2278DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
2279DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
2280DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.cpp"), "");
2282DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
2283DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
2284DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.obj"), "");
2286File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
2288"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2289Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2290Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2291Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2292"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2293Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2294Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2295Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2296"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")),
2297Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2298Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2299Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2304new TaskItem(Path.Combine("TestFiles", "one.cpp")),
2305new TaskItem(Path.Combine("TestFiles", "two.cpp")),
2306new TaskItem(Path.Combine("TestFiles", "three.cpp")),
2312File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
2313"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2314Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
2315"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2316Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2317"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")),
2318Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2321Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
2322Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2323Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2327CanonicalTrackedOutputFiles outputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
2332DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
2344File.Delete(Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2354DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
2364Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "two.cpp"));
2373DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
2374DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
2375DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
2376DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
2377DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
2378DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.cpp"), "");
2380DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
2381DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
2382DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.obj"), "");
2384File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
2386"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2387Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2388Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2389Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2390"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2391Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2392Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2393Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2394"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")),
2395Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2396Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2397Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2402new TaskItem(Path.Combine("TestFiles", "one.cpp")),
2403new TaskItem(Path.Combine("TestFiles", "two.cpp")),
2404new TaskItem(Path.Combine("TestFiles", "three.cpp")),
2408File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
2411Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
2412Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2413Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2417CanonicalTrackedOutputFiles outputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
2420outputs.AddComputedOutputForSourceRoot(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")), Path.GetFullPath(Path.Combine("TestFiles", "one.obj")));
2421outputs.AddComputedOutputForSourceRoot(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")), Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2422outputs.AddComputedOutputForSourceRoot(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")), Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2427DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
2439File.Delete(Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2449DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
2459Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "two.cpp"));
2467if (File.Exists(Path.GetFullPath(Path.Combine("TestFiles", "three.i"))))
2469File.Delete(Path.GetFullPath(Path.Combine("TestFiles", "three.i")));
2473DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
2474DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
2475DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
2476DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
2477DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
2478DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.cpp"), "");
2480DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
2481DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
2482DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.obj"), "");
2484File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
2486"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2487Path.GetFullPath(Path.Combine("TestFiles", "one1.h")).ToUpperInvariant(),
2488Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2489Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2490"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2491Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2492Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2493Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2494"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")),
2495Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2496Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2497Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2502new TaskItem(Path.Combine("TestFiles", "one.cpp")),
2503new TaskItem(Path.Combine("TestFiles", "two.cpp")),
2504new TaskItem(Path.Combine("TestFiles", "three.cpp")),
2508File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
2510"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2511Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
2512"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2513Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2514"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")),
2515Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2519CanonicalTrackedOutputFiles outputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
2522File.Move(Path.GetFullPath(Path.Combine("TestFiles", "three.obj")), Path.GetFullPath(Path.Combine("TestFiles", "three.i")));
2524string threeRootingMarker = FileTracker.FormatRootingMarker(new TaskItem(Path.Combine("TestFiles", "three.cpp")));
2526bool removed = outputs.RemoveOutputForSourceRoot(threeRootingMarker, Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2529outputs.AddComputedOutputForSourceRoot(threeRootingMarker, Path.GetFullPath(Path.Combine("TestFiles", "three.i")));
2534DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
2543Assert.False(outputs.DependencyTable[threeRootingMarker].ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "three.obj"))));
2550File.Delete(Path.GetFullPath(Path.Combine("TestFiles", "three.i")));
2563DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
2564DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
2565DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
2566DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
2567DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.cpp"), "");
2571DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
2572DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
2573DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.obj"), "");
2577Directory.CreateDirectory(Path.Combine("TestFiles", "Foo"));
2582File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
2584"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")).ToUpperInvariant(),
2585Path.GetFullPath(Path.Combine("TestFiles", "one1.h")).ToUpperInvariant(),
2587Path.GetFullPath(Path.Combine("TestFiles", "one3.h")).ToUpperInvariant(),
2588"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")).ToUpperInvariant(),
2589Path.GetFullPath(Path.Combine("TestFiles", "one1.h")).ToUpperInvariant(),
2591Path.GetFullPath(Path.Combine("TestFiles", "one3.h")).ToUpperInvariant(),
2592"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")).ToUpperInvariant(),
2593Path.GetFullPath(Path.Combine("TestFiles", "one1.h")).ToUpperInvariant(),
2595Path.GetFullPath(Path.Combine("TestFiles", "one3.h")).ToUpperInvariant(),
2600new TaskItem(Path.Combine("TestFiles", "one.cpp")),
2601new TaskItem(Path.Combine("TestFiles", "two.cpp")),
2602new TaskItem(Path.Combine("TestFiles", "three.cpp")),
2606File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
2608"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")).ToUpperInvariant(),
2609Path.GetFullPath(Path.Combine("TestFiles", "one.obj")).ToUpperInvariant(),
2610"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")).ToUpperInvariant(),
2611Path.GetFullPath(Path.Combine("TestFiles", "two.obj")).ToUpperInvariant(),
2612"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")).ToUpperInvariant(),
2613Path.GetFullPath(Path.Combine("TestFiles", "three.obj")).ToUpperInvariant(),
2617CanonicalTrackedOutputFiles outputs = new CanonicalTrackedOutputFiles(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))));
2622DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))),
2624new[] { new TaskItem(Path.GetFullPath(Path.Combine("TeSTfiles", "Foo"))) },
2639DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
2640DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
2641DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
2642DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
2643DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
2644DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
2645DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
2646DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
2647DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
2648DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.obj"), "");
2651File.WriteAllLines(Path.Combine("TestFiles", "one1.tlog"), new[] {
2653"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2654Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2657File.WriteAllLines(Path.Combine("TestFiles", "one2.tlog"), new[] {
2659"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2660Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2661Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2664File.WriteAllLines(Path.Combine("TestFiles", "two1.tlog"), new[] {
2666"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2667Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
2668Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
2673DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
2676new TaskItem(Path.Combine("TestFiles", "one1.tlog")),
2677new TaskItem(Path.Combine("TestFiles", "one2.tlog")),
2678new TaskItem(Path.Combine("TestFiles", "two1.tlog"))
2684DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
2686DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
2693Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
2707DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.cpp"))),
2709DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.obj"))),
2716Assert.True(outofdate[0].ItemSpec == Path.Combine("TestFiles", "one.cpp"));
2726DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "two.cpp"))),
2728DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "two.obj"))),
2736Assert.False(d2.DependencyTable.ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
2742DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "two.cpp"))),
2744DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "two.obj"))),
2752Assert.False(d3.DependencyTable.ContainsKey(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))));
2762new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp"))),
2763new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))),
2764new TaskItem(Path.GetFullPath(Path.Combine("TestFiles", "three.cpp"))) };
2770File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
2773Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")),
2775Path.GetFullPath(Path.Combine("TestFiles", "foo1.bar")),
2776Path.GetFullPath(Path.Combine("TestFiles", "bar1.baz")),
2779File.WriteAllLines(Path.Combine("TestFiles", "two.tlog"), new[] {
2782Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
2783Path.GetFullPath(Path.Combine("TestFiles", "three.obj")),
2785Path.GetFullPath(Path.Combine("TestFiles", "foo2.bar")),
2786Path.GetFullPath(Path.Combine("TestFiles", "bar2.baz")),
2790new TaskItem(Path.Combine("TestFiles", "one.tlog")),
2791new TaskItem(Path.Combine("TestFiles", "two.tlog"))
2834Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2835Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2836Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2847Assert.True(outputs[0].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "oNe.obj")));
2848Assert.True(outputs[1].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "two.obj")));
2849Assert.True(outputs[2].ItemSpec == Path.GetFullPath(Path.Combine("TestFiles", "three.obj")));
2862DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
2863DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
2864DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
2865DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two1.h"), "");
2866DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two2.h"), "");
2867DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two3.h"), "");
2868DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three1.h"), "");
2869DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three2.h"), "");
2872DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
2873DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "two.cpp"), "");
2874DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "three.cpp"), "");
2877DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
2878DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "twothree.obj"), "");
2881File.WriteAllLines(Path.Combine("TestFiles", "one1.read.tlog"), new[] {
2883"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2884Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
2887File.WriteAllLines(Path.Combine("TestFiles", "one2.read.tlog"), new[] {
2889"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
2890Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
2891Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
2894File.WriteAllLines(Path.Combine("TestFiles", "two1.read.tlog"), new[] {
2896"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2897Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
2898Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
2901File.WriteAllLines(Path.Combine("TestFiles", "three1.read.tlog"), new[] {
2903"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")),
2904Path.GetFullPath(Path.Combine("TestFiles", "three1.h"))
2907File.WriteAllLines(Path.Combine("TestFiles", "twothree.read.tlog"), new[] {
2909"^" + Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
2910Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
2911Path.GetFullPath(Path.Combine("TestFiles", "two3.h")),
2912Path.GetFullPath(Path.Combine("TestFiles", "three1.h")),
2913Path.GetFullPath(Path.Combine("TestFiles", "three2.h"))
2917new TaskItem(Path.Combine("TestFiles", "one1.read.tlog")),
2918new TaskItem(Path.Combine("TestFiles", "one2.read.tlog")),
2919new TaskItem(Path.Combine("TestFiles", "two1.read.tlog")),
2920new TaskItem(Path.Combine("TestFiles", "three1.read.tlog")),
2921new TaskItem(Path.Combine("TestFiles", "twothree.read.tlog"))
2925new TaskItem(Path.Combine("TestFiles", "one.cpp")),
2926new TaskItem(Path.Combine("TestFiles", "two.cpp")),
2927new TaskItem(Path.Combine("TestFiles", "three.cpp"))
2931new TaskItem(Path.Combine("TestFiles", "one.obj")),
2932new TaskItem(Path.Combine("TestFiles", "twothree.obj"))
2951Assert.True(d.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Values.Count == 4);
2970Assert.True(d2.DependencyTable[Path.GetFullPath(Path.Combine("TestFiles", "three.cpp")) + "|" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp"))].Values.Count == 4);
2999File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "", "^FOO" });
3004DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
3016File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "^FOO", "", "FOO" });
3021DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
3033File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "^FOO", "FOO", "", "^BAR", "BAR" });
3038DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
3050File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] { "^", "FOO" });
3055DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
3067DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3068DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3069DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3070DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3072DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
3074File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3076"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3077Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3078Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3079Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3080"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
3081Path.GetFullPath(Path.Combine("TestFiles", "two1.h")),
3082Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
3085File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
3087"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3088Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
3089Path.GetFullPath(Path.Combine("TestFiles", "sometempfile.obj")),
3090"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
3091Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
3092Path.GetFullPath(Path.Combine("TestFiles", "sometempfile2.obj"))
3095FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3096FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3108DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3109DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3110DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3111DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3113DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
3115File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3117"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3118Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3119Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3120Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3121"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
3122Path.GetFullPath(Path.Combine("TestFiles", "two1.h")),
3123Path.GetFullPath(Path.Combine("TestFiles", "two2.h")),
3126File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
3128"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3129Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
3132FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3133FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3148DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3149DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3150DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3151DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3153DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
3155File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3157"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3158Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3159Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3160Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3161"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
3164File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
3166"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3167Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
3168Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
3169Path.GetFullPath(Path.Combine("TestFiles", "sometempfile2.obj"))
3172FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3173FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3188File.WriteAllText(Path.Combine("TestFiles", "one.read.tlog"), string.Empty);
3189File.WriteAllText(Path.Combine("TestFiles", "one.write.tlog"), string.Empty);
3191FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3192FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3204DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3205DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3206DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3207DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3210File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3212"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3213Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3214Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3215Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3218File.WriteAllText(Path.Combine("TestFiles", "one.write.tlog"), string.Empty);
3220FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3221FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3235File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3237"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3238Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3239Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3240Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3241"^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
3244File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
3246"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3247Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
3252DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3253DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3254DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3255DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3257DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
3259FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3261FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3267File.SetLastWriteTime(Path.Combine("TestFiles", "one.read.tlog"), DateTime.Now);
3268File.SetLastWriteTime(Path.Combine("TestFiles", "one.write.tlog"), DateTime.Now);
3271File.SetLastWriteTime(Path.GetFullPath(Path.Combine("TestFiles", "one.obj")), DateTime.Now - TimeSpan.FromHours(1));
3273outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3274inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3287DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3288DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3289DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3290DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3294File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3296"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3297Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3298Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3299Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3302FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "*-one.write.?.tlog"))), false);
3304FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3309outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "*-one.write.?.tlog"))), false);
3311inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3320File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3322Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3323Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3324Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3325Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3328File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
3330"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3331Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
3338DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3339DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3340DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3341DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3346DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
3348FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3350FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3360File.SetLastWriteTime(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")), DateTime.Now);
3362outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3363inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3376File.WriteAllLines(Path.Combine("TestFiles", "one.read.tlog"), new[] {
3378Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3379Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3380Path.GetFullPath(Path.Combine("TestFiles", "one2.h")),
3381Path.GetFullPath(Path.Combine("TestFiles", "one3.h")),
3384File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
3386"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3387Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
3392DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one1.h"), "");
3393DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one2.h"), "");
3394DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one3.h"), "");
3395DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3397DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.obj"), "");
3399FlatTrackingData outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3401FlatTrackingData inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3409File.SetLastWriteTime(Path.Combine("TestFiles", "one.read.tlog"), DateTime.Now);
3410File.SetLastWriteTime(Path.Combine("TestFiles", "one.write.tlog"), DateTime.Now);
3413outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3414inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3420File.SetLastWriteTime(Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")), DateTime.Now);
3422outputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))), false);
3423inputs = new FlatTrackingData(DependencyTestHelper.MockTask, DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.read.tlog"))), false);
3435if (!Directory.Exists(Path.Combine("TestFiles", "ToBeExcluded")))
3437Directory.CreateDirectory(Path.Combine("TestFiles", "ToBeExcluded"));
3443DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.h"), "");
3444DependencyTestHelper.WriteAll(Path.Combine("TestFiles", "one.cpp"), "");
3446File.WriteAllLines(Path.Combine("TestFiles", "one.tlog"), new[] {
3448Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3449Path.GetFullPath(Path.Combine("TestFiles", "one1.h")),
3459DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
3479DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.tlog"))),
3482new[] { Path.GetFullPath(Path.Combine("TestFiles", "ToBeExcluded")) },
3493File.WriteAllLines(Path.Combine("TestFiles", "one.write.tlog"), new[] {
3495"^" + Path.GetFullPath(Path.Combine("TestFiles", "one.cpp")),
3496Path.GetFullPath(Path.Combine("TestFiles", "one.obj")),
3501DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))),
3506Path.Combine("TestFiles", "one.write.tlog"),
3509"#Command some-command", "^" + Path.GetFullPath(Path.Combine("TestFiles", "two.cpp")),
3510Path.GetFullPath(Path.Combine("TestFiles", "two.obj")),
3515DependencyTestHelper.ItemArray(new TaskItem(Path.Combine("TestFiles", "one.write.tlog"))),
Microsoft.Cci.Extensions (2)
Microsoft.CodeAnalysis (20)
Microsoft.CodeAnalysis.Analyzers (4)
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
Microsoft.CodeAnalysis.CodeStyle (2)
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 (181)
CommandLineTests.cs (160)
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")));
2009Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2022Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2029Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2096Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath);
2097Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2101Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath);
2102Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2109Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2113Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll"));
2148Assert.Equal(Path.Combine(Path.GetPathRoot(WorkingDirectory), @"MyFolder\MyPdb.pdb"), parsedArgs.PdbPath);
2212Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink);
2216Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink);
2220Assert.Equal(Path.Combine(WorkingDirectory, "s l.json"), parsedArgs.SourceLink);
2254var peStream = File.OpenRead(Path.Combine(dir.Path, "a.exe"));
2286var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
2315var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
2334new[] { "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2340new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2346new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2352new[] { "a.cs", "b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2358new[] { "a,b.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2364new[] { "a.txt", "a.cs", "b.cs", "c.cs" }.Select(f => Path.Combine(WorkingDirectory, f)),
2478using (var peReader = new PEReader(File.OpenRead(Path.Combine(dir.Path, "embed.exe"))))
2485MetadataReaderProvider.FromPortablePdbStream(File.OpenRead(Path.Combine(dir.Path, "embed.pdb"))))
2513symReader = SymReaderFactory.CreateReader(File.OpenRead(Path.Combine(dir.Path, "embed.pdb")));
2884Diagnostic(ErrorCode.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah"), "File not found."));
2885Assert.Equal(expected: Path.Combine(TempRoot.Root, "blah"), actual: parsedArgs.RuleSetPath);
2889Diagnostic(ErrorCode.ERR_CantReadRulesetFile).WithArguments(Path.Combine(TempRoot.Root, "blah;blah.ruleset"), "File not found."));
2890Assert.Equal(expected: Path.Combine(TempRoot.Root, "blah;blah.ruleset"), actual: parsedArgs.RuleSetPath);
3592" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(40,13): error CS0103: The name 'Goo' does not exist in the current context
3593" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(50,13): error CS0103: The name 'Goo' does not exist in the current context
3615" + Path.Combine(dir.Path, @"a.cs") + @"(8,13): error CS0103: The name 'Goo' does not exist in the current context
3619" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(40,13): error CS0103: The name 'Goo' does not exist in the current context
3620" + Path.GetFullPath(Path.Combine(dir.Path, @"..\b.cs")) + @"(50,13): error CS0103: The name 'Goo' does not exist in the current context
3627" + Path.Combine(dir.Path, @"a.cs") + @"(32,13): error CS0103: The name 'Goo' does not exist in the current context
3795Assert.Equal(Path.Combine(baseDirectory, "MyBinary.dll"), parsedArgs.GetOutputFilePath(parsedArgs.OutputFileName));
4106Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.DocumentationPath);
4210Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.ErrorLogOptions.Path);
4501using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, "aa.exe"))))
5657Assert.Equal(Path.Combine(WorkingDirectory, "test.snk"), parsedArgs.CompilationOptions.CryptoKeyFile);
6057var assemblyName = AssemblyName.GetAssemblyName(Path.Combine(tempDir, name));
7090using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, expectedOutputName))))
7828IntPtr lib = LoadLibraryEx(Path.Combine(dir.Path, outputFileName), IntPtr.Zero, 0x00000002);
8263Assert.True(File.Exists(Path.Combine(dir.ToString(), "a.xml")));
8455CleanupAllGeneratedFiles(Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(source)), Path.GetFileName(source)));
8547exitCode = CreateCSharpCompiler(null, baseDir, new[] { "/nologo", "/preferreduilang:en", Path.Combine(baseDir, "nonexistent.cs"), source.ToString() }).Run(outWriter);
8549Assert.Equal("error CS2001: Source file '" + Path.Combine(baseDir, "nonexistent.cs") + "' could not be found.", outWriter.ToString().Trim());
8710System.IO.File.Delete(System.IO.Path.Combine(baseDir, "goo.dll"));
8989var exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe");
9011var exePath = Path.Combine(Path.GetDirectoryName(srcPath), "test.exe");
9034var xmlPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.xml");
9058var sourceLinkPath = Path.Combine(Path.GetDirectoryName(srcPath), "test.json");
9086string exePath = Path.Combine(Path.GetDirectoryName(sourcePath), "test.exe");
9111string exePath = Path.Combine(Path.GetDirectoryName(sourcePath), "test.exe");
9137string xmlPath = Path.Combine(WorkingDirectory, "Test.xml");
9240string xmlPath = Path.Combine(WorkingDirectory, "Test.xml");
9883Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles.Single().Path);
9888Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9889Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9894Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9895Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[1].Path);
9899Assert.Equal(Path.Combine(WorkingDirectory, "..\\web.config"), args.AdditionalFiles.Single().Path);
9909Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles[0].Path);
9910Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles[1].Path);
9911Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles[2].Path);
9916Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9917Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9922Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9923Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9928Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path);
9929Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path);
9934Assert.Equal(Path.Combine(WorkingDirectory, "web.config,app.manifest"), args.AdditionalFiles[0].Path);
9939Assert.Equal(Path.Combine(WorkingDirectory, "web.config:app.manifest"), args.AdditionalFiles[0].Path);
9955Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths.Single());
9960Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
9961Assert.Equal(Path.Combine(WorkingDirectory, "subdir\\.editorconfig"), args.AnalyzerConfigPaths[1]);
9966Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
9967Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[1]);
9971Assert.Equal(Path.Combine(WorkingDirectory, "..\\.editorconfig"), args.AnalyzerConfigPaths.Single());
9976Assert.Equal(Path.Combine(WorkingDirectory, ".editorconfig"), args.AnalyzerConfigPaths[0]);
9977Assert.Equal(Path.Combine(WorkingDirectory, "subdir\\.editorconfig"), args.AnalyzerConfigPaths[1]);
11377Assert.True(File.Exists(Path.Combine(dir.ToString(), "doc.xml")));
11392using (var reader = new StreamReader(Path.Combine(dir.ToString(), "doc.xml")))
11398output = ProcessUtilities.RunAndGetOutput(Path.Combine(dir.ToString(), "out.exe"), startFolder: dir.ToString());
11415Assert.Equal(Path.Combine(baseDirectory, @"a.pdb"), args.PdbPath);
11448AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11452AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "@script.csx") }, args.SourceFiles.Select(f => f.Path));
11456AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "-script.csx") }, args.SourceFiles.Select(f => f.Path));
11460AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11464AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11468AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11473AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11478AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path));
11483AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "--") }, args.SourceFiles.Select(f => f.Path));
11602var dir = Path.Combine(WorkingDirectory, "a");
11605Assert.Equal(Path.Combine(dir, @"data.pdb"), parsedArgs.PdbPath);
11628var exePath = Path.Combine(dir.Path, "a.exe");
11640var pdbPath = Path.Combine(dir.Path, "a.pdb");
11647var pdbPath = Path.Combine(dir.Path, "a.pdb");
11654var pdbPath = Path.Combine(dir.Path, "a.pdb");
11662var pdbPath = Path.Combine(dir.Path, @"pdb\a.pdb");
11669var pdbPath = Path.Combine(dir.Path, "a.pdb");
11676var pdbPath = Path.Combine(dir.Path, "a.pdb");
11683var pdbPath = Path.Combine(dir.Path, "a.pdb");
11747dir.CopyFile(Path.Combine(Path.GetDirectoryName(s_CSharpCompilerExecutable), "csc.rsp"));
11808var exe = Path.Combine(dir.Path, "a.exe");
11817var doc = Path.Combine(dir.Path, "doc.xml");
11841var refDll = Path.Combine(refDir.Path, "a.dll");
11872var dll = Path.Combine(dir.Path, "a.dll");
11875var refDll = Path.Combine(dir.Path, Path.Combine("ref", "a.dll"));
11924var refDll = Path.Combine(dir.Path, "a.dll");
11935var pdb = Path.Combine(dir.Path, "a.pdb");
11938var doc = Path.Combine(dir.Path, "doc.xml");
12256var cscCopy = Path.Combine(dir.Path, "csc.exe");
12300var exePath = Path.Combine(dir.Path, "a.exe");
13487string binaryPath = Path.Combine(dir.Path, "temp.dll");
13490string pdbPath = Path.Combine(dir.Path, pdbName);
13493string xmlDocFilePath = Path.Combine(dir.Path, docName);
13533string binaryPath = Path.Combine(dir.Path, "temp.dll");
13536string pdbPath = Path.Combine(dir.Path, pdbName);
13539string xmlDocFilePath = Path.Combine(dir.Path, docName);
13583string binaryPath = Path.Combine(dir.Path, "temp.dll");
13586string pdbPath = Path.Combine(dir.Path, pdbName);
13589string xmlDocFilePath = Path.Combine(dir.Path, docName);
13614string binaryPath = Path.Combine(dir.Path, "temp.dll");
14052using (Stream peStream = File.OpenRead(Path.Combine(dir.Path, "checksum.exe")), pdbStream = File.OpenRead(Path.Combine(dir.Path, "checksum.pdb")))
14124ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource1 } } } });
14131ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource2 } } } });
14194var generatedPath = Path.Combine(subdir, generatedFileName);
14233var path = Path.Combine(dir.Path, Guid.NewGuid().ToString() + ".dll");
14289var generatedDirPath = Path.Combine(dir.Path, "noexist");
14317ValidateWrittenSources(new() { { Path.Combine(generatedDir.Path, generatorPrefix), new() { { "generatedSource.cs", generatedSource } } } });
14344Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory);
14348Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory);
14352Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory);
14356Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory);
14358var absPath = Path.Combine(root, "outdir");
14367absPath = Path.Combine(root, "generated files");
14411string[] writtenText = File.ReadAllLines(Path.Combine(dir.Path, "touched.write"));
15406var generatorPath = Path.Combine(directory.Path, "generator.dll");
15442Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(srcDirectory.Path, additionalFilePath1)));
15443Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(srcDirectory.Path, additionalFilePath2)));
15449string 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 (57)
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.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 (1)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (3)
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (5)
Microsoft.CodeAnalysis.Features (17)
Microsoft.CodeAnalysis.Features.Test.Utilities (7)
Microsoft.CodeAnalysis.Features.UnitTests (22)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (16)
122AddDocument(CreateDesignTimeOnlyDocument(projectPId, name: "dt1.cs", path: Path.Combine(dir.Path, "dt1.cs"))).
605var newRefOutPath = Path.Combine(TempRoot.Root, "newRef");
907var designTimeOnlyFilePath = Path.Combine(dir.Path, designTimeOnlyFileName);
2128var pathA = Path.Combine(TempRoot.Root, "A.cs");
2129var pathB = Path.Combine(TempRoot.Root, "B.cs");
2130var pathC = Path.Combine(TempRoot.Root, "C.cs");
2131var pathD = Path.Combine(TempRoot.Root, "D.cs");
2132var pathX = Path.Combine(TempRoot.Root, "X");
2133var pathY = Path.Combine(TempRoot.Root, "Y");
2134var pathCommon = Path.Combine(TempRoot.Root, "Common.cs");
2206var pathX = Path.Combine(TempRoot.Root, "X.cs");
2207var pathA = Path.Combine(TempRoot.Root, "A.cs");
2387var pathA = Path.Combine(TempRoot.Root, "A.txt");
2465var sourcePath = Path.Combine(TempRoot.Root, "A.cs");
4140AddDocument("DocB", source1, filePath: Path.Combine(TempRoot.Root, "DocB.cs")).Project;
4641var filePath = withPath ? Path.Combine(TempRoot.Root, "test.cs") : null;
Microsoft.CodeAnalysis.InteractiveHost (3)
Microsoft.CodeAnalysis.LanguageServer (9)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (8)
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (2)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
Microsoft.CodeAnalysis.PublicApiAnalyzers.UnitTests (2)
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.ServiceHub (2)
Microsoft.CodeAnalysis.Remote.Workspaces (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Microsoft.CodeAnalysis.Scripting (12)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (2)
Microsoft.CodeAnalysis.Scripting.TestUtilities (2)
Microsoft.CodeAnalysis.Test.Utilities (29)
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 (14)
Microsoft.CodeAnalysis.Workspaces (16)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (6)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (16)
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 (45)
SolutionTests\SolutionTests.cs (40)
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"))));
1089.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")))
1090.AddProject(ProjectInfo.Create(projectId2, VersionStamp.Default, "proj2", "proj2", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj2.dll")))
1091.AddDocument(d1, "d1.cs", SourceText.From("class D1;", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "d1.cs"))
1092.AddDocument(d2, "d2.cs", SourceText.From("class D2;", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "d2.cs"))
1095.AddAnalyzerConfigDocument(c1, "c1", SourceText.From("#empty1", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"))
1096.AddAnalyzerConfigDocument(c2, "c2", SourceText.From("#empty2", Encoding.UTF8, SourceHashAlgorithms.Default), filePath: Path.Combine(s_projectDir, "editorcfg"));
1106loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD1;", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1107filePath: Path.Combine(s_projectDir, "newD1.cs"),
1115loader: TextLoader.From(TextAndVersion.Create(SourceText.From("class NewD3;", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1116filePath: Path.Combine(s_projectDir, "newD3.cs"),
1125loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1126filePath: Path.Combine(s_projectDir, "newA1.txt"),
1134loader: TextLoader.From(TextAndVersion.Create(SourceText.From("new text3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1135filePath: Path.Combine(s_projectDir, "newA3.txt"),
1144loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty1", Encoding.UTF32, SourceHashAlgorithm.Sha256), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD1.cs"))),
1145filePath: Path.Combine(s_projectDir, "newC1"),
1153loader: TextLoader.From(TextAndVersion.Create(SourceText.From("#new empty3", Encoding.UTF8, SourceHashAlgorithms.Default), VersionStamp.Create(), filePath: Path.Combine(s_projectDir, "newD3.cs"))),
1154filePath: Path.Combine(s_projectDir, "newC3"),
1161var generatedOutputDir = Path.Combine(TempRoot.Root, "obj");
1298.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1333.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1368.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1403.AddProject(ProjectInfo.Create(projectId, VersionStamp.Default, "proj1", "proj1", LanguageNames.CSharp, Path.Combine(s_projectDir, "proj1.dll")));
1481var objDir = Path.Combine(TempRoot.Root, "obj");
1482var binDir = Path.Combine(TempRoot.Root, "bin");
1483var otherDir = Path.Combine(TempRoot.Root, "other");
1492.WithOutputFilePath(Path.Combine(binDir, "output.dll"))
1494assemblyPath: Path.Combine(objDir, "output.dll"),
2333var sourcePathOptions = project2.State.GetAnalyzerOptionsForPath(Path.Combine(s_projectDir, "x.cs"), CancellationToken.None);
2393var filePath = Path.Combine(TempRoot.Root, "x.cs");
2424var filePath = Path.Combine(TempRoot.Root, "x.cs");
2475var filePath = Path.Combine(TempRoot.Root, "x.cs");
2504var filePath = Path.Combine(TempRoot.Root, "x.cs");
5544projectPath = string.IsNullOrEmpty(projectPath) ? projectPath : Path.Combine(TempRoot.Root, projectPath);
5545configPath = Path.Combine(TempRoot.Root, configPath);
5546sourcePath = string.IsNullOrEmpty(sourcePath) ? sourcePath : Path.Combine(TempRoot.Root, sourcePath);
5778.WithCompilationOutputInfo(new CompilationOutputInfo(assemblyPath: Path.Combine(TempRoot.Root, "assembly.dll"), generatedFilesOutputDirectory: null));
Microsoft.Data.Analysis.Tests (2)
Microsoft.DotNet.ApiCompat.IntegrationTests (26)
Task\ValidatePackageTargetIntegrationTests.cs (24)
44var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
59var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
73var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
78string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg");
79result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
93var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
98result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
112var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
117string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg");
118result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
133string nonExistentPackageBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg");
134var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
141result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
163PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name));
205PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name));
246PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name));
275PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name));
299PackCommand packCommand = new(Log, Path.Combine(asset.TestRoot, testProject.Name));
323var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
328string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg");
329result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
344var result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
349string packageValidationBaselinePath = Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.1.0.0.nupkg");
350result = new PackCommand(Log, Path.Combine(testAsset.TestRoot, "PackageValidationTestProject.csproj"))
Microsoft.DotNet.ApiCompat.Task (3)
Microsoft.DotNet.ApiCompat.Tests (3)
Microsoft.DotNet.ApiCompat.Tool (5)
Microsoft.DotNet.ApiCompatibility.Tests (8)
Microsoft.DotNet.ApiDiff (2)
Microsoft.DotNet.ApiDiff.Tests (5)
Microsoft.DotNet.ApiSymbolExtensions (3)
Microsoft.DotNet.ApiSymbolExtensions.Tests (9)
Microsoft.DotNet.Arcade.Sdk (5)
Microsoft.DotNet.Arcade.Sdk.Tests (8)
Microsoft.DotNet.AsmDiff (1)
Microsoft.DotNet.Build.Tasks.Feed (13)
Microsoft.DotNet.Build.Tasks.Feed.Tests (18)
Microsoft.DotNet.Build.Tasks.Installers (18)
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 (7)
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)
34ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"),
35msiOutputPath: Path.Combine(MsiOutputPath, "mrec"));
46string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
49ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
53ITaskItem msi604 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.4.nupkg"));
83string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
84TaskItem packageItem = new(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"));
113string PackageRootDirectory = Path.Combine(BaseIntermediateOutputPath, "pkg");
114string 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.Cli.Utils (12)
Microsoft.DotNet.Cli.Utils.Tests (65)
MockFileSystemTests.cs (56)
18string nestedFilePath = Path.Combine(directory, "filename");
46string nestedFilePath = Path.Combine(directory, "filename");
77fileSystem.File.Exists(Path.Combine(directory, "file")).Should().BeTrue();
90fileSystem.Directory.Exists(Path.Combine(directory, "dir")).Should().BeTrue();
127string path = Path.Combine(directory, "sub");
154string path = Path.Combine(directory, Path.GetRandomFileName());
167string path = Path.Combine(directory, Path.GetRandomFileName());
179string directory = Path.Combine(
196string path = Path.Combine(directory, Path.GetRandomFileName());
221string sourceFile = Path.Combine(directory, Path.GetRandomFileName());
223string destinationFile = Path.Combine(directory, Path.GetRandomFileName());
238string sourceFile = Path.Combine(directory, Path.GetRandomFileName());
240string destinationFile = Path.Combine(directory, Path.GetRandomFileName());
254string badSourceFile = Path.Combine(directory, Path.GetRandomFileName());
257string destinationFile = Path.Combine(directory, Path.GetRandomFileName());
271string sourceFile = Path.Combine(directory, Path.GetRandomFileName());
289string sourceFile = Path.Combine(directory, Path.GetRandomFileName());
291string destinationFile = Path.Combine(directory, Path.GetRandomFileName());
305string sourceFile = Path.Combine(directory, Path.GetRandomFileName());
306string destinationFile = Path.Combine(directory, Path.GetRandomFileName());
320string badSourceFile = Path.Combine(directory, Path.GetRandomFileName());
322string destinationFile = Path.Combine(directory, Path.GetRandomFileName());
336string sourceFile = Path.Combine(directory, Path.GetRandomFileName());
353string sourceFile = Path.Combine(directory, Path.GetRandomFileName());
355string destinationFile = Path.Combine(directory, Path.GetRandomFileName());
371string file = Path.Combine(directory, Path.GetRandomFileName());
386string file = Path.Combine(directory, Path.GetRandomFileName());
432string wrongFilePath = Path.Combine(directory, Path.GetRandomFileName());
450string emptyDirectory = Path.Combine(tempDirectory, Path.GetRandomFileName());
463string testDirectory = Path.Combine(tempDirectory, Path.GetRandomFileName());
464string file1 = Path.Combine(testDirectory, Path.GetRandomFileName());
465string file2 = Path.Combine(testDirectory, Path.GetRandomFileName());
498string wrongFilePath = Path.Combine(directory, Path.GetRandomFileName());
516string emptyDirectory = Path.Combine(tempDirectory, Path.GetRandomFileName());
529string testDirectory = Path.Combine(tempDirectory, Path.GetRandomFileName());
530string file1 = Path.Combine(testDirectory, Path.GetRandomFileName());
531string file2 = Path.Combine(testDirectory, Path.GetRandomFileName());
532string nestedDirectoryPath = Path.Combine(testDirectory, Path.GetRandomFileName());
553string testDirectory = Path.Combine(tempDirectory, Path.GetRandomFileName());
569string nonExistsTestDirectory = Path.Combine(tempDirectory, Path.GetRandomFileName());
585string actuallyAFilePath = Path.Combine(tempDirectory, Path.GetRandomFileName());
599string testDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
600string testDirectoryFilePath = Path.Combine(testDirectoryPath, Path.GetRandomFileName());
618string testDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
619string testDirectoryFilePath = Path.Combine(testDirectoryPath, Path.GetRandomFileName());
635string testSourceDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
637string testDirectoryFilePath = Path.Combine(testSourceDirectoryPath, nestedFilePath);
641string testDestinationDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
647fileSystem.File.Exists(Path.Combine(testDestinationDirectoryPath, nestedFilePath)).Should().BeTrue();
657string testSourceDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
659string testDestinationDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
673string testSourceDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
676string testDestinationDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
690string testSourceDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
693string testDestinationDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
707string testSourceDirectoryPath = Path.Combine(tempDirectory, Path.GetRandomFileName());
Microsoft.DotNet.Configurer (10)
Microsoft.DotNet.GenAPI (1)
Microsoft.DotNet.GenAPI.Tests (5)
Microsoft.DotNet.GenFacades (3)
Microsoft.DotNet.Helix.Sdk (7)
Microsoft.DotNet.Helix.Sdk.Tests (2)
Microsoft.DotNet.HotReload.Client.Tests (1)
Microsoft.DotNet.Internal.SymbolHelper (9)
Microsoft.DotNet.InternalAbstractions (3)
Microsoft.DotNet.MSBuildSdkResolver (33)
SdkDirectoryWorkloadManifestProvider.cs (14)
73string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
74string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
186_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
270var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
300var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
326var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], _sdkVersionBand.ToString());
341var manifestVersionBandDirectory = Path.Combine(manifestRoot, _sdkVersionBand.ToString());
434.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
446else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
448var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
505if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
536var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
563var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
597string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.DotNet.MSBuildSdkResolver.Tests (12)
GivenAnMSBuildSdkResolver.cs (11)
233var ambientSdkDotnetRoot = Path.Combine(environment.GetProgramFilesDirectory(ProgramFiles.X64).FullName, "dotnet");
663=> new(Path.Combine(TestDirectory.FullName, $"ProgramFiles{programFiles}"));
682var dotnetDllPath = Path.Combine(netSdkDirectory, "dotnet.dll");
719var dotnetDllPath = Path.Combine(netSdkDirectory, "dotnet.dll");
754var dotnetPath = Path.Combine(muxerDirectory.FullName, Muxer);
777Path.Combine(cliDirectory.FullName, "minimumMSBuildVersion"),
800Path.Combine(cliDirectory.FullName, "minimumMSBuildVersion"),
833File.WriteAllText(Path.Combine(directory.FullName, "global.json"), globalJsonContent);
862return Path.Combine(baseDirectory, "minimumVSDefinedSDKVersion");
867VSSettingsFile = new FileInfo(Path.Combine(TestDirectory.FullName, "sdk.txt"));
904set => ProjectFilePath = Path.Combine(value.FullName, "test.csproj");
Microsoft.DotNet.NativeWrapper (1)
Microsoft.DotNet.NuGetRepack.Tasks (6)
Microsoft.DotNet.NuGetRepack.Tests (31)
VersionUpdaterTests.cs (28)
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);
68var a_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameA);
69var b_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameB);
70var c_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameC);
71var d_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameD);
73var a_rel = Path.Combine(dir, TestResources.ReleasePackages.NameA);
74var b_rel = Path.Combine(dir, TestResources.ReleasePackages.NameB);
75var c_rel = Path.Combine(dir, TestResources.ReleasePackages.NameC);
76var d_rel = Path.Combine(dir, TestResources.ReleasePackages.NameD);
97var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
101File.WriteAllBytes(e_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameE), TestResources.DailyBuildPackages.TestPackageE);
102File.WriteAllBytes(f_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameF), TestResources.DailyBuildPackages.TestPackageF);
104var e_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameE);
105var f_pre = Path.Combine(dir, TestResources.PreReleasePackages.NameF);
107var e_rel = Path.Combine(dir, TestResources.ReleasePackages.NameE);
108var f_rel = Path.Combine(dir, TestResources.ReleasePackages.NameF);
125var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
129File.WriteAllBytes(a_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameA), TestResources.DailyBuildPackages.TestPackageA);
130File.WriteAllBytes(b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
131File.WriteAllBytes(c_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameC), TestResources.DailyBuildPackages.TestPackageC);
164var dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
165var outputDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
169File.WriteAllBytes(dotnet_tool = Path.Combine(dir, TestResources.MiscPackages.NameDotnetTool), TestResources.MiscPackages.DotnetTool);
171File.WriteAllBytes(normal_package_b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
Microsoft.DotNet.Open.Api.Tools.Tests (26)
Microsoft.DotNet.PackageInstall.Tests (36)
ToolPackageDownloaderTests.cs (11)
185var emptySource = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
334var emptySource = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
454var localToolDownloadDir = Path.Combine(new DirectoryPath(SettingsUtility.GetGlobalPackagesFolder(settings)).ToString().Trim('"'), TestPackageId.ToString());
455var localToolVersionDir = Path.Combine(localToolDownloadDir, TestPackageVersion.ToString());
729var nugetConfigPath = new FilePath(Path.Combine(root.Path, "NuGet.config"));
733var testRuntimeJsonPath = Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "RuntimeIdentifierGraph.json");
760var emptySource = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
788var emptySource = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
886var nugetConfigPath = new FilePath(Path.Combine(root.Value, "NuGet.config"));
915var testRuntimeJsonPath = Path.Combine(TestContext.Current.ToolsetUnderTest.SdkFolderUnderTest, "RuntimeIdentifierGraph.json");
954Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestAssetLocalNugetFeed");
Microsoft.DotNet.RemoteExecutor (5)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.SharedFramework.Sdk (3)
Microsoft.DotNet.SignCheck (4)
Microsoft.DotNet.SignCheckLibrary (12)
Verification\MsiVerifier.cs (4)
41string targetPath = Path.Combine(svr.TempPath, name);
55SignatureVerificationResult packageFileResult = VerifyFile(installPackage.Files[key].TargetPath, svr.Filename, Path.Combine(svr.VirtualPath, originalFiles[key]), containerPath: null);
77string binaryFilePath = Path.Combine(svr.TempPath, binaryFile);
79SignatureVerificationResult binaryStreamResult = VerifyFile(binaryFilePath, svr.Filename, Path.Combine(svr.VirtualPath, binaryFile), containerPath: null);
Microsoft.DotNet.SignTool (12)
Microsoft.DotNet.SignTool.Tests (25)
Microsoft.DotNet.SourceBuild.Tasks (3)
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.TemplateLocator (18)
SdkDirectoryWorkloadManifestProvider.cs (14)
73string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
74string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
186_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
270var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
300var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
326var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], _sdkVersionBand.ToString());
341var manifestVersionBandDirectory = Path.Combine(manifestRoot, _sdkVersionBand.ToString());
434.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
446else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
448var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
505if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
536var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
563var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
597string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.DotNet.TemplateLocator.Tests (9)
GivenAnTemplateLocator.cs (9)
18Path.Combine(TestContext.Current.TestExecutionDirectory, Path.GetRandomFileName());
22var fakeRuntimeIdentifierChainPath = Path.Combine(fakeSdkDirectory, "NETCoreSdkRuntimeIdentifierChain.txt");
34Directory.CreateDirectory(Path.Combine(_manifestDirectory, "Android"));
35File.Copy(Path.Combine("Manifests", "AndroidWorkloadManifest.json"),
38string templatePacksDirectory = Path.Combine(_fakeDotnetRootDirectory, "template-packs");
40string templateNupkgPath = Path.Combine(templatePacksDirectory, "xamarin.android.templates.1.0.3.nupkg");
55Directory.CreateDirectory(Path.Combine(_manifestDirectory, "Android"));
56File.Copy(Path.Combine("Manifests", "AndroidWorkloadManifest.json"),
67Path.Combine(TestContext.Current.TestExecutionDirectory, Path.GetRandomFileName());
Microsoft.DotNet.Tools.Tests.ComponentMocks (12)
Microsoft.DotNet.VersionTools (4)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Microsoft.Extensions.AI.Templates.Tests (12)
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)
38var directory = new DirectoryInfo(Path.Combine(_assemblyLocation, "build"));
41file.CopyTo(Path.Combine(build.Root, file.Name), overwrite: true);
46file.CopyTo(Path.Combine(build.Root, file.Name), overwrite: true);
53file.CopyTo(Path.Combine(files.Root, file.Name), overwrite: true);
60file.CopyTo(Path.Combine(tasks.Root, file.Name), overwrite: true);
81Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
103Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
104Assert.Contains($"TypeScriptCompile: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
126Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
127Assert.Contains($"FileWrites: {Path.Combine("obj", "NSwagClient.cs")}", process.Output);
128Assert.Contains($"FileWrites: {Path.Combine("obj", "swashbuckleClient.cs")}", process.Output);
180$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
205$"Options: '--an-option' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
230$"Options: '' OutputPath: '{Path.Combine("generated", "azureMonitorClient.cs")}'",
257$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
282$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.ts")}'",
307$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
332$"Options: '--an-option' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
359$"Options: '' OutputPath: '{Path.Combine("obj", "Custom.cs")}'",
383$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
389$"Options: '' OutputPath: '{Path.Combine("obj", "NSwagClient.cs")}'",
395$"Options: '' OutputPath: '{Path.Combine("obj", "swashbuckleClient.cs")}'",
424$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.cs")}'",
430$"Options: '' OutputPath: '{Path.Combine("obj", "azureMonitorClient.ts")}'",
Microsoft.Extensions.ApiDescription.Tool.Tests (39)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.Configuration.FileExtensions (1)
Microsoft.Extensions.DependencyModel (7)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.DotNetDeltaApplier (1)
Microsoft.Extensions.DotNetDeltaApplier.Tests (2)
Microsoft.Extensions.FileProviders.Embedded.Tests (4)
Microsoft.Extensions.FileProviders.Physical (4)
Microsoft.Extensions.FileSystemGlobbing (5)
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.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.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 (18)
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 (25)
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.Build.Containers (3)
Microsoft.NET.Build.Containers.IntegrationTests (15)
FullFramework\CreateNewImageToolTaskTests.cs (15)
28DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
71DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
105DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
138DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
170DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
206DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
252DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
303DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
393DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
412DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
447DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
484DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
522DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
548DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
579DirectoryInfo publishDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), DateTime.Now.ToString("yyyyMMddHHmmssfff")));
Microsoft.NET.Build.Containers.UnitTests (1)
Microsoft.NET.Build.Extensions.Tasks (1)
Microsoft.NET.Build.Extensions.Tasks.UnitTests (1)
Microsoft.NET.Build.Tasks (51)
SdkDirectoryWorkloadManifestProvider.cs (14)
73string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
74string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
186_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
270var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
300var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
326var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], _sdkVersionBand.ToString());
341var manifestVersionBandDirectory = Path.Combine(manifestRoot, _sdkVersionBand.ToString());
434.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
446else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
448var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
505if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
536var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
563var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
597string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.NET.Build.Tasks.UnitTests (36)
GivenAProduceContentsAssetsTask.cs (9)
124Path.Combine("donotcopy", "README.md"),
148outputPath: Path.Combine("output", contentFiles[1])),
150outputPath: Path.Combine("output", contentFiles[2])),
183item.GetMetadata("TargetPath").Should().Be(Path.Combine("output", contentFiles[i]));
203Path.Combine("donotcopy", "README.md"),
307outputPath: Path.Combine("output", contentFiles[2])),
309outputPath: Path.Combine("output", contentFiles[3])),
485private static readonly string ContentOutputDirectory = Path.Combine("bin", "obj");
486private static readonly string PackageRootDirectory = Path.Combine("root", "packages");
Microsoft.NET.Build.Tests (343)
AppHostTests.cs (10)
71new RunExeCommand(Log, Path.Combine(outputDirectory.FullName, hostExecutable))
106var appHostFullPath = Path.Combine(outputDirectory.FullName, hostExecutable);
117var buildProjDir = Path.Combine(outputDirectory.FullName, "../..");
157var appHostFullPath = Path.Combine(outputDirectory.FullName, testAssetName);
220var apphostPath = Path.Combine(buildCommand.GetOutputDirectory().FullName, "HelloWorld.exe");
261string apphostPath = Path.Combine(outputDirectory.FullName, $"{testProject.Name}.exe");
302ReadOnlySpan<byte> appBytes = File.ReadAllBytes(Path.Combine(outputDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}"));
343string apphostPath = Path.Combine(outputDirectory.FullName, testProject.Name + ".exe");
428Path.Combine(
433var intermediateAppHost = Path.Combine(intermediateDirectory, "apphost" + Constants.ExeSuffix);
ArtifactsOutputPathTests.cs (24)
52File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"),
64File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"),
92OutputPathCalculator outputPathCalculator = OutputPathCalculator.FromProject(Path.Combine(testAsset.Path, testProject.Name), testProject);
93new FileInfo(Path.Combine(outputPathCalculator.GetOutputDirectory(), testProject.Name + ".dll"))
114OutputPathCalculator outputPathCalculator = OutputPathCalculator.FromProject(Path.Combine(testAsset.Path, testProject.Name), testProject);
115new FileInfo(Path.Combine(outputPathCalculator.GetOutputDirectory(configuration: "release"), testProject.Name + ".dll"))
118new FileInfo(Path.Combine(outputPathCalculator.GetPublishDirectory(configuration: "release"), testProject.Name + ".dll"))
139OutputPathCalculator outputPathCalculator = OutputPathCalculator.FromProject(Path.Combine(testAsset.Path, testProject.Name), testProject);
140new FileInfo(Path.Combine(outputPathCalculator.GetOutputDirectory(configuration: "release"), testProject.Name + ".dll"))
143new FileInfo(Path.Combine(outputPathCalculator.GetPackageDirectory(configuration: "release"), testProject.Name + ".1.0.0.nupkg"))
153new DirectoryInfo(Path.Combine(testAsset.TestRoot, testProject.Name))
184new FileInfo(Path.Combine(outputPathCalculator.GetOutputDirectory(), testProject.Name + ".dll"))
211File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), """
229File.Delete(Path.Combine(testAsset.Path, "Directory.Build.props"));
248File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), """
257File.WriteAllText(Path.Combine(testAsset.Path, "Directory.AfterTargetFrameworkInference.targets"), """
288.WithWorkingDirectory(Path.Combine(testAsset.Path, testProject.Name))
300.WithWorkingDirectory(Path.Combine(testAsset.Path, testProject.Name))
319File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"),
428File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"),
438.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name))
459new DirectoryInfo(Path.Combine(testAsset.TestRoot, "artifacts"))
552File.WriteAllText(Path.Combine(testAsset.Path, "Directory.Build.props"), """
560var projectDir = Path.Combine(testAsset.Path, testAsset.TestProject.Name);
GivenFrameworkReferences.cs (14)
58string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
113string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
149string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
179string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
316testProject.AdditionalProperties["NetCoreTargetingPackRoot"] = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
324string nugetPackagesFolder = Path.Combine(testAsset.TestRoot, "packages");
372string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
719string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
760string nugetPackagesFolder = Path.Combine(testAsset.TestRoot, "packages");
772string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
842var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
999string projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
1136var resolvedVersions = ResolvedVersionInfo.ParseFrom(Path.Combine(outputDirectory.FullName, "resolvedversions.txt"));
1160var command = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProject.Name), targetFramework,
GivenThatWeWantToBuildALibrary.cs (22)
88var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
149var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
183var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
227var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
259var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
261var oldProjectFile = Path.Combine(libraryProjectDirectory, "TestLibrary.csproj");
262var newProjectFile = Path.Combine(libraryProjectDirectory, "TestLibrary.different_language_proj");
285var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
365var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
460var libraryProjectDirectory = Path.Combine(testAsset.TestRoot, "TestLibrary");
542var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name));
548var runCommand = new RunExeCommand(Log, Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, $"{testProj.Name}.exe"));
602var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformIdentifier");
633var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "TargetPlatformVersion");
680var relativePathToProject = Path.Combine(testProject.Name, testProject.Name + ".csproj");
771var assetsFilePath = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "project.assets.json");
837Path.Combine(asset.Path, project.Name),
892string runtimeConfigFile = Path.Combine(outputDirectory.FullName, runtimeConfigName);
936string runtimeConfigFile = Path.Combine(outputDirectory.FullName, runtimeConfigName);
1003string runtimeConfigFile = Path.Combine(outputDirectory.FullName, runtimeConfigName);
1045string projectFolder = Path.Combine(testAsset.Path, testProject.Name);
1134var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, "TestLibrary"), targetFramework, "PackageConflictPreferredPackages");
GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs (10)
22WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
47WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
71WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
90WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
110WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
129WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
168WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
187WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
216WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
265WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name)
GivenThatWeWantToBuildANetCoreApp.cs (15)
154string runtimeConfigFile = Path.Combine(outputDirectory.FullName, testProject.Name + ".runtimeconfig.json");
166string devruntimeConfigContents = File.ReadAllText(Path.Combine(outputDirectory.FullName, runtimeconfigDevFileName));
365new DotnetCommand(Log, Path.Combine(outputFolder, project.Name + ".dll"))
392var runtimeconfigFile = Path.Combine(
420var runtimeconfigFile = Path.Combine(
487using (var depsJsonFileStream = File.OpenRead(Path.Combine(outputFolder, $"{project.Name}.deps.json")))
526using var depsJsonFileStream = File.OpenRead(Path.Combine(outputFolder, $"{project.Name}.deps.json"));
607outputDirectory.Should().HaveFile(Path.Combine("fr", "Humanizer.resources.dll"));
650string intermediateFolderWithConfiguration = Path.Combine(buildCommand.GetBaseIntermediateDirectory().FullName, "Debug");
779string testDirectory = Path.Combine(testAsset.TestRoot, testProject.Name);
869var depsFilePath = Path.Combine(outputPath, $"{testProject.Name}.deps.json");
870var runtimeConfigPath = Path.Combine(outputPath, $"{testProject.Name}.runtimeconfig.json");
930var refPath = Path.Combine(outputPath, "ref");
1123var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.Path, testProj.Name));
1129var runCommand = new RunExeCommand(Log, Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework).FullName, $"{testProj.Name}{EnvironmentInfo.ExecutableExtension}"));
GivenThatWeWantToBuildASelfContainedApp.cs (11)
52string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
141string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
218.WithEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS, Path.Combine(packageDownloadAsset.TestRoot, packageDownloadProject.Name));
229var path = Path.Combine(packagesFolder, runtimePack.metadata["NuGetPackageId"].ToLowerInvariant());
285string manifestRoot = Path.Combine(testAsset.TestRoot, "manifests");
288string manifestPath = Path.Combine(manifestFolder, "WorkloadManifest.json");
398.WithWorkingDirectory(Path.Combine(testAsset.Path, "MainProject"))
495Path.Combine(asset.Path, project.Name),
516string exePath = Path.Combine(
588string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
631string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
GivenThatWeWantToBuildAWindowsDesktopProject.cs (6)
157var projFile = Path.Combine(testDirectory, Path.GetFileName(testDirectory) + ".csproj");
262var projectPath = Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj");
281File.WriteAllText(Path.Combine(testDir.Path, "Directory.Build.targets"), DirectoryBuildTargetsContent);
310File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent);
342File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent);
792File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), """
GivenThatWeWantToBuildWithATargetPlatform.cs (5)
32var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, valueName);
70var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.Path, testProj.Name), targetFramework, "TargetPlatformIdentifier");
88var build = new BuildCommand(Log, Path.Combine(testAsset.Path, testProject.Name));
121File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent);
159File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.targets"), DirectoryBuildTargetsContent);
GivenThatWeWantToControlGeneratedAssemblyInfo.cs (24)
79var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework, "Release").FullName, "HelloWorld.dll");
96var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
127var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
159var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
195var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
232var command = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), testProject.TargetFrameworks, valueName: "InformationalVersion");
258var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll");
286var assemblyPath = Path.Combine(incrementalBuildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll");
309var assemblyPath = Path.Combine(firstBuildCommand.GetOutputDirectory(targetFramework).FullName, "TestLibrary.dll");
359var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll");
394var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll");
453var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(ToolsetInfo.CurrentTargetFramework).FullName, "HelloWorld.dll");
507var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, "HelloWorld.dll");
553var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll");
579var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll");
606var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll");
632var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll");
660var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory("netstandard2.0").FullName, "HelloWorld.dll");
698var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".dll");
730File.WriteAllText(Path.Combine(testAsset.TestRoot, "Directory.Build.props"), @"
744var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(testTestProject.TargetFrameworks).FullName, testTestProject.Name + ".dll");
776var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".dll");
803var assemblyPath = Path.Combine(buildCommand.GetOutputDirectory(targetFramework).FullName, testProject.Name + ".dll");
860var exePath = Path.Combine(buildCommand.GetOutputDirectory(testProject.TargetFrameworks).FullName, testProject.Name + ".dll");
GivenThatWeWantToFloatWarningLevels.cs (8)
52Path.Combine(testAsset.TestRoot, testProject.Name),
96Path.Combine(testAsset.TestRoot, testProject.Name),
141Path.Combine(testAsset.TestRoot, testProject.Name),
197Path.Combine(testAsset.TestRoot, testProject.Name),
244Path.Combine(testAsset.TestRoot, testProject.Name),
340Path.Combine(testAsset.TestRoot, testProject.Name),
357Path.Combine(testAsset.TestRoot, testProject.Name),
463var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
GivenThatWeWantToUsePlatformAnalyzers.cs (9)
50Path.Combine(testAsset.TestRoot, testProject.Name),
96Path.Combine(testAsset.TestRoot, testProject.Name),
142Path.Combine(testAsset.TestRoot, testProject.Name),
188Path.Combine(testAsset.TestRoot, testProject.Name),
234Path.Combine(testAsset.TestRoot, testProject.Name),
279var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
319Path.Combine(testAsset.TestRoot, testProject.Name),
365Path.Combine(testAsset.TestRoot, testProject.Name),
411Path.Combine(testAsset.TestRoot, testProject.Name),
GivenThereAreDefaultItems.cs (20)
141string sharedCodePath = Path.Combine(Path.GetDirectoryName(getValuesCommand.ProjectRootPath), "Shared");
142WriteFile(Path.Combine(sharedCodePath, "Shared.cs"),
254WriteFile(Path.Combine(getValuesCommand.ProjectRootPath, "CSharpAsResource.cs"),
302WriteFile(Path.Combine(getValuesCommand.ProjectRootPath, "CSharpAsContent.cs"),
305WriteFile(Path.Combine(getValuesCommand.ProjectRootPath, "None.txt"), "Content file");
386var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
388File.WriteAllText(Path.Combine(projectFolder, "ShouldBeIgnored.cs"), "!InvalidCSharp!");
389File.WriteAllText(Path.Combine(projectFolder, "Resources.resx"), "<Resource/>");
390File.WriteAllText(Path.Combine(projectFolder, "ResourcesResw.resw"), "<root/>");
391File.WriteAllText(Path.Combine(projectFolder, "TestImage.jpg"), "");
464WriteFile(Path.Combine(buildCommand.ProjectRootPath, "ProjectRoot.txt"), "ProjectRoot");
504WriteFile(Path.Combine(buildCommand.ProjectRootPath, "ShouldNotBeCompiled.cs"),
531WriteFile(Path.Combine(buildCommand.ProjectRootPath, "Class1.cs"), "public class Class1 {}");
727var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name),
765var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
767File.WriteAllText(Path.Combine(projectFolder, "ResourcesResw.resw"), "<root/>");
771File.WriteAllText(Path.Combine(projectFolder, fileName), "");
816var projectFolder = Path.Combine(testAsset.TestRoot, testProject.Name);
818File.WriteAllText(Path.Combine(projectFolder, "ResourcesResw.resw"), "<root/>");
822File.WriteAllText(Path.Combine(projectFolder, fileName), "");
GivenWeWantToRequireWindowsForDesktopApps.cs (6)
178var command = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName));
206var command = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName));
237var buildCommand = new BuildCommand(Log, Path.Combine(asset.Path, ProjectName));
264Path.Combine(asset.Path, testProject.Name),
292Path.Combine(asset.Path, testProject.Name),
360Path.Combine(testAsset.Path, testProject.Name),
ReferenceExeTests.cs (10)
145var mainExePath = Path.Combine(outputDirectory, MainProject.Name + Constants.ExeSuffix);
147var referencedExePath = Path.Combine(outputDirectory, ReferencedProject.Name + Constants.ExeSuffix);
346var testProjectDirectory = Path.Combine(testAsset.TestRoot, "TestProject");
402var mtpProjectDirectory = Path.Combine(testAssetMTP.Path, "MTPTestProject");
406File.WriteAllText(Path.Combine(mtpProjectDirectory, "Directory.Build.targets"), """
462var consoleAppDirectory = Path.Combine(testAssetSelfContained.Path, testConsoleProjectSelfContained.Name);
490var testProjectDirectory = Path.Combine(testAsset.TestRoot, "TestProject");
500string consoleProjectDirectory = Path.Combine(testAsset.Path, testConsoleProject.Name);
535var mtpProjectDirectory = Path.Combine(testAssetMTP.Path, mtpSelfContained.Name);
539File.WriteAllText(Path.Combine(mtpProjectDirectory, "Directory.Build.targets"), """
SourceLinkTests.cs (15)
22var gitDir = Path.Combine(repoDir, ".git");
26File.WriteAllText(Path.Combine(gitDir, "HEAD"), "ref: refs/heads/master");
31File.WriteAllText(Path.Combine(headsDir, "master"), commitSha);
36File.WriteAllText(Path.Combine(gitDir, "config"), $"""
42File.WriteAllText(Path.Combine(repoDir, ".gitignore"), """
104.CopyTestAsset("SourceLinkTestApp", testDestinationDirectory: Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()))
203var sourceLinkFilePath = Path.Combine(intermediateDir.FullName, "SourceLinkTestApp.sourcelink.json");
205var expectedPattern = Path.Combine(testAsset.Path, "*").Replace("\\", "\\\\");
209ValidatePdb(Path.Combine(intermediateDir.FullName, "SourceLinkTestApp.pdb"), expectedEmbeddedSources: true);
214using var nupkg = ZipFile.OpenRead(Path.Combine(binDir.FullName, "SourceLinkTestApp.1.0.0.nupkg"));
289ValidatePdb(Path.Combine(intermediateDir.FullName, "SourceLinkTestApp.pdb"), expectedEmbeddedSources: false);
315var sourceLinkFilePath = Path.Combine(intDir, "NETCoreCppCliTest.sourcelink.json");
317var expectedPattern = Path.Combine(testAsset.Path, "*").Replace("\\", "\\\\");
322var pdbText = File.ReadAllText(Path.Combine(outputDir, "NETCoreCppCliTest.pdb"), Encoding.UTF8);
337WorkingDirectory = Path.Combine(testAsset.Path, "FxWpf")
Microsoft.NET.Clean.Tests (1)
Microsoft.NET.Pack.Tests (8)
Microsoft.NET.Publish.Tests (290)
GivenThatWeWantToPublishAHelloWorldProject.cs (26)
55new DotnetCommand(Log, Path.Combine(publishDirectory.FullName, "HelloWorld.dll"))
121string selfContainedExecutableFullPath = Path.Combine(publishDirectory.FullName, selfContainedExecutable);
326using (var depsJsonFileStream = File.OpenRead(Path.Combine(publishDirectory.FullName, $"{testProject.Name}.deps.json")))
344string selfContainedExecutableFullPath = Path.Combine(publishDirectory.FullName, selfContainedExecutable);
386runCommand = new DotnetCommand(Log, Path.Combine(publishDirectory.FullName, $"{testProject.Name}.dll"));
405var buildCommand = new BuildCommand(helloWorldAsset, Path.Combine("DeployProj", "Deploy.proj"));
435File.WriteAllText(Path.Combine(helloWorldAsset.Path, "Directory.Build.props"), "<Project><PropertyGroup><PublishRelease>true</PublishRelease></PropertyGroup></Project>");
620.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name))
645.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name))
678File.WriteAllText(Path.Combine(publishProfilesDirectory, "test.pubxml"), $@"
862var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
866File.WriteAllText(Path.Combine(publishProfilesDirectory, "test.pubxml"), $@"
945var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
946var projectPath = Path.Combine(projectDirectory, $"{testProject.Name}.csproj");
948var publishProfilePath = Path.Combine(publishProfilesDirectory, "test.pubxml");
992var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
996File.WriteAllText(Path.Combine(publishProfilesDirectory, "testProfile.pubxml"), $@"
1049var projectDirectory = Path.Combine(testProjectInstance.Path, testProject.Name);
1053File.WriteAllText(Path.Combine(publishProfilesDirectory, "testProfile.pubxml"), $@"
1096var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
1152TestCommand runCommand = new RunExeCommand(Log, Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}"));
1159expectedRoot = Path.Combine(publishDirectory, appRelativeDotNet);
1160CopyDirectory(Path.Combine(TestContext.Current.ToolsetUnderTest.DotNetRoot, "host"), Path.Combine(expectedRoot, "host"));
1192File.Copy(file, Path.Combine(destinationDir, Path.GetFileName(file)));
1197CopyDirectory(directory, Path.Combine(destinationDir, Path.GetFileName(directory)));
GivenThatWeWantToPublishAnAotApp.cs (40)
47var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
60var publishedDll = Path.Combine(publishDirectory, $"{projectName}{sharedLibSuffix}");
61var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
103var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
104var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
149var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
150var publishedRuntimeConfig = Path.Combine(publishDirectory, $"{testProject.Name}.runtimeconfig.json");
151var publishedDeps = Path.Combine(publishDirectory, $"{testProject.Name}.deps.json");
201var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
202var publishedRuntimeConfig = Path.Combine(publishDirectory, $"{testProject.Name}.runtimeconfig.json");
203var publishedDeps = Path.Combine(publishDirectory, $"{testProject.Name}.deps.json");
243var assemblyPath = Path.Combine(outputDirectory, $"{projectName}{Constants.ExeSuffix}");
244var runtimeConfigPath = Path.Combine(outputDirectory, $"{projectName}.runtimeconfig.json");
245var depsPath = Path.Combine(outputDirectory, $"{projectName}.deps.json");
295var publishedDll = Path.Combine(publishDirectory, $"{projectName}{sharedLibSuffix}");
296var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
338var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
339var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
368var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
369var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
414var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
415var publishedExe = Path.Combine(publishDirectory, $"{testProject.Name}{Constants.ExeSuffix}");
447var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
464var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
488var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
512var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
535var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
565var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
584var buildCommand = new BuildCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
594var assemblyPath = Path.Combine(outputDirectory, $"{projectName}.dll");
599var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
699var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
743var publishedExe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}");
838var publishedExe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}");
873var publishedDll = Path.Combine(publishDirectory, $"{projectName}{staticLibSuffix}");
896var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
926var publishedDll = Path.Combine(publishDirectory, $"{projectName}{sharedLibSuffix}");
942var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
965string runtimeConfigFile = Path.Combine(outputDirectory, $"{projectName}.runtimeconfig.json");
1226var path = Path.Combine(baseDir, baseName + suffix);
GivenThatWeWantToPublishASingleFileApp.cs (18)
43private readonly string SmallNameDirWord = Path.Combine(SmallNameDir, "word").Replace('\\', '/'); // DirectoryInfoAssertions normalizes Path-Separator.
71using (var writer = File.CreateText(Path.Combine(longDirPath, ".word")))
105var singleFilePath = Path.Combine(GetPublishDirectory(cmd).FullName, $"SingleFileTest{Constants.ExeSuffix}");
328var singleFilePath = Path.Combine(publishDir, $"{testProject.Name}{Constants.ExeSuffix}");
445var mainProjectDll = Path.Combine(intermediateDirectory.FullName, $"{TestProjectName}.dll");
522var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand).FullName, SingleFile);
567string singleFilePath = Path.Combine(
583var appHostPath = Path.Combine(GetPublishDirectory(publishCommand).FullName, SingleFile);
607var appHostPath = Path.Combine(GetPublishDirectory(publishCommand).FullName, SingleFile);
636var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
656var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
672var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
827var singleFilePath = Path.Combine(publishDir, $"{testProject.Name}{Constants.ExeSuffix}");
870string singleFilePath = Path.Combine(publishDir.FullName, $"{testProject.Name}.exe");
960var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}");
991var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}");
1025var singleFilePath = Path.Combine(GetPublishDirectory(publishCommand, ToolsetInfo.CurrentTargetFramework).FullName, $"SingleFileTest{Constants.ExeSuffix}");
1169var singleFilePath = Path.Combine(publishDir, testProject.Name);
GivenThatWeWantToPublishIncrementally.cs (14)
43File.WriteAllText(Path.Combine(publishDir, "UserData.txt"), string.Empty);
81File.WriteAllText(Path.Combine(publishDir, "UserData.txt"), string.Empty);
82File.WriteAllText(Path.Combine(publishDir, testProject.Name + ".deps.json"), string.Empty);
127File.WriteAllText(Path.Combine(publishDir, testProject.Name + ".dll"), string.Empty);
167File.WriteAllText(Path.Combine(publishDir, "UserData.txt"), string.Empty);
197new PublishCommand(Log, Path.Combine(testDir.Path, assetName))
203Directory.Exists(Path.Combine(publishDir, "wwwroot"));
205File.WriteAllText(Path.Combine(publishDir, "UserData.txt"), string.Empty);
208new PublishCommand(Log, Path.Combine(testDir.Path, assetName))
213Directory.Exists(Path.Combine(publishDir, "wwwroot"));
241File.WriteAllText(Path.Combine(publishDir, "UserData.txt"), string.Empty);
318var depsJsonPath = Path.Combine(publishDir, testProject.Name + ".deps.json");
337new FileInfo(Path.Combine(publishDir, expectedFile)).Should().Exist();
344new FileInfo(Path.Combine(publishDir, unexpectedFile)).Should().NotExist();
GivenThatWeWantToPublishTrimmedWindowsFormsAndWPFApps.cs (20)
126var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj"));
134string mainWindowXamlCsPath = Path.Combine(testDir.Path, "Form1.cs");
153var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory(
159var wpfPresentationCoreDll = Path.Combine(publishDirectory, "PresentationCore.dll");
160var wpfPresentationFxDll = Path.Combine(publishDirectory, "PresentationFramework.dll");
161var winFormsDll = Path.Combine(publishDirectory, "System.Windows.Forms.dll");
162var accessibilitysDll = Path.Combine(publishDirectory, "Accessibility.dll");
172FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe")
198var project = XDocument.Load(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj"));
206string mainWindowXamlCsPath = Path.Combine(testDir.Path, "MainWindow.xaml.cs");
225var publishDirectory = OutputPathCalculator.FromProject(Path.Combine(testDir.Path, Path.GetFileName(testDir.Path) + ".csproj")).GetPublishDirectory(
231var wpfPresentationCoreDll = Path.Combine(publishDirectory, "PresentationCore.dll");
232var wpfPresentationFxDll = Path.Combine(publishDirectory, "PresentationFramework.dll");
233var winFormsDll = Path.Combine(publishDirectory, "System.Windows.Forms.dll");
234var accessibilitysDll = Path.Combine(publishDirectory, "Accessibility.dll");
244FileName = Path.Combine(publishDirectory, Path.GetFileName(testDir.Path) + ".exe")
278var wpfPresentationCoreDll = Path.Combine(publishDirectory, "PresentationCore.dll");
279var wpfPresentationFxDll = Path.Combine(publishDirectory, "PresentationFramework.dll");
280var winFormsDll = Path.Combine(publishDirectory, "System.Windows.Forms.dll");
281var accessibilitysDll = Path.Combine(publishDirectory, "Accessibility.dll");
GivenThatWeWantToPublishWithoutConflicts.cs (2)
32var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "ResolvedFileToPublish", GetValuesCommand.ValueType.Item)
71var getValuesCommand = new GetValuesCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name), targetFramework, "ResolvedFileToPublish", GetValuesCommand.ValueType.Item)
GivenThatWeWantToRunILLink.cs (90)
50var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
54var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
55var unusedDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
56var unusedFrameworkDll = Path.Combine(publishDirectory, $"{UnusedFrameworkAssembly}.dll");
63var depsFile = Path.Combine(publishDirectory, $"{projectName}.deps.json");
89var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
93var linkedDll = Path.Combine(linkedDirectory, $"{projectName}.dll");
94var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
95var unusedDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
96var unusedFrameworkDll = Path.Combine(publishDirectory, $"{UnusedFrameworkAssembly}.dll");
104var depsFile = Path.Combine(publishDirectory, $"{projectName}.deps.json");
132var exe = Path.Combine(publishDirectory.FullName, $"{testProject.Name}{Constants.ExeSuffix}");
285var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
286var unusedIsTrimmableDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
311var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
312var unusedTrimModeLinkDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
350var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
351var isTrimmableDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
386var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
410var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
411var unusedTrimmableDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
440var unusedTrimmableDll = Path.Combine(publishDirectory, "UnusedTrimmableAssembly.dll");
441var unusedNonTrimmableDll = Path.Combine(publishDirectory, "UnusedNonTrimmableAssembly.dll");
475var unusedTrimmableDll = Path.Combine(publishDirectory, "UnusedTrimmableAssembly.dll");
476var unusedNonTrimmableDll = Path.Combine(publishDirectory, "UnusedNonTrimmableAssembly.dll");
499var trimmableDll = Path.Combine(publishDirectory, "TrimmableAssembly.dll");
500var nonTrimmableDll = Path.Combine(publishDirectory, "NonTrimmableAssembly.dll");
501var unusedTrimmableDll = Path.Combine(publishDirectory, "UnusedTrimmableAssembly.dll");
502var unusedNonTrimmableDll = Path.Combine(publishDirectory, "UnusedNonTrimmableAssembly.dll");
529var trimmableDll = Path.Combine(publishDirectory, "TrimmableAssembly.dll");
530var nonTrimmableDll = Path.Combine(publishDirectory, "NonTrimmableAssembly.dll");
531var unusedTrimmableDll = Path.Combine(publishDirectory, "UnusedTrimmableAssembly.dll");
532var unusedNonTrimmableDll = Path.Combine(publishDirectory, "UnusedNonTrimmableAssembly.dll");
569var trimmableDll = Path.Combine(publishDirectory, "TrimmableAssembly.dll");
570var nonTrimmableDll = Path.Combine(publishDirectory, "NonTrimmableAssembly.dll");
571var unusedTrimmableDll = Path.Combine(publishDirectory, "UnusedTrimmableAssembly.dll");
572var unusedNonTrimmableDll = Path.Combine(publishDirectory, "UnusedNonTrimmableAssembly.dll");
819var intermediateLinkDir = Path.Combine(intermediateDirectory, "linked");
821var linkSemaphore = Path.Combine(intermediateLinkDir, "Link.semaphore");
822var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
890var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
988var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
1008var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
1025var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
1048string runtimeConfigFile = Path.Combine(outputDirectory, $"{projectName}.runtimeconfig.json");
1131var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
1132var unusedDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
1188var referenceDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
1222var referenceDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
1246var intermediateLinkDir = Path.Combine(intermediateDirectory, "linked");
1248var linkSemaphore = Path.Combine(intermediateLinkDir, "Link.semaphore");
1280var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
1284var linkedDll = Path.Combine(linkedDirectory, $"{projectName}.dll");
1285var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
1286var unusedDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
1287var unusedFrameworkDll = Path.Combine(publishDirectory, $"{UnusedFrameworkAssembly}.dll");
1294var depsFile = Path.Combine(publishDirectory, $"{projectName}.deps.json");
1317var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
1321var linkedDll = Path.Combine(linkedDirectory, $"{projectName}.dll");
1322var publishedDll = Path.Combine(publishDirectory, $"{projectName}.dll");
1323var unusedDll = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
1324var unusedFrameworkDll = Path.Combine(publishDirectory, $"{UnusedFrameworkAssembly}.dll");
1331var depsFile = Path.Combine(publishDirectory, $"{projectName}.deps.json");
1355var intermediateLinkDir = Path.Combine(intermediateDirectory, "linked");
1356var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
1358var linkSemaphore = Path.Combine(intermediateLinkDir, "Link.semaphore");
1364var publishedDllKeptFirstTimeOnly = Path.Combine(publishDirectory, $"{referenceProjectName}.dll");
1365var linkedDllKeptFirstTimeOnly = Path.Combine(linkedDirectory, $"{referenceProjectName}.dll");
1388Directory.Exists(Path.Combine(publishDirectory, "linked")).Should().BeFalse();
1409var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
1411var intermediatePdb = Path.Combine(intermediateDirectory, $"{projectName}.pdb");
1412var linkedPdb = Path.Combine(linkedDirectory, $"{projectName}.pdb");
1413var publishedPdb = Path.Combine(publishDirectory, $"{projectName}.pdb");
1447var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
1449var intermediatePdb = Path.Combine(intermediateDirectory, $"{projectName}.pdb");
1450var linkedPdb = Path.Combine(linkedDirectory, $"{projectName}.pdb");
1451var publishedPdb = Path.Combine(publishDirectory, $"{projectName}.pdb");
1484var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
1486var intermediatePdb = Path.Combine(intermediateDirectory, $"{projectName}.pdb");
1487var linkedPdb = Path.Combine(linkedDirectory, $"{projectName}.pdb");
1488var publishedPdb = Path.Combine(publishDirectory, $"{projectName}.pdb");
1514var linkedDirectory = Path.Combine(intermediateDirectory, "linked");
1516var intermediatePdb = Path.Combine(intermediateDirectory, $"{projectName}.pdb");
1517var linkedPdb = Path.Combine(linkedDirectory, $"{projectName}.pdb");
1518var publishedPdb = Path.Combine(publishDirectory, $"{projectName}.pdb");
1785var assemblyPath = Path.Combine(outputDirectory, $"{projectName}.dll");
1786var runtimeConfigPath = Path.Combine(outputDirectory, $"{projectName}.runtimeconfig.json");
1819var assemblyPath = Path.Combine(outputDirectory, $"{projectName}.dll");
1820var runtimeConfigPath = Path.Combine(outputDirectory, $"{projectName}.runtimeconfig.json");
2359Assembly assembly = mlc.LoadFromAssemblyPath(Path.Combine(publishCommand.GetOutputDirectory(targetFramework: targetFramework, runtimeIdentifier: rid).FullName, "System.Private.CoreLib.dll"));
GivenThatWeWantToStoreAProjectWithDependencies.cs (20)
63var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "outdir");
64var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w");
93var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "outdir");
94var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w");
98binlogPath = Path.Combine(uploadRoot, "compose_dependencies_noopt().binlog");
139var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "o");
140var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w");
141var additionalproj1 = Path.Combine(simpleDependenciesAsset.TestRoot, "NewtonsoftMultipleVersions.xml");
142var additionalproj2 = Path.Combine(simpleDependenciesAsset.TestRoot, "FluentAssertion.xml");
170var artifact = Path.Combine(OutputFolder, "artifact.xml");
188var outputFolder = Path.Combine(targetManifestsAsset.TestRoot, "o");
189var workingDir = Path.Combine(targetManifestsAsset.TestRoot, "w");
196var artifactFile = Path.Combine(outputFolder, "artifact.xml");
222var outputFolder = Path.Combine(targetManifestsAsset.TestRoot, "o");
223var workingDir = Path.Combine(targetManifestsAsset.TestRoot, "w");
246var symbolsFolder = new DirectoryInfo(Path.Combine(outputFolder, "symbols"));
283var outputFolder = Path.Combine(testProjectInstance.TestRoot, "o");
284var workingDir = Path.Combine(testProjectInstance.TestRoot, "w");
314var outputFolder = Path.Combine(targetManifestsAsset.TestRoot, "o");
315var workingDir = Path.Combine(targetManifestsAsset.TestRoot, "w");
RuntimeIdentifiersTests.cs (8)
64string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
106string selfContainedExecutableFullPath = Path.Combine(buildCommand.GetOutputDirectory(runtimeIdentifier: runtimeIdentifier).FullName, selfContainedExecutable);
173string selfContainedExecutableFullPath = Path.Combine(outputDirectory.FullName, selfContainedExecutable);
217.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, testProject.Name))
248.WithWorkingDirectory(Path.Combine(testAsset.TestRoot, MethodBase.GetCurrentMethod().Name))
283var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
329var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
379var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name));
Microsoft.NET.Rebuild.Tests (1)
Microsoft.NET.Restore.Tests (14)
Microsoft.Net.Sdk.AnalyzerRedirecting (1)
Microsoft.Net.Sdk.AnalyzerRedirecting.Tests (3)
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (10)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (2)
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (126)
BlazorWasmStaticWebAssetsIntegrationTest.cs (12)
27File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "App.razor.css"), "h1 { font-size: 16px; }");
39var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
45var finalPath = Path.Combine(outputPath, "blazorwasm-minimal.staticwebassets.runtime.json");
69File.WriteAllText(Path.Combine(ProjectDirectory.TestRoot, "App.razor.css"), "h1 { font-size: 16px; }");
80var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
116var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
122var finalPath = Path.Combine(outputPath, "blazorhosted.staticwebassets.runtime.json");
160var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
200var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
244var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
251var finalPath = Path.Combine(outputPath, "blazorhosted.staticwebassets.runtime.json");
299var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
WasmBuildIntegrationTest.cs (12)
37File.WriteAllText(Path.Combine(testInstance.TestRoot, "App.razor.css"), "h1 { font-size: 16px; }");
198File.WriteAllText(Path.Combine(wwwroot, "appsettings.json"), "Default settings");
199File.WriteAllText(Path.Combine(wwwroot, "appsettings.development.json"), "Development settings");
245File.WriteAllText(Path.Combine(wwwroot, "appsettings.json"), "Default settings");
246File.WriteAllText(Path.Combine(wwwroot, "appsettings.development.json"), "Development settings");
597var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
603var finalPath = Path.Combine(outputPath, "blazorwasm.staticwebassets.runtime.json");
652var referenceAssemblyPath = new FileInfo(Path.Combine(
705var nugetRestorePath = Path.Combine(testInstance.TestRoot, ".nuget");
708.WithWorkingDirectory(Path.Combine(testInstance.TestRoot, "blazorhosted"))
713new DirectoryInfo(Path.Combine(nugetRestorePath, "microsoft.netcore.app.runtime.mono.linux-x64"))
735var referenceAssemblyPath = new FileInfo(Path.Combine(
WasmJsModulesIntegrationTests.cs (12)
37var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
42var blazorBootJson = new FileInfo(Path.Combine(intermediateOutputPath, WasmBootConfigFileName));
82var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
87var blazorBootJson = new FileInfo(Path.Combine(intermediateOutputPath.Replace("blazorhosted", "blazorwasm"), WasmBootConfigFileName));
126var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
131var blazorBootJson = new FileInfo(Path.Combine(intermediateOutputPath, $"publish.{WasmBootConfigFileName}"));
190var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
246var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
251var publishExtension = GetPublishExtension(Path.Combine(intermediateOutputPath, $"publish.{WasmBootConfigFileName}"));
252GetPublishExtensionEntriesCount(Path.Combine(intermediateOutputPath, $"publish.{WasmBootConfigFileName}")).Should().Be(1);
317var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
322var publishExtension = GetPublishExtension(Path.Combine(intermediateOutputPath.Replace("blazorhosted", "blazorwasm"), $"publish.{WasmBootConfigFileName}"));
WasmPublishIntegrationTest.cs (53)
50var content = File.ReadAllText(Path.Combine(publishDirectory.ToString(), "web.config"));
53VerifyBootManifestHashes(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"));
92var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
101serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
181var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
205serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
231var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
295var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
316serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
368new DirectoryInfo(Path.Combine(publishDirectory.ToString(), "wwwroot")).Should().HaveDirectory("different-path");
373var content = File.ReadAllText(Path.Combine(publishDirectory.ToString(), "web.config"));
379Path.Combine(publishDirectory.ToString(), "wwwroot"),
380serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
435new DirectoryInfo(Path.Combine(publishDirectory.ToString(), "wwwroot")).Should().HaveDirectory("different-path");
477var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
516serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
561var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
607var blazorPublishDirectory = Path.Combine(publishOutputDirectory.ToString(), "wwwroot");
663serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
688File.WriteAllText(Path.Combine(wwwroot, "appsettings.json"), "Default settings");
689File.WriteAllText(Path.Combine(wwwroot, "appsettings.development.json"), "Development settings");
801new FileInfo(Path.Combine(publishDirectory.ToString(), "blazorhosted.dll")).Should().Exist();
847VerifyBootManifestHashes(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"));
866VerifyServiceWorkerFiles(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"),
867serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
897new FileInfo(Path.Combine(publishDirectory.ToString(), "blazorhosted.dll")).Should().Exist();
927VerifyBootManifestHashes(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"));
928VerifyServiceWorkerFiles(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"),
929serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
962new FileInfo(Path.Combine(publishDirectory.ToString(), "blazorhosted.dll")).Should().Exist();
1008VerifyBootManifestHashes(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"));
1019var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
1023serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
1056var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
1059new FileInfo(Path.Combine(publishDirectory.ToString(), "blazorhosted.dll")).Should().Exist();
1111VerifyBootManifestHashes(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"));
1124serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
1172var blazorPublishDirectory = Path.Combine(publishDirectory.ToString(), "wwwroot");
1243var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted"));
1245publishCommand.WithWorkingDirectory(Path.Combine(testInstance.TestRoot, "blazorhosted"));
1268var publishCommand = new DotnetPublishCommand(Log, Path.Combine(testInstance.TestRoot, "blazorhosted"));
1270publishCommand.WithWorkingDirectory(Path.Combine(testInstance.TestRoot, "blazorhosted"));
1356VerifyBootManifestHashes(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"));
1374VerifyServiceWorkerFiles(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"),
1375serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
1438VerifyBootManifestHashes(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"));
1456VerifyServiceWorkerFiles(testInstance, Path.Combine(publishDirectory.ToString(), "wwwroot"),
1457serviceWorkerPath: Path.Combine("serviceworkers", "my-service-worker.js"),
1518new FileInfo(Path.Combine(publishOutputDirectory, "BlazorMultipleApps.Server.dll")).Should().Exist();
1519new FileInfo(Path.Combine(publishOutputDirectory, "BlazorMultipleApps.FirstClient.dll")).Should().Exist();
1520new FileInfo(Path.Combine(publishOutputDirectory, "BlazorMultipleApps.SecondClient.dll")).Should().Exist();
1567var referenceAssemblyPath = new FileInfo(Path.Combine(
1669return new DirectoryInfo(Path.Combine(baseDirectory.FullName, "publish"));
Microsoft.NET.Sdk.Publish.Tasks (24)
Microsoft.NET.Sdk.Publish.Tasks.Tests (37)
Tasks\TransformAppSettingsTests.cs (11)
35string projectFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
36string publishDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
56string appSettingsProductionJson = (Path.Combine(publishDir, "appsettings.production.json"));
82string projectFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
83string publishDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
105string projectFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
106string publishDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
128string appSettingsProductionJson = (Path.Combine(publishDir, $"MyCustomAppSettings.production.json"));
153string projectFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
154string publishDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
177string appSettingsProductionJson = (Path.Combine(publishDir, $"NewDestinationAppSettings.json"));
Tasks\TransformWebConfigTests.cs (11)
18string projectFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
25var projectFile = Path.Combine(projectFolder, "Test.csproj");
31Assert.Equal(Path.Combine(projectFolder, webConfigToSearchFor), webConfig);
35if (File.Exists(Path.Combine(projectFolder, webConfigToSearchFor)))
37File.Delete(Path.Combine(projectFolder, webConfigToSearchFor));
45string projectFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
53var projectFile = Path.Combine(projectFolder, "Test.csproj");
59Assert.Equal(Path.Combine(projectFolder, "web.config"), webConfig);
63if (File.Exists(Path.Combine(projectFolder, fileName)))
65File.Delete(Path.Combine(projectFolder, fileName));
73using var fs = File.Create(Path.Combine(path, name));
Microsoft.NET.Sdk.Razor.Tasks (6)
Microsoft.NET.Sdk.Razor.Tests (185)
BuildIntegrationTest.cs (37)
35new FileInfo(Path.Combine(outputPath, "SimpleMvc.dll")).Should().Exist();
36new FileInfo(Path.Combine(outputPath, "SimpleMvc.pdb")).Should().Exist();
37new FileInfo(Path.Combine(outputPath, "SimpleMvc.Views.dll")).Should().NotExist();
38new FileInfo(Path.Combine(outputPath, "SimpleMvc.Views.pdb")).Should().NotExist();
52new FileInfo(Path.Combine(outputPath, "SimpleMvc.dll")).Should().Exist();
53new FileInfo(Path.Combine(outputPath, "SimpleMvc.pdb")).Should().Exist();
54new FileInfo(Path.Combine(outputPath, "SimpleMvc.Views.dll")).Should().NotExist();
55new FileInfo(Path.Combine(outputPath, "SimpleMvc.Views.pdb")).Should().NotExist();
83new FileInfo(Path.Combine(intermediateOutputPath, "SimpleMvc.dll")).Should().NotExist();
97new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.dll")).Should().Exist();
98new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.pdb")).Should().Exist();
99new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.Views.dll")).Should().NotExist();
100new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.Views.pdb")).Should().NotExist();
101new FileInfo(Path.Combine(outputPath, "ClassLibrary.dll")).Should().Exist();
102new FileInfo(Path.Combine(outputPath, "ClassLibrary.pdb")).Should().Exist();
103new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.dll")).Should().NotExist();
104new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.pdb")).Should().NotExist();
119new FileInfo(Path.Combine(outputPath, "SimpleMvc.deps.json")).Should().Exist();
120var depsFilePath = Path.Combine(outputPath, "SimpleMvc.deps.json");
163var assemblyPath = Path.Combine(intermediateOutputPath, "SimpleMvc.dll");
180var razorAssemblyInfo = Path.Combine(intermediateOutputPath, "SimpleMvc.RazorAssemblyInfo.cs");
183new FileInfo(Path.Combine(intermediateOutputPath, "SimpleMvc.RazorTargetAssemblyInfo.cs")).Should().NotExist();
207new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.dll")).Should().Exist();
208new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.Views.dll")).Should().NotExist();
209new FileInfo(Path.Combine(outputPath, "ClassLibrary.dll")).Should().Exist();
210new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.dll")).Should().NotExist();
211new FileInfo(Path.Combine(outputPath, "AnotherClassLib.dll")).Should().Exist();
212new FileInfo(Path.Combine(outputPath, "AnotherClassLib.Views.dll")).Should().NotExist();
246new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.dll")).Should().Exist();
247new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.Views.dll")).Should().NotExist();
248new FileInfo(Path.Combine(outputPath, "ClassLibrary.dll")).Should().Exist();
249new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.dll")).Should().NotExist();
250new FileInfo(Path.Combine(outputPath, "ClassLibraryMvc21.dll")).Should().Exist();
251new FileInfo(Path.Combine(outputPath, "ClassLibraryMvc21.Views.dll")).Should().Exist();
265new FileInfo(Path.Combine(intermediateOutputPath, "SimpleMvc.dll")).Should().Exist();
266new FileInfo(Path.Combine(intermediateOutputPath, "SimpleMvc.Views.dll")).Should().NotExist();
267new FileInfo(Path.Combine(intermediateOutputPath, "SimpleMvc.Views.pdb")).Should().NotExist();
BuildWithComponentsIntegrationTest.cs (13)
30new FileInfo(Path.Combine(outputPath, "ComponentLibrary.dll")).Should().Exist();
31new FileInfo(Path.Combine(outputPath, "ComponentLibrary.pdb")).Should().Exist();
33new FileInfo(Path.Combine(outputPath, "ComponentLibrary.Views.dll")).Should().NotExist();
34new FileInfo(Path.Combine(outputPath, "ComponentLibrary.Views.pdb")).Should().NotExist();
47new FileInfo(Path.Combine(outputPath, "MvcWithComponents.dll")).Should().Exist();
48new FileInfo(Path.Combine(outputPath, "MvcWithComponents.pdb")).Should().Exist();
49new FileInfo(Path.Combine(outputPath, "MvcWithComponents.Views.dll")).Should().NotExist();
50new FileInfo(Path.Combine(outputPath, "MvcWithComponents.Views.pdb")).Should().NotExist();
52new FileInfo(Path.Combine(outputPath, "MvcWithComponents.dll")).AssemblyShould().ContainType("MvcWithComponents.TestComponent");
53new FileInfo(Path.Combine(outputPath, "MvcWithComponents.dll")).AssemblyShould().ContainType("MvcWithComponents.Views.Shared.NavMenu");
56new FileInfo(Path.Combine(outputPath, "MvcWithComponents.dll")).AssemblyShould().ContainType("MvcWithComponents.Components.Counter");
58new FileInfo(Path.Combine(outputPath, "MvcWithComponents.dll")).AssemblyShould().ContainType("AspNetCoreGeneratedDocument.Views_Home_Index");
68var projectFile = Path.Combine(projectDirectory.Path, "ComponentApp.csproj");
MvcBuildIntegrationTest21NetFx.cs (16)
28new FileInfo(Path.Combine(outputPath, OutputFileName)).Should().Exist();
29new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.pdb")).Should().Exist();
30new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.dll")).Should().Exist();
31new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.pdb")).Should().Exist();
34new FileInfo(Path.Combine(intermediateOutputPath, $"{TestProjectName}.TagHelpers.input.cache")).Should().Exist();
35new FileInfo(Path.Combine(intermediateOutputPath, $"{TestProjectName}.TagHelpers.output.cache")).Should().Exist();
37Path.Combine(intermediateOutputPath, $"{TestProjectName}.TagHelpers.output.cache")).Should().Contain(
54new DirectoryInfo(Path.Combine(outputPath, "Views")).Should().NotExist();
57new DirectoryInfo(Path.Combine(outputPath, "refs")).Should().Exist();
71new FileInfo(Path.Combine(outputPath, OutputFileName)).Should().Exist();
72new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.pdb")).Should().Exist();
73new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.dll")).Should().Exist();
74new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.pdb")).Should().Exist();
77new DirectoryInfo(Path.Combine(outputPath, "refs")).Should().NotExist();
78new DirectoryInfo(Path.Combine(outputPath, "Views")).Should().NotExist();
107var depsFile = new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.deps.json"));
MvcBuildIntegrationTest50.cs (17)
41new FileInfo(Path.Combine(intermediateOutputPath, "MvcWithComponents.dll")).Should().NotExist();
42new FileInfo(Path.Combine(intermediateOutputPath, "MvcWithComponents.Views.dll")).Should().NotExist();
63new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.dll")).Should().Exist();
64new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.Views.dll")).Should().Exist();
65new FileInfo(Path.Combine(outputPath, "ClassLibrary.dll")).Should().Exist();
66new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.dll")).Should().Exist();
67new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.pdb")).Should().Exist();
72new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.dll")).Should().NotExist();
73new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.Views.dll")).Should().NotExist();
74new FileInfo(Path.Combine(outputPath, "ClassLibrary.dll")).Should().NotExist();
75new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.dll")).Should().NotExist();
76new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.pdb")).Should().NotExist();
82new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.dll")).Should().Exist();
83new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.Views.dll")).Should().Exist();
84new FileInfo(Path.Combine(outputPath, "ClassLibrary.dll")).Should().Exist();
85new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.dll")).Should().Exist();
86new FileInfo(Path.Combine(outputPath, "ClassLibrary.Views.pdb")).Should().Exist();
MvcBuildIntegrationTestLegacy.cs (16)
33new FileInfo(Path.Combine(outputPath, OutputFileName)).Should().Exist();
34new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.pdb")).Should().Exist();
35new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.dll")).Should().Exist();
36new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.pdb")).Should().Exist();
39new FileInfo(Path.Combine(intermediateOutputPath, $"{TestProjectName}.TagHelpers.input.cache")).Should().Exist();
40new FileInfo(Path.Combine(intermediateOutputPath, $"{TestProjectName}.TagHelpers.output.cache")).Should().Exist();
42Path.Combine(intermediateOutputPath, $"{TestProjectName}.TagHelpers.output.cache")).Should().Contain(
59new DirectoryInfo(Path.Combine(outputPath, "Views")).Should().NotExist();
62new DirectoryInfo(Path.Combine(outputPath, "refs")).Should().NotExist();
77new FileInfo(Path.Combine(outputPath, OutputFileName)).Should().Exist();
78new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.pdb")).Should().Exist();
79new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.dll")).Should().Exist();
80new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.Views.pdb")).Should().Exist();
83new DirectoryInfo(Path.Combine(outputPath, "refs")).Should().NotExist();
84new DirectoryInfo(Path.Combine(outputPath, "Views")).Should().NotExist();
114var depsFile = new FileInfo(Path.Combine(outputPath, $"{TestProjectName}.deps.json"));
PublishIntegrationTest.cs (39)
24new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.dll")).Should().Exist();
25new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.pdb")).Should().Exist();
26new FileInfo(Path.Combine(publishOutputPath, "appsettings.json")).Should().Exist();
27new FileInfo(Path.Combine(publishOutputPath, "appsettings.Development.json")).Should().Exist();
29new FileInfo(Path.Combine(outputPath, "SimpleMvc.dll")).Should().Exist();
30new FileInfo(Path.Combine(outputPath, "SimpleMvc.pdb")).Should().Exist();
31new FileInfo(Path.Combine(outputPath, "appsettings.json")).Should().Exist();
32new FileInfo(Path.Combine(outputPath, "appsettings.Development.json")).Should().Exist();
40new DirectoryInfo(Path.Combine(publishOutputPath, "refs")).Should().NotExist();
41new DirectoryInfo(Path.Combine(publishOutputPath, "Views")).Should().NotExist();
57new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.dll")).Should().Exist();
58new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.pdb")).Should().Exist();
61new DirectoryInfo(Path.Combine(publishOutputPath, "refs")).Should().NotExist();
62new DirectoryInfo(Path.Combine(publishOutputPath, "Views")).Should().NotExist();
71Directory.Delete(Path.Combine(projectDirectory.Path, "Views"), recursive: true);
79new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.dll")).Should().Exist();
80new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.pdb")).Should().Exist();
95new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.dll")).Should().Exist();
96new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.pdb")).Should().Exist();
100new DirectoryInfo(Path.Combine(publishOutputPath, "Views")).Should().NotBeEmpty();
122new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.dll")).Should().Exist();
123new FileInfo(Path.Combine(publishOutputPath, "SimpleMvc.pdb")).Should().Exist();
140new FileInfo(Path.Combine(publishOutputPath, "AppWithP2PReference.dll")).Should().Exist();
141new FileInfo(Path.Combine(publishOutputPath, "AppWithP2PReference.pdb")).Should().Exist();
142new FileInfo(Path.Combine(publishOutputPath, "ClassLibrary.dll")).Should().Exist();
143new FileInfo(Path.Combine(publishOutputPath, "ClassLibrary.pdb")).Should().Exist();
147new DirectoryInfo(Path.Combine(publishOutputPath, "refs")).Should().NotExist();
148new DirectoryInfo(Path.Combine(publishOutputPath, "Views")).Should().NotExist();
177new FileInfo(Path.Combine(outputPath, "AppWithP2PReference.dll")).Should().Exist();
178new FileInfo(Path.Combine(outputPath, "ClassLibrary.dll")).Should().Exist();
179new FileInfo(Path.Combine(outputPath, "AnotherClassLib.dll")).Should().Exist();
188new FileInfo(Path.Combine(publishOutputPath, "AppWithP2PReference.dll")).Should().Exist();
189new FileInfo(Path.Combine(publishOutputPath, "AppWithP2PReference.pdb")).Should().Exist();
191new FileInfo(Path.Combine(publishOutputPath, "ClassLibrary.dll")).Should().Exist();
192new FileInfo(Path.Combine(publishOutputPath, "ClassLibrary.pdb")).Should().Exist();
194new FileInfo(Path.Combine(publishOutputPath, "AnotherClassLib.dll")).Should().Exist();
195new FileInfo(Path.Combine(publishOutputPath, "AnotherClassLib.pdb")).Should().Exist();
210var assemblyPath = Path.Combine(outputPath, "SimpleMvc.dll");
220var publishAssemblyPath = Path.Combine(publishOutputPath, "SimpleMvc.dll");
Microsoft.NET.Sdk.Razor.Tool.Tests (11)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (12)
Microsoft.NET.Sdk.StaticWebAssets.Tests (742)
ComputeStaticWebAssetsTargetPathsTest.cs (6)
31Assets = [CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate#[.{fingerprint}]!.js", "All", "All", fingerprint: "1234asdf")],
43asset.GetMetadata("TargetPath").Should().Be(Path.Combine("wwwroot", "candidate.1234asdf.js"));
59Assets = [CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate#[.{fingerprint}].js", "All", "All", fingerprint: "1234asdf")],
71asset.GetMetadata("TargetPath").Should().Be(Path.Combine("wwwroot", "candidate.1234asdf.js"));
87Assets = [CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate#[.{fingerprint}]?.js", "All", "All", fingerprint: "1234asdf")],
99asset.GetMetadata("TargetPath").Should().Be(Path.Combine("wwwroot", "candidate.js"));
JsModulesIntegrationTest.cs (12)
18Directory.CreateDirectory(Path.Combine(projectDirectory.TestRoot, "wwwroot"));
40Directory.CreateDirectory(Path.Combine(projectDirectory.TestRoot, "wwwroot"));
72var finalPath = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
97Directory.CreateDirectory(Path.Combine(ProjectDirectory.TestRoot, "wwwroot"));
107var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
157Directory.CreateDirectory(Path.Combine(projectDirectory.TestRoot, "wwwroot"));
165var directoryPath = Path.Combine(intermediateOutputPath, "jsmodules");
217var finalPath = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
256var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
262var finalPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
309var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json"); ;
320var finalPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
ScopedCssIntegrationTests.cs (10)
83var styles = Path.Combine(stylesFolder, "Counter.css");
374var directoryPath = Path.Combine(intermediateOutputPath, "scopedcss");
445: IsolatedNuGetPackageFolderAspNetSdkBaselineTest(log, Path.Combine(nameof(ScopedCssCompatibilityIntegrationTest), ".nuget"))
476var finalPath = Path.Combine(outputPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
478var manifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
523var finalPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
525var publishManifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.publish.json")));
544: IsolatedNuGetPackageFolderAspNetSdkBaselineTest(log, Path.Combine(nameof(ScopedCssPackageReferences), ".nuget"))
564var finalPath = Path.Combine(outputPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
566var buildManifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
StaticWebAssetEndpointsIntegrationTest.cs (17)
29var dir = Directory.CreateDirectory(Path.Combine(root, "wwwroot"));
30File.WriteAllText(Path.Combine(dir.FullName, "app.js"), "console.log('hello world!');");
39var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
179var dir = Directory.CreateDirectory(Path.Combine(root, "wwwroot"));
180File.WriteAllText(Path.Combine(dir.FullName, "app.js"), "console.log('hello world!');");
189var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
309var dir = Directory.CreateDirectory(Path.Combine(root, "wwwroot"));
310File.WriteAllText(Path.Combine(dir.FullName, "app.js"), "console.log('hello world!');");
311File.WriteAllText(Path.Combine(dir.FullName, "app.publish.js"), "console.log('publish hello world!');");
320var path = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
325var publishManifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.publish.json")));
452var buildOutputDirectory = OutputPathCalculator.FromProject(Path.Combine(testInstance.TestRoot, "blazorhosted")).GetOutputDirectory();
516var endpointsManifestFile = Path.Combine(outputDirectory, $"{projectName}.staticwebassets.endpoints.json");
555return [.. Directory.GetFiles(Path.Combine(outputDirectory, "wwwroot"), "*", SearchOption.AllDirectories)
556.Select(a => StaticWebAsset.Normalize(Path.GetRelativePath(Path.Combine(outputDirectory, "wwwroot"), a)))];
560var staticWebAssetDevelopmentManifest = JsonSerializer.Deserialize<StaticWebAssetsDevelopmentManifest>(File.ReadAllText(Path.Combine(outputDirectory, $"{projectName}.staticwebassets.runtime.json")));
580Traverse(child.Value, Path.Combine(pathSoFar, child.Key), endpoints);
StaticWebAssets\ApplyCompressionNegotiationTest.cs (86)
31Path.Combine("wwwroot", "candidate.js"),
42Path.Combine("compressed", "candidate.js.gz"),
50Path.Combine("wwwroot", "candidate.js"),
60Path.Combine("wwwroot", "candidate.js"),
65Path.Combine("compressed", "candidate.js.gz"),
80AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
94AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
107AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
132Path.Combine("wwwroot", "candidate.js"),
192AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.br"),
258AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.gz"),
377AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.br"),
435AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.gz"),
493AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.br"),
549AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.gz"),
648AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.br"),
696AssetFile = Path.Combine(AppContext.BaseDirectory, $"{expectedName}.gz"),
752Path.Combine("wwwroot", "candidate.js"),
763Path.Combine("compressed", "candidate.js.gz"),
771Path.Combine("wwwroot", "candidate.js"),
781Path.Combine("wwwroot", "candidate.js"),
786Path.Combine("wwwroot", "candidate.js"),
791Path.Combine("compressed", "candidate.js.gz"),
806AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
819AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
831AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
844AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
856AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
883Path.Combine("wwwroot", "candidate.js"),
893Path.Combine("compressed", "candidate.js.gz"),
901Path.Combine("wwwroot", "candidate.js"),
911AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
924AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
935AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
948AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
959AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
982AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
995AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
1007AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1020AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
1032AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1059Path.Combine("wwwroot", "candidate.js"),
1070Path.Combine("compressed", "candidate.js.gz"),
1078Path.Combine("wwwroot", "candidate.js"),
1084Path.Combine("compressed", "candidate.js.br"),
1092Path.Combine("wwwroot", "candidate.js"),
1103AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1116AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
1127AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1140AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
1151AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1164AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.br")),
1185AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1198AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.br")),
1211AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
1223AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1236AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.br")),
1249AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
1261AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1274AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.br")),
1301Path.Combine("wwwroot", "candidate.js"),
1312Path.Combine("compressed", "candidate.js.gz"),
1320Path.Combine("wwwroot", "candidate.js"),
1328Path.Combine("publish", "candidate.js"),
1343Path.Combine("wwwroot", "candidate.js"),
1348Path.Combine("compressed", "candidate.js.gz"),
1354Path.Combine("publish", "candidate.js"),
1369AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1383AssetFile = Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
1396AssetFile = Path.GetFullPath(Path.Combine("compressed", "candidate.js.gz")),
1410AssetFile = Path.GetFullPath(Path.Combine("publish", "candidate.js")),
1513Path.Combine("wwwroot", "candidate.js"),
1524Path.Combine("compressed", "candidate.js.gz"),
1532Path.Combine("wwwroot", "candidate.js"),
1542Path.Combine("wwwroot", "candidate.js"),
1547Path.Combine("compressed", "candidate.js.gz"),
1580Path.Combine("wwwroot", "candidate.js"),
1591Path.Combine("compressed", "candidate.js.gz"),
1599Path.Combine("wwwroot", "candidate.js"),
1609Path.Combine("wwwroot", "candidate.js"),
1614Path.Combine("compressed", "candidate.js.gz"),
1647Path.Combine("wwwroot", "candidate.js"),
1658Path.Combine("compressed", "candidate.js.gz"),
1666Path.Combine("wwwroot", "candidate.js"),
1676Path.Combine("wwwroot", "candidate.js"),
1681Path.Combine("compressed", "candidate.js.gz"),
StaticWebAssets\ComputeEndpointsForReferenceStaticWebAssetsTest.cs (9)
26Assets = [CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All")],
27CandidateEndpoints = [CreateCandidateEndpoint("candidate.js", Path.Combine("wwwroot", "candidate.js"))]
37task.Endpoints[0].GetMetadata("AssetFile").Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
51Assets = [CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All")],
52CandidateEndpoints = [CreateCandidateEndpoint("candidate.js", Path.Combine("wwwroot", "candidate.js"), addLabel: true)]
62task.Endpoints[0].GetMetadata("AssetFile").Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
80Assets = [CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All")],
82CreateCandidateEndpoint("candidate.js", Path.Combine("wwwroot", "candidate.js")),
94task.Endpoints[0].GetMetadata("AssetFile").Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
StaticWebAssets\ComputeReferenceStaticWebAssetItemsTest.cs (17)
26Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All") },
52Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All") },
78Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All") },
106CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All"),
107CreateCandidate(Path.Combine("wwwroot", "candidate.other.js"), "MyPackage", "Discovered", "candidate.js", "Build", "All")
120task.StaticWebAssets[0].ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.other.js")));
137CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All"),
138CreateCandidate(Path.Combine("wwwroot", "candidate.other.js"), "MyPackage", "Discovered", "candidate.js", "Build", "All"),
139CreateCandidate(Path.Combine("wwwroot", "candidate.publish.js"), "MyPackage", "Discovered", "candidate.js", "Publish", "All")
152task.StaticWebAssets[0].ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.other.js")));
169Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", assetKind, "All") },
195Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "CurrentProject") },
221Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "Reference") },
247Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "CurrentProject") },
273Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "Reference") },
299Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "Other", "Project", "candidate.js", "All", "All") },
325Assets = new[] { CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "Other", "Package", "candidate.js", "All", "All") },
StaticWebAssets\ComputeStaticWebAssetsForCurrentProjectTest.cs (7)
54CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All"),
55CreateCandidate(Path.Combine("wwwroot", "candidate.other.js"), "MyPackage", "Discovered", "candidate.js", "Build", "All")
67task.StaticWebAssets[0].ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.other.js")));
84CreateCandidate(Path.Combine("wwwroot", "candidate.js"), "MyPackage", "Discovered", "candidate.js", "All", "All"),
85CreateCandidate(Path.Combine("wwwroot", "candidate.other.js"), "MyPackage", "Discovered", "candidate.js", "Build", "All"),
86CreateCandidate(Path.Combine("wwwroot", "candidate.publish.js"), "MyPackage", "Discovered", "candidate.js", "Publish", "All")
98task.StaticWebAssets[0].ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.other.js")));
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (11)
36Path.Combine("wwwroot", "candidate.js"),
58endpoint.AssetFile.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
103Path.Combine("wwwroot", "candidate.js"),
126endpoint.AssetFile.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
175otherEndpoint.AssetFile.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
220Path.Combine("wwwroot", "candidate.js"),
243endpoint.AssetFile.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
292otherEndpoint.AssetFile.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
356Path.Combine("wwwroot", "candidate.js"),
366Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")),
510["ContentRoot"] = Path.Combine(AppContext.BaseDirectory, "dist"),
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (43)
32CreateCandidate(Path.Combine("wwwroot", "candidate.js"))
48asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
62asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js"));
81CreateCandidate(Path.Combine("wwwroot", file))
102asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", file)));
116asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", file));
135CreateCandidate(Path.Combine("wwwroot", candidate.Replace('/', Path.DirectorySeparatorChar)))
152asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", candidate)));
166asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", Path.Combine(candidate.Split('/'))));
185CreateCandidate(Path.Combine("wwwroot", fileName))
203asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", fileName)));
217asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", fileName));
231var tempRoot = Path.Combine(Path.GetTempPath(), "swafp_identity_test");
235var assetFullPath = Path.Combine(nugetPackagePath, assetFileName);
238var relativePath = Path.Combine("_framework", assetFileName).Replace('\\', '/');
297CreateCandidate(Path.Combine("wwwroot", "candidate.js"), relativePath: "subdir/candidate.js")
313asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
327asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js"));
344CreateCandidate(Path.Combine("wwwroot", "candidate.js"), targetPath: Path.Combine("wwwroot", "subdir", "candidate.publish.js"))
360asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
374asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js"));
391CreateCandidate(Path.Combine("wwwroot", "candidate.js"), link: Path.Combine("wwwroot", "subdir", "candidate.link.js"))
407asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
421asset.GetMetadata(nameof(StaticWebAsset.OriginalItemSpec)).Should().Be(Path.Combine("wwwroot", "candidate.js"));
438CreateCandidate(Path.Combine("wwwroot", "candidate.js"), copyToPublishDirectory: "Never"),
439CreateCandidate(Path.Combine("wwwroot", "candidate.publish.js"), relativePath: "candidate.js")
454var buildAsset = task.Assets.Single(a => a.ItemSpec == Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
455var publishAsset = task.Assets.Single(a => a.ItemSpec == Path.GetFullPath(Path.Combine("wwwroot", "candidate.publish.js")));
456buildAsset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
461publishAsset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.publish.js")));
493Path.Combine("wwwroot","candidate.js"),
498Path.Combine("wwwroot","candidate.publish.js"),
517'{Path.GetFullPath(Path.Combine("wwwroot", "candidate.js"))}' with kind '{firstKind}'
518'{Path.GetFullPath(Path.Combine("wwwroot", "candidate.publish.js"))}' with kind '{secondKind}'
563asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
617asset.ItemSpec.Should().Be(Path.GetFullPath(Path.Combine("wwwroot", "candidate.js")));
720var manifestPath = Path.Combine(Environment.CurrentDirectory, "CanRoundtripManifest.json");
729var cachedAsset = CreateCandidate(Path.Combine(Environment.CurrentDirectory, "Input2.txt"), "Input2.txt");
734var newAsset = CreateCandidate(Path.Combine(Environment.CurrentDirectory, "Input1.txt"), "Input1.txt");
770new TaskItem(Path.Combine(debugDir, "Microsoft.AspNetCore.Components.CustomElements.lib.module.js"),
772new TaskItem(Path.Combine(debugDir, "Microsoft.AspNetCore.Components.CustomElements.lib.module.js.map"),
810new TaskItem(Path.Combine("wwwroot", "Microsoft.AspNetCore.Components.CustomElements.lib.module.js"),
812new TaskItem(Path.Combine("wwwroot", "Microsoft.AspNetCore.Components.CustomElements.lib.module.js.map"),
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (4)
49Path.Combine("js", "sample.js"),
56Path.Combine("js", "sample.js"),
126Path.Combine("js", "sample.js").Replace('\\', '/'),
160errorMessages[0].Should().Be($"""The asset file '{Path.GetFullPath(Path.Combine("wwwroot", "js", "sample.js"))}' specified in the endpoint '{Path.Combine("js","sample.js").Replace('\\', '/')}' does not exist.""");
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (15)
16Directory.CreateDirectory(Path.Combine(TestContext.Current.TestExecutionDirectory, nameof(GenerateStaticWebAssetsManifestTest)));
76var asset = CreateAsset(Path.Combine("wwwroot", "candidate.js"), "MyProject", "Computed", "candidate.js", "All", "All");
185var asset = CreateAsset(Path.Combine("wwwroot", "candidate.js"), "MyProject", "Computed", "candidate.js", "All", "All");
219CreateAsset(Path.Combine("wwwroot", "candidate.js"), "MyProject", "Computed", "candidate.js", "All", "All"),
220CreateAsset(Path.Combine("wwwroot", "candidate.js"), "MyProject", "Computed", "candidate.js", "All", "All")
225CreateAsset(Path.Combine("wwwroot", "candidate.js"), "Package", "Package", "candidate.js", "All", "Build"),
226CreateAsset(Path.Combine("wwwroot", "candidate.js"), "OtherProject", "Project", "candidate.js", "All", "Build")
231CreateAsset(Path.Combine("wwwroot", "candidate.js"), "Package", "Package", "candidate.js", "All", "Publish"),
232CreateAsset(Path.Combine("wwwroot", "candidate.js"), "OtherProject", "Project", "candidate.js", "All", "Publish")
237CreateAsset(Path.Combine("wwwroot", "candidate.js"), "Package", "Package", "candidate.js", "All", "All"),
238CreateAsset(Path.Combine("wwwroot", "candidate.js"), "OtherProject", "Project", "candidate.js", "All", "All")
243CreateAsset(Path.Combine("wwwroot", "candidate.js"), "MyProject", "Computed", "candidate.js", "All", "Build"),
244CreateAsset(Path.Combine("wwwroot", "candidate.js"), "Other", "Project", "candidate.js", "All", "Publish")
337var candidatePattern = CreatePatternCandidate(Path.Combine("MyProject", "wwwroot"), "base", "wwwroot/**", "MyProject");
376Identity = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), $"{source}.csproj")),
StaticWebAssets\GenerateStaticWebAssetsPropsFileTest.cs (12)
35["RelativePath"] = Path.Combine("js", "sample.js"),
68["RelativePath"] = Path.Combine("js", "sample.js"),
101["RelativePath"] = Path.Combine("js", "sample.js"),
134["RelativePath"] = Path.Combine("js", "sample.js"),
212["RelativePath"] = Path.Combine("js", "sample.js"),
228["RelativePath"] = Path.Combine("css", "site.css"),
273["RelativePath"] = Path.Combine("js", "sample.js"),
289["RelativePath"] = Path.Combine("css", "site.css"),
356["RelativePath"] = Path.Combine("js", "sample.js").Replace("\\","/"),
457["RelativePath"] = Path.Combine("js", "sample.js").Replace("\\","/"),
472CreateItem(Path.Combine("wwwroot","App.styles.css"), new Dictionary<string,string>
485["OriginalItemSpec"] = Path.Combine("wwwroot","App.styles.css"),
StaticWebAssets\GenerateV1StaticWebAssetsManifestTest.cs (8)
29CreateItem(Path.Combine("wwwroot", "sample.js"), new Dictionary<string,string>
41var expectedError = $"Missing required metadata 'BasePath' for '{Path.Combine("wwwroot", "sample.js")}'.";
59CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string>
71var expectedError = $"Missing required metadata 'ContentRoot' for '{Path.Combine("wwwroot", "sample.js")}'.";
92CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string>
98CreateItem(Path.Combine("wwwroot", "otherLib.js"), new Dictionary<string,string>
180CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string>
225CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string>
StaticWebAssets\ResolveFingerprintedStaticWebAssetEndpointsForAssetsTest.cs (5)
28Path.Combine("wwwroot", "candidate.js"),
71Path.Combine("wwwroot", "candidate.js"),
111Path.Combine("wwwroot", "candidate.js"),
154Path.Combine("wwwroot", "candidate.js"),
197Path.Combine("wwwroot", "candidate.js"),
StaticWebAssets\UpdateExternallyDefinedStaticWebAssetsTest.cs (10)
28Path.Combine(AppContext.BaseDirectory, @"dist\assets\index-C5tBAdQX.css"),
38["ContentRoot"] = Path.Combine(AppContext.BaseDirectory, "dist"),
43["OriginalItemSpec"] = Path.Combine(AppContext.BaseDirectory, @"dist\assets\index-C5tBAdQX.css"),
47Path.Combine(AppContext.BaseDirectory, @"dist\index.html"),
57["ContentRoot"] = Path.Combine(AppContext.BaseDirectory, "dist"),
62["OriginalItemSpec"] = Path.Combine(AppContext.BaseDirectory, @"dist\index.html"),
112["ContentRoot"] = Path.Combine(AppContext.BaseDirectory, "dist"),
131["ContentRoot"] = Path.Combine(AppContext.BaseDirectory, "dist"),
198["ContentRoot"] = Path.Combine(AppContext.BaseDirectory, "dist"),
217["ContentRoot"] = Path.Combine(AppContext.BaseDirectory, "dist"),
StaticWebAssets\ValidateStaticWebAssetsUniquePathsTest.cs (8)
70CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string>
73["ContentRoot"] = Path.Combine("nuget", "MyLibrary"),
77CreateItem(Path.Combine("wwwroot", "otherLib.js"), new Dictionary<string,string>
80["ContentRoot"] = Path.Combine("nuget", "MyOtherLibrary"),
103CreateItem(Path.Combine("wwwroot","sample.js"), new Dictionary<string,string>
108["ContentRoot"] = Path.Combine(".", "MyLibrary")
110CreateItem(Path.Combine("wwwroot", "otherLib.js"), new Dictionary<string,string>
115["ContentRoot"] = Path.Combine(".", "MyLibrary")
StaticWebAssetsIntegrationTest.cs (78)
30var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
36var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
39var manifest1 = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
58var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
64var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
69new FileInfo(Path.Combine(intermediateOutputPath, "rpswa.dswa.cache.json")).Should().NotExist();
71new FileInfo(Path.Combine(intermediateOutputPath, "rbcswa.dswa.cache.json")).Should().NotExist();
73new FileInfo(Path.Combine(intermediateOutputPath, "rjimswa.dswa.cache.json")).Should().NotExist();
75new FileInfo(Path.Combine(intermediateOutputPath, "rjsmcshtml.dswa.cache.json")).Should().NotExist();
76new FileInfo(Path.Combine(intermediateOutputPath, "rjsmrazor.dswa.cache.json")).Should().NotExist();
78var manifest1 = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
96var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
99var objManifestContents = File.ReadAllText(Path.Combine(intermediateOutputPath, "staticwebassets.build.json"));
105var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
113var secondPath = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
120var secondFinalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
142var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
145var objManifestContents = File.ReadAllText(Path.Combine(intermediateOutputPath, "staticwebassets.build.json"));
150var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
161Directory.CreateDirectory(Path.Combine(ProjectDirectory.Path, "wwwroot"));
167var secondPath = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
180var secondFinalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
210var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
213var objManifestContents = File.ReadAllText(Path.Combine(intermediateOutputPath, "staticwebassets.build.json"));
217var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
226var secondPath = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
241var secondFinalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
271var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
277var finalPath = Path.Combine(publishPath, "ComponentApp.staticwebassets.runtime.json");
281var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
306var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
312var finalPath = Path.Combine(publishPath, "ComponentApp.staticwebassets.runtime.json");
316var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
344var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
353var finalPath = Path.Combine(publishPath, "ComponentApp.staticwebassets.runtime.json");
358var finalManifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
374var seconBinManifestPath = Path.Combine(publishPath, "ComponentApp.staticwebassets.runtime.json");
380var secondBinManifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
384var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
411var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
417var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
421var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
428Path.Combine(outputPath, "publish"),
447var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
453var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
455var finalManifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
490using var destination = File.OpenWrite(Path.Combine(Path.GetDirectoryName(name), "ExternalStaticAssets.targets"));
502var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
508var finalPath = Path.Combine(publishPath, "ComponentApp.staticwebassets.runtime.json");
512var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
545using var destination = File.OpenWrite(Path.Combine(Path.GetDirectoryName(name), "ExternalStaticAssets.targets"));
566var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
596Directory.CreateDirectory(Path.Combine(ProjectDirectory.Path, "wwwroot"));
607var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
613var finalPath = Path.Combine(outputPath, "ComponentApp.staticwebassets.runtime.json");
616var manifest1 = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
661var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
669var finalPath = Path.Combine(outputPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
673var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
680Path.Combine(outputPath, "publish"),
702var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
710var finalPath = Path.Combine(outputPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
737var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
744var finalPath = Path.Combine(outputPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
766var manifest = StaticWebAssetsManifest.FromJsonBytes(File.ReadAllBytes(Path.Combine(intermediateOutputPath, "staticwebassets.build.json")));
800var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
807var finalPath = Path.Combine(publishPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
811var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
842var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
850var finalPath = Path.Combine(publishPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
854var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
883var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
893var finalPath = Path.Combine(outputPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
915var seconBinManifestPath = Path.Combine(outputPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
922var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
952var path = Path.Combine(intermediateOutputPath, "staticwebassets.build.json");
959var finalPath = Path.Combine(publishPath, "AppWithPackageAndP2PReference.staticwebassets.runtime.json");
963var intermediatePublishManifestPath = Path.Combine(intermediateOutputPath, "staticwebassets.publish.json");
StaticWebAssetsPackIntegrationTest.cs (294)
51new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
54Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
59Path.Combine("staticwebassets", "PackageLibraryDirectDependency.*.bundle.scp.css"),
60Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
61Path.Combine("build", "PackageLibraryDirectDependency.props"),
62Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
63Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
80new FileInfo(Path.Combine(outputPath, "PackageLibraryNoStaticAssets.dll")).Should().Exist();
83Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryNoStaticAssets.1.0.0.nupkg"),
87Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
88Path.Combine("build", "PackageLibraryNoStaticAssets.props"),
89Path.Combine("buildMultiTargeting", "PackageLibraryNoStaticAssets.props"),
90Path.Combine("buildTransitive", "PackageLibraryNoStaticAssets.props")
114new FileInfo(Path.Combine(outputPath, "PackageLibraryNoStaticAssets.dll")).Should().Exist();
121Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
122Path.Combine("build", "PackageLibraryNoStaticAssets.props"),
123Path.Combine("buildMultiTargeting", "PackageLibraryNoStaticAssets.props"),
124Path.Combine("buildTransitive", "PackageLibraryNoStaticAssets.props")
146new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
149Path.Combine(pack2.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
154Path.Combine("staticwebassets", "PackageLibraryDirectDependency.*.bundle.scp.css"),
155Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
156Path.Combine("build", "PackageLibraryDirectDependency.props"),
157Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
158Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
177new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
180Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
185Path.Combine("staticwebassets", "LICENSE"),
186Path.Combine("staticwebassets", "PackageLibraryDirectDependency.*.bundle.scp.css"),
187Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
188Path.Combine("build", "PackageLibraryDirectDependency.props"),
189Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
190Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
219new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
227Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
228Path.Combine("build", "PackageLibraryDirectDependency.props"),
229Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
230Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
262new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
270Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
271Path.Combine("build", "PackageLibraryDirectDependency.props"),
272Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
273Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
305new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
343new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
351Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
352Path.Combine("build", "PackageLibraryDirectDependency.props"),
353Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
354Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
383new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
421Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
428Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
429File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
430File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
431File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
432File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
443new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
455Path.Combine("staticwebassets", "exampleJsInterop.js"),
456Path.Combine("staticwebassets", "background.png"),
457Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.bundle.scp.css"),
458Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
459Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
460Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
461Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
490Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
497Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
498File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
499File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
500File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
501File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
512new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
524Path.Combine("content", "exampleJsInterop.js"),
525Path.Combine("content", "background.png"),
526Path.Combine("content", "PackageLibraryTransitiveDependency.bundle.scp.css"),
527Path.Combine("contentFiles", "exampleJsInterop.js"),
528Path.Combine("contentFiles", "background.png"),
529Path.Combine("contentFiles", "PackageLibraryTransitiveDependency.bundle.scp.css"),
558Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
565Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
566File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
567File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
568File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
569File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
585new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
597Path.Combine("staticwebassets", "exampleJsInterop.js"),
598Path.Combine("staticwebassets", "background.png"),
599Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.bundle.scp.css"),
600Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
601Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
602Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
603Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
632Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
639Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
640File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
641File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
642File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
643File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
659new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
671Path.Combine("content", "exampleJsInterop.js"),
672Path.Combine("content", "background.png"),
673Path.Combine("content", "PackageLibraryTransitiveDependency.bundle.scp.css"),
674Path.Combine("contentFiles", "exampleJsInterop.js"),
675Path.Combine("contentFiles", "background.png"),
676Path.Combine("contentFiles", "PackageLibraryTransitiveDependency.bundle.scp.css"),
705Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
712Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
713File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
714File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
715File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
716File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
727new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
739Path.Combine("staticwebassets", "exampleJsInterop.js"),
740Path.Combine("staticwebassets", "background.png"),
741Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.bundle.scp.css"),
742Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
743Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
744Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
745Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
774Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
781Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
782File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
783File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
784File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
785File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
796new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
808Path.Combine("content", "exampleJsInterop.js"),
809Path.Combine("content", "background.png"),
810Path.Combine("content", "PackageLibraryTransitiveDependency.bundle.scp.css"),
811Path.Combine("contentFiles", "exampleJsInterop.js"),
812Path.Combine("contentFiles", "background.png"),
813Path.Combine("contentFiles", "PackageLibraryTransitiveDependency.bundle.scp.css"),
840Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
847Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
848File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
849File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
850File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
851File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
862new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
874Path.Combine("staticwebassets", "exampleJsInterop.js"),
875Path.Combine("staticwebassets", "background.png"),
876Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.bundle.scp.css"),
877Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
878Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
879Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
880Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
907Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
914Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
915File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
916File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
917File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
918File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
929new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
941Path.Combine("content", "exampleJsInterop.js"),
942Path.Combine("content", "background.png"),
943Path.Combine("content", "PackageLibraryTransitiveDependency.bundle.scp.css"),
944Path.Combine("contentFiles", "exampleJsInterop.js"),
945Path.Combine("contentFiles", "background.png"),
946Path.Combine("contentFiles", "PackageLibraryTransitiveDependency.bundle.scp.css"),
973Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
980Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
981File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
982File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
983File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
984File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
1000new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1012Path.Combine("staticwebassets", "exampleJsInterop.js"),
1013Path.Combine("staticwebassets", "background.png"),
1014Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.bundle.scp.css"),
1015Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
1016Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
1017Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
1018Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
1045Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
1052Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
1053File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
1054File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
1055File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
1056File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
1072new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1084Path.Combine("content", "exampleJsInterop.js"),
1085Path.Combine("content", "background.png"),
1086Path.Combine("content", "PackageLibraryTransitiveDependency.bundle.scp.css"),
1087Path.Combine("contentFiles", "exampleJsInterop.js"),
1088Path.Combine("contentFiles", "background.png"),
1089Path.Combine("contentFiles", "PackageLibraryTransitiveDependency.bundle.scp.css"),
1116Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
1123Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
1124File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
1125File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
1126File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
1127File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
1138new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1150Path.Combine("staticwebassets", "exampleJsInterop.js"),
1151Path.Combine("staticwebassets", "background.png"),
1152Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.bundle.scp.css"),
1153Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
1154Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
1155Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
1156Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
1183Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
1190Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
1191File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
1192File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
1193File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
1194File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
1205new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1217Path.Combine("content", "exampleJsInterop.js"),
1218Path.Combine("content", "background.png"),
1219Path.Combine("content", "PackageLibraryTransitiveDependency.bundle.scp.css"),
1220Path.Combine("contentFiles", "exampleJsInterop.js"),
1221Path.Combine("contentFiles", "background.png"),
1222Path.Combine("contentFiles", "PackageLibraryTransitiveDependency.bundle.scp.css"),
1253Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
1260Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
1261File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
1262File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
1263File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
1264File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.js"), "");
1265File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
1277new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1289Path.Combine("staticwebassets", "exampleJsInterop.js"),
1290Path.Combine("staticwebassets", "background.png"),
1291Path.Combine("staticwebassets", "Component1.razor.js"),
1292Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.*.bundle.scp.css"),
1293Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.*.lib.module.js"),
1294Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
1295Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
1296Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
1297Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
1328Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
1335Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
1336File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
1337File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
1338File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
1339File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.js"), "");
1340File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
1354new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1366Path.Combine("staticwebassets", "exampleJsInterop.js"),
1367Path.Combine("staticwebassets", "background.png"),
1368Path.Combine("staticwebassets", "Component1.razor.js"),
1369Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.*.bundle.scp.css"),
1370Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.*.lib.module.js"),
1371Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
1372Path.Combine("build", "PackageLibraryTransitiveDependency.props"),
1373Path.Combine("buildMultiTargeting", "PackageLibraryTransitiveDependency.props"),
1374Path.Combine("buildTransitive", "PackageLibraryTransitiveDependency.props")
1405Directory.Delete(Path.Combine(projectDirectory.Path, "wwwroot"), recursive: true);
1412Directory.CreateDirectory(Path.Combine(projectDirectory.Path, "wwwroot"));
1413File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
1414File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor"), componentText);
1415File.WriteAllText(Path.Combine(projectDirectory.Path, "Component1.razor.css"), "");
1416File.WriteAllText(Path.Combine(projectDirectory.Path, "ExampleJsInterop.cs"), "");
1427new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1439Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.styles.css"),
1440Path.Combine("staticwebassets", "PackageLibraryTransitiveDependency.modules.json"),
1469new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
1495new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
1498Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
1503Path.Combine("staticwebassets", "PackageLibraryDirectDependency.styles.css"),
1520new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
1523Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
1553new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
1556Path.Combine(build.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
1560Path.Combine("staticwebassets", "PackageLibraryDirectDependency.*.bundle.scp.css"),
1562Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
1563Path.Combine("build", "PackageLibraryDirectDependency.props"),
1564Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
1565Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
1583new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
1586Path.Combine(pack.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
1590Path.Combine("content", "PackageLibraryDirectDependency.bundle.scp.css"),
1593Path.Combine("contentFiles", "PackageLibraryDirectDependency.bundle.scp.css"),
1609new FileInfo(Path.Combine(outputPath, "ComponentLibrary.dll")).Should().Exist();
1615Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
1616Path.Combine("build", "ComponentLibrary.props"),
1617Path.Combine("buildMultiTargeting", "ComponentLibrary.props"),
1618Path.Combine("buildTransitive", "ComponentLibrary.props")
1636new FileInfo(Path.Combine(outputPath, "PackageLibraryTransitiveDependency.dll")).Should().Exist();
1643var directoryPath = Path.Combine(intermediateOutputPath, "staticwebassets");
1647Path.Combine(directoryPath, "msbuild.PackageLibraryTransitiveDependency.Microsoft.AspNetCore.StaticWebAssets.props"),
1648Path.Combine(directoryPath, "msbuild.build.PackageLibraryTransitiveDependency.props"),
1649Path.Combine(directoryPath, "msbuild.buildMultiTargeting.PackageLibraryTransitiveDependency.props"),
1650Path.Combine(directoryPath, "msbuild.buildTransitive.PackageLibraryTransitiveDependency.props"),
1684new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
1687Path.Combine(buildCommand.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
1692Path.Combine("staticwebassets", "PackageLibraryDirectDependency.*.bundle.scp.css"),
1693Path.Combine("build", "Microsoft.AspNetCore.StaticWebAssets.props"),
1694Path.Combine("build", "PackageLibraryDirectDependency.props"),
1695Path.Combine("buildMultiTargeting", "PackageLibraryDirectDependency.props"),
1696Path.Combine("buildTransitive", "PackageLibraryDirectDependency.props")
1715new FileInfo(Path.Combine(outputPath, "PackageLibraryDirectDependency.dll")).Should().Exist();
1718Path.Combine(buildCommand.GetPackageDirectory().FullName, "PackageLibraryDirectDependency.1.0.0.nupkg"),
1723Path.Combine("content", "PackageLibraryDirectDependency.*.bundle.scp.css"),
1726Path.Combine("contentFiles", "PackageLibraryDirectDependency.bundle.scp.css"),
Microsoft.NET.Sdk.Web.Tests (4)
Microsoft.NET.Sdk.WorkloadManifestReader (18)
SdkDirectoryWorkloadManifestProvider.cs (14)
73string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
74string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
186_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
270var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
300var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
326var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], _sdkVersionBand.ToString());
341var manifestVersionBandDirectory = Path.Combine(manifestRoot, _sdkVersionBand.ToString());
434.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
446else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
448var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
505if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
536var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
563var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
597string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (53)
SdkDirectoryWorkloadManifestProviderTests.cs (42)
28_fakeDotnetRootDirectory = Path.Combine(_testDirectory, "dotnet");
29_manifestRoot = Path.Combine(_fakeDotnetRootDirectory, "sdk-manifests");
30_manifestVersionBandDirectory = Path.Combine(_manifestRoot, featureBand);
50var installStateFilePath = Path.Combine(installStateLocation, "default.json");
65Directory.Delete(Path.Combine(_manifestRoot, "8.0.400"), recursive: true);
105Directory.Delete(Path.Combine(_manifestRoot, "8.0.100"), recursive: true);
106Directory.Delete(Path.Combine(_manifestRoot, "8.0.200"), recursive: true);
107Directory.Delete(Path.Combine(_manifestRoot, "8.0.200-rc.2"), recursive: true);
117Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "Android"));
119Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "iOS"));
136Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "Android"));
162Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "Android"));
313globalJsonPath = Path.Combine(_testDirectory, "global.json");
457var installStateFilePath = Path.Combine(installStateLocation, "default.json");
465File.WriteAllText(Path.Combine(workloadSetDirectory, "1.workloadset.json"), """
470File.WriteAllText(Path.Combine(workloadSetDirectory, "2.workloadset.json"), """
500File.WriteAllText(Path.Combine(workloadSetDirectory, "1.workloadset.json"), """
505File.WriteAllText(Path.Combine(workloadSetDirectory, "2.workloadset.json"), """
521string? globalJsonPath = Path.Combine(_testDirectory, "global.json");
563string? globalJsonPath = Path.Combine(_testDirectory, "global.json");
594string? globalJsonPath = Path.Combine(_testDirectory, "global.json");
915string? globalJsonPath = Path.Combine(_testDirectory, "global.json");
964string? globalJsonPath = Path.Combine(_testDirectory, "global.json");
1011var additionalManifestDirectory = Path.Combine(_testDirectory, "AdditionalManifests");
1022Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "iOS"));
1041var additionalManifestDirectory = Path.Combine(_testDirectory, "AdditionalManifests");
1052Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "Android"));
1071var additionalManifestDirectory1 = Path.Combine(_testDirectory, "AdditionalManifests1");
1073var additionalManifestDirectory2 = Path.Combine(_testDirectory, "AdditionalManifests2");
1081Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "iOS"));
1084Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "Android"));
1112var additionalManifestDirectory = Path.Combine(_testDirectory, "AdditionalManifests");
1118Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "Android"));
1135Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "iOS"));
1137Directory.CreateDirectory(Path.Combine(_manifestVersionBandDirectory, "Microsoft.NET.Workload.Android"));
1282manifestDirectory = Path.Combine(manifestDirectory, manifestVersion);
1295File.WriteAllText(Path.Combine(manifestDirectory, "WorkloadManifest.json"), manifestContents);
1302var installStateFilePath = Path.Combine(installStateLocation, "default.json");
1313File.WriteAllText(Path.Combine(workloadSetDirectory, "workloadset.workloadset.json"), workloadSetContents);
1321string installStatePath = Path.Combine(installStateFolder, "default.json");
1332var fakeDotnetRootDirectory = Path.Combine(testDirectory, "dotnet");
1337Directory.CreateDirectory(Path.Combine(manifestDirectory6, "iOS"));
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (8)
Microsoft.NET.TestFramework (78)
TestContext.cs (17)
106DirectoryInfo sdksDir = new(Path.Combine(dotnetRoot, "sdk"));
153if (Directory.Exists(Path.Combine(AppContext.BaseDirectory, "TestAssets")))
156testContext.TestAssetsDirectory = Path.Combine(AppContext.BaseDirectory, "TestAssets");
164string? FindFolder = FindFolderInTree(Path.Combine("test", "TestAssets"), AppContext.BaseDirectory);
206string? FindFolder2 = FindFolderInTree(Path.Combine("test", "TestAssets"), AppContext.BaseDirectory);
222artifactsDir = Path.Combine(repoRoot, "artifacts");
248var testPackages = Path.Combine(testContext.TestExecutionDirectory, "Testpackages");
257?? Path.Combine(testContext.TestExecutionDirectory, ".nuget");
259testContext.NuGetFallbackFolder = Path.Combine(nugetFolder, "NuGetFallbackFolder");
260testContext.NuGetExePath = Path.Combine(nugetFolder, $"nuget{Constants.ExeSuffix}");
261testContext.NuGetCachePath = Path.Combine(nugetFolder, "packages");
263var testPackages = Path.Combine(testContext.TestExecutionDirectory, "Testpackages");
284Path.Combine(testContext.ToolsetUnderTest.SdkFolderUnderTest, "MSBuild.dll"));
302var gitPath = Path.Combine(directory, ".git");
322ret = Path.Combine(startPath, relativePath);
331string path = Path.Combine(currentPath, relativePath);
361string globalJsonPath = Path.Combine(path, "global.json");
Microsoft.NET.ToolPack.Tests (15)
Microsoft.TemplateEngine.Cli (11)
Microsoft.TemplateEngine.Cli.UnitTests (36)
PostActionTests\AddJsonPropertyPostActionTests.cs (26)
199string jsonFilePath = Path.Combine(targetBasePath, jsonFileName);
309string jsonFilePath = Path.Combine(targetBasePath, jsonFileName);
344string jsonFilePath = Path.Combine(targetBasePath, jsonFileName);
353var dirWithGlobalJson = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGlobalJson_NoSlnInvolved));
355physicalFileSystem.WriteAllText(Path.Combine(dirWithGlobalJson, "global.json"), "{}");
356var subDir = Path.Combine(dirWithGlobalJson, "subdir");
366var dirWithGlobalJson = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGlobalJson_SlnInSubDirectory));
368physicalFileSystem.WriteAllText(Path.Combine(dirWithGlobalJson, "global.json"), "{}");
369var subDir = Path.Combine(dirWithGlobalJson, "subdir");
371physicalFileSystem.WriteAllText(Path.Combine(subDir, "MySolution.sln"), "{}");
380var dirWithGlobalJson = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGlobalJson_SlnInParent));
382physicalFileSystem.WriteAllText(Path.Combine(dirWithGlobalJson, "global.json"), "{}");
383var subDir = Path.Combine(dirWithGlobalJson, "subdir");
385physicalFileSystem.WriteAllText(Path.Combine(tempPath, "MySolution.sln"), "{}");
394var dirWithGitDirectory = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGitDirectory_NoSlnInvolved));
396physicalFileSystem.CreateDirectory(Path.Combine(dirWithGitDirectory, ".git"));
397var subDir = Path.Combine(dirWithGitDirectory, "subdir");
407var dirWithGitDirectory = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGitDirectory_SlnInSubDirectory));
409physicalFileSystem.CreateDirectory(Path.Combine(dirWithGitDirectory, ".git"));
410var subDir = Path.Combine(dirWithGitDirectory, "subdir");
412physicalFileSystem.WriteAllText(Path.Combine(subDir, "MySolution.sln"), "");
421var dirWithGitDirectory = Path.Combine(tempPath, nameof(RepoRootDetectionShouldPreferGitDirectory_SlnInParent));
423physicalFileSystem.CreateDirectory(Path.Combine(dirWithGitDirectory, ".git"));
424var subDir = Path.Combine(dirWithGitDirectory, "subdir");
426physicalFileSystem.WriteAllText(Path.Combine(tempPath, "MySolution.sln"), "");
432string jsonFileFullPath = Path.Combine(targetBasePath, fileName);
Microsoft.VisualBasic.Core (4)
Microsoft.VisualStudio.LanguageServices (11)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (14)
Microsoft.VisualStudio.LanguageServices.Implementation (5)
Microsoft.WebTools.AspireService.Tests (2)
Microsoft.Win32.Msi.Tests (1)
MSBuild (40)
FileUtilities.cs (9)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
492return NormalizePath(Path.Combine(directory, file));
704return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
812string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
890var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1338return paths.Aggregate(root, Path.Combine);
1510string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
msbuild.Integration.Tests (1)
Msbuild.Tests.Utilities (6)
MSBuildTaskHost (20)
FileUtilities.cs (8)
77string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
144cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
195string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
492return NormalizePath(Path.Combine(directory, file));
812string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
890var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1338return paths.Aggregate(root, Path.Combine);
1510string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
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)
Roslyn.Compilers.Extension (2)
Roslyn.Diagnostics.Analyzers (4)
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 (26)
HelixTestRunner.cs (13)
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),
219File.WriteAllText(Path.Combine(workItemPayloadDir, commandFileName), commandContent);
222File.WriteAllText(Path.Combine(workItemPayloadDir, postCommandFileName), postCommandContent);
479var destinationPath = Path.Combine(logsDir, relativePath);
rzc (16)
SDDLTests (7)
sdk-tasks (16)
SemanticSearch.BuildTask (2)
ServerComparison.FunctionalTests (2)
Sockets.BindTests (2)
Sockets.FunctionalTests (2)
StaticFilesAuth (4)
Stress.ApiService (2)
System.CodeDom (1)
System.CommandLine.StaticCompletions.Tests (3)
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 (15)
System.Private.Xml (3)
System.Reflection.MetadataLoadContext (1)
System.Security.Cryptography (4)
System.Text.RegularExpressions (1)
Templates.Blazor.Tests (33)
BlazorWasmTemplateTest.cs (9)
29var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
30Assert.False(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "Non-PWA templates should not produce service-worker-assets.js");
105var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
109Assert.False(File.Exists(Path.Combine(publishDir, "service-worker.published.js")), "service-worker.published.js should not be published");
110Assert.True(File.Exists(Path.Combine(publishDir, "service-worker.js")), "service-worker.js should be published");
111Assert.True(File.Exists(Path.Combine(publishDir, "service-worker-assets.js")), "service-worker-assets.js should be published");
127var fullPath = Path.Combine(basePath, path);
131return File.ReadAllText(Path.Combine(basePath, path));
166var publishDir = Path.Combine(project.TemplatePublishDir, "wwwroot");
Templates.Blazor.WebAssembly.Auth.Tests (26)
Templates.Blazor.WebAssembly.Tests (34)
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 (29)
Templates.Tests (32)
Test.Utilities (1)
TestDiscoveryWorker (1)
TestProject.AppHost (1)
TestTasks (1)
Text.Analyzers (4)
trustedroots.Tests (1)
vbc (8)
VBCSCompiler (9)
VBCSCompiler.UnitTests (20)
CompilerServerTests.cs (16)
101var filePath = Path.Combine(currentDirectory.Path, "netstandard.dll");
257return new DisposableFile(Path.Combine(directory.Path, resultFileName));
451var compilerServerExecutable = Path.Combine(basePath, "VBCSCompiler.exe");
559Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
589Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
606Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe")));
624Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hello.exe")));
649Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe")));
667Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "missingfile.exe")));
696Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "hellovb.exe")));
725Assert.False(File.Exists(Path.Combine(_tempDirectory.Path, "app.exe")));
1063$"src1.cs /shared:{serverData.PipeName} /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"),
1114$"src1.vb /shared:{serverData.PipeName} /vbruntime* /nologo /t:library /out:" + Path.Combine(libDirectory.Path, "lib.dll"),
1397var tmp = Path.Combine(_tempDirectory.Path, "Temp");
1431var tmp = Path.Combine(_tempDirectory.Path, "Temp");
1461var compilerServerExecutable = Path.Combine(basePath, "VBCSCompiler.exe");
WindowsBase.Tests (1)
xunit.console (9)
Yarp.AppHost (1)