855 references to WriteAllTextAsync
aspire (24)
Agents\AspireSkills\AspireSkillsInstaller.cs (3)
765await File.WriteAllTextAsync( 774await File.WriteAllTextAsync( 782await File.WriteAllTextAsync(
Caching\AppHostInfoDiskCache.cs (1)
220await File.WriteAllTextAsync(tempPath, payload, cancellationToken).ConfigureAwait(false);
Caching\DiskCache.cs (1)
108await File.WriteAllTextAsync(tempFile, content, cancellationToken).ConfigureAwait(false);
Commands\AgentInitCommand.cs (1)
734await File.WriteAllTextAsync(fullPath, skillFile.Content, cancellationToken);
Commands\RenderCommand.cs (1)
446await File.WriteAllTextAsync(filePath, "This file is used to smoke test SafeFileLink rendering.", cancellationToken).ConfigureAwait(false);
Commands\Sdk\SdkDumpCommand.cs (2)
232await File.WriteAllTextAsync(outputFile.FullName, output, cancellationToken); 361await File.WriteAllTextAsync(outputPath, output, cancellationToken);
Commands\Sdk\SdkGenerateCommand.cs (1)
187await File.WriteAllTextAsync(filePath, content, cancellationToken);
Documentation\FileBackedDocumentContentCache.cs (1)
297await File.WriteAllTextAsync(tempPath, content, cancellationToken).ConfigureAwait(false);
Packaging\TemporaryNuGetConfig.cs (1)
147await File.WriteAllTextAsync(configFile.FullName, content);
Projects\GeneratedFileWriter.cs (1)
46await File.WriteAllTextAsync(path, content, cancellationToken).ConfigureAwait(false);
Projects\GuestAppHostProject.cs (1)
1717await File.WriteAllTextAsync(filePath, content, cancellationToken);
Projects\GuestRuntime.cs (1)
592await File.WriteAllTextAsync(filePath, content, cancellationToken);
Projects\JavaAppHostToolchainResolver.cs (1)
417await File.WriteAllTextAsync(temporaryPath, GradleInitScript, cancellationToken).ConfigureAwait(false);
Projects\PrebuiltAppHostServer.cs (2)
649await File.WriteAllTextAsync(Path.Combine(objDir, RestoreStampFileName), fingerprint, cancellationToken).ConfigureAwait(false); 1709await File.WriteAllTextAsync(
Projects\ProjectUpdater.cs (2)
892await File.WriteAllTextAsync(projectFile.FullName, updatedContent); 927await File.WriteAllTextAsync(projectFile.FullName, updatedContent);
Scaffolding\ScaffoldingService.cs (3)
212await File.WriteAllTextAsync(filePath, contentToWrite, cancellationToken); 322await File.WriteAllTextAsync(packageJsonPath, serializedPackageJson, cancellationToken); 496await File.WriteAllTextAsync(filePath, content, cancellationToken);
Templating\CliTemplateFactory.EmptyTemplate.cs (1)
163await File.WriteAllTextAsync(aspireConfigPath, updatedContent, cancellationToken);
Aspire.Acquisition.Tests (43)
Scripts\Common\FakeArchiveHelper.cs (7)
32await File.WriteAllTextAsync(binaryPath, "#!/bin/bash\necho \"aspire mock v1.0\"\n"); 49await File.WriteAllTextAsync(checksumPath, hashHex); 67await File.WriteAllTextAsync(path, "fake-nupkg-content"); 74await File.WriteAllTextAsync(archive.ChecksumPath, "0000000000000000000000000000000000000000000000000000000000000000"); 117await File.WriteAllTextAsync(binaryPath, FakeVerifyAspireScript); 126await File.WriteAllTextAsync(sidecarPath, "{\"source\":\"stray\"}"); 132await File.WriteAllTextAsync(checksumPath, hashHex);
Scripts\Common\TestEnvironment.cs (1)
277await File.WriteAllTextAsync(tempGhScriptPath, scriptContent);
Scripts\PRScriptInstallerModeTests.cs (16)
37await File.WriteAllTextAsync(Path.Combine(root, "aspire.rb"), "cask \"aspire\" do\n version \"13.3.0\"\nend\n"); 38await File.WriteAllTextAsync(Path.Combine(root, "dogfood.sh"), "#!/usr/bin/env bash\nexit 0\n"); 47await File.WriteAllTextAsync(Path.Combine(root, "Microsoft.Aspire.installer.yaml"), "PackageIdentifier: Microsoft.Aspire\nPackageVersion: 13.3.0\nInstallers: []\n"); 48await File.WriteAllTextAsync(Path.Combine(root, "dogfood.ps1"), "exit 0\n"); 94await File.WriteAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.installer.yaml"), installerYaml); 95await File.WriteAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.yaml"), $"PackageIdentifier: Microsoft.Aspire\nPackageVersion: {version}\nManifestType: version\nManifestVersion: 1.10.0\n"); 96await File.WriteAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.locale.en-US.yaml"), $"PackageIdentifier: Microsoft.Aspire\nPackageVersion: {version}\nPackageLocale: en-US\nManifestType: defaultLocale\nManifestVersion: 1.10.0\n"); 97await File.WriteAllTextAsync(Path.Combine(manifestDir, "dogfood.ps1"), "exit 0\n"); 121await File.WriteAllTextAsync(brewPath, $$""" 195await File.WriteAllTextAsync(curlPath, """ 235await File.WriteAllTextAsync(implPath, $$""" 370await File.WriteAllTextAsync(wingetCmd, """ 376await File.WriteAllTextAsync(aspireCmd, $$""" 388await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-arm64-13.3.0.tar.gz"), "fake arm64 archive"); 389await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-x64-13.3.0.tar.gz"), "fake x64 archive"); 581await File.WriteAllTextAsync(caskPath, "cask \"aspire\" do\n version \"13.3.0\"\nend\n");
Scripts\PRScriptPowerShellTests.cs (1)
215await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
Scripts\PRScriptPSFunctionTests.cs (3)
326await File.WriteAllTextAsync(Path.Combine(downloadDir, "README.txt"), "no archive here"); 348await File.WriteAllTextAsync(Path.Combine(downloadDir, "aspire-cli-linux-x64.tar.gz"), "fake1"); 349await File.WriteAllTextAsync(Path.Combine(downloadDir, "aspire-cli-osx-arm64.tar.gz"), "fake2");
Scripts\PRScriptShellTests.cs (1)
173await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
Scripts\PRScriptToolModeTests.cs (9)
120await File.WriteAllTextAsync(dotnetScriptPath, scriptContent); 631await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.symbols.nupkg"), "fake-symbols-nupkg-content"); 632await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.snupkg"), "fake-symbols-package-content"); 634await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13_3_0.nupkg"), "fake-invalid-version-content"); 657await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content"); 1158await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.symbols.nupkg"), "fake-symbols-nupkg-content"); 1159await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.snupkg"), "fake-symbols-package-content"); 1161await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13_3_0.nupkg"), "fake-invalid-version-content"); 1183await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content");
Scripts\ReleaseScriptFunctionTests.cs (3)
439await File.WriteAllTextAsync(cliPath, ($$""" 613await File.WriteAllTextAsync(mockCurl, 650await File.WriteAllTextAsync(mockCurl,
Scripts\ReleaseScriptPowerShellTests.cs (1)
221await File.WriteAllTextAsync(sidecarPath, """{"source":"old"}""");
Scripts\ReleaseScriptPSFunctionTests.cs (1)
421await File.WriteAllTextAsync(cliPath, contents.ReplaceLineEndings(OperatingSystem.IsWindows() ? "\r\n" : "\n"));
Aspire.Cli.EndToEnd.Tests (7)
ChannelUpdateWorkflowTests.cs (1)
138await File.WriteAllTextAsync(appHostPath,
SdkExportTests.cs (1)
27await File.WriteAllTextAsync(
TypeScriptBlazorGatewayTests.cs (2)
78await File.WriteAllTextAsync(appHostPath, """ 128await File.WriteAllTextAsync(verificationScriptPath, verificationScript.ReplaceLineEndings("\n"));
TypeScriptEmptyAppHostTemplateTests.cs (1)
58await File.WriteAllTextAsync(appHostPath, appHostContents, TestContext.Current.CancellationToken);
UpdateChannelNuGetConfigOrderingTests.cs (2)
111await File.WriteAllTextAsync(appHostCsPath, 128await File.WriteAllTextAsync(nugetConfigPath,
Aspire.Cli.Tests (618)
Agents\AspireSkillsBundleTests.cs (12)
146await File.WriteAllTextAsync(skillPath, CreateSkillFileContent()); 189await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), CreateSkillFileContent()); 232await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), "{"); 510await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skills", CommonAgentApplicators.AspireSkillName, "SKILL.md"), CreateSkillFileContent()); 558await File.WriteAllTextAsync(skillPath, CreateSkillFileContent()); 640await File.WriteAllTextAsync(skillPath, skillContent); 663await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson); 685await File.WriteAllTextAsync(skillPath, CreateSkillFileContent()); 805await File.WriteAllTextAsync(skillPath, "tampered"); 844await File.WriteAllTextAsync(fullPath, content); 885await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), content); 908return File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
Agents\AspireSkillsInstallerTests.cs (10)
487await File.WriteAllTextAsync(Path.Combine(cachedBundleDirectory, "skill-manifest.json"), "{"); 560await File.WriteAllTextAsync( 2015await File.WriteAllTextAsync(skillPath, 2048await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson); 2052await File.WriteAllTextAsync(Path.Combine(bundleDirectory, AspireSkillsInstaller.ArchiveSha512FileName), archiveSha512); 2057await File.WriteAllTextAsync( 2064await File.WriteAllTextAsync( 2072return File.WriteAllTextAsync( 2101await File.WriteAllTextAsync( 2107await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), "{");
Agents\ClaudeCodeAgentEnvironmentScannerTests.cs (3)
26await File.WriteAllTextAsync(mcpJsonPath, "{ invalid json content"); 54await File.WriteAllTextAsync(mcpJsonPath, ""); 80await File.WriteAllTextAsync(mcpJsonPath, originalContent);
Agents\CopilotCliAgentEnvironmentScannerTests.cs (5)
111await File.WriteAllTextAsync(mcpConfigPath, existingConfig.ToJsonString()); 151await File.WriteAllTextAsync(mcpConfigPath, existingConfig.ToJsonString()); 209await File.WriteAllTextAsync(mcpConfigPath, "{ invalid json content"); 237await File.WriteAllTextAsync(mcpConfigPath, ""); 263await File.WriteAllTextAsync(mcpConfigPath, originalContent);
Agents\OpenCodeAgentEnvironmentScannerTests.cs (3)
24await File.WriteAllTextAsync(configPath, "{ invalid json content"); 50await File.WriteAllTextAsync(configPath, ""); 74await File.WriteAllTextAsync(configPath, originalContent);
Agents\PlaywrightCliInstallerTests.cs (1)
780await File.WriteAllTextAsync(Path.Combine(preExistingDir, "SKILL.md"), "# User's existing skill");
Agents\TelemetryHookConfiguratorTests.cs (4)
138await File.WriteAllTextAsync(settingsPath, existing.ToJsonString()).DefaultTimeout(); 159await File.WriteAllTextAsync(settingsPath, malformed).DefaultTimeout(); 178await File.WriteAllTextAsync(settingsPath, unexpected).DefaultTimeout(); 198await File.WriteAllTextAsync(settingsPath, nonObjectRoot).DefaultTimeout();
Agents\TelemetryHookInstallerTests.cs (1)
74await File.WriteAllTextAsync(shellPath, "stale-content").DefaultTimeout();
Agents\VsCodeAgentEnvironmentScannerTests.cs (5)
189await File.WriteAllTextAsync(mcpJsonPath, existingConfig.ToJsonString()); 230await File.WriteAllTextAsync(mcpJsonPath, existingConfig.ToJsonString()); 282await File.WriteAllTextAsync(mcpJsonPath, "{ invalid json content"); 310await File.WriteAllTextAsync(mcpJsonPath, ""); 336await File.WriteAllTextAsync(mcpJsonPath, originalContent);
Certificates\UnixCertificateManagerTests.cs (2)
256await File.WriteAllTextAsync(certUtilFile.FullName, script); 281await File.WriteAllTextAsync(certUtilFile.FullName, script);
Commands\AgentInitCommandTests.cs (3)
103await File.WriteAllTextAsync(blockedSkillParentPath, "blocked").DefaultTimeout(); 850await File.WriteAllTextAsync(skillPath, $$""" 887await File.WriteAllTextAsync(manifestPath, manifestJson);
Commands\CacheCommandTests.cs (3)
73await File.WriteAllTextAsync(cacheEntry, "{}").DefaultTimeout(); 105await File.WriteAllTextAsync(Path.Combine(firstBuildCache.FullName, "Aspire.Hosting.dll"), "fake").DefaultTimeout(); 106await File.WriteAllTextAsync(Path.Combine(secondBuildCache.FullName, "Aspire.Hosting.dll"), "fake").DefaultTimeout();
Commands\ConfigCommandTests.cs (3)
801await File.WriteAllTextAsync(settingsPath, """ 834await File.WriteAllTextAsync(settingsPath, """ 891await File.WriteAllTextAsync(legacySettingsPath, """{ "channel": "daily" }""");
Commands\DeployCommandTests.cs (1)
88await File.WriteAllTextAsync(appHostFile.FullName, "<Project />");
Commands\DoctorCommandTests.cs (17)
167await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 194await File.WriteAllTextAsync(appHostFile.FullName, "export {};"); 195await File.WriteAllTextAsync( 243await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 270await File.WriteAllTextAsync(projectFile.FullName, "<Project />"); 298await File.WriteAllTextAsync(projectFile.FullName, "<Project />"); 301await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 323await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), "<Project />"); 324await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.fsproj"), "<Project />"); 351await File.WriteAllTextAsync(appHostFile.FullName, "export {};"); 405await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 406await File.WriteAllTextAsync( 496await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 497await File.WriteAllTextAsync( 527await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 528await File.WriteAllTextAsync( 561await File.WriteAllTextAsync(appHostFile.FullName, "<Project />");
Commands\DotNetSdkCheckTests.cs (1)
105await File.WriteAllTextAsync(filePath, "");
Commands\ExtensionInternalCommandTests.cs (1)
103await File.WriteAllTextAsync(projectFile.FullName, """
Commands\InitCommandTests.cs (5)
677await File.WriteAllTextAsync(configPath, existingConfig.ToJsonString()); 705await File.WriteAllTextAsync(configPath, "{ this is not json"); 725await File.WriteAllTextAsync(appHostPath, preExistingContent); 1156await File.WriteAllTextAsync(configPath, existing.ToJsonString()); 1364await File.WriteAllTextAsync(configPath, existing.ToJsonString());
Commands\LsCommandTests.cs (2)
175await File.WriteAllTextAsync(configuredAppHost.FullName, "Not a real apphost"); 176await File.WriteAllTextAsync(Path.Combine(workingDirectory.FullName, "aspire.config.json"), JsonSerializer.Serialize(new
Commands\NewCommandTests.cs (1)
1952await File.WriteAllTextAsync(Path.Combine(context.TargetDirectory.FullName, "aspire.config.json"), """
Commands\PublishCommandPromptingIntegrationTests.cs (7)
263await File.WriteAllTextAsync(selectedFile, "artifact"); 804await File.WriteAllTextAsync(oversizedFile, new string('x', 100)); 807await File.WriteAllTextAsync(validFile, "ok"); 850await File.WriteAllTextAsync(wrongExtFile, "not a pem"); 853await File.WriteAllTextAsync(correctFile, "pem content"); 896await File.WriteAllTextAsync(validFile, "zip content"); 942await File.WriteAllTextAsync(validFile, "gzip content");
Commands\RestoreCommandTests.cs (2)
19await File.WriteAllTextAsync(appHostFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\" />"); 53await File.WriteAllTextAsync(appHostFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\" />");
Commands\RunCommandTests.cs (26)
374await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 438await File.WriteAllTextAsync(appHostFile.FullName, "<Project />", TestContext.Current.CancellationToken); 526await File.WriteAllTextAsync(appHostFile.FullName, "<Project />", TestContext.Current.CancellationToken); 631await File.WriteAllTextAsync(appHostFile.FullName, "<Project />", TestContext.Current.CancellationToken); 787await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake"); 790await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake"); 920await File.WriteAllTextAsync( 1088await File.WriteAllTextAsync(appHostFile.FullName, "<Project />", TestContext.Current.CancellationToken); 1313await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1389await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1453await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1515await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1573await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1635await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1696await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1759await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1820await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1882await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 3207await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 3255await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 3299await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 3347await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 3390await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 3434await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 3478await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 3891await File.WriteAllTextAsync(appHostFile.FullName, "<Project />");
Commands\SdkInstallerTests.cs (3)
29await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), projectContent); 116await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), projectContent); 154await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), projectContent);
Commands\SecretCommandTests.cs (2)
25await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 51await File.WriteAllTextAsync(appHostFile.FullName, "export {};");
Commands\StartCommandTests.cs (5)
268await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake"); 271await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake"); 299await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake"); 302await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake"); 331await File.WriteAllTextAsync(appHostFile.FullName, "<Project />");
Commands\StopCommandTests.cs (19)
281await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 475await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 509await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 541await File.WriteAllTextAsync(runningAppHostFile.FullName, "<Project />"); 544await File.WriteAllTextAsync(discoveredAppHostFile.FullName, "<Project />"); 593await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 625await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 660await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 700await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 735await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 775await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 815await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 854await File.WriteAllTextAsync(appHostFile.FullName, ""); 900await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 937await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 982await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1020await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1058await File.WriteAllTextAsync(appHostFile.FullName, "<Project />"); 1126await File.WriteAllTextAsync(appHostFile.FullName, "<Project />");
Commands\TypeScriptAppHostToolingCheckTests.cs (1)
155await File.WriteAllTextAsync(
Commands\UpdateCommandTests.cs (6)
89await File.WriteAllTextAsync(appHostProjectFile.FullName, """ 1493await File.WriteAllTextAsync(processPath, "#!/bin/sh\nexit 0\n"); 1497await File.WriteAllTextAsync( 1536await File.WriteAllTextAsync(processPath, originalExecutable); 1541await File.WriteAllTextAsync(sidecarPath, originalSidecar); 3295await File.WriteAllTextAsync(
Configuration\ConfigurationServiceTests.cs (2)
223await File.WriteAllTextAsync( 252await File.WriteAllTextAsync(
DotNet\DotNetCliRunnerTests.cs (57)
46await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 95await File.WriteAllTextAsync(appHostFile.FullName, "Not a real AppHost."); 134await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 170await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 212await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 251await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 279await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 381await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 409await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 446await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 475await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 504await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 577await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 614await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 655await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 700await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 755await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 852await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 892await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 934await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 981await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1044await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1090await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1132await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1174await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1227await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 1294await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 1360await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>"); 1433await File.WriteAllTextAsync(solutionFile.FullName, "Not a real solution file."); 1438await File.WriteAllTextAsync(project1File.FullName, "Not a real project file."); 1442await File.WriteAllTextAsync(project2File.FullName, "Not a real project file."); 1480await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1483await File.WriteAllTextAsync(referencedProject.FullName, "Not a real project file."); 1513await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1560await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1606await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1643await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1680await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1721await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1766await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1818await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1867await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1915await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost"); 1952await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1987await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2030await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2072await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2112await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2152await File.WriteAllTextAsync(projectFile.FullName, """ 2162await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "Program.cs"), "Console.WriteLine(\"Hello\");"); 2197await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2418await File.WriteAllTextAsync(packagePath, string.Empty); 2488await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2526await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2564await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2604await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2643await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
DotNet\ProcessExecutionDetachedTests.cs (7)
55await File.WriteAllTextAsync(dcpPath, """ 137await File.WriteAllTextAsync(dcpPath, """ 218await File.WriteAllTextAsync(dcpPath, """ 257await File.WriteAllTextAsync(dcpPath, """ 311await File.WriteAllTextAsync(dcpPath, """ 366await File.WriteAllTextAsync(dcpPath, """ 416await File.WriteAllTextAsync(dcpPath, """
DotNet\ProcessExecutionTests.cs (8)
41await File.WriteAllTextAsync(outputFile.FullName, CreateJsonPayload(lineCount: 400)); 101await File.WriteAllTextAsync(outputFile.FullName, CreateJsonPayload(lineCount: 400)); 294await File.WriteAllTextAsync(scriptFile.FullName, content); 303await File.WriteAllTextAsync(scriptFile.FullName, content); 327await File.WriteAllTextAsync(scriptFile.FullName, content); 338await File.WriteAllTextAsync(scriptFile.FullName, content); 358await File.WriteAllTextAsync(scriptFile.FullName, content); 367await File.WriteAllTextAsync(scriptFile.FullName, content);
DotNetSdkInstallerTests.cs (2)
335await File.WriteAllTextAsync(scriptFile, script); 359await File.WriteAllTextAsync(shellFile, shellScript);
Git\GitRepositoryTests.cs (6)
42await File.WriteAllTextAsync(trackedFile, "Not a real project file."); 47await File.WriteAllTextAsync(untrackedFile, "Not a real project file."); 51await File.WriteAllTextAsync(gitignorePath, "bin/\n"); 56await File.WriteAllTextAsync(ignoredFile, "Not a real project file."); 83await File.WriteAllTextAsync(trackedFile, "Not a real project file."); 110await File.WriteAllTextAsync(trackedFile, "Not a real project file.");
Migrations\TypeScriptAppHostMigrationTests.cs (11)
55await File.WriteAllTextAsync(appHostPath, "import { createBuilder } from './.modules/aspire.js';"); 70await File.WriteAllTextAsync( 83await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"), "// legacy"); 84await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"), "// modern"); 95await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"), "// csharp"); 152await File.WriteAllTextAsync(Path.Combine(root.FullName, "apphost.ts"), LegacyAppHostContent); 153await File.WriteAllTextAsync( 162await File.WriteAllTextAsync( 170await File.WriteAllTextAsync( 181await File.WriteAllTextAsync(Path.Combine(root.FullName, "eslint.config.mjs"), LegacyEslintConfigContent); 184await File.WriteAllTextAsync(Path.Combine(modulesDir.FullName, "aspire.ts"), "// generated");
NuGet\BundleNuGetPackageCacheTests.cs (3)
31await File.WriteAllTextAsync(managedPath!, string.Empty); 86await File.WriteAllTextAsync(managedPath!, string.Empty); 135await File.WriteAllTextAsync(managedPath!, string.Empty);
NuGet\BundleNuGetServiceTests.cs (1)
343await File.WriteAllTextAsync(
Packaging\NuGetConfigMergerSnapshotTests.cs (1)
35await File.WriteAllTextAsync(path, content);
Packaging\NuGetConfigMergerTests.cs (1)
25await File.WriteAllTextAsync(path, content);
Projects\AppHostCandidateFinderTests.cs (2)
541await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, ".gitignore"), "legacy/\n"); 609await File.WriteAllTextAsync(fullPath, "Not a real project file.");
Projects\AppHostServerProjectTests.cs (4)
213await File.WriteAllTextAsync(integrationProjectPath, "<Project />"); 321await File.WriteAllTextAsync(aspireConfigPath, """ 425await File.WriteAllTextAsync(aspireConfigPath, """ 479await File.WriteAllTextAsync(aspireConfigPath, """
Projects\FallbackProjectParserTests.cs (14)
31await File.WriteAllTextAsync(projectFile, projectContent); 56await File.WriteAllTextAsync(projectFile, projectContent); 81await File.WriteAllTextAsync(projectFile, projectContent); 106await File.WriteAllTextAsync(projectFile, projectContent); 132await File.WriteAllTextAsync(projectFile, projectContent); 158await File.WriteAllTextAsync(projectFile, projectContent); 195await File.WriteAllTextAsync(projectFile, invalidProjectContent); 217await File.WriteAllTextAsync(projectFile, projectContent); 247await File.WriteAllTextAsync(projectFile, projectContent); 270await File.WriteAllTextAsync(projectFile, projectContent); 294await File.WriteAllTextAsync(projectFile, projectContent); 317await File.WriteAllTextAsync(projectFile, projectContent); 339await File.WriteAllTextAsync(projectFile, projectContent); 357await File.WriteAllTextAsync(projectFile, projectContent);
Projects\GuestAppHostProjectTests.cs (31)
55await File.WriteAllTextAsync(kept, "class Kept { }"); 56await File.WriteAllTextAsync(obsolete, "class RemovedResource { }"); 82await File.WriteAllTextAsync(handWritten, "class HandWritten { }"); 96await File.WriteAllTextAsync(filePath, "class Generated { }"); 112await File.WriteAllTextAsync(filePath, "class Generated { }"); 137await File.WriteAllTextAsync(filePath, "def add_redis(): ..."); 726await File.WriteAllTextAsync(configPath, """ 734await File.WriteAllTextAsync(appHostPath, "// test apphost"); 779await File.WriteAllTextAsync(configPath, """ 787await File.WriteAllTextAsync(appHostPath, "// test apphost"); 820await File.WriteAllTextAsync(appHostPath, "// test apphost"); 844await File.WriteAllTextAsync(configPath, """ 853await File.WriteAllTextAsync(appHostPath, "// test apphost"); 900await File.WriteAllTextAsync(configPath, """ 908await File.WriteAllTextAsync(appHostPath, "// test apphost"); 955await File.WriteAllTextAsync(configPath, """ 964await File.WriteAllTextAsync(appHostPath, "// test apphost"); 1039await File.WriteAllTextAsync(configPath, seededJson); 1042await File.WriteAllTextAsync(appHostPath, "// test apphost"); 1139await File.WriteAllTextAsync(appHostPath, "// test apphost"); 1181await File.WriteAllTextAsync(appHostPath, "// test apphost"); 1260await File.WriteAllTextAsync(configPath, $$""" 1268await File.WriteAllTextAsync(appHostPath, "// test apphost"); 1349await File.WriteAllTextAsync(configPath, $$""" 1357await File.WriteAllTextAsync(appHostPath, "// test apphost"); 1585await File.WriteAllTextAsync(existingBundlePath, "existing certificate", TestContext.Current.CancellationToken); 1586await File.WriteAllTextAsync(devCertificatePath, "development certificate", TestContext.Current.CancellationToken); 1641await File.WriteAllTextAsync(existingBundlePath, existingBundleContents, TestContext.Current.CancellationToken); 1642await File.WriteAllTextAsync(inheritedBundlePath, inheritedBundleContents, TestContext.Current.CancellationToken); 1643await File.WriteAllTextAsync(devCertificatePath, devCertificateContents, TestContext.Current.CancellationToken); 1709await File.WriteAllTextAsync(devCertificatePath, "dev certificate", TestContext.Current.CancellationToken);
Projects\GuestRuntimeTests.cs (1)
998await File.WriteAllTextAsync(migrationFilePath, existingContent);
Projects\JavaAppHostToolchainResolverTests.cs (3)
409await File.WriteAllTextAsync(scriptPath, "// stale"); 439await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), ""); 468await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), "");
Projects\PrebuiltAppHostServerTests.cs (28)
62await File.WriteAllTextAsync(path, "<Project />"); 122await File.WriteAllTextAsync(referencedProject, """<Project><ItemGroup><PackageReference Include="Aspire.Hosting" Version="13.5.0" /></ItemGroup></Project>"""); 129await File.WriteAllTextAsync(referencedProject, """<Project><ItemGroup><PackageReference Include="Aspire.Hosting" Version="13.6.0-dev" /></ItemGroup></Project>"""); 143await File.WriteAllTextAsync(referencedProject, """<Project><ItemGroup><PackageReference Include="Aspire.Hosting" /></ItemGroup></Project>"""); 145await File.WriteAllTextAsync(packagesProps, """<Project><ItemGroup><PackageVersion Include="Aspire.Hosting" Version="13.5.0" /></ItemGroup></Project>"""); 150await File.WriteAllTextAsync(packagesProps, """<Project><ItemGroup><PackageVersion Include="Aspire.Hosting" Version="13.6.0-dev" /></ItemGroup></Project>"""); 161await File.WriteAllTextAsync(leaf, """<Project><ItemGroup><PackageReference Include="Aspire.Hosting" Version="13.5.0" /></ItemGroup></Project>"""); 163await File.WriteAllTextAsync(referencedProject, """<Project><ItemGroup><ProjectReference Include="Leaf.csproj" /></ItemGroup></Project>"""); 170await File.WriteAllTextAsync(leaf, """<Project><ItemGroup><PackageReference Include="Aspire.Hosting" Version="13.6.0-dev" /></ItemGroup></Project>"""); 181await File.WriteAllTextAsync(leaf, """<Project><ItemGroup><PackageReference Include="Some.Package" Version="13.4.*" /></ItemGroup></Project>"""); 183await File.WriteAllTextAsync(referencedProject, """<Project><ItemGroup><ProjectReference Include="Leaf.csproj" /></ItemGroup></Project>"""); 199await File.WriteAllTextAsync(first, """<Project><ItemGroup><ProjectReference Include="Second.csproj" /></ItemGroup></Project>"""); 200await File.WriteAllTextAsync(second, """<Project><ItemGroup><ProjectReference Include="First.csproj" /></ItemGroup></Project>"""); 213await File.WriteAllTextAsync(referencedProject, "<Project />"); 229await File.WriteAllTextAsync(referencedProject, """<Project><ItemGroup><PackageReference Include="Some.Package" Version="13.4.*" /></ItemGroup></Project>"""); 242await File.WriteAllTextAsync(referencedProject, """<Project ToolsVersion="4.0"><ItemGroup><PackageReference Include="Some.Package" Version="13.5.0" /></ItemGroup></Project>"""); 1373await File.WriteAllTextAsync(aspireConfigPath, """ 1564await File.WriteAllTextAsync(aspireConfigPath, $$""" 1623await File.WriteAllTextAsync(aspireConfigPath, """ 1683await File.WriteAllTextAsync(aspireConfigPath, """ 1742await File.WriteAllTextAsync(aspireConfigPath, """ 1802await File.WriteAllTextAsync(aspireConfigPath, $$""" 1857await File.WriteAllTextAsync(aspireConfigPath, """ 1922await File.WriteAllTextAsync(aspireConfigPath, """ 2005await File.WriteAllTextAsync(aspireConfigPath, """ 2094await File.WriteAllTextAsync(aspireConfigPath, """ 2176await File.WriteAllTextAsync(aspireConfigPath, """ 2611await File.WriteAllTextAsync(copiedFilePath, "corrupt");
Projects\ProcessGuestLauncherTests.cs (2)
341await File.WriteAllTextAsync(scriptFile.FullName, content); 352await File.WriteAllTextAsync(shellFile.FullName, shellContent);
Projects\ProjectLocatorTests.cs (196)
49await File.WriteAllTextAsync( 65await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 69await File.WriteAllTextAsync(secondAppHostProjectFile.FullName, "Not a real apphost"); 73await File.WriteAllTextAsync(configPath, originalConfig); 96await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 100await File.WriteAllTextAsync(secondAppHostProjectFile.FullName, "Not a real apphost"); 104await File.WriteAllTextAsync(configPath, originalConfig); 125await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 129await File.WriteAllTextAsync(secondAppHostProjectFile.FullName, "Not a real apphost"); 133await File.WriteAllTextAsync(configPath, originalConfig); 158await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 162await File.WriteAllTextAsync(secondAppHostProjectFile.FullName, "Not a real apphost"); 165await File.WriteAllTextAsync(configPath, """{"appHost":{"path":"FirstAppHost/FirstAppHost.csproj"}}"""); 191await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 195await File.WriteAllTextAsync(firstAlternative.FullName, "Not a real apphost"); 197await File.WriteAllTextAsync(secondAlternative.FullName, "Not a real apphost"); 200await File.WriteAllTextAsync(configPath, """{"appHost":{"path":"FirstAppHost/FirstAppHost.csproj"}}"""); 224await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 228await File.WriteAllTextAsync(alternativeAppHost.FullName, "Not a real apphost"); 232await File.WriteAllTextAsync(configPath, originalConfig); 253await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real apphost"); 277await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real apphost"); 302await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real apphost"); 307await File.WriteAllTextAsync(configPath, """{"sdk":{"version":"9.9.9"}}"""); 372await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 376await File.WriteAllTextAsync(secondAppHostProjectFile.FullName, "Not a real apphost"); 379await File.WriteAllTextAsync(configPath, """{"appHost":{"path":"FirstAppHost/FirstAppHost.csproj"}}"""); 403await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 407await File.WriteAllTextAsync(secondAppHostProjectFile.FullName, "Not a real apphost"); 411await File.WriteAllTextAsync(configPath, originalConfig); 439await File.WriteAllTextAsync(firstAppHostProjectFile.FullName, "Not a real apphost"); 443await File.WriteAllTextAsync(secondAppHostProjectFile.FullName, "Not a real apphost"); 446await File.WriteAllTextAsync(configPath, """{"appHost":{"path":"FirstAppHost/FirstAppHost.csproj"}}"""); 509await File.WriteAllTextAsync(projectFile.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 541await File.WriteAllTextAsync(brokenAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 545await File.WriteAllTextAsync(decoyAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 550await File.WriteAllTextAsync(aspireSettingsFile.FullName, JsonSerializer.Serialize(new 591await File.WriteAllTextAsync(outsideAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 595await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 629await File.WriteAllTextAsync(appHostFile.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 692await File.WriteAllTextAsync(projectFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk.Web\"></Project>"); 721await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 725await File.WriteAllTextAsync(otherAppHostProjectFile.FullName, "Not a real apphost"); 754await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 785await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 812await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost project"); 853await File.WriteAllTextAsync(staleProjectFile.FullName, "Not a real apphost project"); 856await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost project"); 906await File.WriteAllTextAsync(aspireSettingsFile.FullName, JsonSerializer.Serialize(new 929await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 964await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 968await File.WriteAllTextAsync(decoyAppHostProjectFile.FullName, "Not a real apphost"); 971await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1002await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 1006await File.WriteAllTextAsync(decoyAppHostProjectFile.FullName, "Not a real apphost"); 1009await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1039await File.WriteAllTextAsync(guestAppHostFile.FullName, "// guest apphost"); 1042await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1076await File.WriteAllTextAsync(configuredAppHostProjectFile.FullName, "Not a real apphost"); 1079await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost"); 1082await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1129await File.WriteAllTextAsync(configuredAppHostProjectFile.FullName, "Not a real apphost"); 1132await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost"); 1135await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1181await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 1185await File.WriteAllTextAsync(otherAppHostProjectFile.FullName, "Not a real apphost"); 1188await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1218await File.WriteAllTextAsync(settingsAppHostFile.FullName, "Not a real apphost"); 1224await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1257await File.WriteAllTextAsync(settingsAppHostFile.FullName, "Not a supported apphost type"); 1260await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 1292await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost"); 1322await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file."); 1325await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file."); 1340await File.WriteAllTextAsync(appHostProject.FullName, "Not a real apphost project."); 1343await File.WriteAllTextAsync(webProject.FullName, "Not a real web project."); 1386await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1404await File.WriteAllTextAsync(onDiskProjectFile.FullName, "Not a real project file."); 1433await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1449await File.WriteAllTextAsync(appHostFile.FullName, "// TypeScript AppHost"); 1451await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), JsonSerializer.Serialize(new 1487await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real project file."); 1524await File.WriteAllTextAsync(appHostFile.FullName, "// TypeScript apphost"); 1527await File.WriteAllTextAsync( 1591await File.WriteAllTextAsync(appHost1File.FullName, "// TypeScript apphost"); 1593await File.WriteAllTextAsync(appHost1ConfigPath, """ 1603await File.WriteAllTextAsync(appHost2File.FullName, "// TypeScript apphost"); 1605await File.WriteAllTextAsync(appHost2ConfigPath, """ 1661await File.WriteAllTextAsync(appHostFile.FullName, "// TypeScript apphost"); 1710await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real apphost"); 1721await File.WriteAllTextAsync(aspireSettingsFile.FullName, JsonSerializer.Serialize(new { appHostPath = relativeAppHostPath })); 1754await File.WriteAllTextAsync( 1779await File.WriteAllTextAsync( 1805await File.WriteAllTextAsync( 1815await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 1820await File.WriteAllTextAsync( 1860await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting 1880await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 1885await File.WriteAllTextAsync( 1921await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 1948await File.WriteAllTextAsync( 1972await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting; 1993await File.WriteAllTextAsync(appHostFile.FullName, "using Aspire.Hosting;"); 1996await File.WriteAllTextAsync(projectFile.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2019await File.WriteAllTextAsync( 2030await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 2045await File.WriteAllTextAsync(txtFile.FullName, "Some text file"); 2065await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 2070await File.WriteAllTextAsync( 2257await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2312await File.WriteAllTextAsync(projectFile.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2342await File.WriteAllTextAsync(first.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2345await File.WriteAllTextAsync(second.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2382await File.WriteAllTextAsync(brokenAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2387await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 2424await File.WriteAllTextAsync(healthyAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2429await File.WriteAllTextAsync(brokenAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2432await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 2465await File.WriteAllTextAsync(configuredAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2470await File.WriteAllTextAsync(firstAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2473await File.WriteAllTextAsync(secondAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2476await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 2510await File.WriteAllTextAsync(unsupportedAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2515await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 2564await File.WriteAllTextAsync(brokenAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2568await File.WriteAllTextAsync(firstHealthy.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2572await File.WriteAllTextAsync(secondHealthy.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 2575await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 2614await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file."); 2616await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file."); 2651await File.WriteAllTextAsync( 2679await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2718await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 2723await File.WriteAllTextAsync(appHostCsFile.FullName, """ 2761await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>"); 2765await File.WriteAllTextAsync(appHostCsFile.FullName, """ 2803await File.WriteAllTextAsync(appHostCsFile.FullName, """ 2826await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2847await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2869await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file."); 2922await File.WriteAllTextAsync(normalProject.FullName, "Not a real project file."); 2929await File.WriteAllTextAsync(cachedProject.FullName, "Not a real project file."); 2959await File.WriteAllTextAsync(project1.FullName, "Not a real project file."); 2963await File.WriteAllTextAsync(project2.FullName, "Not a real project file."); 2990await File.WriteAllTextAsync(normalProject.FullName, "Not a real project file."); 2997await File.WriteAllTextAsync(cachedProject.FullName, "Not a real project file."); 3031await File.WriteAllTextAsync(siblingProject.FullName, "Not a real project file."); 3037await File.WriteAllTextAsync(cachedProject.FullName, "Not a real project file."); 3067await File.WriteAllTextAsync(appHostFile.FullName, "Not a real apphost"); 3090await File.WriteAllTextAsync(appHost1File.FullName, "Not a real apphost"); 3096await File.WriteAllTextAsync(appHost2File.FullName, "Not a real apphost"); 3120await File.WriteAllTextAsync(appHostFile.FullName, "Not a real apphost"); 3143await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "Not a real apphost"); 3146await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "Not a real apphost"); 3165await File.WriteAllTextAsync(appHost1File.FullName, "Not a real apphost"); 3168await File.WriteAllTextAsync(appHost2File.FullName, "Not a real apphost"); 3171await File.WriteAllTextAsync(slowValidationFile.FullName, "Not a real apphost"); 3224await File.WriteAllTextAsync(appHost1File.FullName, "Not a real apphost"); 3228await File.WriteAllTextAsync(appHost2File.FullName, "Not a real apphost"); 3237await File.WriteAllTextAsync(aspireSettingsFile.FullName, JsonSerializer.Serialize(new { appHostPath = relativeAppHostPath })); 3257await File.WriteAllTextAsync(appHost1File.FullName, "Not a real apphost"); 3261await File.WriteAllTextAsync(appHost2File.FullName, "Not a real apphost"); 3270await File.WriteAllTextAsync(aspireSettingsFile.FullName, JsonSerializer.Serialize(new { appHostPath = relativeAppHostPath })); 3292await File.WriteAllTextAsync(realAppHost.FullName, "Not a real project file."); 3297await File.WriteAllTextAsync(staleAppHost.FullName, "Not a real project file."); 3320await File.WriteAllTextAsync(realAppHost.FullName, "Not a real project file."); 3324await File.WriteAllTextAsync(staleAppHost.FullName, "Not a real project file."); 3349await File.WriteAllTextAsync(realAppHost.FullName, "Not a real project file."); 3353await File.WriteAllTextAsync(skipListedAppHost.FullName, "Not a real project file."); 3378await File.WriteAllTextAsync(buildableAppHost.FullName, "Not a real project file."); 3382await File.WriteAllTextAsync(unbuildableAppHost.FullName, "Not a real project file."); 3417await File.WriteAllTextAsync(realAppHost.FullName, "Not a real project file."); 3422await File.WriteAllTextAsync(staleAppHost.FullName, "Not a real project file."); 3456await File.WriteAllTextAsync(configuredAppHost.FullName, "<Project Sdk=\"Aspire.AppHost.Sdk\"></Project>"); 3460await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new 3492await File.WriteAllTextAsync(trackedAppHost.FullName, "Not a real project file."); 3496await File.WriteAllTextAsync(ignoredAppHost.FullName, "Not a real project file."); 3527await File.WriteAllTextAsync(realAppHost.FullName, "Not a real project file."); 3532await File.WriteAllTextAsync(nodeModulesAppHost.FullName, "Not a real project file."); 3564await File.WriteAllTextAsync(realAppHost.FullName, "Not a real project file."); 3620await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real apphost"); 3687await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real apphost"); 3720await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real apphost"); 3806await File.WriteAllTextAsync(configPath, """ 3834await File.WriteAllTextAsync(aspireSettingsFile.FullName, """ 3861await File.WriteAllTextAsync(configPath, """ 3886await File.WriteAllTextAsync(aspireSettingsFile.FullName, """ 3911await File.WriteAllTextAsync(configPath, """ 3941await File.WriteAllTextAsync(settingsPath, """ 3968await File.WriteAllTextAsync(settingsPath, """ 3995await File.WriteAllTextAsync(settingsPath, """ 4033await File.WriteAllTextAsync(realAppHost.FullName, "Not a real project file."); 4095await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real project file."); 4106await File.WriteAllTextAsync(configPath, $$""" 4130await File.WriteAllTextAsync(configuredAppHost.FullName, "Not a real project file."); 4133await File.WriteAllTextAsync(configPath, JsonSerializer.Serialize(new
Projects\ProjectUpdaterTests.cs (59)
39await File.WriteAllTextAsync( 149await File.WriteAllTextAsync( 161await File.WriteAllTextAsync( 313await File.WriteAllTextAsync( 420await File.WriteAllTextAsync( 429await File.WriteAllTextAsync( 584await File.WriteAllTextAsync( 713await File.WriteAllTextAsync( 843await File.WriteAllTextAsync( 852await File.WriteAllTextAsync( 866await File.WriteAllTextAsync( 976await File.WriteAllTextAsync( 988await File.WriteAllTextAsync( 1078await File.WriteAllTextAsync( 1090await File.WriteAllTextAsync( 1201await File.WriteAllTextAsync( 1216await File.WriteAllTextAsync( 1308await File.WriteAllTextAsync( 1396await File.WriteAllTextAsync(appHostProjectFile.FullName, ProjectContent); 1465await File.WriteAllTextAsync( 1480await File.WriteAllTextAsync( 1578await File.WriteAllTextAsync(nugetConfigPath, 1639await File.WriteAllTextAsync( 1779await File.WriteAllTextAsync( 1791await File.WriteAllTextAsync( 1892await File.WriteAllTextAsync( 1905await File.WriteAllTextAsync( 2016await File.WriteAllTextAsync( 2028await File.WriteAllTextAsync( 2130await File.WriteAllTextAsync( 2142await File.WriteAllTextAsync( 2239await File.WriteAllTextAsync( 2335await File.WriteAllTextAsync( 2347await File.WriteAllTextAsync( 2435await File.WriteAllTextAsync( 2513await File.WriteAllTextAsync( 2596await File.WriteAllTextAsync( 2688await File.WriteAllTextAsync( 2782await File.WriteAllTextAsync( 2859await File.WriteAllTextAsync( 2940await File.WriteAllTextAsync( 3027await File.WriteAllTextAsync( 3105await File.WriteAllTextAsync( 3182await File.WriteAllTextAsync( 3309await File.WriteAllTextAsync( 3326await File.WriteAllTextAsync( 3442await File.WriteAllTextAsync(projectFile, originalContent); 3474await File.WriteAllTextAsync(projectFile, originalContent); 3511await File.WriteAllTextAsync(projectFile, originalContent); 3547await File.WriteAllTextAsync(projectFile, originalContent); 3579await File.WriteAllTextAsync(projectFile, originalContent); 3612await File.WriteAllTextAsync(projectFile, originalContent); 3654await File.WriteAllTextAsync(projectFile, originalContent); 3658await File.WriteAllTextAsync(directoryPackagesPropsFile, """ 3712await File.WriteAllTextAsync( 3826await File.WriteAllTextAsync( 3903await File.WriteAllTextAsync( 3956await File.WriteAllTextAsync( 3993await File.WriteAllTextAsync(
Telemetry\InternalMicrosoftDetectorTests.cs (6)
25await File.WriteAllTextAsync(cacheFilePath, """ 64await File.WriteAllTextAsync(cacheFilePath, """ 257await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty); 258await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty); 294await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty); 295await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
Templating\DotNetTemplateFactoryTests.cs (1)
40await File.WriteAllTextAsync(path, content);
Templating\TemplateNuGetConfigServiceTests.cs (6)
30await File.WriteAllTextAsync( 114await File.WriteAllTextAsync( 124await File.WriteAllTextAsync( 1035await File.WriteAllTextAsync(templatePackagePath, string.Empty); 1171await File.WriteAllTextAsync( 1232await File.WriteAllTextAsync(
TestServices\FakePlaywrightServices.cs (2)
151await File.WriteAllTextAsync(path, content, cancellationToken); 174await File.WriteAllTextAsync(Path.Combine(_bundleDirectory.FullName, "skill-manifest.json"), manifestJson, cancellationToken);
Utils\DcpConnectionHealthCheckTests.cs (2)
190await File.WriteAllTextAsync(kubeconfigPath, "clusters:", TestContext.Current.CancellationToken); 205return File.WriteAllTextAsync(kubeconfigPath, completeKubeconfig, cancellationToken);
Utils\LegacySettingsFileCheckTests.cs (8)
17await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}"); 42await File.WriteAllTextAsync( 62await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}"); 63await File.WriteAllTextAsync( 82await File.WriteAllTextAsync( 107await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}"); 133await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}"); 138await File.WriteAllTextAsync(
Aspire.Dashboard.Tests (5)
Integration\OtlpGrpcServiceTests.cs (2)
176await File.WriteAllTextAsync(configPath, configJson.ToString()).DefaultTimeout(); 225await File.WriteAllTextAsync(configPath, configJson.ToString()).DefaultTimeout();
Integration\StartupTests.cs (3)
294await File.WriteAllTextAsync(browserTokenConfigFile, changedFrontendBrowserToken).DefaultTimeout(); 648await File.WriteAllTextAsync(configFilePath, configJson.ToString()).DefaultTimeout(); 1146await File.WriteAllTextAsync(browserTokenConfigFile, browserToken);
Aspire.Hosting (4)
ApplicationModel\DockerfileBuildAnnotation.cs (2)
112await File.WriteAllTextAsync(DockerfilePath, dockerfileContent, cancellationToken).ConfigureAwait(false); 186await File.WriteAllTextAsync(perDockerfileIgnore, content, cancellationToken).ConfigureAwait(false);
Devcontainers\DevcontainerSettingsWriter.cs (1)
185await File.WriteAllTextAsync(settingsPath, settingsContent, cancellationToken).ConfigureAwait(false);
Pipelines\Internal\FileDeploymentStateManager.cs (1)
109await File.WriteAllTextAsync(
Aspire.Hosting.Azure (1)
AzurePublishingContext.cs (1)
529await File.WriteAllTextAsync(bicepPath, compiledBicep.Value).ConfigureAwait(false);
Aspire.Hosting.Azure.Kubernetes (1)
AzureKubernetesEnvironmentResource.AksPipeline.cs (1)
279await File.WriteAllTextAsync(kubeConfigPath, kubeConfigContent, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.Tests (2)
AzureDeployerTests.cs (1)
1695await File.WriteAllTextAsync(deploymentStatePath, cachedState.ToJsonString());
AzureEnvironmentResourceTests.cs (1)
321await File.WriteAllTextAsync(bicepFilePath, bicepContent);
Aspire.Hosting.Blazor (1)
BlazorGatewayExtensions.cs (1)
516await File.WriteAllTextAsync(destEndpoints, modifiedEndpoints, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Blazor.Tests (8)
EndpointsManifestTransformerTests.cs (8)
39await File.WriteAllTextAsync(manifestPath, JsonSerializer.Serialize(manifest, ManifestJsonContext.Default.EndpointsManifest)); 64await File.WriteAllTextAsync(manifestPath, JsonSerializer.Serialize(manifest, ManifestJsonContext.Default.EndpointsManifest)); 95await File.WriteAllTextAsync(manifestPath, JsonSerializer.Serialize(manifest, ManifestJsonContext.Default.EndpointsManifest)); 119await File.WriteAllTextAsync(manifestPath, JsonSerializer.Serialize(manifest, ManifestJsonContext.Default.EndpointsManifest)); 177await File.WriteAllTextAsync(app1Path, JsonSerializer.Serialize(app1Manifest, ManifestJsonContext.Default.DevelopmentManifest)); 178await File.WriteAllTextAsync(app2Path, JsonSerializer.Serialize(app2Manifest, ManifestJsonContext.Default.DevelopmentManifest)); 241await File.WriteAllTextAsync(app1Path, JsonSerializer.Serialize(app1Manifest, ManifestJsonContext.Default.DevelopmentManifest)); 242await File.WriteAllTextAsync(app2Path, JsonSerializer.Serialize(app2Manifest, ManifestJsonContext.Default.DevelopmentManifest));
Aspire.Hosting.Browsers.Tests (4)
BrowserHostTests.cs (2)
24await File.WriteAllTextAsync(browserExecutable, string.Empty); 26await File.WriteAllTextAsync(devToolsActivePortPath, "12345\n/devtools/browser/stale");
BrowserLogsBuilderExtensionsTests.cs (1)
1022await File.WriteAllTextAsync(tempBrowserPath, string.Empty);
BrowserLogsSessionManagerTests.cs (1)
323await File.WriteAllTextAsync(
Aspire.Hosting.Containers.Tests (1)
DockerSocketBindMountTests.cs (1)
25await File.WriteAllTextAsync(dockerFilePath, dockerfile);
Aspire.Hosting.Docker (1)
DockerComposePublishingContext.cs (1)
149await File.WriteAllTextAsync(outputFile, composeOutput, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Dotnet.Tests (7)
DotnetProjectResourceTests.cs (7)
398await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Dockerfile"), "FROM scratch"); 478await File.WriteAllTextAsync(projectPath, "<Project />"); 481await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """ 565await File.WriteAllTextAsync(projectPath, "<Project />"); 568await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """ 635await File.WriteAllTextAsync(projectPath, "<Project />"); 638await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
Aspire.Hosting.Java.Tests (5)
AddJavaAppPublishTests.cs (4)
52await File.WriteAllTextAsync(Path.Combine(workspace.Path, "build", "libs", "reports service.jar"), ""); 1147await File.WriteAllTextAsync( 1227await File.WriteAllTextAsync( 1260await File.WriteAllTextAsync(
AddJavaAppTests.cs (1)
816await File.WriteAllTextAsync(wrapper, "#!/bin/sh\nexit 0\n");
Aspire.Hosting.JavaScript.Tests (8)
AddJavaScriptAppTests.cs (8)
383await File.WriteAllTextAsync( 417await File.WriteAllTextAsync( 449await File.WriteAllTextAsync( 478await File.WriteAllTextAsync( 556await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson); 580await File.WriteAllTextAsync(dockerfileInContext, modifiedDockerfile); 651await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson); 670await File.WriteAllTextAsync(dockerfileInContext, dockerfileContent);
Aspire.Hosting.Kubernetes (11)
CertManagerExtensions.cs (1)
452await File.WriteAllTextAsync(manifestPath, manifest, context.CancellationToken).ConfigureAwait(false);
Deployment\HelmDeploymentEngine.cs (1)
363await File.WriteAllTextAsync(overrideFilePath, overrideContent, cancellationToken).ConfigureAwait(false);
KubernetesEnvironmentResource.cs (7)
1476await File.WriteAllTextAsync(patchFilePath, patchJson, context.CancellationToken).ConfigureAwait(false); 1589await File.WriteAllTextAsync(certPath, certPem, context.CancellationToken).ConfigureAwait(false); 1590await File.WriteAllTextAsync(keyPath, keyPem, context.CancellationToken).ConfigureAwait(false); 1922await File.WriteAllTextAsync(patchFilePath, patchJson, context.CancellationToken).ConfigureAwait(false); 2103await File.WriteAllTextAsync(manifestPath, minimal.ToJsonString(), context.CancellationToken).ConfigureAwait(false); 2226await File.WriteAllTextAsync(certPath, certPem, context.CancellationToken).ConfigureAwait(false); 2227await File.WriteAllTextAsync(keyPath, keyPem, context.CancellationToken).ConfigureAwait(false);
KubernetesPublishingContext.cs (2)
404await File.WriteAllTextAsync(outputFile, valuesYaml, cancellationToken).ConfigureAwait(false); 426await File.WriteAllTextAsync(outputFile, chartYaml, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Kubernetes.Tests (5)
KubernetesDeployTests.cs (5)
983await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml); 1022await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}"); 1042await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}"); 1116await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}"); 1281await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml);
Aspire.Hosting.MongoDB.Tests (2)
MongoDbFunctionalTests.cs (2)
278await File.WriteAllTextAsync(initFilePath, $$""" 375await File.WriteAllTextAsync(initFilePath, $$"""
Aspire.Hosting.Radius (3)
Publishing\RadiusBicepPublishingContext.cs (2)
97await File.WriteAllTextAsync(bicepPath, bicepContent, cancellationToken).ConfigureAwait(false); 98await File.WriteAllTextAsync(configPath, bicepConfigContent, cancellationToken).ConfigureAwait(false);
Publishing\RadiusDeploymentPipelineStep.cs (1)
287await File.WriteAllTextAsync(
Aspire.Hosting.RemoteHost.Tests (19)
AtsExportsTests.cs (1)
140await File.WriteAllTextAsync(tempFile, "test content");
LayoutCommandTests.cs (18)
28await File.WriteAllTextAsync(Path.Combine(packageRoot, "lib", "net10.0", "Test.Package.dll"), "base"); 29await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", "unix", "lib", "net10.0", "Test.Package.dll"), "unix"); 30await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", "win", "lib", "net10.0", "Test.Package.dll"), "win"); 31await File.WriteAllTextAsync(Path.Combine(packageRoot, "lib", "net10.0", "fr", "Test.Package.resources.dll"), "fr"); 32await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", GetCurrentRuntimeIdentifier(), "native", GetNativeFileName()), "runtime-native"); 35await File.WriteAllTextAsync(assetsPath, CreateAssetsJsonWithResolvedRidTarget(workspaceRoot, GetCurrentRuntimeIdentifier(), GetNativeFileName())); 80await File.WriteAllTextAsync(Path.Combine(packageRoot, "lib", "net10.0", "Test.Package.dll"), "base"); 81await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", "unix", "lib", "net10.0", "Test.Package.dll"), "unix"); 82await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", "win", "lib", "net10.0", "Test.Package.dll"), "win"); 85await File.WriteAllTextAsync(assetsPath, CreateAssetsJsonWithRuntimeSpecificTarget(workspaceRoot, GetCurrentRuntimeIdentifier(), GetExpectedRuntimeAssemblyPath())); 120await File.WriteAllTextAsync(Path.Combine(packageRoot, "lib", "net10.0", "Test.Package.dll"), "base"); 123await File.WriteAllTextAsync(assetsPath, CreateAssetsJsonWithBaseTargetOnly(workspaceRoot)); 161await File.WriteAllTextAsync(Path.Combine(packageRoot, "lib", "net10.0", "Test.Package.dll"), "base"); 162await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", "unix", "lib", "net10.0", "Test.Package.dll"), "unix"); 163await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", "win", "lib", "net10.0", "Test.Package.dll"), "win"); 164await File.WriteAllTextAsync(Path.Combine(packageRoot, "lib", "net10.0", "fr", "Test.Package.resources.dll"), "fr"); 165await File.WriteAllTextAsync(Path.Combine(packageRoot, "runtimes", GetCurrentRuntimeIdentifier(), "native", GetNativeFileName()), "runtime-native"); 168await File.WriteAllTextAsync(assetsPath, CreateAssetsJsonWithResolvedRidTarget(workspaceRoot, GetCurrentRuntimeIdentifier(), GetNativeFileName()));
Aspire.Hosting.Rust.Tests (1)
RustDockerfileShellTests.cs (1)
42await File.WriteAllTextAsync(
Aspire.Hosting.Sdk.Tests (27)
AppHostSdkTargetsTests.cs (27)
224await File.WriteAllTextAsync(nonExecutableDnxPath, ""); 352await File.WriteAllTextAsync(appHostFile, """ 789await File.WriteAllTextAsync(commandShimPath, """ 797await File.WriteAllTextAsync(projectPath, $$""" 855await File.WriteAllTextAsync( 1074await File.WriteAllTextAsync(Path.Combine(projectDirectory, "AppHost.csproj"), 1126await File.WriteAllTextAsync(projectFile, 1149await File.WriteAllTextAsync(Path.Combine(projectDirectory, "Program.cs"), """ 1225await File.WriteAllTextAsync(aspirePath, """ 1261await File.WriteAllTextAsync(aspirePath, contents.ReplaceLineEndings(OperatingSystem.IsWindows() ? "\r\n" : "\n")); 1295await File.WriteAllTextAsync(aspirePath, """ 1312await File.WriteAllTextAsync(aspirePath, (""" 1332await File.WriteAllTextAsync(Path.Combine(fakeSdkDirectory.FullName, "dotnet.dll"), ""); 1335await File.WriteAllTextAsync(dnxPath, OperatingSystem.IsWindows() 1381await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "fail-version"), ""); 1385await File.WriteAllTextAsync(dnxPath, (""" 1417await File.WriteAllTextAsync( 1433await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$""" 1446await File.WriteAllTextAsync(aspirePath, ($$""" 1461await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$""" 1475await File.WriteAllTextAsync(aspirePath, ($$""" 1495await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """ 1509await File.WriteAllTextAsync(aspirePath, (""" 1525await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """ 1543await File.WriteAllTextAsync(aspirePath, (""" 1563await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """ 1580await File.WriteAllTextAsync(aspirePath, ("""
Aspire.Hosting.Tests (14)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (6)
224await File.WriteAllTextAsync(dockerfilePath, "FROM scratch"); 248await File.WriteAllTextAsync(dockerfilePath, "FROM scratch"); 261await File.WriteAllTextAsync(Path.Combine(contextPath, ".dockerignore"), "secrets\n"); 278await File.WriteAllTextAsync(dockerfilePath, "FROM scratch"); 279await File.WriteAllTextAsync(Path.Combine(contextPath, ".dockerignore"), "secrets\n"); 283await File.WriteAllTextAsync(perDockerfileIgnore, userIgnoreContent);
Dashboard\DashboardServiceTests.cs (2)
1122await File.WriteAllTextAsync(filePath, "content"); 1123await File.WriteAllTextAsync(secondFilePath, "second content");
ProjectResourceTests.cs (4)
67await File.WriteAllTextAsync(projectFilePath, csProjContent).DefaultTimeout(); 70await File.WriteAllTextAsync(launchSettingsFilePath, launchSettingsContent).DefaultTimeout(); 107await File.WriteAllTextAsync(projectFilePath, csProjContent).DefaultTimeout(); 110await File.WriteAllTextAsync(launchSettingsFilePath, launchSettingsContent).DefaultTimeout();
Publishing\ResourceContainerImageManagerTests.cs (2)
956await File.WriteAllTextAsync(tempSecretFile, "secret-file-content"); 1532await File.WriteAllTextAsync(dockerfilePath, """
Aspire.Hosting.TestUtilities (1)
Utils\DockerfileUtils.cs (1)
55await File.WriteAllTextAsync(tempDockerfilePath, dockerfileContent);
Infrastructure.Tests (31)
GenerateTestSummary\GenerateTestSummaryToolTests.cs (3)
135await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<"); 165await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<"); 192await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<");
Pipelines\NixCliPackageTests.cs (2)
78await File.WriteAllTextAsync(curlPath, """ 125await File.WriteAllTextAsync(curlPath, """
Pipelines\NpmCliPackageTests.cs (8)
181await File.WriteAllTextAsync( 221await File.WriteAllTextAsync( 516await File.WriteAllTextAsync( 531await File.WriteAllTextAsync(Path.Combine(pointerBinRoot, "aspire-package-map.json"), packageMap.ToJsonString()); 541await File.WriteAllTextAsync( 550await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire"), "native binary stub"); 551await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire.exe"), "native binary stub"); 577await File.WriteAllTextAsync(nativeBinaryPath, "native binary stub");
WorkflowScripts\AutoRerunTransientCiFailuresTests.cs (1)
2228await File.WriteAllTextAsync(inputPath, requestJson);
WorkflowScripts\CreateFailingTestIssueWorkflowTests.cs (1)
271await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(new { operation, payload }, s_jsonOptions));
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (2)
307await File.WriteAllTextAsync(changelogPath, content.ReplaceLineEndings("\n")); 457await File.WriteAllTextAsync(fullPath, content.ReplaceLineEndings("\n"));
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (4)
550await File.WriteAllTextAsync(bodyPath, new string('a', 65_536)); 569await File.WriteAllTextAsync(bodyPath, new string('a', 65_537)); 592await File.WriteAllTextAsync( 797await File.WriteAllTextAsync(
WorkflowScripts\MonitorScheduledWorkflowsIntegrationTests.cs (1)
393await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(scenario, s_requestOptions));
WorkflowScripts\MonitorScheduledWorkflowsTests.cs (1)
246await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(new { operation, payload }, s_jsonOptions));
WorkflowScripts\ReportCiFailureIntegrationTests.cs (1)
285await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(scenario, s_requestOptions));
WorkflowScripts\ReportCiFailureTests.cs (1)
82await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(new { operation, payload }, s_jsonOptions));
WorkflowScripts\ReportPipelineFailureIntegrationTests.cs (1)
291await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(scenario, s_requestOptions));
WorkflowScripts\ReportPipelineFailureTests.cs (1)
140await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(new { operation, payload }, s_jsonOptions));
WorkflowScripts\ReportSpecializedTestFailuresTests.cs (1)
229await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(new { operation, payload }, s_jsonOptions));
WorkflowScripts\SelectTestsCommentScriptTests.cs (1)
232await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(new { script, commentFile, context, liveHeadSha, existingComments }, s_jsonOptions));
WorkflowScripts\SpecializedTestFailureRunnerTests.cs (1)
229await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(scenario, s_requestOptions));
WorkflowScripts\TrackingIssueTests.cs (1)
287await File.WriteAllTextAsync(requestPath, JsonSerializer.Serialize(new { operation, payload }, s_jsonOptions));
Microsoft.Extensions.DataIngestion.Tests (1)
Readers\DocumentReaderConformanceTests.cs (1)
50await File.WriteAllTextAsync(filePath, "This is a test file for cancellation token.");