4337 references to File
AnalyzerRunner (4)
aspire (86)
Aspire.Cli.Tests (246)
Commands\UpdateCommandTests.cs (13)
89File.WriteAllText(oldBackup1, "test");
90File.WriteAllText(oldBackup2, "test");
91File.WriteAllText(otherFile, "test");
99Assert.False(File.Exists(oldBackup1), "Old backup file should be deleted");
100Assert.False(File.Exists(oldBackup2), "Old backup file should be deleted");
101Assert.True(File.Exists(otherFile), "Other files should not be deleted");
113File.WriteAllText(oldBackup, "test");
125Assert.True(File.Exists(oldBackup), "Locked file should still exist on Windows");
129Assert.False(File.Exists(oldBackup), "Locked file should be deleted on Mac/Linux");
380File.WriteAllText(archivePath, "fake archive");
427File.WriteAllText(archivePath, "fake archive");
468File.WriteAllText(archivePath, "fake archive");
921File.WriteAllText(archivePath, "fake archive");
DotNet\DotNetCliRunnerTests.cs (26)
35await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
84await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
122await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
170await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
217await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
267await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
363await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
411await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
461await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
516await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
571await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
632await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
701await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
774await File.WriteAllTextAsync(solutionFile.FullName, "Not a real solution file.");
779await File.WriteAllTextAsync(project1File.FullName, "Not a real project file.");
783await File.WriteAllTextAsync(project2File.FullName, "Not a real project file.");
830await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
833await File.WriteAllTextAsync(referencedProject.FullName, "Not a real project file.");
872await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
927await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
981await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
1035await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
1095await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
1153await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
1210await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
1255await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
Projects\FallbackProjectParserTests.cs (14)
32await File.WriteAllTextAsync(projectFile, projectContent);
57await File.WriteAllTextAsync(projectFile, projectContent);
82await File.WriteAllTextAsync(projectFile, projectContent);
107await File.WriteAllTextAsync(projectFile, projectContent);
133await File.WriteAllTextAsync(projectFile, projectContent);
159await File.WriteAllTextAsync(projectFile, projectContent);
196await File.WriteAllTextAsync(projectFile, invalidProjectContent);
218await File.WriteAllTextAsync(projectFile, projectContent);
248await File.WriteAllTextAsync(projectFile, projectContent);
271await File.WriteAllTextAsync(projectFile, projectContent);
295await File.WriteAllTextAsync(projectFile, projectContent);
318await File.WriteAllTextAsync(projectFile, projectContent);
340await File.WriteAllTextAsync(projectFile, projectContent);
358await File.WriteAllTextAsync(projectFile, projectContent);
Projects\ProjectLocatorTests.cs (42)
61await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
65await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
100await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
104await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
136await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost project");
181await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
216await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file.");
219await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file.");
239await File.WriteAllTextAsync(appHostProject.FullName, "Not a real apphost project.");
242await File.WriteAllTextAsync(webProject.FullName, "Not a real web project.");
294await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
313await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
335await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real project file.");
360var settingsJson = await File.ReadAllTextAsync(settingsFile.FullName);
376await File.WriteAllTextAsync(
404await File.WriteAllTextAsync(
434await File.WriteAllTextAsync(
444await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
449await File.WriteAllTextAsync(
485await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting;
509await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
514await File.WriteAllTextAsync(
557await File.WriteAllTextAsync(
585await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting;
609await File.WriteAllTextAsync(
620await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
639await File.WriteAllTextAsync(txtFile.FullName, "Some text file");
663await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
668await File.WriteAllTextAsync(
774await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
833await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file.");
835await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file.");
871await File.WriteAllTextAsync(
903await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
937await File.WriteAllTextAsync(exeProjectFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Exe</OutputType></PropertyGroup></Project>");
942await File.WriteAllTextAsync(libProjectFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Library</OutputType></PropertyGroup></Project>");
978await File.WriteAllTextAsync(winExeProjectFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>WinExe</OutputType></PropertyGroup></Project>");
1013await File.WriteAllTextAsync(lib1File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Library</OutputType></PropertyGroup></Project>");
1017await File.WriteAllTextAsync(lib2File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Library</OutputType></PropertyGroup></Project>");
1069await File.WriteAllTextAsync(exe1File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Exe</OutputType></PropertyGroup></Project>");
1073await File.WriteAllTextAsync(exe2File.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>Exe</OutputType></PropertyGroup></Project>");
1077await File.WriteAllTextAsync(winExeFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"><PropertyGroup><OutputType>WinExe</OutputType></PropertyGroup></Project>");
Templating\DotNetTemplateFactoryTests.cs (16)
55await File.WriteAllTextAsync(path, content);
80Assert.True(File.Exists(nugetConfigPath), "NuGet.config should be created in working directory for in-place creation");
112Assert.True(File.Exists(nugetConfigPath), "NuGet.config should exist in working directory");
114var content = await File.ReadAllTextAsync(nugetConfigPath);
150var parentContent = await File.ReadAllTextAsync(parentConfigPath);
156Assert.True(File.Exists(outputConfigPath), "NuGet.config should be created in output directory");
158var outputContent = await File.ReadAllTextAsync(outputConfigPath);
192Assert.True(File.Exists(outputConfigPath), "NuGet.config should exist in output directory");
194var content = await File.ReadAllTextAsync(outputConfigPath);
219Assert.False(File.Exists(workingConfigPath), "No NuGet.config should be created in working directory");
223Assert.True(File.Exists(outputConfigPath), "NuGet.config should be created in output directory");
225var content = await File.ReadAllTextAsync(outputConfigPath);
246Assert.False(File.Exists(workingConfigPath), "No NuGet.config should be created for implicit channel");
247Assert.False(File.Exists(outputConfigPath), "No NuGet.config should be created for implicit channel");
267Assert.False(File.Exists(workingConfigPath), "No NuGet.config should be created when no mappings exist");
268Assert.False(File.Exists(outputConfigPath), "No NuGet.config should be created when no mappings exist");
Utils\FileSystemHelperTests.cs (24)
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")));
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")));
60Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "level1.txt")));
62Assert.True(File.Exists(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt")));
64Assert.Equal("root content", File.ReadAllText(Path.Combine(destDir, "root.txt")));
65Assert.Equal("level 1 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "level1.txt")));
66Assert.Equal("level 2 content", File.ReadAllText(Path.Combine(destDir, "subdir1", "subdir2", "level2.txt")));
159File.WriteAllBytes(binaryFilePath, randomBytes);
166Assert.True(File.Exists(copiedFilePath));
168var copiedBytes = File.ReadAllBytes(copiedFilePath);
185File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}");
198Assert.True(File.Exists(filePath));
199Assert.Equal($"content at level {i}", File.ReadAllText(filePath));
Aspire.Dashboard.Tests (11)
Aspire.EndToEnd.Tests (18)
tests\Shared\TemplatesTesting\AspireProject.cs (9)
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
73File.Copy(srcNuGetConfigPath, targetNuGetConfigPath);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
131var csprojContent = File.ReadAllText(csprojPath);
151File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
153string programCs = File.ReadAllText(programCsPath);
156File.WriteAllText(programCsPath, programCs);
Aspire.Hosting (61)
Aspire.Hosting.Azure (12)
Aspire.Hosting.Azure.Functions (6)
Aspire.Hosting.Azure.Tests (61)
Aspire.Hosting.Containers.Tests (6)
Aspire.Hosting.DevTunnels (2)
Aspire.Hosting.Docker (11)
Aspire.Hosting.Docker.Tests (88)
DockerComposePublisherTests.cs (68)
99Assert.True(File.Exists(composePath));
100Assert.True(File.Exists(envPath));
102await Verify(File.ReadAllText(composePath), "yaml")
103.AppendContentAsFile(File.ReadAllText(envPath), "env");
136Assert.True(File.Exists(composePath));
137Assert.True(File.Exists(envPath));
139await Verify(File.ReadAllText(composePath), "yaml")
140.AppendContentAsFile(File.ReadAllText(envPath), "env");
163Assert.True(File.Exists(composePath));
165await Verify(File.ReadAllText(composePath), "yaml");
192Assert.True(File.Exists(composePath));
241Assert.True(File.Exists(composePath));
243Assert.True(File.Exists(envPath));
245await Verify(File.ReadAllText(composePath), "yaml")
246.AppendContentAsFile(File.ReadAllText(envPath), "env");
268Assert.True(File.Exists(envFilePath));
269var firstContent = File.ReadAllText(envFilePath).Replace("PARAM1=", "PARAM1=changed");
270File.WriteAllText(envFilePath, firstContent);
273Assert.True(File.Exists(envFilePath));
274var secondContent = File.ReadAllText(envFilePath);
309Assert.True(File.Exists(envFilePath));
310var firstContent = File.ReadAllText(envFilePath).Replace("PARAM1=", "PARAM1=changed");
311File.WriteAllText(envFilePath, firstContent);
314Assert.True(File.Exists(envFilePath));
315var secondContent = File.ReadAllText(envFilePath);
340Assert.True(File.Exists(composePath));
342var composeFile = File.ReadAllText(composePath);
366Assert.True(File.Exists(composePath));
368var composeContent = File.ReadAllText(composePath);
392Assert.True(File.Exists(composePath));
394var composeContent = File.ReadAllText(composePath);
420Assert.True(File.Exists(composePath));
422var composeContent = File.ReadAllText(composePath);
452Assert.True(File.Exists(composePath));
454var composeContent = File.ReadAllText(composePath);
477Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}");
478var actualContent = await File.ReadAllTextAsync(dockerfilePath);
501Assert.False(File.Exists(composePath));
527var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production"));
557Assert.True(File.Exists(envFilePath), $"Expected env file at {envFilePath}");
559var envFileContent = await File.ReadAllTextAsync(envFilePath);
590var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production"));
613File.WriteAllText(envFilePath, "# Old content\nOLD_KEY=old_value\n");
619var envFileContent = File.ReadAllText(envFilePath);
647File.WriteAllText(envFilePath, "# Old staging content\nOLD_STAGING_KEY=old_staging_value\n");
653var envFileContent = File.ReadAllText(envFilePath);
679Assert.True(File.Exists(composePath));
680Assert.True(File.Exists(envPath));
682await Verify(File.ReadAllText(composePath), "yaml")
683.AppendContentAsFile(File.ReadAllText(envPath), "env");
705Assert.True(File.Exists(composePath));
707var composeContent = File.ReadAllText(composePath);
737Assert.True(File.Exists(composePath));
738Assert.True(File.Exists(envPath));
740await Verify(File.ReadAllText(composePath), "yaml")
741.AppendContentAsFile(File.ReadAllText(envPath), "env");
776Assert.True(File.Exists(composePath));
777Assert.True(File.Exists(envPath));
779await Verify(File.ReadAllText(composePath), "yaml")
780.AppendContentAsFile(File.ReadAllText(envPath), "env");
824Assert.True(File.Exists(composePath));
825Assert.True(File.Exists(envPath));
827await Verify(File.ReadAllText(composePath), "yaml")
828.AppendContentAsFile(File.ReadAllText(envPath), "env");
858Assert.True(File.Exists(composePath));
859Assert.True(File.Exists(envPath));
861await Verify(File.ReadAllText(composePath), "yaml")
862.AppendContentAsFile(File.ReadAllText(envPath), "env");
Aspire.Hosting.Garnet.Tests (1)
Aspire.Hosting.JavaScript (17)
Aspire.Hosting.JavaScript.Tests (50)
AddNodeAppTests.cs (17)
97File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
98File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "{}");
106var dockerfileContents = File.ReadAllText(dockerfilePath);
162File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
175var dockerfileContents = File.ReadAllText(dockerfilePath);
209File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
220var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "js.Dockerfile"));
229File.WriteAllText(Path.Combine(tempDir.Path, "app.js"), "{}");
256File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), "{}");
329File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
330File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
356Assert.True(File.Exists(nodeDockerfilePath), "Dockerfile should be generated for NodeApp");
358var dockerfileContent = File.ReadAllText(nodeDockerfilePath);
385File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
386File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
412Assert.True(File.Exists(nodeDockerfilePath), "Dockerfile should be generated for NodeApp");
414var dockerfileContent = File.ReadAllText(nodeDockerfilePath);
AddViteAppTests.cs (18)
26File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
58var dockerfileContents = File.ReadAllText(dockerfilePath);
91File.WriteAllText(Path.Combine(tempDir.Path, "package.json"), packageJson);
99var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
111File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), "18.20.0");
119var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
131File.WriteAllText(Path.Combine(tempDir.Path, ".node-version"), "v21.5.0");
139var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
156File.WriteAllText(Path.Combine(tempDir.Path, ".tool-versions"), toolVersions);
164var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
182var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
198File.WriteAllText(Path.Combine(tempDir.Path, ".nvmrc"), versionString);
206var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
228var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "vite.Dockerfile"));
291File.WriteAllText(viteConfigPath, "export default {}");
352File.WriteAllText(viteConfigPath, "export default {}");
456File.WriteAllText(viteConfigPath, "export default {}");
517File.WriteAllText(viteConfigPath, "export default {}");
PackageInstallationTests.cs (6)
458File.WriteAllText(Path.Combine(tempDir.Path, "package-lock.json"), "empty");
485File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty");
506File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty");
507File.WriteAllText(Path.Combine(tempDir.Path, ".yarnrc.yml"), "empty");
522File.WriteAllText(Path.Combine(tempDir.Path, "yarn.lock"), "empty");
538File.WriteAllText(Path.Combine(tempDir.Path, "pnpm-lock.yaml"), "empty");
Aspire.Hosting.Kafka.Tests (1)
Aspire.Hosting.Keycloak.Tests (1)
Aspire.Hosting.Kubernetes (3)
Aspire.Hosting.Kubernetes.Tests (17)
KubernetesPublisherTests.cs (14)
68settingsTask = Verify(File.ReadAllText(filePath), fileExtension);
72settingsTask = settingsTask.AppendContentAsFile(File.ReadAllText(filePath), fileExtension);
103Assert.True(File.Exists(deploymentPath));
105var content = await File.ReadAllTextAsync(deploymentPath);
163settingsTask = Verify(File.ReadAllText(filePath), fileExtension);
167settingsTask = settingsTask.AppendContentAsFile(File.ReadAllText(filePath), fileExtension);
217settingsTask = Verify(File.ReadAllText(filePath), fileExtension);
221settingsTask = settingsTask.AppendContentAsFile(File.ReadAllText(filePath), fileExtension);
272settingsTask = Verify(File.ReadAllText(filePath), fileExtension);
276settingsTask = settingsTask.AppendContentAsFile(File.ReadAllText(filePath), fileExtension);
300Assert.True(File.Exists(dockerfilePath), $"Dockerfile should exist at {dockerfilePath}");
301var actualContent = await File.ReadAllTextAsync(dockerfilePath);
399settingsTask = Verify(File.ReadAllText(filePath), fileExtension);
403settingsTask = settingsTask.AppendContentAsFile(File.ReadAllText(filePath), fileExtension);
Aspire.Hosting.Maui (2)
Aspire.Hosting.Maui.Tests (3)
Aspire.Hosting.MongoDB.Tests (3)
Aspire.Hosting.MySql (2)
Aspire.Hosting.MySql.Tests (3)
Aspire.Hosting.Oracle.Tests (4)
Aspire.Hosting.PostgreSQL.Tests (2)
Aspire.Hosting.Python (17)
Aspire.Hosting.Python.Tests (80)
AddPythonAppTests.cs (75)
290File.WriteAllText(scriptPath, scriptContent);
293File.WriteAllText(requirementsPath, requirementsContent);
297File.WriteAllText(dockerFilePath,
1259File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1260File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1261File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1283Assert.True(File.Exists(scriptDockerfilePath), "Dockerfile should be generated for script entrypoint");
1286Assert.True(File.Exists(moduleDockerfilePath), "Dockerfile should be generated for module entrypoint");
1289Assert.True(File.Exists(executableDockerfilePath), "Dockerfile should be generated for executable entrypoint");
1291var scriptDockerfileContent = File.ReadAllText(scriptDockerfilePath);
1292var moduleDockerfileContent = File.ReadAllText(moduleDockerfilePath);
1293var executableDockerfileContent = File.ReadAllText(executableDockerfilePath);
1324File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1326File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1348Assert.True(File.Exists(scriptDockerfilePath), "Dockerfile should be generated for script entrypoint");
1351Assert.True(File.Exists(moduleDockerfilePath), "Dockerfile should be generated for module entrypoint");
1354Assert.True(File.Exists(executableDockerfilePath), "Dockerfile should be generated for executable entrypoint");
1356var scriptDockerfileContent = File.ReadAllText(scriptDockerfilePath);
1357var moduleDockerfileContent = File.ReadAllText(moduleDockerfilePath);
1358var executableDockerfileContent = File.ReadAllText(executableDockerfilePath);
1642File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1643File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1644File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1660Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated");
1662var dockerfileContent = File.ReadAllText(dockerfilePath);
1688File.WriteAllText(Path.Combine(projectDirectory, "requirements.txt"), requirementsContent);
1689File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1701Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated for non-UV Python app");
1703var dockerfileContent = File.ReadAllText(dockerfilePath);
1737File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1738File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1750Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated for non-UV Python app");
1752var dockerfileContent = File.ReadAllText(dockerfilePath);
1769File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1781Assert.True(File.Exists(dockerfilePath), "Dockerfile should be generated for Python app");
1783var dockerfileContent = File.ReadAllText(dockerfilePath);
1802File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1803File.WriteAllText(Path.Combine(projectDirectory, ".python-version"), pythonVersionContent);
1817Assert.True(File.Exists(scriptDockerfilePath), "Dockerfile should be generated for script entrypoint");
1820Assert.True(File.Exists(moduleDockerfilePath), "Dockerfile should be generated for module entrypoint");
1823Assert.True(File.Exists(executableDockerfilePath), "Dockerfile should be generated for executable entrypoint");
1825var scriptDockerfileContent = File.ReadAllText(scriptDockerfilePath);
1826var moduleDockerfileContent = File.ReadAllText(moduleDockerfilePath);
1827var executableDockerfileContent = File.ReadAllText(executableDockerfilePath);
1852File.WriteAllText(scriptPath, "print('Hello')");
1856File.WriteAllText(pyprojectPath, "[project]\nname = \"test\"");
1886File.WriteAllText(scriptPath, "print('Hello')");
1890File.WriteAllText(requirementsPath, "requests==2.31.0");
1921File.WriteAllText(scriptPath, "print('Hello')");
1925File.WriteAllText(pyprojectPath, "[project]\nname = \"test\"");
1927File.WriteAllText(requirementsPath, "requests==2.31.0");
1951File.WriteAllText(scriptPath, "print('Hello')");
1975File.WriteAllText(scriptPath, "print('Hello')");
1998File.WriteAllText(scriptPath, "print('Hello')");
2002File.WriteAllText(requirementsPath, "requests");
2026File.WriteAllText(scriptPath, "print('Hello')");
2030File.WriteAllText(requirementsPath, "requests");
2055File.WriteAllText(scriptPath, "print('Hello')");
2083File.WriteAllText(scriptPath, "print('Hello')");
2087File.WriteAllText(requirementsPath, "requests");
2126File.WriteAllText(scriptPath, "print('Hello')");
2129File.WriteAllText(requirementsPath, "requests");
2156File.WriteAllText(scriptPath, "print('Hello')");
2159File.WriteAllText(requirementsPath, "requests");
2190File.WriteAllText(scriptPath, "print('Hello')");
2193File.WriteAllText(requirementsPath, "requests");
2226File.WriteAllText(scriptPath, "print('Hello')");
2229File.WriteAllText(requirementsPath, "requests");
2256File.WriteAllText(scriptPath, "print('Hello')");
2259File.WriteAllText(requirementsPath, "requests");
2288File.WriteAllText(scriptPath, "print('Hello')");
2291File.WriteAllText(requirementsPath, "requests");
2320File.WriteAllText(scriptPath, "print('Hello')");
2323File.WriteAllText(requirementsPath, "requests");
2356File.WriteAllText(scriptPath, "print('Hello')");
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.SqlServer.Tests (1)
Aspire.Hosting.Testing (2)
Aspire.Hosting.Testing.Tests (3)
Aspire.Hosting.Tests (108)
Dashboard\DashboardLifecycleHookTests.cs (19)
203File.Delete(tempDir);
212File.WriteAllText(dashboardDll, "mock dll content");
235File.WriteAllText(runtimeConfig, JsonSerializer.Serialize(originalConfig, new JsonSerializerOptions { WriteIndented = true }));
260Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist");
264var customConfigContent = File.ReadAllText((string)args[2]);
296File.Delete(tempDir);
306File.WriteAllText(dashboardExe, "mock exe content");
307File.WriteAllText(dashboardDll, "mock dll content");
323File.WriteAllText(runtimeConfig, JsonSerializer.Serialize(originalConfig, new JsonSerializerOptions { WriteIndented = true }));
345Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist");
368File.Delete(tempDir);
378File.WriteAllText(dashboardExe, "mock exe content");
379File.WriteAllText(dashboardDll, "mock dll content");
395File.WriteAllText(runtimeConfig, JsonSerializer.Serialize(originalConfig, new JsonSerializerOptions { WriteIndented = true }));
417Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist");
440File.Delete(tempDir);
449File.WriteAllText(dashboardDll, "mock dll content");
465File.WriteAllText(runtimeConfig, JsonSerializer.Serialize(originalConfig, new JsonSerializerOptions { WriteIndented = true }));
487Assert.True(File.Exists((string)args[2]), "Custom runtime config file should exist");
MSBuildTests.cs (16)
25File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
54File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
82File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
110File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
121var appHostMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "_AppHost.ProjectMetadata.g.cs"));
122var appMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "App.ProjectMetadata.g.cs"));
149File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
159File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
177File.WriteAllText(Path.Combine(libraryDirectory, $"{name}.csproj"),
189File.WriteAllText(Path.Combine(libraryDirectory, "Class1.cs"),
204File.WriteAllText(Path.Combine(appDirectory, $"{name}.csproj"),
215File.WriteAllText(Path.Combine(appDirectory, "Program.cs"),
271File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
300File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
330File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
359File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
Aspire.Hosting.Yarp (1)
Aspire.Hosting.Yarp.Tests (2)
Aspire.Playground.Tests (1)
Aspire.RuntimeIdentifier.Tool (1)
Aspire.Templates.Tests (33)
tests\Shared\TemplatesTesting\AspireProject.cs (9)
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
73File.Copy(srcNuGetConfigPath, targetNuGetConfigPath);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
131var csprojContent = File.ReadAllText(csprojPath);
151File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
153string programCs = File.ReadAllText(programCsPath);
156File.WriteAllText(programCsPath, programCs);
Aspire.TestUtilities (1)
AzureSearch.ApiService (1)
blazor-devserver (1)
BoundTreeGenerator (1)
BuildActionTelemetryTable (2)
BuildBoss (7)
BuildValidator (14)
CatalogService (1)
ClientSample (1)
CodeGenerator (3)
CodeStyleConfigFileGenerator (2)
ConfigurationSchemaGenerator (1)
ConfigurationSchemaGenerator.Tests (3)
Crossgen2Tasks (13)
csc (6)
CSharpErrorFactsGenerator (2)
CSharpSyntaxGenerator (3)
dotnet-dev-certs (22)
dotnet-getdocument (9)
dotnet-openapi (9)
dotnet-razorpagegenerator (3)
dotnet-sql-cache (1)
dotnet-svcutil.xmlserializer (9)
dotnet-svcutil.xmlserializer.IntegrationTests (4)
dotnet-svcutil-lib (46)
Shared\MSBuildProj.cs (10)
147var project = await ParseAsync(File.ReadAllText(filePath), filePath, logger, cancellationToken).ConfigureAwait(false);
154var project = await ParseAsync(File.ReadAllText(filePath), filePath, logger, cancellationToken, tfMoniker).ConfigureAwait(false);
322if (fullPath == null || !File.Exists(fullPath))
396if (File.Exists(fullPath))
412project = await ParseAsync(File.ReadAllText(fullPath), fullPath, logger, cancellationToken).ConfigureAwait(false);
701using (StreamWriter writer = File.CreateText(this.FullPath))
798if (File.Exists(assetsFile) && !(this.TargetFramework.Contains("-") && !this.TargetFramework.ToLower().Contains("windows")))
883if (File.Exists(depsFile))
890using (var stream = File.OpenRead(depsFile))
915if (File.Exists(dependency.FullPath) && !assemblyDependencies.Contains(dependency))
dotnet-svcutil-lib.Tests (52)
GlobalToolTests.cs (4)
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);
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);
TestInit.cs (20)
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>");
95if (!File.Exists(filePath))
115File.Copy(project.FullPath, projectPath);
116File.Copy(srcProgramPath, programPath);
118File.WriteAllText(programPath, File.ReadAllText(programPath)
167Assert.True(File.Exists(g_StarterProject.FullPath), $"{nameof(g_StarterProject)} is not initialized!");
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>");
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
335File.WriteAllText(this.this_TestCaseLogFile, logText);
354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
430File.Copy(generated, expected);
458File.WriteAllText(scriptPath, cmdStr.ToString());
472fileLines1.AddRange(File.ReadAllLines(baselineFile));
473fileLines2.AddRange(File.ReadAllLines(generatedFile));
590Assert.True(rootSolutionFolder != null && File.Exists(rootSolutionFolder), $"Unable to find dotnet-svcutil.sln file, current dir: {parentDir}");
606File.WriteAllText(Path.Combine(directory, "global.json"), globalConfig);
624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
UnitTest.cs (8)
225File.Copy(Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl"), Path.Combine(this_TestGroupOutputDir, "wsdl", "Simple.wsdl"));
271File.WriteAllText(this_TestCaseLogFile, this_FixupUtil.ReplaceText(log));
309File.WriteAllText(this_TestCaseLogFile, this_FixupUtil.ReplaceText(log));
331File.Copy(jsonFileSrcPath, jsonFileDstPath);
332File.WriteAllText(jsonFileDstPath, File.ReadAllText(jsonFileDstPath).Replace("$testCaseProject$", this_TestCaseProject.FullPath.Replace("\\", "/")));
348var jsonText = File.ReadAllText(jsonFileSrcPath);
354File.WriteAllText(outJsonFile, options.Json);
dotnet-user-jwts (12)
dotnet-user-secrets (9)
FilesWebSite (1)
GenerateAnalyzerNuspec (6)
GenerateDocumentationAndConfigFiles (21)
GenerateRulesMissingDocumentation (3)
GetDocument.Insider (5)
HelixTestRunner (10)
IdeBenchmarks (3)
IdeCoreBenchmarks (12)
IIS.FunctionalTests (21)
IIS.LongTests (26)
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"), "");
IIS.Microbenchmarks (1)
IIS.NewHandler.FunctionalTests (26)
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"), "");
IIS.NewShim.FunctionalTests (26)
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"), "");
IIS.ShadowCopy.Tests (16)
IIS.Tests (1)
IISExpress.FunctionalTests (28)
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"), "");
illink (25)
Linker.Steps\OutputStep.cs (16)
68using (var w = File.CreateText(Context.AssemblyListFile))
158using (var fs = File.Open(Path.Combine(Context.OutputDirectory, Context.PInvokesListFile), FileMode.Create))
172if (File.Exists(target))
174File.Delete(target);
175File.Delete(target + ".mdb");
176File.Delete(Path.ChangeExtension(target, "pdb"));
177File.Delete(GetConfigFile(target));
220if (!File.Exists(satelliteAssembly))
227File.Copy(satelliteAssembly, Path.Combine(culturePath, resourceFile), true);
234if (!File.Exists(config))
242File.Copy(config, GetConfigFile(GetAssemblyFileName(assembly, directory)), true);
269File.Copy(source, target, true);
274if (File.Exists(mdb))
275File.Copy(mdb, target + ".mdb", true);
278if (File.Exists(pdb))
279File.Copy(pdb, Path.ChangeExtension(target, "pdb"), true);
ILLink.Tasks (9)
Infrastructure.Common (1)
InProcessWebSite (5)
installer.tasks (9)
InteractiveHost.UnitTests (2)
Interop.FunctionalTests (3)
InteropClient (2)
IOperationGenerator (2)
Metrics (6)
Metrics.Legacy (6)
Microsoft.Agents.AI.ProjectTemplates.Tests (5)
Microsoft.Analyzers.Extra.Tests (1)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.Arcade.Common (10)
Microsoft.AspNetCore.Analyzer.Testing (2)
Microsoft.AspNetCore.App.UnitTests (15)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (26)
Microsoft.AspNetCore.Authentication.Test (4)
Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests (1)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebView (2)
Microsoft.AspNetCore.DataProtection (10)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (6)
Microsoft.AspNetCore.DataProtection.Tests (11)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (21)
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (12)
Microsoft.AspNetCore.Diagnostics (3)
Microsoft.AspNetCore.FunctionalTests (6)
Microsoft.AspNetCore.Grpc.Swagger.Tests (1)
Microsoft.AspNetCore.Hosting (5)
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Microbenchmarks (4)
Microsoft.AspNetCore.Http.Results.Tests (8)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.HttpLogging.Tests (30)
FileLoggerProcessorTests.cs (30)
51Assert.True(File.Exists(filePath));
53Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath));
98Assert.True(File.Exists(filePathToday));
99Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePathToday));
100Assert.True(File.Exists(filePathTomorrow));
101Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePathTomorrow));
137Assert.True(File.Exists(filePath1));
138Assert.True(File.Exists(filePath2));
140Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1));
141Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2));
154File.WriteAllText(Path.Combine(path, "randomFile.txt"), "Text");
400Assert.True(File.Exists(filePath1));
401Assert.True(File.Exists(filePath2));
402Assert.True(File.Exists(filePath3));
404Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1));
405Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2));
406Assert.Equal(_messageThree + Environment.NewLine, File.ReadAllText(filePath3));
466Assert.False(File.Exists(filePath1));
467Assert.False(File.Exists(filePath2));
468Assert.True(File.Exists(filePath3));
469Assert.True(File.Exists(filePath4));
471Assert.Equal(_messageThree + Environment.NewLine, File.ReadAllText(filePath3));
472Assert.Equal(_messageFour + Environment.NewLine, File.ReadAllText(filePath4));
536Assert.True(File.Exists(filePath1));
537Assert.True(File.Exists(filePath2));
539Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1));
540Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2));
550while (!File.Exists(filePath))
558if (File.ReadAllText(filePath).Length >= length)
581while (File.Exists(filePath))
Microsoft.AspNetCore.Identity.Test (2)
Microsoft.AspNetCore.InternalTesting (10)
Microsoft.AspNetCore.InternalTesting.Tests (14)
AssemblyTestLogTests.cs (14)
67Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist.");
68Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist.");
160Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist");
161Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist");
163var globalLogContent = MakeConsistent(File.ReadAllText(globalLogPath));
164var testLogContent = MakeConsistent(File.ReadAllText(testLog));
215Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist.");
216Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist.");
221Assert.True(!File.Exists(globalLogPath), $"Expected no global log file {globalLogPath} to exist.");
222Assert.True(!File.Exists(testLog), $"Expected no test log file {testLog} to exist.");
266Assert.True(File.Exists(globalLogPath), $"Expected global log file {globalLogPath} to exist.");
267Assert.True(File.Exists(testLog), $"Expected test log file {testLog} to exist.");
343Assert.True(File.Exists(Path.Combine(
353Assert.True(File.Exists(Path.Combine(
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Testing (3)
Microsoft.AspNetCore.Mvc.Testing.Tasks (1)
Microsoft.AspNetCore.OpenApi.Build.Tests (6)
Microsoft.AspNetCore.ResponseCompression.Tests (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (4)
Microsoft.AspNetCore.Server.IIS (3)
Microsoft.AspNetCore.Server.IntegrationTesting (10)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (16)
Microsoft.AspNetCore.Server.Kestrel.Core (23)
Microsoft.AspNetCore.Server.Kestrel.Tests (47)
KestrelConfigurationLoaderTests.cs (32)
280File.WriteAllBytes(path, bytes);
303if (File.Exists(GetCertificatePath()))
305File.Delete(GetCertificatePath());
321File.WriteAllBytes(devCertPath, devCertBytes);
385if (File.Exists(GetCertificatePath()))
387File.Delete(GetCertificatePath());
447File.WriteAllBytes(path, bytes);
477if (File.Exists(GetCertificatePath()))
479File.Delete(GetCertificatePath());
494File.WriteAllBytes(path, bytes);
526if (File.Exists(GetCertificatePath()))
528File.Delete(GetCertificatePath());
543File.WriteAllBytes(path, bytes);
579if (File.Exists(GetCertificatePath()))
581File.Delete(GetCertificatePath());
919File.WriteAllText(certificatePath, certificate.ExportCertificatePem());
924File.WriteAllBytes(certificatePath, certificate.Export(X509ContentType.Cert));
927File.WriteAllText(keyPath, keyPem);
985File.WriteAllBytes(path, bytes);
1000if (File.Exists(GetCertificatePath()))
1002File.Delete(GetCertificatePath());
1013if (File.Exists(GetCertificatePath()))
1015File.Delete(GetCertificatePath());
1031if (File.Exists(GetCertificatePath()))
1033File.Delete(GetCertificatePath());
1141File.WriteAllBytes(certificatePath, oldCertificateBytes);
1171File.WriteAllBytes(certificatePath, newCertificateBytes);
1195if (File.Exists(certificatePath))
1198File.Delete(certificatePath);
1226var fileLink = File.CreateSymbolicLink(Path.Combine(tempDir, "tls.key"), "./link/tls.key");
1235File.WriteAllBytes(oldCertPath, oldCertificateBytes);
1240File.WriteAllBytes(newCertPath, newCertificateBytes);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
Microsoft.AspNetCore.Shared.Tests (23)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SpaProxy (2)
Microsoft.AspNetCore.StaticAssets (2)
Microsoft.AspNetCore.StaticAssets.Tests (8)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
Microsoft.AspNetCore.StaticFiles.Tests (2)
Microsoft.AspNetCore.TestHost.Tests (9)
UseSolutionRelativeContentRootTests.cs (9)
27File.WriteAllText(solutionFile, "Microsoft Visual Studio Solution File, Format Version 12.00");
45File.WriteAllText(solutionFile, """
74File.WriteAllText(slnFile, "Microsoft Visual Studio Solution File, Format Version 12.00");
75File.WriteAllText(slnxFile, """
103File.WriteAllText(slnFile, "Microsoft Visual Studio Solution File, Format Version 12.00");
104File.WriteAllText(slnxFile, """
129File.WriteAllText(slnFile, "Microsoft Visual Studio Solution File, Format Version 12.00");
130File.WriteAllText(slnxFile, """
171File.WriteAllText(solutionFile, """
Microsoft.AspNetCore.WebSockets.ConformanceTests (8)
Microsoft.AspNetCore.WebUtilities (2)
Microsoft.AspNetCore.WebUtilities.Tests (24)
Microsoft.Build.Tasks.CodeAnalysis (21)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (22)
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (4)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (34)
Microsoft.Cci.Extensions (9)
Microsoft.CodeAnalysis (27)
Microsoft.CodeAnalysis.Analyzers (5)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
Microsoft.CodeAnalysis.CodeStyle (2)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (95)
CommandLineTests.cs (78)
155Assert.True(File.Exists(exePath));
412Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932)));
432Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932)));
2254var peStream = File.OpenRead(Path.Combine(dir.Path, "a.exe"));
2262AssertEx.Equal(File.ReadAllBytes(sl.Path), blob);
2286var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
2291AssertEx.Equal(File.ReadAllBytes(sl.Path), blob);
2315var pdbStream = File.OpenRead(Path.Combine(dir.Path, "a.pdb"));
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")));
2544var content = File.ReadAllText(file, encoding ?? Encoding.UTF8);
4501using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, "aa.exe"))))
4511if (System.IO.File.Exists(exeName))
4513System.IO.File.Delete(exeName);
7081using (var metadata = ModuleMetadata.CreateFromImage(File.ReadAllBytes(Path.Combine(dir.Path, expectedOutputName))))
7091if (System.IO.File.Exists(expectedOutputName))
7093System.IO.File.Delete(expectedOutputName);
8251using (var xmlFileHandle = File.Open(xml.ToString(), FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.ReadWrite))
8256Assert.True(File.Exists(Path.Combine(dir.ToString(), "a.xml")));
8703System.IO.File.Delete(System.IO.Path.Combine(baseDir, "goo.dll"));
8758using (var stream = File.OpenWrite(exe.Path))
8765using (var stream = File.OpenWrite(pdb.Path))
8780using (var peFile = File.OpenRead(exe.Path))
8791using (var peFile = File.OpenRead(exe.Path))
8799using (var stream = File.OpenRead(path))
8895using (var fsNewDll = File.OpenRead(libDll.Path))
8910File.Delete(libSrc.Path);
8911File.Delete(libDll.Path);
8912File.Delete(libPdb.Path);
8935File.SetAttributes(libDll.Path, FileAttributes.ReadOnly);
8972using (var stream = File.OpenRead(path))
8992return File.Open(file, mode, access, share);
9015return File.Open(file, mode, access, share);
9037return File.Open(file, mode, access, share);
9067return File.Open(file, mode, access, share);
9088return File.Open(file, mode, access, share);
9095System.IO.File.Delete(sourcePath);
9096System.IO.File.Delete(exePath);
9114return File.Open(file, (FileMode)mode, (FileAccess)access, (FileShare)share);
9120System.IO.File.Delete(sourcePath);
9121System.IO.File.Delete(exePath);
9122System.IO.File.Delete(pdbPath);
9140return File.Open(file, (FileMode)mode, (FileAccess)access, (FileShare)share);
9152System.IO.File.Delete(xmlPath);
9153System.IO.File.Delete(sourcePath);
9244var bytes = File.ReadAllBytes(xmlPath);
9263System.IO.File.Delete(xmlPath);
9264System.IO.File.Delete(sourcePath);
11370Assert.True(File.Exists(Path.Combine(dir.ToString(), "doc.xml")));
11622Assert.True(File.Exists(exePath));
11623Assert.True(File.Exists(pdbPath));
11624using (var peStream = File.OpenRead(exePath))
11803Assert.True(File.Exists(exe));
11812Assert.True(File.Exists(doc));
11814var content = File.ReadAllText(doc);
11836Assert.True(File.Exists(refDll));
11867Assert.False(File.Exists(dll));
11870Assert.False(File.Exists(refDll));
11919Assert.True(File.Exists(refDll));
11930Assert.False(File.Exists(pdb));
11933Assert.True(File.Exists(doc));
11935var content = File.ReadAllText(doc);
12295Assert.True(File.Exists(exePath));
12296using (var peStream = File.OpenRead(exePath))
13483Assert.True(File.Exists(binaryPath) == !warnAsError);
13486Assert.True(File.Exists(pdbPath) == !warnAsError);
13489Assert.True(File.Exists(xmlDocFilePath) == !warnAsError);
13529Assert.True(File.Exists(binaryPath) == !analyzerConfigSetToError);
13532Assert.True(File.Exists(pdbPath) == !analyzerConfigSetToError);
13535Assert.True(File.Exists(xmlDocFilePath) == !analyzerConfigSetToError);
13579Assert.True(File.Exists(binaryPath) == !rulesetSetToError);
13582Assert.True(File.Exists(pdbPath) == !rulesetSetToError);
13585Assert.True(File.Exists(xmlDocFilePath) == !rulesetSetToError);
13610Assert.True(File.Exists(binaryPath) == !warnAsError);
14047using (Stream peStream = File.OpenRead(Path.Combine(dir.Path, "checksum.exe")), pdbStream = File.OpenRead(Path.Combine(dir.Path, "checksum.pdb")))
14406string[] writtenText = File.ReadAllLines(Path.Combine(dir.Path, "touched.write"));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (31)
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (10)
46File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
80File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
118File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
389File.WriteAllBytes(typeForwardDllFilePath, []);
390File.WriteAllBytes(dllFilePath, []);
450File.WriteAllBytes(typeForwardDllFilePath, []);
451File.WriteAllBytes(dllFilePath, []);
521File.WriteAllBytes(typeForwardDllFilePath, []);
522File.WriteAllBytes(realImplementationDllFilePath, []);
523File.WriteAllBytes(dllFilePath, []);
PdbSourceDocument\PdbSourceDocumentTests.cs (12)
360File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
401File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
459File.WriteAllText(Path.Combine(dataDir, "FrameworkList.xml"), """
484File.Delete(GetPdbPath(path));
507File.Delete(GetDllPath(path));
529File.Delete(GetSourceFilePath(path));
572File.WriteAllBytes(GetPdbPath(path), []);
597File.WriteAllBytes(GetPdbPath(path), corruptPdb);
621File.Move(pdbFilePath, archivePdbFilePath);
632File.Delete(pdbFilePath);
633File.Move(archivePdbFilePath, pdbFilePath);
652File.WriteAllText(GetSourceFilePath(path), """
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Features (3)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (2)
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (1)
Microsoft.CodeAnalysis.Features (22)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (4)
Microsoft.CodeAnalysis.InteractiveHost (4)
Microsoft.CodeAnalysis.LanguageServer (13)
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (5)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
Microsoft.CodeAnalysis.Remote.ServiceHub (4)
Microsoft.CodeAnalysis.Remote.Workspaces (3)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Microsoft.CodeAnalysis.Scripting (15)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (9)
Microsoft.CodeAnalysis.Scripting.TestUtilities (3)
Microsoft.CodeAnalysis.SemanticSearch.Extensions (1)
Microsoft.CodeAnalysis.Test.Utilities (24)
Microsoft.CodeAnalysis.UnitTests (24)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (12)
Microsoft.CodeAnalysis.Workspaces.MSBuild (16)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (31)
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 (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.Data.Analysis (1)
Microsoft.Data.Analysis.Tests (3)
Microsoft.DotNet.Arcade.Sdk (23)
Microsoft.DotNet.Arcade.Sdk.Tests (7)
Microsoft.DotNet.ArcadeAzureIntegration (1)
Microsoft.DotNet.Baselines.Tasks (3)
Microsoft.DotNet.Build.Manifest.Tests (4)
Microsoft.DotNet.Build.Tasks.Feed (23)
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
Microsoft.DotNet.Build.Tasks.Installers (37)
src\CreateWixBuildWixpack.cs (18)
115File.Copy(projectPath, destPath, overwrite: true);
148if (File.Exists(OutputFile))
150File.Delete(OutputFile);
202File.Copy(includeFile, tempFilePath, overwrite: true);
212File.Delete(tempFilePath);
432File.WriteAllText(Path.Combine(WixpackWorkingDir, "create.rsp"), string.Join(System.Environment.NewLine, commandLineArgs));
446File.WriteAllText(Path.Combine(WixpackWorkingDir, "create.cmd"), createCmdFileContents.ToString());
511if (!File.Exists(xmlPath))
519File.Copy(xmlPath, copiedXmlPath, overwrite: true);
639string content = File.ReadAllText(file);
649if (File.Exists(includeFilePath))
667if (File.Exists(potentialPath))
683File.WriteAllText(file, content);
749string input = File.ReadAllText(sourceFile);
933File.WriteAllText(sourceFile, output.ToString());
1021if (File.Exists(source))
1024File.Copy(source, destPath, overwrite: true);
1108File.Copy(file, Path.Combine(destDir, Path.GetFileName(file)), overwrite: true);
Microsoft.DotNet.Build.Tasks.Packaging (23)
Microsoft.DotNet.Build.Tasks.Packaging.Tests (10)
Microsoft.DotNet.Build.Tasks.Templating (3)
Microsoft.DotNet.Build.Tasks.Templating.Tests (4)
Microsoft.DotNet.Build.Tasks.VisualStudio (8)
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (9)
Microsoft.DotNet.Build.Tasks.Workloads (22)
Microsoft.DotNet.Build.Tasks.Workloads.Tests (22)
CreateVisualStudioWorkloadTests.cs (6)
94string componentSwr = File.ReadAllText(
99string previewComponentSwr = File.ReadAllText(
128string manifestMsiSwr = File.ReadAllText(Path.Combine(baseIntermediateOutputPath, "src", "swix", "6.0.200", "Emscripten.Manifest-6.0.200", "x64", "msi.swr"));
144string packMsiSwr = File.ReadAllText(Path.Combine(Path.GetDirectoryName(pythonPackSwixItem.ItemSpec), "msi.swr"));
229string componentSwr = File.ReadAllText(
250string manifestMsiSwr = File.ReadAllText(Path.Combine(baseIntermediateOutputPath, "src", "swix", "6.0.200", "Emscripten.Manifest-6.0.200", "arm64", "msi.swr"));
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.Deployment.Tasks.Links (1)
Microsoft.DotNet.GenAPI (3)
Microsoft.DotNet.GenFacades (9)
Microsoft.DotNet.Helix.JobSender (6)
Microsoft.DotNet.Helix.JobSender.Tests (1)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Helix.Sdk.Tests (3)
Microsoft.DotNet.Internal.SymbolHelper (9)
Microsoft.DotNet.MacOsPkg.Core (9)
Microsoft.DotNet.MacOsPkg.Tests (4)
Microsoft.DotNet.NuGetRepack.Tasks (9)
Microsoft.DotNet.NuGetRepack.Tests (29)
VersionUpdaterTests.cs (26)
63File.WriteAllBytes(a_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameA), TestResources.DailyBuildPackages.TestPackageA);
64File.WriteAllBytes(b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
65File.WriteAllBytes(c_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameC), TestResources.DailyBuildPackages.TestPackageC);
66File.WriteAllBytes(d_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameD), TestResources.DailyBuildPackages.TestPackageD);
67File.WriteAllBytes(g_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameG), TestResources.DailyBuildPackages.TestPackageG);
84AssertPackagesEqual(TestResources.ReleasePackages.TestPackageA, File.ReadAllBytes(a_rel));
85AssertPackagesEqual(TestResources.ReleasePackages.TestPackageB, File.ReadAllBytes(b_rel));
86AssertPackagesEqual(TestResources.ReleasePackages.TestPackageC, File.ReadAllBytes(c_rel));
87AssertPackagesEqual(TestResources.ReleasePackages.TestPackageD, File.ReadAllBytes(d_rel));
88AssertPackagesEqual(TestResources.ReleasePackages.TestPackageG, File.ReadAllBytes(g_rel));
90AssertPackagesEqual(TestResources.PreReleasePackages.TestPackageA, File.ReadAllBytes(a_pre));
91AssertPackagesEqual(TestResources.PreReleasePackages.TestPackageB, File.ReadAllBytes(b_pre));
92AssertPackagesEqual(TestResources.PreReleasePackages.TestPackageC, File.ReadAllBytes(c_pre));
93AssertPackagesEqual(TestResources.PreReleasePackages.TestPackageD, File.ReadAllBytes(d_pre));
94AssertPackagesEqual(TestResources.PreReleasePackages.TestPackageG, File.ReadAllBytes(g_pre));
106File.WriteAllBytes(e_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameE), TestResources.DailyBuildPackages.TestPackageE);
107File.WriteAllBytes(f_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameF), TestResources.DailyBuildPackages.TestPackageF);
118AssertPackagesEqual(TestResources.ReleasePackages.TestPackageE, File.ReadAllBytes(e_rel));
119AssertPackagesEqual(TestResources.ReleasePackages.TestPackageF, File.ReadAllBytes(f_rel));
121AssertPackagesEqual(TestResources.PreReleasePackages.TestPackageE, File.ReadAllBytes(e_pre));
122AssertPackagesEqual(TestResources.PreReleasePackages.TestPackageF, File.ReadAllBytes(f_pre));
134File.WriteAllBytes(a_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameA), TestResources.DailyBuildPackages.TestPackageA);
135File.WriteAllBytes(b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
136File.WriteAllBytes(c_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameC), TestResources.DailyBuildPackages.TestPackageC);
174File.WriteAllBytes(dotnet_tool = Path.Combine(dir, TestResources.MiscPackages.NameDotnetTool), TestResources.MiscPackages.DotnetTool);
176File.WriteAllBytes(normal_package_b_daily = Path.Combine(dir, TestResources.DailyBuildPackages.NameB), TestResources.DailyBuildPackages.TestPackageB);
Microsoft.DotNet.Open.Api.Tools.Tests (27)
Microsoft.DotNet.PackageTesting (1)
Microsoft.DotNet.RemoteExecutor (12)
Microsoft.DotNet.SetupNugetSources.Tests (41)
Microsoft.DotNet.SharedFramework.Sdk (7)
Microsoft.DotNet.SignCheckLibrary (18)
Microsoft.DotNet.SignCheckTask (3)
Microsoft.DotNet.SignTool (53)
Microsoft.DotNet.SignTool.Tests (22)
Microsoft.DotNet.SourceBuild.Tasks (13)
Microsoft.DotNet.StrongName (1)
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
Microsoft.DotNet.Tar (3)
Microsoft.DotNet.VersionTools.Cli (1)
Microsoft.DotNet.XliffTasks (10)
Tasks\TransformTemplates.cs (4)
74File.Copy(templatePath, cultureSpecificTemplateFile, overwrite: true);
80File.Copy(projectFileFullPath, Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value)), overwrite: true);
108File.Copy(Path.Combine(TranslatedOutputDirectory, localizedFileName), templateItemDestinationPath, overwrite: true);
113File.Copy(templateItemFullPath, templateItemDestinationPath, overwrite: true);
Microsoft.Extensions.AI.Evaluation.Console (5)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Microsoft.Extensions.AI.Templates.Tests (5)
Microsoft.Extensions.ApiDescription.Client.Tests (3)
Microsoft.Extensions.ApiDescription.Tool.Tests (20)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (4)
Microsoft.Extensions.DataIngestion.Markdig (1)
Microsoft.Extensions.DataIngestion.MarkItDown (2)
Microsoft.Extensions.DataIngestion.Tests (5)
Microsoft.Extensions.DependencyModel (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (9)
Microsoft.Extensions.FileProviders.Embedded (2)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.Extensions.Hosting.Systemd (1)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (2)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.ML (1)
Microsoft.Extensions.ML.Tests (1)
Microsoft.Extensions.SecretManager.Tools.Tests (10)
Microsoft.Extensions.ServiceDiscovery.Dns (6)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (9)
Microsoft.Gen.ContextualOptions.Unit.Tests (21)
Microsoft.Gen.Logging.Unit.Tests (1)
Microsoft.Gen.MetadataExtractor (3)
Microsoft.Gen.MetadataExtractor.Unit.Tests (11)
Microsoft.Gen.Metrics.Unit.Tests (3)
Microsoft.Gen.MetricsReports (1)
Microsoft.Gen.MetricsReports.Unit.Tests (11)
Microsoft.Maui (3)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Resizetizer (22)
Microsoft.ML.AutoML (2)
Microsoft.ML.AutoML.Samples (3)
Microsoft.ML.AutoML.Tests (6)
Microsoft.ML.CodeGenerator (1)
Microsoft.ML.Core (11)
Microsoft.ML.Core.Tests (39)
UnitTests\TestEntryPoints.cs (26)
242File.WriteAllLines(epListPath, epListContents);
248using (var file = File.OpenWrite(manifestPath))
269File.WriteAllLines(path, epListContents);
275using (var file = File.OpenWrite(jPath))
610File.WriteAllLines(jsonPath, new[] { inputGraph });
738File.WriteAllLines(jsonPath, new[] { inputGraph });
886File.WriteAllLines(jsonPath, new[] { inputGraph });
1047File.WriteAllLines(jsonPath, new[] { inputGraph });
1190File.WriteAllLines(jsonPath, new[] { inputGraph });
1337File.WriteAllLines(jsonPath, new[] { inputGraph });
1434File.WriteAllLines(jsonPath, new[] { inputGraph });
2231using (var file = File.OpenWrite(summaryPath))
2241using (var file = File.OpenWrite(summaryKvpPath))
2324File.WriteAllLines(jsonPath, new[] { inputGraph });
2374File.WriteAllLines(jsonPath, new[] { inputGraph });
2419File.WriteAllLines(jsonPath, new[] { inputGraph });
2465File.WriteAllLines(jsonPath, new[] { inputGraph });
2520File.WriteAllLines(jsonPath, new[] { inputGraph });
2635File.WriteAllLines(jsonPath, new[] { inputGraph });
2860File.WriteAllLines(dataFile, new[] {
3255File.WriteAllLines(jsonPath, new[] { inputGraph });
3324File.WriteAllLines(jsonPath, new[] { inputGraph });
4412File.WriteAllLines(jsonPath, new[] { inputGraph });
4517File.WriteAllLines(dataFile, new[] {
6587using (var stream = File.OpenRead(modelPath))
6663using (var f = File.Open(outputPath, FileMode.Create, FileAccess.Write, FileShare.None))
Microsoft.ML.Data (8)
Microsoft.ML.EntryPoints (4)
Microsoft.ML.GenAI.Core.Tests (1)
Microsoft.ML.GenAI.LLaMA (3)
Microsoft.ML.GenAI.Mistral (3)
Microsoft.ML.GenAI.Phi (6)
Microsoft.ML.GenAI.Samples (1)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.IntegrationTests (12)
Microsoft.ML.Maml (1)
Microsoft.ML.OnnxTransformer (4)
Microsoft.ML.OnnxTransformerTest (8)
Microsoft.ML.PerformanceTests (16)
Microsoft.ML.Predictor.Tests (8)
Microsoft.ML.ResultProcessor (4)
Microsoft.ML.Samples (34)
Microsoft.ML.Samples.GPU (22)
Microsoft.ML.SamplesUtils (1)
Microsoft.ML.Sweeper (4)
Microsoft.ML.TensorFlow (2)
Microsoft.ML.TensorFlow.Tests (13)
Microsoft.ML.TestFramework (43)
DataPipe\TestDataPipe.cs (19)
53File.WriteAllLines(mappingPathData,
73File.WriteAllLines(mappingPathData,
93File.WriteAllLines(mappingPathData,
113File.WriteAllLines(mappingPathData,
143File.WriteAllLines(mappingPathData,
169File.WriteAllLines(pathTerms, new string[] {
192File.WriteAllLines(pathTerms, new string[] {
250File.WriteAllLines(pathData, new string[] {
296File.WriteAllLines(pathData,
344File.WriteAllLines(dataFile, _small20NewsGroupSample);
347File.WriteAllLines(dictFile, _small20NewsGroupDict);
429File.WriteAllLines(pathData,
654File.WriteAllLines(pathData,
736File.WriteAllLines(pathData,
889File.WriteAllLines(dataFile, new[] {
908File.WriteAllLines(stopwordsFile, stopwordsList);
960File.WriteAllLines(dataFile, new[] {
984File.WriteAllLines(pathData,
1042File.WriteAllLines(pathData, new string[] {
Microsoft.ML.TestFrameworkCommon (3)
Microsoft.ML.Tests (77)
Microsoft.ML.TimeSeries (1)
Microsoft.ML.TimeSeries.Tests (5)
Microsoft.ML.Tokenizers (17)
Microsoft.ML.Tokenizers.Data.Tests (3)
Microsoft.ML.Tokenizers.Tests (59)
Microsoft.ML.Transforms (6)
Microsoft.ML.Vision (21)
Microsoft.NETCore.Platforms (2)
Microsoft.VisualBasic.Core (27)
Microsoft.VisualBasic.Forms.Tests (22)
Microsoft.VisualBasic.Tests (24)
Microsoft.VisualStudio.LanguageServices (17)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.Implementation (4)
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
mscorlib (1)
Mvc.Api.Analyzers.Test (2)
netstandard (1)
Pipelines.AppHost (1)
Pipelines.Library (3)
PrepareTests (6)
PresentationBuildTasks (20)
PresentationCore (4)
PresentationCore.Tests (4)
PresentationFramework (9)
PresentationUI (23)
MS\Internal\Documents\Application\DocumentStream.cs (19)
118File.Copy(sourcePath, copiesPath, true);
123FileAttributes attrib = File.GetAttributes(copiesPath);
126File.SetAttributes(copiesPath, attrib ^ FileAttributes.ReadOnly);
264File.Copy(sourcePath, tempPath, true);
315if (File.Exists(path))
317attributes = File.GetAttributes(path);
689File.Delete(path);
750File.SetAttributes(
854if (File.Exists(targetFile))
865if( File.Exists( backupFile ) )
868File.SetAttributes(backupFile, FileAttributes.Normal);
869File.Delete(backupFile);
874targetAttributes = File.GetAttributes(targetFile);
875File.Move(targetFile, backupFile);
889File.SetAttributes(backupFile, FileAttributes.Normal);
892File.Move(sourceFile, targetFile);
907File.Move(backupFile, targetFile);
914File.SetAttributes(targetFile, targetAttributes);
925File.Delete(backupFile);
Replay (6)
Roslyn.Compilers.Extension (3)
Roslyn.Diagnostics.Analyzers (5)
Roslyn.Test.Performance.Utilities (11)
Roslyn.VisualStudio.DiagnosticsWindow (1)
RulesetToEditorconfigConverter (2)
RulesetToEditorconfigConverter.UnitTests (3)
RunTests (25)
Security.TransportSecurity.IntegrationTests (1)
SemanticSearch.BuildTask (7)
ServerComparison.FunctionalTests (1)
Sockets.FunctionalTests (1)
Stress.ApiService (2)
Swaggatherer (3)
System.CodeDom (5)
System.ComponentModel.TypeConverter (1)
System.Configuration.ConfigurationManager (21)
System.Diagnostics.FileVersionInfo (2)
System.Diagnostics.Process (12)
System.Diagnostics.StackTrace (1)
System.Diagnostics.TraceSource (1)
System.Drawing.Common (6)
System.Drawing.Common.Tests (57)
System.Formats.Tar (11)
System.IO.Compression.ZipFile (2)
System.IO.FileSystem (1)
System.IO.FileSystem.DriveInfo (2)
System.IO.FileSystem.Watcher (1)
System.IO.IsolatedStorage (7)
System.IO.MemoryMappedFiles (4)
System.IO.Ports (3)
System.Memory.Data (2)
System.Net.Mail (1)
System.Net.NetworkInformation (11)
System.Net.Ping (3)
System.Net.Quic (1)
System.Net.Security (1)
System.Net.Sockets (3)
System.Net.WebClient (1)
System.Private.CoreLib (35)
System.Private.Windows.Core.TestUtilities (5)
System.Private.Xml (3)
System.Reflection.MetadataLoadContext (3)
System.Runtime (1)
System.Runtime.Caching (1)
System.Security.Cryptography (15)
System.Windows.Forms (6)
System.Windows.Forms.Analyzers.CSharp.Tests (2)
System.Windows.Forms.Analyzers.Tests (3)
System.Windows.Forms.Design (2)
System.Windows.Forms.Design.Tests (5)
System.Windows.Forms.IntegrationTests.Common (4)
System.Windows.Forms.Primitives (1)
System.Windows.Forms.Primitives.TestUtilities (2)
System.Windows.Forms.Tests (13)
System.Windows.Forms.UI.IntegrationTests (10)
Templates.Blazor.Tests (40)
Templates.Blazor.WebAssembly.Auth.Tests (38)
Templates.Blazor.WebAssembly.Tests (42)
Templates.Mvc.Tests (46)
Templates.Tests (42)
Test.Utilities (4)
TestTasks (3)
Text.Analyzers (5)
vbc (6)
VBCSCompiler (7)
VBCSCompiler.UnitTests (15)
Wasm.Performance.ConsoleHost (1)
WindowsBase.Tests (2)
WinFormsControlsTest (2)
WinShimmer (1)
xunit.console (11)