9474 references to Combine
aspire (425)
Agents\AspireSkills\AspireSkillsInstaller.cs (29)
209var archivePath = Path.Combine(tempDirectory.FullName, GetSafeFileName(asset.Name));
670!File.Exists(Path.Combine(cacheDirectory, GitHubAttestationVerifiedFileName)))
680var cachedArchiveSha512Path = Path.Combine(cacheDirectory, ArchiveSha512FileName);
693var cachedGitHubArchiveSha256Path = Path.Combine(cacheDirectory, GitHubArchiveSha256FileName);
766Path.Combine(stageDirectory.FullName, ArchiveSha512FileName),
775Path.Combine(stageDirectory.FullName, GitHubArchiveSha256FileName),
783Path.Combine(stageDirectory.FullName, GitHubAttestationVerifiedFileName),
827File.Delete(Path.Combine(bundleDirectory, ArchiveSha512FileName));
828File.Delete(Path.Combine(bundleDirectory, GitHubArchiveSha256FileName));
829File.Delete(Path.Combine(bundleDirectory, GitHubAttestationVerifiedFileName));
830File.Delete(Path.Combine(bundleDirectory, LastUsedFileName));
858var lockPath = Path.Combine(cacheRoot, $".{GetSafeFileName(version)}.lock");
946return Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
951return Path.Combine(cacheRoot, version);
956return Path.Combine(
1067return Directory.Exists(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.SkillsDirectoryName)) ||
1068File.Exists(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.ManifestFileName)) ||
1069File.Exists(Path.Combine(versionCacheDirectory, ArchiveSha512FileName)) ||
1070File.Exists(Path.Combine(versionCacheDirectory, GitHubArchiveSha256FileName)) ||
1071File.Exists(Path.Combine(versionCacheDirectory, GitHubAttestationVerifiedFileName)) ||
1072File.Exists(Path.Combine(versionCacheDirectory, LastUsedFileName));
1079TryDeleteDirectory(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.SkillsDirectoryName));
1080TryDeleteFile(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.ManifestFileName));
1081TryDeleteFile(Path.Combine(versionCacheDirectory, ArchiveSha512FileName));
1082TryDeleteFile(Path.Combine(versionCacheDirectory, GitHubArchiveSha256FileName));
1083TryDeleteFile(Path.Combine(versionCacheDirectory, GitHubAttestationVerifiedFileName));
1084TryDeleteFile(Path.Combine(versionCacheDirectory, LastUsedFileName));
1109File.WriteAllText(Path.Combine(directory, LastUsedFileName), DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture));
1119var markerPath = Path.Combine(directory, LastUsedFileName);
Bundles\BundleService.cs (22)
112var lockPath = Path.Combine(extractDir, ".aspire-bundle-lock");
157var lockPath = Path.Combine(destinationPath, ".aspire-bundle-lock");
236var versionsRoot = Path.Combine(destinationPath, VersionsDirectoryName);
241var activeVersionDir = Path.Combine(versionsRoot, versionId);
320var tempDir = Path.Combine(versionsRoot, $"{versionId}{TempSuffixPrefix}{Guid.NewGuid():N}");
472var sidecarPath = Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName);
501var linkPath = Path.Combine(layoutPath, dir);
516var linkPath = Path.Combine(layoutPath, dir);
567var linkPath = Path.Combine(layoutPath, dir);
599var managedDir = Path.Combine(versionDir, BundleDiscovery.ManagedDirectoryName);
600var managedExe = Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName));
607var dashboardDir = Path.Combine(versionDir, BundleDiscovery.DashboardDirectoryName);
608var dashboardExe = Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
611var sqliteLibrary = Path.Combine(dashboardDir, sqliteLibraryName);
617var dcpDir = Path.Combine(versionDir, BundleDiscovery.DcpDirectoryName);
680var bundlePath = Path.Combine(extractDir, BundleDiscovery.BundleDirectoryName);
716: Path.Combine(layoutPath, target));
750var legacyPath = Path.Combine(layoutPath, dir);
847var markerPath = Path.Combine(extractDir, VersionMarkerFileName);
857var markerPath = Path.Combine(extractDir, VersionMarkerFileName);
902var fullPath = Path.GetFullPath(Path.Combine(destinationPath, relativePath));
939var linkTarget = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(fullPath)!, entry.LinkName));
Caching\AppHostInfoDiskCache.cs (7)
116_cacheDirectory = new DirectoryInfo(Path.Combine(executionContext.CacheDirectory.FullName, SubDirectoryName));
139var path = Path.Combine(_cacheDirectory.FullName, $"{key}.json");
212var path = Path.Combine(_cacheDirectory.FullName, $"{key}.json");
218tempPath = Path.Combine(_cacheDirectory.FullName, $"{Path.GetRandomFileName()}.tmp");
359AppendMtime(sb, Path.Combine(dir.FullName, siblingName), siblingName);
361AppendMtime(sb, Path.Combine(dir.FullName, "global.json"), "globaljson");
366AppendMtime(sb, Path.Combine(dir.FullName, customName), customName);
Certificates\CertificateGeneration\MacOSCertificateManager.cs (4)
331ExportCertificate(certificate, Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.pfx"), includePrivateKey: true, null, CertificateKeyExportFormat.Pfx);
378Path.Combine(s_macOSUserHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx");
406ExportCertificate(diskCert, Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.pfx"), includePrivateKey: true, null, CertificateKeyExportFormat.Pfx);
416var keyPath = Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.key");
Layout\LayoutDiscovery.cs (14)
250var bundlePath = Path.Combine(layoutPath, BundleDiscovery.BundleDirectoryName);
251var bundleManagedPath = Path.Combine(bundlePath, BundleDiscovery.ManagedDirectoryName);
252var bundleDashboardPath = Path.Combine(bundlePath, BundleDiscovery.DashboardDirectoryName);
253var bundleDcpPath = Path.Combine(bundlePath, BundleDiscovery.DcpDirectoryName);
265var bundleManagedExe = Path.Combine(bundleManagedPath, managedExeName);
266var bundleDashboardExe = Path.Combine(bundleDashboardPath, dashboardExeName);
279Dcp = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName),
280Dashboard = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DashboardDirectoryName),
281Managed = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName),
288var managedPath = Path.Combine(layoutPath, BundleDiscovery.ManagedDirectoryName);
289var dashboardPath = Path.Combine(layoutPath, BundleDiscovery.DashboardDirectoryName);
290var dcpPath = Path.Combine(layoutPath, BundleDiscovery.DcpDirectoryName);
304var managedExePath = Path.Combine(managedPath, managedExeName);
305var dashboardExePath = Path.Combine(dashboardPath, dashboardExeName);
NuGet\NuGetPackageAssetResolver.cs (5)
200var sourcePath = Path.Combine(packagePath, relativePath.Replace('/', Path.DirectorySeparatorChar));
332var sourcePath = Path.Combine(packagePath, runtimeTarget.Path.Replace('/', Path.DirectorySeparatorChar));
363var sourcePath = Path.Combine(packagePath, resourceAssembly.Path.Replace('/', Path.DirectorySeparatorChar));
383Path.Combine(locale, Path.GetFileName(sourcePath)),
404var sourcePath = Path.Combine(packagePath, nativeLib.Path.Replace('/', Path.DirectorySeparatorChar));
Projects\AppHostCandidateFinder.cs (5)
76".agents", ".claude", Path.Combine(".github", "skills"), Path.Combine(".opencode", "skill"),
413.Select(path => new FileInfo(Path.Combine(searchDirectory.FullName, path.Replace('/', Path.DirectorySeparatorChar))))
569return new MatcherDirectoryInfo(new DirectoryInfo(Path.Combine(_directory.FullName, path)), _options, _excludePath, _applyDirectoryExclusions, _pathComparison, _counters, _onDirectoryEnumerated, _depth + 1, _maxDepth, _cancellationToken);
574return new MatcherFileInfo(new FileInfo(Path.Combine(_directory.FullName, path)), _options, _excludePath, _applyDirectoryExclusions, _pathComparison, _counters, _onDirectoryEnumerated, _depth, _maxDepth, _cancellationToken);
Projects\AppHostServerClosureSnapshots.cs (12)
20public string IntegrationLibsPath => Path.Combine(LayoutPath, "libs");
336var layoutsDirectory = Path.Combine(Path.GetFullPath(rootPath), LayoutRootFolderName);
337_itemsDirectory = Path.Combine(layoutsDirectory, LayoutItemsFolderName);
338_stagingDirectory = Path.Combine(layoutsDirectory, LayoutStagingFolderName);
379var libsPath = Path.Combine(layoutPath, "libs");
380var manifestPath = Path.Combine(layoutPath, LayoutManifestFileName);
420var stagingPath = Path.Combine(_stagingDirectory, Guid.NewGuid().ToString("n"));
421var libsPath = Path.Combine(stagingPath, "libs");
431var destinationPath = Path.Combine(libsPath, entry.RelativePath.Replace('/', Path.DirectorySeparatorChar));
441await WriteManifestFileAsync(Path.Combine(stagingPath, LayoutManifestFileName), manifest, cancellationToken).ConfigureAwait(false);
477return Path.Combine(_itemsDirectory, fingerprint);
495var copiedPath = Path.Combine(libsPath, entry.RelativePath.Replace('/', Path.DirectorySeparatorChar));
Projects\DotNetBasedAppHostServerProject.cs (15)
103public string BuildPath => Path.Combine(_projectModelPath, BuildFolder);
110public string GetProjectFilePath() => Path.Combine(_projectModelPath, ProjectFileName);
114var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
126var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
278File.WriteAllText(Path.Combine(_projectModelPath, "Program.cs"), programCs);
389var repoDirectoryPackagesProps = Path.Combine(_repoRoot, "Directory.Packages.props");
401var projectFileName = Path.Combine(_projectModelPath, ProjectFileName);
468if (!File.Exists(Path.Combine(_projectModelPath, fileName)))
488var objPath = Path.Combine(_projectModelPath, "obj");
510File.WriteAllText(Path.Combine(_projectModelPath, fileName), content);
513projectDocument.Save(Path.Combine(_projectModelPath, ProjectFileName));
519var staleNugetConfig = Path.Combine(_projectModelPath, "nuget.config");
550var projectFile = new FileInfo(Path.Combine(_projectModelPath, ProjectFileName));
601var assemblyPath = Path.Combine(BuildPath, ProjectDllName);
756var globalNuGetPath = Path.Combine(userProfile, ".nuget");
Projects\JavaAppHostToolchainResolver.cs (23)
133if (File.Exists(Path.Combine(candidate.FullName, MavenPomFileName)))
140if (File.Exists(Path.Combine(candidate.FullName, gradleBuildFileName)))
191var candidate = Path.Combine(directory.FullName, wrapperName);
206var gitPath = Path.Combine(directory.FullName, ".git");
223JavaAppHostToolchain.Gradle => File.Exists(Path.Combine(directory, GradleSettingsFileName))
224|| File.Exists(Path.Combine(directory, GradleKotlinSettingsFileName)),
227JavaAppHostToolchain.Maven => File.Exists(Path.Combine(directory, MavenPomFileName)),
436var scriptPath = Path.Combine(resolution.ProjectDirectory.FullName, GradleInitScriptPath);
495var dependencyDirectory = Path.Combine(
534return projectPath is null ? path : Path.Combine(projectPath, path);
551JavaAppHostToolchain.Maven => ["-f", Path.Combine(projectPath, MavenPomFileName)],
576"-f", Path.Combine(reactorPath, MavenPomFileName),
602var document = XDocument.Load(Path.Combine(aggregatorDirectory.FullName, MavenPomFileName));
618var moduleDirectory = new DirectoryInfo(Path.GetFullPath(Path.Combine(aggregatorDirectory.FullName, modulePath)));
620|| (File.Exists(Path.Combine(moduleDirectory.FullName, MavenPomFileName))
642JavaAppHostToolchain.Maven => Path.Combine("target", "classes"),
652JavaAppHostToolchain.Maven => Path.Combine("target", DependencyDirectoryName),
653JavaAppHostToolchain.Gradle => Path.Combine("build", DependencyDirectoryName),
784Path.Combine("gradle", "libs.versions.toml")
808"-classpath", Path.Combine(dependencyDirectory, "*"),
856.Select(output => Path.Combine(classesDirectory, Path.GetFileName(output)))
859StampFile = Path.Combine(classesDirectory, Path.GetFileName(baseCompile.UpToDateCheck.StampFile))
869var classPath = string.Join(Path.PathSeparator, [classesDirectory, Path.Combine(dependencyDirectory, "*")]);
Projects\PrebuiltAppHostServer.cs (22)
158var assemblyPath = hostingAssembly?.Path ?? (_integrationLibsPath is not null ? Path.Combine(_integrationLibsPath, "Aspire.Hosting.dll") : null);
235_integrationProbeManifestPath = Path.Combine(_workingDirectory, IntegrationPackageProbeManifest.FileName);
555references.Add(Path.Combine(projectDirectory, include.Replace('\\', Path.DirectorySeparatorChar)));
587var candidate = Path.Combine(directory, fileName);
688var objDir = Path.Combine(restoreDir, "obj");
690await File.WriteAllTextAsync(Path.Combine(objDir, RestoreStampFileName), fingerprint, cancellationToken).ConfigureAwait(false);
781var restoreDir = Path.Combine(_workingDirectory, "integration-restore");
803var projectFilePath = Path.Combine(restoreDir, IntegrationProjectFileName);
815Path.Combine(restoreDir, "Directory.Packages.props"), directoryPackagesProps, cancellationToken);
819Path.Combine(restoreDir, "Directory.Build.props"), "<Project />", cancellationToken);
821Path.Combine(restoreDir, "Directory.Build.targets"), "<Project />", cancellationToken);
859var closureSourcesPath = Path.Combine(restoreDir, ClosureSourcesFileName);
860var closureMetadataPath = Path.Combine(restoreDir, ClosureMetadataFileName);
861var closureTargetsPath = Path.Combine(restoreDir, ClosureTargetsFileName);
873Path.Combine(restoreDir, ProjectRefAssemblyNamesFileName),
898Path.Combine(restoreDir, ClosureManifestFileName),
923new XElement("AspireClosureMetadataFile", Path.Combine(restoreDir, ClosureMetadataFileName)),
924new XElement("AspireClosureSourcesFile", Path.Combine(restoreDir, ClosureSourcesFileName)),
925new XElement("AspireClosureTargetsFile", Path.Combine(restoreDir, ClosureTargetsFileName)),
926new XElement("AspireProjectRefAssemblyNamesFile", Path.Combine(restoreDir, ProjectRefAssemblyNamesFileName)));
1274return Path.Combine(
1769Path.Combine(contentRootPath, "appsettings.json"),
Projects\TypeScriptAppHostToolchainResolver.cs (10)
63if (File.Exists(Path.Combine(candidateDirectory.FullName, BunLockFileName)))
68if (File.Exists(Path.Combine(candidateDirectory.FullName, BunBinaryLockFileName)))
73if (File.Exists(Path.Combine(candidateDirectory.FullName, PnpmLockFileName)))
78var yarnLockFilePath = Path.Combine(candidateDirectory.FullName, YarnLockFileName);
89if (File.Exists(Path.Combine(candidateDirectory.FullName, YarnConfigFileName)))
94if (File.Exists(Path.Combine(candidateDirectory.FullName, DenoLockFileName)))
99if (File.Exists(Path.Combine(candidateDirectory.FullName, DenoJsonFileName)))
104if (File.Exists(Path.Combine(candidateDirectory.FullName, DenoJsoncFileName)))
109if (File.Exists(Path.Combine(candidateDirectory.FullName, PackageLockFileName)))
355var packageJsonPath = Path.Combine(appHostDirectory.FullName, PackageJsonFileName);
Scaffolding\ScaffoldingService.cs (11)
184var filePath = Path.Combine(scaffoldDirectory.FullName, fileName);
242var appHostRunPath = Path.Combine(scaffoldDirectory.FullName, "apphost.run.json");
268if (IsTypeScriptLanguage(language) && File.Exists(Path.Combine(directory.FullName, PackageJsonFileName)))
272return new DirectoryInfo(Path.Combine(directory.FullName, BrownfieldTypeScriptAppHostDirectoryName));
282return Path.Combine(scaffoldDirectory.FullName, appHostFileName);
294var packageJsonPath = Path.Combine(rootDirectory.FullName, PackageJsonFileName);
369Path.GetRelativePath(rootDirectory.FullName, Path.Combine(scaffoldDirectory.FullName, appHostFileName)));
491var outputPath = Path.Combine(directoryPath, LanguageInfo.GeneratedFolderName);
496var filePath = Path.Combine(outputPath, fileName);
515!File.Exists(Path.Combine(directory.FullName, PackageJsonFileName)) ||
555var filePath = Path.Combine(rootDirectory, fileName);
aspire-managed (11)
Aspire.Acquisition.Tests (337)
Scripts\CompletionScriptTests.cs (74)
21var profile = Path.Combine(env.MockHome, "profile.ps1");
41Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
74var target = Path.Combine(env.TempDirectory, "actual");
75var selected = Path.Combine(env.TempDirectory, "selected");
76var outside = Path.Combine(env.TempDirectory, "outside");
88New-Item -ItemType $linkType -Path '{{Quote(Path.Combine(target, "completions"))}}' -Target '{{Quote(outside)}}' -ErrorAction Stop | Out-Null
110var home = Path.Combine(env.MockHome, "it's $home ` [test]");
166var cli = CreateFakeCli(outsideHome ? Path.Combine(env.TempDirectory, "custom install") : env.MockHome);
167var profile = Path.Combine(env.MockHome, "profile.ps1");
192Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
204var cli = CreateFakeCli(Path.Combine(env.TempDirectory, "custom install"));
205var profile = Path.Combine(Path.GetDirectoryName(cli)!, "outside-profile.ps1");
222Assert.False(Directory.Exists(Path.Combine(Path.GetDirectoryName(cli)!, "completions")));
233var cli = CreateFakeCli(Path.Combine(env.TempDirectory, "it's $install ` [test]"));
234var profile = Path.Combine(env.MockHome, "profile.ps1");
257Assert.False(Directory.Exists(Path.Combine(env.MockHome, ".aspire")));
272var installRoot = Path.Combine(env.TempDirectory, "custom install");
274var profile = Path.Combine(env.MockHome, "profile.ps1");
277var outside = Path.Combine(env.TempDirectory, "custom install-other");
279var sentinel = Path.Combine(outside, "aspire.ps1");
311Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
323var cli = Path.Combine(installRoot, "aspire.ps1");
324var profile = Path.Combine(env.MockHome, "profile.ps1");
355var profile = Path.Combine(env.MockHome, "profile.ps1");
377Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
390var profile = Path.Combine(env.MockHome, "profile.ps1");
417var profile = Path.Combine(env.MockHome, "profile.ps1");
445var profile = Path.Combine(env.MockHome, "profile.ps1");
465Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
473var cli = Path.Combine(home, "fake aspire.ps1");
487Path.Combine(dogfood ? Path.GetDirectoryName(cli)! : Path.Combine(home, ".aspire"), "completions", "aspire.ps1");
500var bashrc = Path.Combine(env.MockHome, ".bashrc");
501var outside = Path.Combine(env.TempDirectory, "outside-profile");
504File.CreateSymbolicLink(Path.Combine(env.MockHome, ".bash_profile"), outside);
529var profiles = new[] { Path.Combine(env.MockHome, ".bashrc"), Path.Combine(env.MockHome, ".bash_profile") };
569var target = Path.Combine(env.TempDirectory, "actual");
570var selected = Path.Combine(env.TempDirectory, "selected");
571var outside = Path.Combine(env.TempDirectory, "outside");
580ln -s '{{Quote(outside)}}' '{{Quote(Path.Combine(target, "completions"))}}'
629var home = Path.Combine(env.MockHome, "it's $home ` [test]");
636_ => Path.Combine(home, ".bashrc")
640var completion = Path.Combine(dogfood ? home : Path.Combine(home, ".aspire"), "completions", $"aspire.{shell}");
697var cli = CreateFakeCli(outsideHome ? Path.Combine(env.TempDirectory, "custom install") : env.MockHome);
698var completion = Path.Combine(dogfood || outsideHome ? Path.GetDirectoryName(cli)! : Path.Combine(env.MockHome, ".aspire"), "completions", "aspire.bash");
701var profile = Path.Combine(env.MockHome, ".bashrc");
724Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
734var installRoot = Path.Combine(env.TempDirectory, "custom install");
736var outside = Path.Combine(installRoot, ".zshrc");
740File.CreateSymbolicLink(Path.Combine(env.MockHome, ".zshrc"), outside);
757Assert.False(Directory.Exists(Path.Combine(installRoot, "completions")));
772var installRoot = Path.Combine(env.TempDirectory, "it's $install ` [test]");
776"zsh" => Path.Combine(env.MockHome, ".zshrc"),
778_ => Path.Combine(env.MockHome, ".bashrc")
803Assert.False(Directory.Exists(Path.Combine(env.MockHome, ".aspire")));
804Assert.False(File.Exists(Path.Combine(env.MockHome, ".bash_profile")));
821var installRoot = Path.Combine(env.TempDirectory, "custom install");
823var profile = Path.Combine(env.MockHome, ".bashrc");
826var outside = Path.Combine(env.TempDirectory, "custom install-other");
828var sentinel = Path.Combine(outside, "aspire.bash");
830var completionDirectory = Path.Combine(installRoot, "completions");
831var completion = Path.Combine(completionDirectory, "aspire.bash");
845File.CreateSymbolicLink(completion, destination == "file-link" ? sentinel : Path.Combine(outside, "missing"));
866Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
877var cli = Path.Combine(installRoot, "aspire");
878var profile = Path.Combine(env.MockHome, ".bashrc");
907var profile = Path.Combine(env.MockHome, loginProfile);
927Assert.True(File.Exists(Path.Combine(env.MockHome, ".bashrc")));
935File.WriteAllText(Path.Combine(env.MockHome, ".bashrc"), "export ASPIRE_TEST_BASHRC_LOADED=true\n");
960var profile = Path.Combine(env.MockHome, ".bashrc");
977Assert.False(File.Exists(Path.Combine(env.MockHome, ".bash_profile")));
986var profile = Path.Combine(env.MockHome, ".bashrc");
1003Assert.False(File.Exists(Path.Combine(env.MockHome, ".bash_profile")));
1011var cli = Path.Combine(home, "fake aspire");
Scripts\PRScriptFunctionTests.cs (14)
89var pkgDir = Path.Combine(env.TempDirectory, "packages");
112var emptyDir = Path.Combine(env.TempDirectory, "empty-packages");
131var pkgDir = Path.Combine(env.TempDirectory, "packages");
153var pkgDir = Path.Combine(env.TempDirectory, "packages");
229var tempDir = Path.Combine(env.TempDirectory, "download-temp");
231File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
249var tempDir = Path.Combine(env.TempDirectory, "download-temp");
251File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
269var tempDir = Path.Combine(env.TempDirectory, "download-temp");
271File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
294var tempDir = Path.Combine(env.TempDirectory, "work");
318var tempDir = Path.Combine(env.TempDirectory, "work");
341var tempDir = Path.Combine(env.TempDirectory, "work");
372var configFile = Path.Combine(env.MockHome, ".zshrc");
Scripts\PRScriptInstallerModeTests.cs (67)
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");
66var manifestDir = Path.Combine(root, "installer-winget");
67var archiveRoot = Path.Combine(root, "installer-native-archives");
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");
103await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, $"aspire-cli-win-x64-{version}.zip"), $"stub-x64-{version}");
104await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, $"aspire-cli-win-arm64-{version}.zip"), $"stub-arm64-{version}");
111var mockBinDir = Path.Combine(env.TempDirectory, "mock-homebrew-bin");
112var brewRepository = Path.Combine(env.TempDirectory, "brew-repository");
113var brewPrefix = Path.Combine(env.TempDirectory, "brew-prefix");
114var brewLog = Path.Combine(env.TempDirectory, "brew.log");
115var codesignLog = Path.Combine(env.TempDirectory, "codesign.log");
121var brewPath = Path.Combine(mockBinDir, "brew");
198var curlPath = Path.Combine(mockBinDir, "curl");
206var codesignPath = Path.Combine(mockBinDir, "codesign");
239var mockBinDir = Path.Combine(env.TempDirectory, "mock-winget-bin");
240var wingetLog = Path.Combine(env.TempDirectory, "winget.log");
246var implPath = Path.Combine(mockBinDir, "winget-impl.ps1");
381var wingetCmd = Path.Combine(mockBinDir, "winget.cmd");
387var aspireCmd = Path.Combine(mockBinDir, "aspire.cmd");
400await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-arm64-13.3.0.tar.gz"), "fake arm64 archive");
401await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-x64-13.3.0.tar.gz"), "fake x64 archive");
411await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip"), "stub-x64-13.3.0");
412await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip"), "stub-arm64-13.3.0");
536var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact"));
575var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact"));
580var result = await cmd.ExecuteAsync(Path.Combine(localDir, "aspire.rb"));
592var caskPath = Path.Combine(env.TempDirectory, "aspire.rb");
611var archiveRoot = Path.Combine(env.TempDirectory, "archives");
621"--output-dir", Path.Combine(env.TempDirectory, "homebrew-output"),
628var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
633var codesignLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "codesign.log"));
644var archiveRoot = Path.Combine(env.TempDirectory, "archives");
654"--output-dir", Path.Combine(env.TempDirectory, "homebrew-output"),
658var codesignLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "codesign.log"));
660var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
670var archiveRoot = Path.Combine(env.TempDirectory, "archives");
673var outputDir = Path.Combine(env.TempDirectory, "homebrew-output");
686var cask = await File.ReadAllTextAsync(Path.Combine(outputDir, "aspire.rb"));
692Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-arm64-13.3.0.tar.gz"))).ToLowerInvariant(), cask);
693Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-x64-13.3.0.tar.gz"))).ToLowerInvariant(), cask);
695Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.sh")));
704var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
768var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
807var archiveRoot = Path.Combine(env.TempDirectory, "archives");
809var outputDir = Path.Combine(env.TempDirectory, "winget-output");
820var installerManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml"));
829var localeManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.locale.en-US.yaml"));
831Assert.True(File.Exists(Path.Combine(outputDir, "Microsoft.Aspire.yaml")));
832Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.ps1")));
841var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
849var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log"));
860var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
896var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log"));
901var originalInstaller = await File.ReadAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.installer.yaml"));
950var archiveRoot = Path.Combine(env.TempDirectory, "archives");
953var x64Zip = Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip");
954var arm64Zip = Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip");
958var outputDir = Path.Combine(env.TempDirectory, "winget-output");
969var installerYaml = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml"));
975var extractDir = Path.Combine(env.TempDirectory, $"extract-{Path.GetFileNameWithoutExtension(archive)}");
979var expected = Path.Combine(extractDir, rel.Replace('/', Path.DirectorySeparatorChar));
Scripts\PRScriptPowerShellTests.cs (13)
83Assert.False(Directory.Exists(Path.Combine(env.MockHome, ".aspire")));
115var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
129var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
143var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
156var customPath = Path.Combine(env.TempDirectory, "custom");
201var localDir = Path.Combine(env.TempDirectory, "local artifacts");
226var localDir = Path.Combine(env.TempDirectory, "raw-build");
229await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
309var customPath = Path.Combine(env.TempDirectory, "custom");
434var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
530var customPath = Path.Combine(env.TempDirectory, "custom-prefix");
615var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
638var aspireRoot = Path.Combine(env.MockHome, ".aspire");
Scripts\PRScriptPSFunctionTests.cs (20)
84var cliBinDir = Path.Combine(env.TempDirectory, "cli-bin");
85var existingPath = $"{cliBinDir}{Path.PathSeparator}{Path.Combine(env.TempDirectory, "other-bin")}";
86var githubPath = Path.Combine(env.TempDirectory, "github-path.txt");
116var pkgDir = Path.Combine(env.TempDirectory, "packages");
139var emptyDir = Path.Combine(env.TempDirectory, "empty-packages");
158var pkgDir = Path.Combine(env.TempDirectory, "packages");
180var pkgDir = Path.Combine(env.TempDirectory, "packages");
260var tempDir = Path.Combine(env.TempDirectory, "download-temp");
262File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
280var tempDir = Path.Combine(env.TempDirectory, "download-temp");
282File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
300var tempDir = Path.Combine(env.TempDirectory, "download-temp");
302File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
324var downloadDir = Path.Combine(env.TempDirectory, "cli-download");
326await File.WriteAllTextAsync(Path.Combine(downloadDir, "README.txt"), "no archive here");
328var binDir = Path.Combine(env.TempDirectory, "bin");
346var downloadDir = Path.Combine(env.TempDirectory, "cli-download");
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");
351var binDir = Path.Combine(env.TempDirectory, "bin");
Scripts\PRScriptShellTests.cs (11)
108var mockGhPath = Path.Combine(mockBinPath, "gh");
122var mockGhPath = Path.Combine(mockBinPath, "gh");
135var customPath = Path.Combine(env.TempDirectory, "custom");
161var localDir = Path.Combine(env.TempDirectory, "local artifacts");
186var localDir = Path.Combine(env.TempDirectory, "raw-build");
189await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
365var customPath = Path.Combine(env.TempDirectory, "custom");
512var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
597var customPath = Path.Combine(env.TempDirectory, "custom-prefix");
680var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
705var aspireRoot = Path.Combine(env.MockHome, ".aspire");
Scripts\PRScriptToolModeTests.cs (62)
49var mockBinDir = Path.Combine(env.TempDirectory, "mock-dotnet-bin");
53var dotnetScriptPath = Path.Combine(mockBinDir, isWindows ? "dotnet.cmd" : "dotnet");
170var localDir = Path.Combine(env.TempDirectory, "artifacts");
196var localDir = Path.Combine(env.TempDirectory, "artifacts");
216var localDir = Path.Combine(env.TempDirectory, "artifacts");
219var customPath = Path.Combine(env.TempDirectory, "custom");
229Assert.Contains($"Would install CLI archive to: {Path.Combine(customPath, "bin")}", result.Output);
325var localDir = Path.Combine(env.TempDirectory, "artifacts");
327var customPath = Path.Combine(env.TempDirectory, "custom");
337Assert.Contains($"dotnet tool install --tool-path {Path.Combine(customPath, "bin")} Aspire.Cli", result.Output);
346var localDir = Path.Combine(env.TempDirectory, "artifacts");
367var localDir = Path.Combine(env.TempDirectory, "artifacts");
387var localDir = Path.Combine(env.TempDirectory, "artifacts");
390var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
418var localDir = Path.Combine(env.TempDirectory, "artifacts");
421var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
446Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
455var localDir = Path.Combine(env.TempDirectory, "artifacts");
458var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
489var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
512Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
583var localDir = Path.Combine(env.TempDirectory, "artifacts");
585var customPath = Path.Combine(env.TempDirectory, "custom");
586var expectedToolPath = Path.Combine(customPath, "bin");
609var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
629var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
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");
653var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
657await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content");
676var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
698var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
752var localDir = Path.Combine(env.TempDirectory, "artifacts");
777var localDir = Path.Combine(env.TempDirectory, "artifacts");
796var localDir = Path.Combine(env.TempDirectory, "artifacts");
799var customPath = Path.Combine(env.TempDirectory, "custom");
808Assert.Contains($"Installing Aspire CLI to {Path.Combine(customPath, "bin")}", result.Output);
902var localDir = Path.Combine(env.TempDirectory, "artifacts");
904var customPath = Path.Combine(env.TempDirectory, "custom");
914Assert.Contains($"dotnet tool install --tool-path {Path.Combine(customPath, "bin")} Aspire.Cli", result.Output);
923var localDir = Path.Combine(env.TempDirectory, "artifacts");
944var localDir = Path.Combine(env.TempDirectory, "artifacts");
964var localDir = Path.Combine(env.TempDirectory, "artifacts");
967var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
994var localDir = Path.Combine(env.TempDirectory, "artifacts");
997var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
1022Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
1033var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
1056Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
1110var localDir = Path.Combine(env.TempDirectory, "artifacts");
1112var customPath = Path.Combine(env.TempDirectory, "custom");
1113var expectedToolPath = Path.Combine(customPath, "bin");
1136var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
1156var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
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");
1180var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
1183await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content");
1202var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
1224var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
Scripts\ReleaseScriptFunctionTests.cs (16)
305var destPath = Path.Combine(env.TempDirectory, "install-dest");
316Assert.True(File.Exists(Path.Combine(destPath, "aspire")),
326var destPath = Path.Combine(env.TempDirectory, "install-dest-zip");
337Assert.True(File.Exists(Path.Combine(destPath, "aspire.exe")),
437var cliPath = Path.Combine(env.TempDirectory, "aspire");
438var capturePath = Path.Combine(env.TempDirectory, "setup-args.txt");
513File.WriteAllText(Path.Combine(env.MockHome, ".bashrc"), "# existing config\n");
525var bashrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".bashrc"));
537File.WriteAllText(Path.Combine(env.MockHome, ".zshrc"), "# existing config\n");
549var zshrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".zshrc"));
563Path.Combine(env.MockHome, ".bashrc"),
576var bashrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".bashrc"));
609var mockBinDir = Path.Combine(env.TempDirectory, "mock-bin");
612var mockCurl = Path.Combine(mockBinDir, "curl");
646var mockBinDir = Path.Combine(env.TempDirectory, "mock-bin");
649var mockCurl = Path.Combine(mockBinDir, "curl");
Aspire.Cli.EndToEnd.Tests (355)
BundleSmokeTests.cs (13)
64var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
65var appHostDirectory = Path.Combine(projectRoot, $"{projectName}.AppHost");
66var appHostProjectPath = Path.Combine(appHostDirectory, $"{projectName}.AppHost.csproj");
67var appHostSourcePath = Path.Combine(appHostDirectory, "AppHost.cs");
68var argsOutputPath = Path.Combine(projectRoot, "apphost-args.txt");
129var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName);
130var appHostDirectory = Path.Combine(projectRoot, $"{ProjectName}.AppHost");
131var appHostProjectPath = Path.Combine(appHostDirectory, $"{ProjectName}.AppHost.csproj");
132var appHostSourcePath = Path.Combine(appHostDirectory, "AppHost.cs");
133var argsOutputPath = Path.Combine(projectRoot, "apphost-dnx-args.txt");
222var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
223var appHostSourcePath = Path.Combine(projectRoot, "apphost.cs");
224var argsOutputPath = Path.Combine(projectRoot, "apphost-file-args.txt");
CentralPackageManagementTests.cs (15)
44var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest");
45var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost");
46var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj");
47var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props");
66File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """
156var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest");
157var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost");
158var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj");
159var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props");
177File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """
279var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest");
280var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost");
281var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj");
282var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props");
297File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """
ChannelUpdateWorkflowTests.cs (9)
83var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
84var aspireConfigPath = Path.Combine(projectPath, "aspire.config.json");
113var appHostPath = Path.GetFullPath(Path.Combine(projectPath, appHostRelativePath));
256var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
267await RunStableChannelUpdateAndAssertChannelPreservedAsync(auto, counter, Path.Combine(projectPath, "aspire.config.json"));
297var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
307await RunStableChannelUpdateAndAssertChannelPreservedAsync(auto, counter, Path.Combine(projectPath, "aspire.config.json"));
339var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
353await RunStableChannelUpdateAndAssertChannelPreservedAsync(auto, counter, Path.Combine(projectPath, "aspire.config.json"));
CompletionTests.cs (11)
34await File.WriteAllTextAsync(Path.Combine(home.FullName, "globalsettings.json"), legacyConfig);
42var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
60Assert.Equal(string.Empty, await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "completion.stderr")));
61Assert.Equal(string.Empty, await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "suggestions.stderr")));
62Assert.Equal("completions\n", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "suggestions.txt")));
63Assert.Equal("complete -o default -F _aspire_complete aspire\n", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "registration.txt")));
66Assert.Equal(legacyConfig, await File.ReadAllTextAsync(Path.Combine(home.FullName, "globalsettings.json")));
89await File.WriteAllTextAsync(Path.Combine(fakeBin.FullName, "aspire"), ("""
110await File.ReadAllBytesAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-arguments.bin")));
111Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-executed")));
126await File.ReadAllBytesAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-arguments.bin")));
ConfigMigrationTests.cs (14)
45var aspireHomeDir = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home");
125var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
126var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
188var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
189var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
232var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
235Path.Combine(aspireHomeDir, "globalsettings.json"),
288var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
289var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
358var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
359var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
438var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
439var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
561var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
CSharpInitTests.cs (14)
28[Path.Combine(appDirectory.FullName, "package.json")] = """{"name":"existing-web","private":true}""",
29[Path.Combine(appDirectory.FullName, "Incidental.slnx")] = "<Solution />"
33existingFiles[Path.Combine(appDirectory.FullName, "aspire.config.json")] = """{"appHost":{"language":"typescript/nodejs"}}""";
66var errorOutput = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "init-error.txt"));
82var toolsDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "tools"));
83var projectPath = Path.Combine(toolsDirectory.FullName, "Incidental.csproj");
86[Path.Combine(workspace.WorkspaceRoot.FullName, "Incidental.sln")] = """
91[Path.Combine(toolsDirectory.FullName, "Incidental.slnx")] = """
124Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
125Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")));
126var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
141var description = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "resources.json")));
188var appHostCs = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
189var aspireConfigJson = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
EntityFrameworkCoreDeploymentTests.cs (8)
133var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName);
134var targetRuntimePath = Path.Combine(projectDirectory, ".aspire-e2e-rid");
153var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName);
154var appHostDirectory = Path.Combine(projectDirectory, $"{ProjectName}.AppHost");
155var apiDirectory = Path.Combine(projectDirectory, $"{ProjectName}.ApiService");
158Path.Combine(appHostDirectory, "AppHost.cs"),
209Path.Combine(apiDirectory, "Program.cs"),
247var apiProjectPath = Path.Combine(apiDirectory, $"{ProjectName}.ApiService.csproj");
Helpers\CliE2ETestHelpers.cs (9)
608if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
1114var configPath = Path.Combine(projectRoot, "aspire.config.json");
1144destDir = Path.Combine(destDir, label);
1147using var logWriter = new StreamWriter(Path.Combine(
1169var destFile = Path.Combine(destDir, captureFileName);
1181? Path.Combine(githubWorkspace, "testresults")
1182: Path.Combine(AppContext.BaseDirectory, "TestResults");
1195var destFile = Path.Combine(destDir, Path.GetFileName(file));
1213CopyDirectory(dir, Path.Combine(destDir, destDirName), log);
Helpers\CliInstallStrategyTests.cs (8)
503File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.25175.1.nupkg"), "");
504File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0-preview.1.25175.1.nupkg"), "");
800File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.12345.1.nupkg"), "");
822File.WriteAllText(Path.Combine(tempDir.FullName, $"Aspire.Cli.{version}.nupkg"), "");
840File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0.nupkg"), "");
858File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0.nupkg"), "");
859File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.4.0.nupkg"), "");
878File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0.nupkg"), "");
JavaScriptPublishTests.cs (9)
145var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
178var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
213var appDir = Path.Combine(workspace.WorkspaceRoot.FullName, appName);
220File.WriteAllText(Path.Combine(appDir, "package.json"), $$"""
235File.WriteAllText(Path.Combine(appDir, "yarn.lock"), $$"""
252File.WriteAllText(Path.Combine(appDir, "server.js"), $$"""
277File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "verify-runtime.sh"), $$"""
330File.Copy(file, Path.Combine(workspace.WorkspaceRoot.FullName, Path.GetFileName(file)));
336var targetDir = Path.Combine(workspace.WorkspaceRoot.FullName, Path.GetFileName(fixtureDir));
ProjectReferenceTests.cs (9)
48var configPath = Path.Combine(workDir, "aspire.config.json");
54var integrationDir = Path.Combine(workDir, "MyIntegration");
57File.WriteAllText(Path.Combine(integrationDir, "MyIntegration.csproj"), $$"""
72var aspireHome = Path.Combine(
74var hivesDir = Path.Combine(aspireHome, "hives");
81var packagesDir = Path.Combine(hiveDir, "packages");
97File.WriteAllText(Path.Combine(workDir, "nuget.config"), nugetConfig);
100File.WriteAllText(Path.Combine(integrationDir, "MyIntegrationExtensions.cs"), """
133File.WriteAllText(Path.Combine(workDir, "apphost.mts"), """
RepositoryToolUpdateTests.cs (11)
42var repositoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "repository");
44var npmManifestPath = Path.Combine(repositoryPath, "package.json");
45var probeDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "package-manager-probes");
46var invocationLogPath = Path.Combine(workspace.WorkspaceRoot.FullName, "package-manager-invocations.log");
49Directory.CreateDirectory(Path.Combine(repositoryPath, ".git"));
108await File.WriteAllBytesAsync(Path.Combine(repositoryPath, name), bytes, cancellationToken);
131Path.Combine(probeDirectory, tool),
217Assert.Equal(bytes, await File.ReadAllBytesAsync(Path.Combine(repositoryPath, name), cancellationToken));
223Assert.False(File.Exists(Path.Combine(repositoryPath, "lifecycle-ran")));
224Assert.False(Directory.Exists(Path.Combine(repositoryPath, "node_modules")));
225Assert.False(File.Exists(Path.Combine(repositoryPath, "aspire.config.json")));
TypeScriptEmptyAppHostTemplateTests.cs (9)
37var appDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TsEmptyApp");
40var appHostPath = Path.Combine(appDirectory, "apphost.mts");
92var appDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TsDeadlockRepro");
106var extensionDirectory = Directory.CreateDirectory(Path.Combine(appDirectory, "DeadlockExtension"));
108File.WriteAllText(Path.Combine(extensionDirectory.FullName, "DeadlockExtension.csproj"), $$"""
123File.WriteAllText(Path.Combine(extensionDirectory.FullName, "DeadlockExtensions.cs"), """
163File.WriteAllText(Path.Combine(appDirectory, "apphost.mts"), """
177var configPath = Path.Combine(appDirectory, "aspire.config.json");
189var configPath = Path.Combine(appDirectory, "aspire.config.json");
TypeScriptLegacyAppHostTests.cs (9)
108var mtsPath = Path.Combine(projectRoot, "apphost.mts");
123File.WriteAllText(Path.Combine(projectRoot, "apphost.ts"), """
135var configPath = Path.Combine(projectRoot, "aspire.config.json");
146File.WriteAllText(Path.Combine(projectRoot, "tsconfig.apphost.json"), """
172var legacyModulesDir = Path.Combine(projectRoot, ".modules");
191var filePath = Path.Combine(legacyModulesDir, expectedFile);
218var filePath = Path.Combine(legacyModulesDir, unexpectedFile);
230var aspireTs = File.ReadAllText(Path.Combine(legacyModulesDir, "aspire.ts"));
235$"File path: {Path.Combine(legacyModulesDir, "aspire.ts")}.");
TypeScriptMigrateAppHostTests.cs (11)
98var mtsPath = Path.Combine(projectRoot, "apphost.mts");
112File.WriteAllText(Path.Combine(projectRoot, "apphost.ts"), """
122var configPath = Path.Combine(projectRoot, "aspire.config.json");
130File.WriteAllText(Path.Combine(projectRoot, "tsconfig.apphost.json"), """
157var legacyAppHost = Path.Combine(projectRoot, "apphost.ts");
165var modernAppHost = Path.Combine(projectRoot, "apphost.mts");
181var legacyModulesDir = Path.Combine(projectRoot, ".modules");
198var filePath = Path.Combine(modernModulesDir, expectedFile);
206var aspireMts = File.ReadAllText(Path.Combine(modernModulesDir, "aspire.mts"));
211$"File path: {Path.Combine(modernModulesDir, "aspire.mts")}.");
215var tsconfig = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "tsconfig.apphost.json")))!.AsObject();
TypeScriptPolyglotTests.cs (25)
82var viteProjectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "viteapp");
98var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
121var appHostLockFilePath = Path.Combine(
128var viteLockFilePath = Path.Combine(
197var viteProjectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "viteapp");
208var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
227var appHostLockFilePath = Path.Combine(
234var guestLockFilePath = Path.Combine(
283var lockFilePath = Path.Combine(
352var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
360var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
361var restartCountPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".deno-watch-restart-count");
426Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"),
448var packageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "package.json")))!.AsObject();
454originalTsConfig = File.ReadAllText(Path.Combine(projectRoot, "tsconfig.json"));
456File.WriteAllText(Path.Combine(projectRoot, "package.json"), packageJson.ToJsonString(new JsonSerializerOptions { WriteIndented = true }));
479packageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "package.json")))!.AsObject();
496Assert.Equal(originalTsConfig, File.ReadAllText(Path.Combine(projectRoot, "tsconfig.json")));
497Assert.False(File.Exists(Path.Combine(projectRoot, "tsconfig.apphost.json")));
498Assert.False(File.Exists(Path.Combine(projectRoot, "apphost.mts")));
500var appHostDirectory = Path.Combine(projectRoot, "aspire-apphost");
501var appHostPath = Path.Combine(appHostDirectory, "apphost.mts");
504var appHostPackageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(appHostDirectory, "package.json")))!.AsObject();
516Assert.True(File.Exists(Path.Combine(appHostDirectory, "tsconfig.apphost.json")));
519var configPath = Path.Combine(projectRoot, "aspire.config.json");
TypeScriptPublishTests.cs (9)
62var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
147var artifactsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "artifacts");
148var composeContent = await File.ReadAllTextAsync(Path.Combine(artifactsPath, "docker-compose.yaml"));
238var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
313var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
354var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
387Path.Combine(s_jsPublishFixturesDir, fixtureName),
388Path.Combine(workspace.WorkspaceRoot.FullName, fixtureName));
394var dockerfilePath = Path.Combine(artifactsPath, $"{resourceName}.Dockerfile");
TypeScriptReusablePackageTests.cs (11)
31var appDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "app"));
44var appAppHostPath = Path.Combine(appDirectory.FullName, "apphost.mts");
57var helperAppHostPath = Path.Combine(helperDirectory.FullName, "apphost.mts");
71Assert.Contains("addRedis", File.ReadAllText(Path.Combine(helperModulesDirectory, "aspire.mts")));
93var configPath = Path.Combine(appDirectory.FullName, "aspire.config.json");
101File.WriteAllText(Path.Combine(appDirectory.FullName, "apphost.mts"), """
113File.WriteAllText(Path.Combine(appDirectory.FullName, "tsconfig.json"), """
141File.WriteAllText(Path.Combine(helperDirectory.FullName, "aspire.config.json"), $$"""
155File.WriteAllText(Path.Combine(helperDirectory.FullName, "package.json"), """
171File.WriteAllText(Path.Combine(helperDirectory.FullName, "tsconfig.json"), """
194File.WriteAllText(Path.Combine(helperSourceDirectory.FullName, "index.ts"), """
Aspire.Cli.Tests (2639)
Acquisition\InstallationDiscoveryDiscoverAllTests.cs (27)
39var pathDir = Path.Combine(workspace.WorkspaceRoot.FullName, "no-sidecar-bin");
55var expectedSidecarPath = Path.Combine(pathDir, InstallSidecarReader.SidecarFileName);
69var pathDir = Path.Combine(workspace.WorkspaceRoot.FullName, "unreadable-bin");
72var sidecarPath = Path.Combine(pathDir, InstallSidecarReader.SidecarFileName);
101var pathDir = Path.Combine(workspace.WorkspaceRoot.FullName, "malformed-bin");
104var sidecarPath = Path.Combine(pathDir, InstallSidecarReader.SidecarFileName);
131File.WriteAllText(Path.Combine(binDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"script\"}");
163var firstPathDir = Path.Combine(workspace.WorkspaceRoot.FullName, "path-first");
164var secondPathDir = Path.Combine(workspace.WorkspaceRoot.FullName, "path-second");
279File.WriteAllText(Path.Combine(prDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"pr\"}");
303File.WriteAllText(Path.Combine(binDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"script\"}");
322var binDir = Path.Combine(workspace.WorkspaceRoot.FullName, hasInstallMetadata ? "metadata-bin" : "no-metadata-bin");
328File.WriteAllText(Path.Combine(binDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"script\"}");
369File.WriteAllText(Path.Combine(prDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"pr\"}");
403File.WriteAllText(Path.Combine(prDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"pr\"}");
438File.WriteAllText(Path.Combine(brewDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"brew\"}");
474File.WriteAllText(Path.Combine(brewDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"brew\"}");
574var pathDir = Path.Combine(workspace.WorkspaceRoot.FullName, "no-sidecar-bin");
765File.WriteAllText(Path.Combine(releaseBinDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"script\"}");
792var releaseBinDir = Path.Combine(aspireHome.FullName, "bin");
795File.WriteAllText(Path.Combine(releaseBinDir, InstallSidecarReader.SidecarFileName), "{\"source\":\"localhive\"}");
815logFilePath: Path.Combine(root.FullName, "test.log"),
847var binDir = Path.Combine(workspace.WorkspaceRoot.FullName, "firmlink-self-bin");
922var binDir = Path.Combine(workspace.WorkspaceRoot.FullName, "hint-bin");
996logFilePath: Path.Combine(root.FullName, "test.log"),
1009var path = Path.Combine(dir, name);
1027File.WriteAllText(Path.Combine(dir, InstallSidecarReader.SidecarFileName), $"{{\"source\":\"{source}\"}}");
Agents\AspireSkillsBundleTests.cs (15)
47Assert.Contains(files, file => file.RelativePath == Path.Combine("references", "app-commands.md"));
48Assert.DoesNotContain(files, file => file.RelativePath == Path.Combine("evals", "evals.json"));
145var skillPath = Path.Combine(skillDirectory, "SKILL.md");
189await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), CreateSkillFileContent());
232await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), "{");
557var skillPath = Path.Combine(skillDirectory, "SKILL.md");
609var archivePath = Path.Combine(rootDirectory, "bundle.zip");
620new DirectoryInfo(Path.Combine(rootDirectory, "staged")),
638var skillPath = Path.Combine(skillDirectory, "SKILL.md");
663await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
684var skillPath = Path.Combine(skillDirectory, "SKILL.md");
842var fullPath = Path.Combine(skillDirectory, AspireSkillsBundleProvider.NormalizeRelativePath(relativePath));
862Sha512 = hashOverride ?? ComputeSha512(Path.Combine(skillDirectory, AspireSkillsBundleProvider.NormalizeRelativePath(file.Key)))
885await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), content);
908return File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
Agents\AspireSkillsInstallerTests.cs (53)
88var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
110var cacheLockPath = Path.Combine(cacheRoot, $".{AspireSkillsInstaller.Version}.lock");
232Assert.True(File.Exists(Path.Combine(
285Assert.False(File.Exists(Path.Combine(
348await File.ReadAllTextAsync(Path.Combine(
353await File.ReadAllTextAsync(Path.Combine(
410await File.ReadAllTextAsync(Path.Combine(
460Assert.False(File.Exists(Path.Combine(cachedBundleDirectory, "skill-manifest.json")));
461Assert.False(Directory.Exists(Path.Combine(cachedBundleDirectory, "skills")));
467await File.ReadAllTextAsync(Path.Combine(
490await File.WriteAllTextAsync(Path.Combine(cachedBundleDirectory, "skill-manifest.json"), "{");
523Directory.CreateDirectory(Path.Combine(cachedBundleDirectory, ".lastused"));
564Path.Combine(staleCacheDirectory, ".lastused"),
595var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
596var staleVersionDirectory = Path.Combine(cacheRoot, "9.9.9");
640var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
641var staleVersionDirectory = Path.Combine(cacheRoot, "9.9.9");
643var staleCacheDirectory = Path.Combine(staleVersionDirectory, staleArchiveSha512);
687var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
720var staleVersionLockPath = Path.Combine(cacheRoot, $".{staleVersion}.lock");
756var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
764var staleVersionLockPath = Path.Combine(cacheRoot, $".{staleVersion}.lock");
900var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
903Path.Combine(cacheRoot, $".{AspireSkillsInstaller.Version}.lock"),
947var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
954var staleDirectory = Directory.CreateDirectory(Path.Combine(cacheRoot, $"{prefix}stale")).FullName;
957recentDirectories.Add(Directory.CreateDirectory(Path.Combine(cacheRoot, $"{prefix}recent")).FullName);
1019var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
1426Assert.Equal(Path.Combine("references", "compatibility-and-validation.md"), compatibilityReference.RelativePath);
1431Assert.Equal(Path.Combine("references", "migration-patterns.md"), migrationPatternsReference.RelativePath);
1448var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1481var stageDirectory = new DirectoryInfo(Path.Combine(rootDirectory, ".stage-test"));
1482var targetDirectory = Path.Combine(rootDirectory, "cached");
1493Assert.True(File.Exists(Path.Combine(targetDirectory, "skill-manifest.json")));
1509var archivePath = Path.Combine(rootDirectory, "bundle.tgz");
1514var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1539var archivePath = Path.Combine(rootDirectory, "bundle.tgz");
1543var bundleDirectory = Path.Combine(rootDirectory, "bundle");
1568var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1642await File.ReadAllTextAsync(Path.Combine(
1647await File.ReadAllTextAsync(Path.Combine(
1809Assert.False(File.Exists(Path.Combine(
2047var skillPath = Path.Combine(skillDirectory, "SKILL.md");
2081await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
2085await File.WriteAllTextAsync(Path.Combine(bundleDirectory, AspireSkillsInstaller.ArchiveSha512FileName), archiveSha512);
2091Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubArchiveSha256FileName),
2098Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubAttestationVerifiedFileName),
2106Path.Combine(cacheDirectory, ".lastused"),
2130var bundleDirectory = Path.Combine(rootDirectory, $"aspire-skills-v{AspireSkillsInstaller.Version}");
2135Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubAttestationVerifiedFileName),
2140await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), "{");
2187return Path.Combine(
2316var archivePath = Path.Combine(bundleDirectory.FullName, $".test-embedded-{Guid.NewGuid():N}.tgz");
Agents\CopilotAppInstallationDetectorTests.cs (7)
19Path.Combine(appDirectory.FullName, "github.exe"),
26var executablePath = Path.Combine(appDirectory.FullName, "github.exe");
63Path.Combine(applicationsDirectory.FullName, "github-copilot.desktop"),
70var desktopEntryPath = Path.Combine(applicationsDirectory.FullName, "github-copilot.desktop");
113Path.Combine(dataHome.FullName, "applications"),
114Path.Combine(firstDataDirectory.FullName, "applications"),
115Path.Combine(secondDataDirectory.FullName, "applications"),
Agents\PlaywrightCliInstallerTests.cs (49)
20var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
91var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
192var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
194var tarballPath = Path.Combine(tempDir, "package.tgz");
240var tarballPath = Path.Combine(tempDir, "package.tgz");
283var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
285var tarballPath = Path.Combine(tempDir, "package.tgz");
327var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
329var tarballPath = Path.Combine(tempDir, "package.tgz");
376var tempPath = Path.Combine(tempDir, "package.tgz");
468var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
470var tarballPath = Path.Combine(tempDir, "package.tgz");
622var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-mirror-test-{Guid.NewGuid():N}");
637File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill");
638Directory.CreateDirectory(Path.Combine(skillDir, "subdir"));
654Path.Combine(".claude", "skills"),
655Path.Combine(".agents", "skills"),
656Path.Combine(".github", "skills")
681var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-sync-test-{Guid.NewGuid():N}");
682var sourceDir = Path.Combine(tempDir, "source");
683var targetDir = Path.Combine(tempDir, "target");
689File.WriteAllText(Path.Combine(sourceDir, "keep.md"), "keep");
693File.WriteAllText(Path.Combine(targetDir, "keep.md"), "old content");
694File.WriteAllText(Path.Combine(targetDir, "stale.md"), "should be removed");
695Directory.CreateDirectory(Path.Combine(targetDir, "stale-dir"));
701Assert.Equal("keep", File.ReadAllText(Path.Combine(targetDir, "keep.md")));
704Assert.False(File.Exists(Path.Combine(targetDir, "stale.md")));
705Assert.False(Directory.Exists(Path.Combine(targetDir, "stale-dir")));
719var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-cleanup-test-{Guid.NewGuid():N}");
734File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill");
750Path.Combine(".agents", "skills")
772var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-preexist-test-{Guid.NewGuid():N}");
780await File.WriteAllTextAsync(Path.Combine(preExistingDir, "SKILL.md"), "# User's existing skill");
801Path.Combine(".agents", "skills")
820var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-emptydir-test-{Guid.NewGuid():N}");
835File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill");
850Path.Combine(".agents", "skills")
857Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude")));
871var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
885Path.Combine(".claude", "skills"));
888Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude")));
903var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
917Path.Combine(".claude", "skills"));
935var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
951Assert.False(Directory.Exists(Path.Combine(tempDir, ".agents")));
967var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
983Path.Combine("a", "b"));
990Assert.True(Directory.Exists(Path.Combine(tempDir, "a")));
1024PackResult = Path.Combine(outputDirectory, "package.tgz");
Agents\TelemetryHookConfiguratorTests.cs (17)
74Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot")));
122var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
123var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
161var claude = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
162await File.WriteAllTextAsync(Path.Combine(claude.FullName, "settings.json"),
182var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
183var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
204var claude = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
209: Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
214["args"] = new JsonArray(Path.Combine(workspace.Path, assemblyName), "agent", "telemetry", "--hook")
227await File.WriteAllTextAsync(Path.Combine(claude.FullName, "settings.json"), settings.ToJsonString());
247var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
248var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
264var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
265var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
294Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot")));
295Assert.False(Directory.Exists(Path.Combine(home.FullName, ".claude")));
Backchannel\AppHostConnectionResolverTests.cs (11)
56string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")),
87string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")),
288var realProjectFile = new FileInfo(Path.Combine(realDirectory.FullName, "TestAppHost.csproj"));
292var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
294var projectFileViaSymlink = new FileInfo(Path.Combine(symlinkDirectory, "TestAppHost.csproj"));
331var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "TestAppHost.csproj"));
377Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
488Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
547var commonGitDirectory = Path.Combine(primaryCheckout.FullName, ".git");
557var projectFile = new FileInfo(Path.Combine(directory.FullName, fileName));
577var socketPath = Path.Combine(
Backchannel\AuxiliaryBackchannelMonitorTests.cs (17)
30var realDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "real"));
31var symlinkDirectory = Path.Combine(tempRoot.FullName, "link");
35var appHostPathViaReal = Path.Combine(realDirectory.FullName, "apphost.cs");
39var appHostPathViaSymlink = Path.Combine(symlinkDirectory, "apphost.cs");
54var workingDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "wd")).FullName;
79Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
81TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
83var primaryAppHost = Path.Combine(primaryRoot, "AppHost.csproj");
84var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj");
104Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
110var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
126Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
128var adminDirectory = TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
131var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
289var appHostId = BackchannelConstants.ComputeAppHostId(Path.Combine(homeDirectory.FullName, "MyApp.AppHost.csproj"));
290var socketPath = Path.Combine(backchannelsDirectory, $"{appHostId}a1b2C3d4.{Environment.ProcessId}");
322logFilePath: Path.Combine(homeDirectory.FullName, "test.log"),
Backchannel\BackchannelConstantsTests.cs (21)
16var homeDirectory = Path.Combine(Path.GetTempPath(), "testuser");
252var socket1 = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
253var socket2 = Path.Combine(backchannelsDir, $"{appHostId}Z9y8X7w6.67890");
257var otherSocket = Path.Combine(backchannelsDir, "differentId1a1b2C3d4.99999");
279var oldFormatSocket = Path.Combine(legacyBackchannelsDir, $"auxi.sock.{hash}");
282var legacyPidSocket = Path.Combine(legacyBackchannelsDir, $"auxi.sock.{hash}.12345");
306var badSeparator = Path.Combine(backchannelsDir, $"{appHostId}AbCdEfGhX12345");
310var badPid = Path.Combine(backchannelsDir, $"{appHostId}AbCdEfGh.notapid");
329var otherSocket = Path.Combine(backchannelsDir, "differentId1a1b2C3d4.99999");
355var orphanedSocket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.{deadPid}");
356var liveSocket = Path.Combine(backchannelsDir, $"{appHostId}Z9y8X7w6.{currentPid}");
357var pidlessSocket = Path.Combine(backchannelsDir, appHostId);
386var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
389var projectFileViaSymlink = Path.Combine(symlinkDirectory, "TestAppHost.csproj");
409var socketPath = Path.Combine(backchannelsDirectory, $"{appHostId}A{index:D7}.{currentPid}");
438var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
441var realProjectPath = Path.Combine(realDirectory.FullName, "TestAppHost.csproj");
443var projectFileViaSymlink = Path.Combine(symlinkDirectory, "TestAppHost.csproj");
524var socket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
555var socket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
585var legacySocket = Path.Combine(backchannelsDir, $"auxi.sock.{legacyHash}.a1b2c3d4e5f6.99999");
BundleServiceComputeDefaultExtractDirTests.cs (17)
32var prefixDir = Path.Combine(workspace.Path, "aspire");
33var binDir = Path.Combine(prefixDir, "bin");
36var binaryPath = Path.Combine(binDir, ExeName("aspire"));
38File.WriteAllText(Path.Combine(binDir, SidecarFileName), $"{{\"source\":\"{source}\"}}");
56var binDir = Path.Combine(prDir, "bin");
59var binaryPath = Path.Combine(binDir, ExeName("aspire"));
61File.WriteAllText(Path.Combine(binDir, SidecarFileName), "{\"source\":\"pr\"}");
79var binaryPath = Path.Combine(installDir, "aspire.exe");
81File.WriteAllText(Path.Combine(installDir, SidecarFileName), "{\"source\":\"winget\"}");
105var cellarBinary = Path.Combine(cellarDir, "aspire");
107File.WriteAllText(Path.Combine(cellarDir, SidecarFileName), "{\"source\":\"brew\"}");
109var brewBinDir = Path.Combine(workspace.Path, "bin");
111var symlinkPath = Path.Combine(brewBinDir, "aspire");
144var binaryPath = Path.Combine(ridDir, ExeName("aspire"));
146File.WriteAllText(Path.Combine(ridDir, SidecarFileName), "{\"source\":\"dotnet-tool\"}");
161var binDir = Path.Combine(prefixDir, "bin");
164var binaryPath = Path.Combine(binDir, ExeName("aspire"));
BundleServiceIntegrationTests.cs (48)
49var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
55var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
161var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
209var v1BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v1", "cli-v1");
210var v2BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v2", "cli-v2-longer");
223var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
264var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
268Directory.CreateDirectory(Path.Combine(versionsDir, "stale-aaaaaaaaaaaaaaaa"));
269Directory.CreateDirectory(Path.Combine(versionsDir, $"stale{BundleService.TempSuffixPrefix}deadbeef"));
270Directory.CreateDirectory(Path.Combine(versionsDir, $"stale{BundleService.BadSuffixPrefix}99999"));
305Assert.False(Directory.Exists(Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)));
314var destinationPath = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
315var lockedFilePath = Path.Combine(sourcePath, "locked.dll");
344var binDir = Path.Combine(layoutRoot, ".fake-bins");
352File.WriteAllText(Path.Combine(binDir, ".aspire-install.json"), "{\"source\":\"script\"}");
358var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
393var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
394var staleVersionDir = Path.Combine(versionsDir, "stale-version");
408var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
409var staleVersionDir = Path.Combine(versionsDir, "stale-version");
410var leasesDir = Path.Combine(staleVersionDir, BundleVersionLease.LeasesDirectoryName);
412File.WriteAllText(Path.Combine(leasesDir, "orphan.lease"), "{}");
429var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
430var staleVersionDir = Path.Combine(versionsDir, "stale-version");
431var leasesDir = Path.Combine(staleVersionDir, BundleVersionLease.LeasesDirectoryName);
433File.WriteAllText(Path.Combine(leasesDir, "unknown.lease"), "{}");
489File.WriteAllText(Path.Combine(ridDir, ".aspire-install.json"), "{\"source\":\"dotnet-tool\"}");
497var bundleLink = Path.Combine(ridDir, BundleDiscovery.BundleDirectoryName);
563var bundleLink = Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName);
574Directory.Exists(Path.Combine(binaryDir, BundleDiscovery.BundleDirectoryName)),
577Directory.Exists(Path.Combine(Path.GetDirectoryName(binaryDir)!, BundleDiscovery.BundleDirectoryName)),
583var versionsDir = Path.Combine(aspireHome, BundleService.VersionsDirectoryName);
624Assert.True(Directory.Exists(Path.Combine(dest, BundleDiscovery.DcpDirectoryName)));
639var v1BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v1", "cli-v1");
640var v2BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v2", "cli-v2-longer");
648var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
756var linkPath = Path.Combine(layoutRoot, dir);
776var path = Path.Combine(directory, name);
789var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
790var managedDir = Path.Combine(bundleDir, BundleDiscovery.ManagedDirectoryName);
791var dcpDir = Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName);
793var managedExe = Path.Combine(managedDir, managedExeName);
806Managed = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName),
807Dashboard = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DashboardDirectoryName),
808Dcp = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName),
815var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
820LayoutComponent.Dashboard => Path.Combine(bundleDir, BundleDiscovery.DashboardDirectoryName),
821LayoutComponent.Dcp => Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName),
BundleServiceTests.cs (23)
77var processPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
147var dashboardDir = Path.Combine(dir, BundleDiscovery.DashboardDirectoryName);
148var dashboardExe = Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
162File.WriteAllText(Path.Combine(frameworkDir, "blazor.web.js"), "blazor");
164File.WriteAllText(Path.Combine(dashboardDir, sqliteLibraryName), "sqlite");
205var frameworkDir = Path.Combine(wwwrootDir, "_framework");
206var blazorScript = Path.Combine(frameworkDir, "blazor.web.js");
235Directory.Delete(Path.Combine(dir, BundleDiscovery.DcpDirectoryName), recursive: true);
246File.Delete(BundleDiscovery.GetDcpExecutablePath(Path.Combine(dir, BundleDiscovery.DcpDirectoryName)));
283var versionsRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
287Directory.CreateDirectory(Path.Combine(versionsRoot, active));
288Directory.CreateDirectory(Path.Combine(versionsRoot, "stale-bbbbbbbbbbbbbbbb"));
289Directory.CreateDirectory(Path.Combine(versionsRoot, $"active{BundleService.TempSuffixPrefix}deadbeef"));
290Directory.CreateDirectory(Path.Combine(versionsRoot, $"active{BundleService.BadSuffixPrefix}99999"));
294Assert.True(Directory.Exists(Path.Combine(versionsRoot, active)));
311Directory.CreateDirectory(Path.Combine(dir, BundleDiscovery.BundleDirectoryName));
318var managedDir = Path.Combine(root, BundleDiscovery.ManagedDirectoryName);
321Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
324var dashboardDir = Path.Combine(root, BundleDiscovery.DashboardDirectoryName);
327Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
331File.WriteAllText(Path.Combine(frameworkDir, "blazor.web.js"), "blazor");
334File.WriteAllText(Path.Combine(dashboardDir, sqliteLibraryName), "sqlite");
336var dcpDir = Path.Combine(root, BundleDiscovery.DcpDirectoryName);
Caching\AppHostInfoDiskCacheTests.cs (30)
36var path = Path.Combine(workspace.WorkspaceRoot.FullName, name);
170var objDir = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "obj"));
171var assetsPath = Path.Combine(objDir.FullName, "project.assets.json");
189File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"), "<Project />");
199File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
289var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
296var commonProps = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Common.props");
353var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
364var sharedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "shared"));
365var sharedProps = Path.Combine(sharedDirectory.FullName, "Directory.Build.props");
390var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
398var sharedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "shared"));
399var sharedProps = Path.Combine(sharedDirectory.FullName, "Directory.Build.props");
423var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
448var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
477var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
484File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Common"), "");
485var commonProps = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Common.props");
557var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
562File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"), """
593var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
600File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Repo.marker"), "");
601var customProps = Path.Combine(workspace.WorkspaceRoot.FullName, "Custom.props");
725projectDir = Directory.CreateDirectory(Path.Combine(projectDir, $"level-{i}")).FullName;
728var projectFile = new FileInfo(Path.Combine(projectDir, "Deep.AppHost.csproj"));
732File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"), "<Project />");
743var parentImport = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props");
746var repoRoot = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "worktree-root"));
748Path.Combine(repoRoot.FullName, ".git"),
752var projectFile = new FileInfo(Path.Combine(projectDir.FullName, "AppHost.csproj"));
Certificates\UnixCertificateManagerTests.cs (21)
212var missingProfileDirectory = Path.Combine(homeDirectory.FullName, "missing-profile");
247var missingProfileDirectory = Path.Combine(homeDirectory.FullName, "missing-profile");
360var certificatePath = Path.Combine(homeDirectory.FullName, "certificate with spaces.pem");
386var certificatePath = Path.Combine(homeDirectory.FullName, "certificate with spaces.pem");
407var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb"));
408var parentPidFile = Path.Combine(tempDirectory.FullName, "certutil-parent.pid");
409var childPidFile = Path.Combine(tempDirectory.FullName, "certutil-child.pid");
458var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb"));
499["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"),
501["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db")
507var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{certificate.Thumbprint}.pem");
534["PATH"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-tools"),
536["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-nss-db")
543File.WriteAllText(Path.Combine(corruptOpenSslDirectory.FullName, certificateFileName), "not a certificate");
544File.WriteAllText(Path.Combine(validOpenSslDirectory.FullName, certificateFileName), certificate.ExportCertificatePem());
569["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"),
570["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db"),
578var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{savedCertificate.Thumbprint}.pem");
604["PATH"] = Path.Combine(nssDbDirectory.FullName, "missing-certutil"),
631var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil"));
655var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil"));
CliBootstrapTests.cs (14)
140File.WriteAllText(Path.Combine(aspireHome.FullName, AspireConfigFile.FileName), globalConfig);
175var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
180Assert.Equal(Path.Combine(installPrefix, "logs"), loggingOptions.LogsDirectory);
188var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
191var logsDirectory = Path.Combine(installPrefix, "logs");
192var logFilePath = Path.Combine(logsDirectory, "aspire.log");
209Assert.Equal(Path.Combine(installPrefix, "hives"), context.HivesDirectory.FullName);
210Assert.Equal(Path.Combine(installPrefix, "cache"), context.CacheDirectory.FullName);
211Assert.Equal(Path.Combine(installPrefix, "sdks"), context.SdksDirectory.FullName);
212Assert.Equal(Path.Combine(installPrefix, "packages"), context.PackagesDirectory?.FullName);
238logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"),
260logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"),
317var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
320File.WriteAllText(Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName), $$"""{"source":"{{source}}"{{channelField}}}""");
CliExecutionContextTests.cs (10)
13var hivesDir = new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "hives"));
14var cacheDir = new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "cache"));
15var sdksDir = new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "sdks"));
16var logsDir = new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "logs"));
23var cacheDir = new DirectoryInfo(Path.Combine(workingDir.FullName, "cache"));
24var sdksDir = new DirectoryInfo(Path.Combine(workingDir.FullName, "sdks"));
25var logsDir = new DirectoryInfo(Path.Combine(workingDir.FullName, "logs"));
66var nonexistentHives = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "no-hives-here"));
109File.WriteAllText(Path.Combine(hivesDir.FullName, "README.md"), "stray");
110File.WriteAllText(Path.Combine(hivesDir.FullName, ".DS_Store"), string.Empty);
Commands\AddCommandTests.cs (41)
388var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
390File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
461var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
463File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
542var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
544File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
641var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
645File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), $$"""
724var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
725var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.ts"));
727File.WriteAllText(Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), """
769var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
842var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
844File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
2490var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, isTypeScript ? "apphost.ts" : "AppHost.csproj"));
2495File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), $$"""
2599var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
2601File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
2814File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty);
2815File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty);
2852File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty);
2853File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty);
2855File.WriteAllText(Path.Combine(prPackagesDir.FullName, $"Aspire.Hosting.{staleVersion}.nupkg"), string.Empty);
2856File.WriteAllText(Path.Combine(prPackagesDir.FullName, $"Aspire.Hosting.Redis.{staleVersion}.nupkg"), string.Empty);
2882File.WriteAllText(Path.Combine(identityPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty);
2883File.WriteAllText(Path.Combine(identityPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty);
3010var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3060var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3110var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3164var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3212var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3260var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3308var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3360var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3411var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3469var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3541var hivesDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "hives"));
3542var cacheDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "cache"));
3543var sdksDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "sdks"));
3544var logsDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "logs"));
3552Path.Combine(logsDirectory.FullName, "test.log"),
Commands\AgentInitCommandTests.cs (35)
102var blockedSkillParentPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".agents");
163Path.Combine(".agents", "skills"),
164Path.Combine(".claude", "skills"),
165Path.Combine(".github", "skills"),
166Path.Combine(".opencode", "skill")
386AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
387AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".claude", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
388AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".github", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
389AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".opencode", "skill"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
417Path.Combine("references", "compatibility-and-validation.md"),
418Path.Combine("references", "migration-patterns.md")
443await File.ReadAllTextAsync(Path.Combine(skillDirectory, file.RelativePath), TestContext.Current.CancellationToken).DefaultTimeout());
533var agentsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".agents");
570AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireSkillName);
571AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireDeploymentSkillName);
572AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireInitSkillName);
573AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
574AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireOrchestrationSkillName);
575AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireProjectV2MigrationSkillName);
576AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireifySkillName);
615AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), skillName);
637AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireOrchestrationSkillName);
673AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireSkillName);
674AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireDeploymentSkillName);
675AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireInitSkillName);
676AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
677AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireOrchestrationSkillName);
678AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireProjectV2MigrationSkillName);
679AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireifySkillName);
774AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireifySkillName);
775AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireProjectV2MigrationSkillName);
917AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireSkillName);
932var bundleDirectory = new DirectoryInfo(Path.Combine(workspaceRoot.FullName, $".test-aspire-skills-bundle-{Guid.NewGuid():N}"));
940var skillPath = Path.Combine(skillDirectory, "SKILL.md");
977var manifestPath = Path.Combine(bundleDirectory.FullName, "skill-manifest.json");
Commands\AppHostLauncherTests.cs (10)
60var logsDirectory = Path.Combine(Path.GetTempPath(), "aspire-cli-tests");
1061var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1089var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1112var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1174var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1324var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1330var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
1332locatedAppHostFile = new FileInfo(Path.Combine(linkPath, "AppHost.csproj"));
1341Path.Combine(logsDirectory.FullName, "parent.log"),
1420var socketPath = Path.Combine(
Commands\CacheCommandTests.cs (14)
49File.WriteAllText(Path.Combine(restoreDir.FullName, "test.dll"), "fake");
63Assert.False(File.Exists(Path.Combine(restoreDir.FullName, "test.dll")));
72var cacheEntry = Path.Combine(appHostInfoCacheDir.FullName, "entry.json");
105await File.WriteAllTextAsync(Path.Combine(firstBuildCache.FullName, "Aspire.Hosting.dll"), "fake").DefaultTimeout();
106await File.WriteAllTextAsync(Path.Combine(secondBuildCache.FullName, "Aspire.Hosting.dll"), "fake").DefaultTimeout();
116Assert.False(Directory.Exists(Path.Combine(stagingCacheRoot.FullName, "deadbeef")));
117Assert.False(Directory.Exists(Path.Combine(stagingCacheRoot.FullName, "cafef00d")));
166var tempDir = new DirectoryInfo(Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}"));
171File.WriteAllText(Path.Combine(tempDir.FullName, "root.txt"), "root");
172File.WriteAllText(Path.Combine(subDir.FullName, "nested.txt"), "nested");
192var tempDir = new DirectoryInfo(Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}"));
196var keepFile = Path.Combine(tempDir.FullName, "keep.txt");
197var deleteFile = Path.Combine(tempDir.FullName, "delete.txt");
221var nonExistent = new DirectoryInfo(Path.Combine(Path.GetTempPath(), $"aspire-test-nonexistent-{Guid.NewGuid():N}"));
Commands\CompletionScriptTests.cs (17)
24var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.ps1");
66var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.ps1");
68await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.ps1"), """
98var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.bash");
100var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
151var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.bash");
152var capturedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "arguments.bin");
153var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
178Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-executed")));
187var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.bash");
188var capturedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "arguments.bin");
189var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
221var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.fish");
245var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.zsh");
269var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "_aspire");
270var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
271var capturedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "arguments.bin");
Commands\DoctorCommandTests.cs (16)
166var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
193var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
196Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"),
269var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Normal.csproj"));
297var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Normal.csproj"));
300var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
323await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), "<Project />");
324await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.fsproj"), "<Project />");
350var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
407Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"),
495var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
498Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"),
526var appHostFile = new FileInfo(Path.Combine(nestedAppHostDir.FullName, "AppHost.csproj"));
529Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"),
560var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1077return new FileInfo(Path.Combine(directory.FullName, "AppHost.csproj"));
Commands\ExportCommandTests.cs (16)
27var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
116var outputPath = Path.Combine(customDir, "my-export.zip");
149var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
152var appHostDir = Path.Combine(workspace.WorkspaceRoot.FullName, "MyAppHost");
154var appHostProjectPath = Path.Combine(appHostDir, "MyAppHost.csproj");
182var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
301var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
427var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
485var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
539var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
604var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
648var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
692var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
734var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
762var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
815var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "export.zip");
Commands\InitCommandTests.cs (81)
67var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
70var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectFileName));
110Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
120var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
153Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
175var appHostContent = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
190var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, solutionPath));
194var projectPath = Path.Combine(solutionFile.Directory.FullName, "Test.csproj");
197var otherSolutionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Other.slnx");
223Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
224Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")));
225var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)))!.AsObject();
264Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
265Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".gitignore")));
267var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
292var runJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json");
319var aspireConfig = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
362File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), existingAspireConfig);
373var runJson = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")))!.AsObject();
412var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
437Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")));
461Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
478await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.mts"), "console.log('existing AppHost');");
563Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
565var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
578var existingAppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
581File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), """{ "type": "commonjs" }""");
596Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
597Assert.Equal("""{ "type": "commonjs" }""", File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json")));
606File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{}");
615File.WriteAllText(Path.Combine(scaffoldDirectory.FullName, context.Language.AppHostFileName!), string.Empty);
645Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
768Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
790Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
810Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
834var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
852var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
885var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
906var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
926var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
970File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
979var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1056var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1122var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1171var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1241Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
1243var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1276Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
1278var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1313var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1337var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1386var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1430var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1545var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1652var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1731var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1819var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1822var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1880var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1909var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1927var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1931var appHostDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost"));
1933Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1954var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1972var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
1974Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1991var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2010var solutionFile = new FileInfo(Path.Combine(solutionDir.FullName, "Test.sln"));
2040Assert.True(File.Exists(Path.Combine(solutionDir.FullName, "nuget.config")),
2042Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
2044AssertNuGetConfigHasChannelShape(Path.Combine(solutionDir.FullName, "nuget.config"), contextChannel);
2060var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
2072var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2121var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
2153var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2176var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
2221File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
2237var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.slnx"));
2267var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2371File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, appHostFileName), string.Empty);
2381File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, AspireConfigFile.FileName), config.ToJsonString());
Commands\NewCommandTemplateConfigPersistenceTests.cs (8)
259File.WriteAllText(Path.Combine(outputPath, $"{name}.generated"), templateName);
298var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName);
303var appHostFile = Path.Combine(outputDirectory, "apphost.cs");
312var csharpNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config"));
335var dotNetNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config"));
403var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName);
515var installPrefix = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "custom-aspire-prefix"));
521File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{s_prVersion}.nupkg"), string.Empty);
Commands\NewCommandTests.cs (76)
147var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TemplateOut");
148var nugetConfigPath = Path.Combine(outputDirectory, "nuget.config");
553var config = AspireConfigFile.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "output"));
727var doc = XDocument.Load(Path.Combine(outputPath, "nuget.config"));
916File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1082File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1107File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), """
1145File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1173File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1250AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource);
1260var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "relative-feed");
1262File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1293AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource);
1305var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
1307File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1330File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, scaffoldFileName), "// test apphost");
1342AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
1353var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
1355File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1366AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
1401Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output")));
1433var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.org");
1436Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output")));
1456File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1495File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1531File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.py"), "# test apphost");
1614var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1615var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json");
1616var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json");
1648var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1649var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json");
1650var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json");
1723var outputRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1725var aspireConfigPath = Path.Combine(outputRoot, "aspire.config.json");
1732var appHostRunJsonPath = Path.Combine(outputRoot, "apphost.run.json");
1857var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestApp");
1902await File.WriteAllTextAsync(Path.Combine(context.TargetDirectory.FullName, "aspire.config.json"), """
1996var modulesDir = Directory.CreateDirectory(Path.Combine(directory.FullName, LanguageInfo.GeneratedFolderName));
1997File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.mts"), "// generated sdk");
2082var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
2086File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
2121File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.ts"), "// generated sdk");
2134AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
2182AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
2192var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
2196File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
2291var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2316var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2413Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-starter"), capturedOutputPath);
2448var result = command.Parse($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None");
2490var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2609Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2725Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2756var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2821workspaceRoot => Path.Combine(workspaceRoot, "source") + Path.DirectorySeparatorChar,
2826workspaceRoot => Path.Combine(workspaceRoot, projectName) + Path.DirectorySeparatorChar,
2827workspaceRoot => Path.Combine(workspaceRoot, projectName));
2853Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2864File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
2880Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
2890File.WriteAllText(Path.Combine(selectedParent.FullName, "existing.txt"), "existing content");
2927File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
2942var expectedPath = Path.Combine(selectedParent.FullName, projectName);
2944Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
2954var collidingProject = Directory.CreateDirectory(Path.Combine(collidingParent.FullName, projectName));
2955File.WriteAllText(Path.Combine(collidingProject.FullName, "existing.txt"), "existing content");
3020Assert.Equal(Path.Combine(validParent.FullName, projectName), capturedOutputPath);
3080File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3095var expectedPath = Path.Combine(selectedParent.FullName, projectName);
3097Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
3149File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3165Assert.True(File.Exists(Path.Combine(selectedOutputPath.FullName, "apphost.ts")));
3203File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3219Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
3364File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content");
3413File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content");
Commands\RunCommandTests.cs (60)
159var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
160File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
208var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
209File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), $$"""
315var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
356var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
403var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
448var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
532var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
628var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
733var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
835var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
923var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1028var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1204await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
1207await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
1338Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
1504var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1577var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1578File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
1697var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1773var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1837var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1899var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1959var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2027var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2110var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2216var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2279var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2340var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2402var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
3079var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [run].log");
3203var appHostProjectPath = Path.Combine(appHostDirectory.FullName, "MyApp.AppHost.csproj");
3844var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3892var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3936var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3984var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4027var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4071var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4115var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4409var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4471var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4513var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4571var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4615var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4676Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
4714Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
4749var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4798var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4842var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4898Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
4940var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4997var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
5046var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
5048var relativeCapturePath = Path.Combine("Profile Output", "profile.zip");
5113var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
5141var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
5393var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
5434var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
5448var socketPath = Path.Combine(
Commands\StartCommandTests.cs (11)
217var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
218File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
269await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
272await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
300await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
303await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
331var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
384var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
651Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
668var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
682var socketPath = Path.Combine(
Commands\StopCommandTests.cs (33)
112string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("Resolved.AppHost", "Resolved.AppHost.csproj")),
144var expectedPath1 = Path.Combine("App1", "AppHost.cs");
145var expectedPath2 = Path.Combine("App2", "AppHost.cs");
225Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
229Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
236var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj");
268var expectedPath = Path.Combine("AppHost", "AppHost.csproj");
280var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
304string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "AppHost.csproj")),
312var commonGitDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, ".git");
476var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
501Assert.Contains(interactionService.DisplayedMessages, message => message.Message == string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "AppHost.csproj")));
511var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
543var runningAppHostFile = new FileInfo(Path.Combine(runningAppHostDirectory.FullName, "Running.AppHost.csproj"));
546var discoveredAppHostFile = new FileInfo(Path.Combine(discoveredAppHostDirectory.FullName, "Discovered.AppHost.csproj"));
585Path.Combine("RunningAppHost", "Running.AppHost.csproj"));
595var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
627var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
662var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
702var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
742var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
783var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
823var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
862var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts"));
898string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "apphost.ts")),
908var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
945var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
990var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1028var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1066var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1134var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1334var homeDirectory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".home"));
1342var socketPath = Path.Combine(
Commands\TerminalTapePlayCommandTests.cs (20)
55await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, path), contents);
98await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
117await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
187await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"),
234await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
287await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
316await File.WriteAllTextAsync(Path.Combine(directory.FullName, "probe.tape"), "# Inspect the current screen.");
318["terminal", "tape", "play", "shell", "--tape-file", Path.Combine("tape files", "probe.tape"), "--replica", "0"]);
337await File.WriteAllTextAsync(Path.Combine(directory.FullName, "play.tape"), """
348["terminal", "tape", "play", "shell", "--tape-file", Path.Combine("scripts", "play.tape")]);
368await File.WriteAllTextAsync(Path.Combine(directory.FullName, "play.tape"),
373["terminal", "tape", "play", "shell", "--tape-file", Path.Combine("scripts", "play.tape")]);
377path => Assert.Equal(Path.Combine(directory.FullName, "screen.txt"), path));
378var capture = await File.ReadAllTextAsync(Path.Combine(directory.FullName, "screen.txt"));
393var file = Path.Combine(workspace.WorkspaceRoot.FullName, "play.tape");
417await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
435await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
454await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
473await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
492await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
Commands\UpdateCommandRepositoryToolsTests.cs (16)
31var appHost = new FileInfo(Path.Combine(directory.FullName, "AppHost.csproj"));
116var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
230var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
292var selectedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "selected"));
294var appHost = Path.Combine(selectedDirectory.FullName, "AppHost.csproj");
356var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
400var appHostDirectory = workspace.CreateDirectory(Path.Combine("src", "AppHost"));
401var appHost = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
409var packagesPath = Path.Combine(directory.FullName, "Directory.Packages.props");
421var configPath = Path.Combine(directory.FullName, "aspire.config.json");
429var nugetPath = Path.Combine(directory.FullName, "NuGet.config");
438var lockPath = Path.Combine(directory.FullName, "package-lock.json");
583Directory.CreateDirectory(Path.Combine(directory.FullName, ".git"));
584var config = Directory.CreateDirectory(Path.Combine(directory.FullName, ".config"));
585var dotnetManifest = Path.Combine(config.FullName, "dotnet-tools.json");
595var npmManifest = Path.Combine(directory.FullName, "package.json");
Commands\UpdateCommandTests.cs (91)
89var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
190var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
191var oldBackup1 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
192var oldBackup2 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.9876543210");
193var otherFile = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.something");
214var oldBackup = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
239FileDeleteHelper.TryCleanupOldItems(Path.Combine("C:", "NonExistent"), "aspire.exe");
311return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
380var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
443var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
498var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
568return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
631var toolPath = Path.Combine(installDir.FullName, "custom tool path");
647return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
724return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
797return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
840return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
881return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
965return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1018Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.DetectedContext.AppHostFile.FullName);
1046Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.DetectedContext.AppHostFile.FullName);
1048Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.AppliedContext.AppHostFile.FullName);
1123return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1262var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
1305UseOrFindAppHostProjectFileAsyncCallback = (_, _, _) => Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")))
1387var toolPath = Path.Combine(installDir.FullName, "custom tool path");
1470var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1496var processPath = Path.Combine(installDirectory.FullName, "aspire");
1500var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName);
1538var processPath = Path.Combine(installDirectory.FullName, "aspire");
1543var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName);
1595var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1636var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1670return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1735return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1799return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1857return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1934return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1979return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2035var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2054var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2056var globalSettingsPath = Path.Combine(globalDir, "settings.global.json");
2074var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2092var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2094File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "daily" }""");
2096var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2116var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2118File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2137var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2146return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2199Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")))
2252var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2253var projectConfigPath = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName);
2258updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2272Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2275var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2277File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2279var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2283updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2300Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2303var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2305Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2310updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2326Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2329var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2331File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2333var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2335Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2340updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2383Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2420return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2506var resolved = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2591return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2633var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2634var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "AppHost.csproj"));
2637Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2781Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2833return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(projectDirectory.FullName, "AppHost.csproj")));
2964var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3009var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3054var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3087var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3120return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
3274var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3296var executablePath = Path.Combine(contentDirectory.FullName, "aspire");
3314var tarPath = Path.Combine(archiveDirectory.FullName, "aspire.tar");
3317var archivePath = Path.Combine(archiveDirectory.FullName, "aspire.tar.gz");
3344var processPath = Path.Combine(toolPath, GetAspireExecutableName());
3370var processPath = Path.Combine(binaryDir, GetAspireExecutableName());
3372File.WriteAllText(Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName), """{"source":"nix"}""");
3440var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
Configuration\AspireConfigFileTests.cs (14)
26var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
46var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
70var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
94var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
117var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
136var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
150var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
163var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
186var filePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
204Assert.True(File.Exists(Path.Combine(subDir, AspireConfigFile.FileName)));
220File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), "{}");
361var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
382var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
531var configPath = Path.Combine(root, AspireConfigFile.FileName);
Configuration\ConfigurationHelperTests.cs (16)
17var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
21var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
121var globalSettingsFile = new FileInfo(Path.Combine(globalDirectory.FullName, AspireConfigFile.FileName));
132_ => Path.Combine(workspace.Path, AspireConfigFile.FileName)
204var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
237File.WriteAllText(Path.Combine(configRoot.FullName, AspireConfigFile.FileName), "{}");
256Path.Combine(workspace.WorkspaceRoot.FullName, AspireJsonConfiguration.SettingsFolder),
277var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
285var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
289var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
315var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
325var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
331var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
349var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
353var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
362var migratedPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
DotNet\DotNetCliRunnerTests.cs (84)
46return Path.Combine(dotnetRoot, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
56var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
105var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, appHostFileName));
144var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
178var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
180var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd"));
220var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
222var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd"));
261var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
289var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
321var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
355var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
357File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
368var cliPath = Path.Combine(cliDirectory.FullName, "aspire");
370File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
372var linkDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
373var linkPath = Path.Combine(linkDirectory.FullName, "aspire");
383var dotnetDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet"));
384var dotnetPath = Path.Combine(dotnetDirectory.FullName, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
394var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
395var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
397File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
398File.WriteAllText(Path.Combine(cliDirectory.FullName, ".aspire-install.json"), """{"source":"script"}""");
407var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
408var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
410File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
411Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "dcp"));
412Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "managed"));
423var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
451var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
488var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
517var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
546var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
619var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
656var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
697var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
742var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
797var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
894var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
934var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
976var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1023var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1071[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1104var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1138[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1150var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1176[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1192var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1218[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1234var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1287var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1354var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1420var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1493var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1498var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj"));
1502var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj"));
1540var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1543var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj"));
1573var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1620var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1666var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1703var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1740var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1780var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1825var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1877var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1926var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1974var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2011var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2046var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2089var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2131var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2171var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2210var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "RunPropertiesApp"));
2211var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "RunPropertiesApp.csproj"));
2222await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "Program.cs"), "Console.WriteLine(\"Hello\");");
2248Assert.Equal(Path.Combine(projectDirectory.FullName, "relative-working-directory"), properties.GetProperty("RunWorkingDirectory").GetString());
2256var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2477var packagePath = Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{packageVersion}.nupkg");
2547var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2585var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2623var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2663var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2702var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Git\GitWorktreeTests.cs (43)
17Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
29var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
48var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
51Path.Combine(fixtureRoot, commonGitDirectoryName));
120var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
124var caseVariantRoot = Path.Combine(fixtureRoot, "WORKTREE");
140var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "checkout")).FullName;
163Path.Combine(adminDirectory, "gitdir"),
186Path.Combine(worktreeRoot, ".git"),
200var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
204Path.Combine(adminDirectory, "gitdir"),
223var caseVariantGitFile = Path.Combine(worktreeRoot, ".GIT");
225Path.Combine(adminDirectory, "gitdir"),
241var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
245var aliasRoot = Path.Combine(fixtureRoot, "worktree-alias");
263Path.Combine(adminDirectory, "gitdir"),
264Path.Combine(aliasRoot, ".git") + Environment.NewLine);
282var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
291Assert.Null(GitWorktree.TryGetLinkedWorktreeRoot(Path.Combine(submoduleRoot, "AppHost.csproj")));
299var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
303Path.Combine(adminDirectory, "gitdir"),
315var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
317var otherWorktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "other-worktree")).FullName;
322Path.Combine(adminDirectory, "gitdir"),
333var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
345Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
350var appHostPath = Path.Combine(submoduleRoot, "AppHost.csproj");
370Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
372TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
373var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj");
374var primaryAppHost = Path.Combine(primaryRoot, "AppHost.csproj");
387Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
389var adminDirectory = TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
392var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
404Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
409var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
446var repoBSubmoduleAppHost = Path.Combine(repoBSubmoduleRoot, "AppHost.csproj");
458TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
468var workingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "plain")).FullName;
479var unmanagedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "outside")).FullName;
480var unmanagedAppHost = Path.Combine(unmanagedDirectory, "App.csproj");
493var root = Directory.CreateDirectory(Path.Combine(parent.FullName, name)).FullName;
494Directory.CreateDirectory(Path.Combine(root, ".git"));
HeldFileLeaseTests.cs (9)
44var orphanPath = Path.Combine(leaseDirectory, $"orphan{LeaseExtension}");
57var leaseDirectory = Path.Combine(workspace.Path, "missing");
67var leasePath = Path.Combine(leaseDirectory, $"orphan.unverified-lock{LeaseExtension}");
79var readyPath = Path.Combine(workspace.Path, "ready");
80var releasePath = Path.Combine(workspace.Path, "release");
119var orphanPath = Path.Combine(leaseDirectory, $"orphan{LeaseExtension}");
135var readyPath = Path.Combine(workspace.Path, "ready");
136var releasePath = Path.Combine(workspace.Path, "release");
178File.WriteAllText(Path.Combine(leaseDirectory, $"orphan{LeaseExtension}"), "{}");
Interaction\ExtensionInteractionServiceTests.cs (10)
35var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [extension].log");
68var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log");
108var cliLogFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log");
109var appHostLogFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cli.log");
158var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log");
221Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log"),
351var invalidPath = Path.Combine(workspace.WorkspaceRoot.FullName, "invalid");
352var validPath = Path.Combine(workspace.WorkspaceRoot.FullName, "valid");
393var invalidPath = Path.Combine(workspace.WorkspaceRoot.FullName, "invalid");
461var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [extension].log");
Layout\LayoutDiscoveryReparsePointTests.cs (37)
43var realBinary = Path.Combine(realLayoutRoot, "aspire");
48var linkPath = Path.Combine(linksDir, "aspire");
69var rawLayoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "custom-layout");
72var realBinaryDir = Path.Combine(workspace.WorkspaceRoot.FullName, "real-binary");
74var realBinary = Path.Combine(realBinaryDir, "aspire");
77var linkPath = Path.Combine(rawLayoutRoot, "aspire");
98var versionedManaged = Path.Combine(versionsDir, BundleDiscovery.ManagedDirectoryName);
99var versionedDashboard = Path.Combine(versionsDir, BundleDiscovery.DashboardDirectoryName);
100var versionedDcp = Path.Combine(versionsDir, BundleDiscovery.DcpDirectoryName);
105Path.Combine(versionedManaged, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
107var dashboardPath = Path.Combine(versionedDashboard, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
112var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
148var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
189var relativeLayoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "colocated");
190var binDir = Path.Combine(relativeLayoutRoot, "bin");
192var binaryPath = Path.Combine(binDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
230? Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)
232var managedDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.ManagedDirectoryName));
233Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DcpDirectoryName));
235Path.Combine(managedDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
237var dashboardDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DashboardDirectoryName));
239Path.Combine(dashboardDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
241var binaryPath = Path.Combine(layoutRoot, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
264? Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)
266var managedDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.ManagedDirectoryName));
267var dcpDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DcpDirectoryName));
269Path.Combine(managedDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
275Path.Combine(managedDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
279var binaryPath = Path.Combine(layoutRoot, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
288var dashboardDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DashboardDirectoryName));
291var dashboardPath = Path.Combine(dashboardDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
303var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
304var managedDir = Path.Combine(bundleDir, BundleDiscovery.ManagedDirectoryName);
305var dashboardDir = Path.Combine(bundleDir, BundleDiscovery.DashboardDirectoryName);
306var dcpDir = Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName);
311Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
314Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
Migrations\TypeScriptAppHostMigrationTests.cs (28)
54var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
71Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"),
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");
106var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "external-apphost"));
108var appHostPath = Path.Combine(appHostDirectory.FullName, "apphost.ts");
152await File.WriteAllTextAsync(Path.Combine(root.FullName, "apphost.ts"), LegacyAppHostContent);
154Path.Combine(root.FullName, "aspire.config.json"),
163Path.Combine(root.FullName, "tsconfig.apphost.json"),
171Path.Combine(root.FullName, "package.json"),
181await File.WriteAllTextAsync(Path.Combine(root.FullName, "eslint.config.mjs"), LegacyEslintConfigContent);
183var modulesDir = Directory.CreateDirectory(Path.Combine(root.FullName, ".modules"));
184await File.WriteAllTextAsync(Path.Combine(modulesDir.FullName, "aspire.ts"), "// generated");
189var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root.FullName, "aspire.config.json")))!;
192var tsconfig = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root.FullName, "tsconfig.apphost.json")))!;
196var packageJson = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root.FullName, "package.json")))!;
201var eslintConfig = await File.ReadAllTextAsync(Path.Combine(root.FullName, "eslint.config.mjs"));
214Assert.False(File.Exists(Path.Combine(root.FullName, "apphost.ts")));
215Assert.False(Directory.Exists(Path.Combine(root.FullName, ".modules")));
217var modernContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "apphost.mts"));
229var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "external-apphost"));
232await CreateMigration(workspace).ApplyAsync(new MigrationContext(new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts"))), CancellationToken.None);
234Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, "apphost.ts")));
235Assert.False(Directory.Exists(Path.Combine(appHostDirectory.FullName, ".modules")));
236Assert.Equal(ExpectedModernAppHostContent, await File.ReadAllTextAsync(Path.Combine(appHostDirectory.FullName, "apphost.mts")));
278var migratedContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "apphost.mts"));
282Assert.Equal(migratedContent, await File.ReadAllTextAsync(Path.Combine(root.FullName, "apphost.mts")));
Npm\AspireJsLauncherTests.cs (18)
66var monkeyPatchScript = Path.Combine(workspace.Path, "patch-chmod.js");
95var monkeyPatchScript = Path.Combine(workspace.Path, "patch-copy.js");
150var probeScript = Path.Combine(workspace.Path, "detect-rids.js");
169var probeScript = Path.Combine(workspace.Path, "detect-current-rid.js");
228var pointerDir = Path.Combine(rootPath, "pointer");
229var pointerBinDir = Path.Combine(pointerDir, "bin");
230var nodeModulesDir = Path.Combine(rootPath, "node_modules");
231var ridPackageDir = Path.Combine(nodeModulesDir, ridPackageName.Replace("/", Path.DirectorySeparatorChar.ToString()));
232var ridBinDir = Path.Combine(ridPackageDir, "bin");
233var cacheDir = Path.Combine(rootPath, "cache");
246Path.Combine(pointerDir, "package.json"),
251var launcherScript = Path.Combine(pointerBinDir, "aspire.js");
257Path.Combine(pointerBinDir, "aspire-package-map.json"),
267Path.Combine(ridPackageDir, "package.json"),
271var binaryPath = Path.Combine(ridBinDir, binaryName);
274var probeScript = Path.Combine(rootPath, "probe-native.js");
285return new FakeNpmLayout(launcherScript, cacheDir, probeScript, Path.Combine(ridPackageDir, "package.json"));
408while (current is not null && !File.Exists(Path.Combine(current, "Aspire.slnx")))
NuGet\BundleNuGetServiceTests.cs (11)
17var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
47Assert.Equal(Path.Combine(Path.GetDirectoryName(manifestPath)!, "obj"), capturedOutputPath);
99var toolPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.dll");
122Path.Combine(AppContext.BaseDirectory, $"{typeof(BundleNuGetService).Assembly.GetName().Name}.dll"),
176var manifestPath = Path.Combine(GetRestoreDirectory(workspace, packageList), ManifestFileName);
200var manifestPath = Path.Combine(GetRestoreDirectory(workspace, packageList), ManifestFileName);
220var firstAppHost = workspace.CreateDirectory(Path.Combine("apps", "api"));
221var secondAppHost = workspace.CreateDirectory(Path.Combine("apps", "web"));
260var legacyLibsDirectory = Directory.CreateDirectory(Path.Combine(restoreDirectory, "libs"));
261var lockedFilePath = Path.Combine(legacyLibsDirectory.FullName, "Microsoft.Extensions.DependencyInjection.xml");
272Assert.Equal(Path.Combine(restoreDirectory, ManifestFileName), result);
NuGet\NuGetClientTests.cs (25)
114Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"),
176var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
380var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
414var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName);
416Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName),
424Assert.False(Directory.Exists(Path.Combine(restoreDirectory.FullName, "libs")));
474var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
523var assets = new LockFileFormat().Read(Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName));
580var assets = new LockFileFormat().Read(Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName));
627var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName);
629Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName),
680var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName);
682Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName),
754var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
818var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
879var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
994var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1014File.WriteAllText(Path.Combine(incompleteInstallPath, "partial.txt"), "incomplete");
1035Assert.True(File.Exists(Path.Combine(package.InstallPath, ".nupkg.metadata")));
1040Directory.Delete(Path.Combine(globalPackagesFolder, packageId.ToLowerInvariant()), recursive: true);
1051var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1071var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1113var lockFile = new LockFileFormat().Read(Path.Combine(restoreDirectory, LockFileFormat.AssetsFileName));
1135var packagePath = Path.Combine(feedDirectory, $"{packageId}.{version}.nupkg");
1197var packageDirectory = Path.Combine(globalPackagesFolder, packageId.ToLowerInvariant());
Packaging\NuGetConfigMergerSnapshotTests.cs (11)
34var path = Path.Combine(dir.FullName, "nuget.config");
73var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
80var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
135var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
142var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
196var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
203var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
255var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
262var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
319var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
326var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
Packaging\NuGetConfigMergerTests.cs (20)
24var path = Path.Combine(dir.FullName, "nuget.config");
46var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
70var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
114var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
153var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
197var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
237var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
347var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
397var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
466var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
530var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
586var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
668var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
718var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
759var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
789var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
839var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
861var originalContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "nuget.config")).DefaultTimeout();
882var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
904var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
Packaging\PackageChannelTests.cs (37)
147Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"),
178File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
182File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
225File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
228File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
266File.WriteAllText(Path.Combine(channelPackagesDirectory.FullName, "Aspire.ProjectTemplates.13.4.0-preview.1.nupkg"), string.Empty);
270File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0-preview.2.nupkg"), string.Empty);
305File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0-preview.2.nupkg"), string.Empty);
332File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Redis.{pinnedVersion}.nupkg"), string.Empty);
333File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.PostgreSQL.{pinnedVersion}.nupkg"), string.Empty);
334File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"CommunityToolkit.Aspire.Hosting.NodeJS.{pinnedVersion}.nupkg"), string.Empty);
337File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.SqlServer.13.3.0.nupkg"), string.Empty);
340File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
347File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.AppHost.{pinnedVersion}.nupkg"), string.Empty);
348File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Sdk.{pinnedVersion}.nupkg"), string.Empty);
349File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Orchestration.linux-arm64.{pinnedVersion}.nupkg"), string.Empty);
350File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Testing.{pinnedVersion}.nupkg"), string.Empty);
351File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Msi.{pinnedVersion}.nupkg"), string.Empty);
352File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Integration.Analyzers.{pinnedVersion}.nupkg"), string.Empty);
355File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Dapr.{pinnedVersion}.nupkg"), string.Empty);
356File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.GitHub.Models.{pinnedVersion}.nupkg"), string.Empty);
357File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.NodeJs.{pinnedVersion}.nupkg"), string.Empty);
640File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.4.0.nupkg"), string.Empty);
641File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0-preview.1.nupkg"), string.Empty);
642File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.PostgreSQL.13.4.0-preview.1.nupkg"), string.Empty);
659File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.4.0.nupkg"), string.Empty);
660File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0-preview.1.nupkg"), string.Empty);
661File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.PostgreSQL.13.4.0.nupkg"), string.Empty);
678File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0.nupkg"), string.Empty);
679File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.6.0-preview.1.nupkg"), string.Empty);
680File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Azure.Kubernetes.13.6.0-pr.19404.gf51e8e1d.nupkg"), string.Empty);
709File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Dapr.13.4.0.nupkg"), string.Empty);
710File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Sql.13.4.0.nupkg"), string.Empty);
729File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Dapr.13.4.0.nupkg"), string.Empty);
730File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Sql.13.4.0.nupkg"), string.Empty);
972var missingDirectory = Path.Combine(Path.GetTempPath(), $"aspire-missing-{Guid.NewGuid():N}");
1012CreatePackageWithTags(Path.Combine(packagesDirectory.FullName, $"{packageId}.{version}.nupkg"), packageId, version, tags);
Packaging\PackagingServiceTests.cs (46)
1121var nugetConfigPath = Path.Combine(tempDir.FullName, "nuget.config");
1150Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-10167"));
1151Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-11832"));
1206Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-12345"));
1376var nugetConfigPath = Path.Combine(tempDir.FullName, "nuget.config");
1492File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{localVersion}.nupkg"), string.Empty);
1493File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{localVersion}.nupkg"), string.Empty);
1513var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix"));
1519File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{prVersion}.nupkg"), string.Empty);
1558File.WriteAllText(Path.Combine(defaultPackagesDirectory.FullName, $"Aspire.ProjectTemplates.{defaultHiveVersion}.nupkg"), string.Empty);
1560var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix"));
1566File.WriteAllText(Path.Combine(dogfoodPackagesDirectory.FullName, $"Aspire.ProjectTemplates.{dogfoodHiveVersion}.nupkg"), string.Empty);
1596var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix"));
1602File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.not-a-semver.nupkg"), string.Empty);
1632var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix"));
1662var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix"));
1718var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix"));
1754var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix"));
1780File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{localVersion}.nupkg"), string.Empty);
1972File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
2005File.WriteAllText(Path.Combine(runPackagesDir.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
2040File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{localVersion}.nupkg"), string.Empty);
2042File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{localVersion}.nupkg"), string.Empty);
2043File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.JavaScript.{localVersion}.nupkg"), string.Empty);
2045File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{localVersion}.nupkg"), string.Empty);
2046File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.AppHost.Sdk.{localVersion}.nupkg"), string.Empty);
2077File.WriteAllText(Path.Combine(localPackagesDir.FullName, "Aspire.Hosting.13.4.0-pr.16820.g1a99aa46.nupkg"), string.Empty);
2116var localHiveDir = new DirectoryInfo(Path.Combine(hivesDir.FullName, PackageChannelNames.Local));
2131var expectedLocalPackagesPath = Path.Combine(localHiveDir.FullName, "packages").Replace('\\', '/');
2167var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping"));
2169File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, $"Aspire.ProjectTemplates.{overrideVersion}.nupkg"), string.Empty);
2170File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, $"Aspire.Hosting.{overrideVersion}.nupkg"), string.Empty);
2197File.WriteAllText(Path.Combine(staleHiveDir.FullName, "Aspire.Hosting.13.4.0.nupkg"), string.Empty);
2199var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping"));
2201File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, $"Aspire.Hosting.{overrideVersion}.nupkg"), string.Empty);
2226var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping"));
2227File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.Hosting.13.4.1.nupkg"), string.Empty);
2228File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.Hosting.13.4.2.nupkg"), string.Empty);
2230File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.ProjectTemplates.13.4.2.nupkg"), string.Empty);
2254var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping"));
2255File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.Hosting.13.4.1.nupkg"), string.Empty);
2256var nestedDir = Directory.CreateDirectory(Path.Combine(packagesOverrideDir.FullName, "nested"));
2257File.WriteAllText(Path.Combine(nestedDir.FullName, "Aspire.Hosting.13.4.2.nupkg"), string.Empty);
2259File.WriteAllText(Path.Combine(nestedDir.FullName, "Aspire.ProjectTemplates.13.4.2.nupkg"), string.Empty);
2260File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.ProjectTemplates.13.4.2.nupkg"), string.Empty);
2281var missingDir = new DirectoryInfo(Path.Combine(tempDir.FullName, "does-not-exist"));
Processes\ProcessTreeGracefulShutdownServiceTests.cs (5)
175AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
220AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
259AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
297AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
330Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
ProfileCaptureServiceTests.cs (9)
117var managedPath = Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName));
122Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
153Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
156var dashboardPath = Path.Combine(dashboardDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
526var dashboardPath = Path.Combine(
541var missingPath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing");
551var logPath = Path.Combine(workspace.WorkspaceRoot.FullName, "profile-service.log");
738var path = Path.Combine(workspace.WorkspaceRoot.FullName, fileName);
749outputPath ?? Path.Combine(workspace.WorkspaceRoot.FullName, "profile.zip"),
Projects\AppHostCandidateFinderTests.cs (8)
168var searchRoot = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "obj"));
205var nugetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
315var nugetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
339var differentlyCasedNuGetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "NUGET-CACHE");
383var nugetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
541await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, ".gitignore"), "legacy/\n");
573var searchDirectory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "src"));
607var fullPath = Path.Combine(root.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar));
Projects\AppHostServerProjectTests.cs (19)
55var parentConfigPath = Path.Combine(_workspace.Path, "NuGet.Config");
71var repoConfigPath = Path.Combine(repoRoot.FullName, "NuGet.Config");
84await File.WriteAllTextAsync(Path.Combine(repoRoot.FullName, "Directory.Packages.props"), "<Project />");
85await File.WriteAllTextAsync(Path.Combine(appPath.FullName, "NuGet.Config"), """
171var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json");
192var programCsPath = Path.Combine(project.ProjectModelPath, "Program.cs");
214var programCs = Path.Combine(project.ProjectModelPath, "Program.cs");
237var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json");
319Path.Combine("src", "Aspire.Hosting.Redis"));
320var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "Aspire.Hosting.Redis.csproj");
367var expectedRoot = Path.Combine(CliPathHelper.GetAspireHomeDirectory(), "hosts");
368var expectedPath = Path.Combine(expectedRoot, pathDir);
428var aspireConfigPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
476var projectModelPath = Path.Combine(appPath, ".aspire_server");
507var projectFilePath = Path.Combine(project.ProjectModelPath, DotNetBasedAppHostServerProject.ProjectFileName);
532var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName);
550var projectModelPath = Path.Combine(appPath, ".aspire_server");
586var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName);
604var projectModelPath = Path.Combine(appPath, ".aspire_server");
Projects\DotNetAppHostProjectTests.cs (84)
268File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
478Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]);
508var customDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "custom-dcp"));
510var customDashboardPath = Path.Combine(
561var inheritedDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dcp")).FullName;
563var inheritedDashboardPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dashboard");
624: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dcp");
627: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dashboard");
897var repoLocalManaged = Path.Combine(_workspace.WorkspaceRoot.FullName, "repo-local-aspire-managed");
955var customTerminalHost = Path.Combine(_workspace.WorkspaceRoot.FullName, "my-custom-terminal-host");
1008var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "run-cwd"));
1012Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1109Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1151"--log-file", Path.Combine(_workspace.WorkspaceRoot.FullName, "child.log"),
1199Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1265Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1355Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1397Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1441Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1488Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1533Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1653var targetPath = Path.Combine(outputDirectory.FullName, "AppHost.dll");
1737Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1804Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1908File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "AppHost.run.json"), """
1973Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "My Project"));
2034Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2099Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2156Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2259Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]);
2422File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
2654var appHostSymlink = Path.Combine(appHostFile.DirectoryName!, "apphost-link.cs");
2683var targetAppHostFile = new FileInfo(Path.Combine(realDirectory.FullName, "apphost.cs"));
2687var selectedAppHostPath = Path.Combine(selectedDirectory.FullName, "apphost.cs");
2717var selectedAppHostFile = new FileInfo(Path.Combine(configuredAppHostFile.DirectoryName!, "AppHost.cs"));
2780File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
2934var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs");
2955var socketPath = Path.Combine(
2965var targetPath = Path.Combine(outputDirectory.FullName, fileName);
2974var commandPath = Path.Combine(outputDirectory.FullName, fileName);
3348WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3440WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3445WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.targets"), """
3634WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3669WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
3674WriteIsLikelyAppHostProject(Path.Combine("repo", "Custom.props"), """
3704WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
3739WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3771WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3811WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3854WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3892WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3920WriteIsLikelyAppHostProject(Path.Combine("outer", "directory.build.props"), """
3944WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """
3975WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """
4037WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4061WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4120var projectFile = WriteIsLikelyAppHostProject(Path.Combine("proj", "MyApp.csproj"), """
4129WriteIsLikelyAppHostProject(Path.Combine("proj", "Directory.Build.props"), $"""
4134WriteIsLikelyAppHostProject(Path.Combine("external", "Directory.Build.props"), """
4210WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4228WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4246WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4267WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4289WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4340WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4378WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4411WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
4430WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
4462WriteIsLikelyAppHostProject(Path.Combine("outer", "Repo.marker"), "<Project />");
4463WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4539var projectFile = new FileInfo(Path.Combine(repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
4557while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
4573Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, ".git"));
4575var path = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4610var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4627var projectPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4641var bundleRoot = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, Guid.NewGuid().ToString()));
4642var dcpDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName));
4643var managedDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.ManagedDirectoryName));
4644var dashboardDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.DashboardDirectoryName));
4647Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
4650Path.Combine(dashboardDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
4706=> File.WriteAllText(Path.Combine(directory, "aspire.config.json"), content);
Projects\ExtensionGuestLauncherTests.cs (8)
32var command = Path.Combine(Path.GetTempPath(), "npx");
64new FileInfo(Path.Combine(root.FullName, "AppHost.java")),
100await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "npx"), ["tsx"], new DirectoryInfo("/tmp"), new Dictionary<string, string>(), afterLaunchAsync: null, options: null, CancellationToken.None);
115await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "npx"), [], new DirectoryInfo("/tmp"), new Dictionary<string, string>(), afterLaunchAsync: null, options: null, CancellationToken.None);
136await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "npx"), ["tsx"], new DirectoryInfo("/tmp"), envVars, afterLaunchAsync: null, options: null, CancellationToken.None);
150var (exitCode, output) = await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "cmd"), [], new DirectoryInfo("/tmp"), new Dictionary<string, string>(), afterLaunchAsync: null, options: null, CancellationToken.None);
166var command = Path.Combine(Path.GetTempPath(), "python");
180var executable = Path.Combine(binDirectory.FullName, OperatingSystem.IsWindows() ? $"{command}.exe" : command);
Projects\FallbackProjectParserTests.cs (14)
24var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
46var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
71var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
96var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
121var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
147var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
186var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
208var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
232var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
262var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
285var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
309var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
332var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
354var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.txt");
Projects\GuestAppHostProjectTests.cs (62)
58Directory.CreateDirectory(Path.Combine(outputPath, "aspire"));
67[Path.Combine("aspire", "Kept.java"), Path.Combine("aspire", "RemovedResource.java")],
75[Path.Combine("aspire", "Kept.java")],
87var handWritten = Path.Combine(outputPath, "HandWritten.java");
101var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "Generated.java");
117var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "Generated.java");
131var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "New.java");
142var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire_app.py");
184var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
204var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
390var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
450var launchSettingsPath = Path.Combine(propertiesDir.FullName, "launchSettings.json");
539var aspireConfigPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
731var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
739var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
794var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
802var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
804var installScriptPath = Path.Combine(_workspace.WorkspaceRoot.FullName, OperatingSystem.IsWindows() ? "install.cmd" : "install.sh");
808var installMarkerPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "install.marker");
818Command = OperatingSystem.IsWindows() ? Path.Combine(Environment.SystemDirectory, "cmd.exe") : "/bin/sh",
833var manifestPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "package.json");
837await File.WriteAllTextAsync(Path.Combine(_workspace.WorkspaceRoot.FullName, "package.after-install.json"), installedManifest);
907var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
915var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
953var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
961var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
998var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1006var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1049var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1057var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1090var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1114var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1123var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1170var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1178var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1225var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1234var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1295var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1312var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1409var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1451var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1519var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1568var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1583new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "package.json")));
1621var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1629var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1710var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1718var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1805var socketPath = Path.Combine(
1833var logFilePath = Path.Combine(_workspace.WorkspaceRoot.FullName, $"test-guest-{Guid.NewGuid()}.log");
1898var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
1914Assert.False(Directory.Exists(Path.Combine(_workspace.WorkspaceRoot.FullName, "bundles")));
1920var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
1941var lowerCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "certificates");
1942var upperCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "CERTIFICATES");
1945var devCertificatePath = Path.Combine(lowerCaseDirectory, "aspire.pem");
1946var existingBundlePath = Path.Combine(upperCaseDirectory, "ASPIRE.PEM");
1995var existingBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "existing-ca-certs.pem");
1996var inheritedBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-ca-certs.pem");
1998var devCertificatePath = Path.Combine(devCertificateDirectory, "aspire-dev-cert.pem");
2070var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
Projects\GuestRuntimeTests.cs (29)
283var appHostFile = new FileInfo(Path.Combine(directory.FullName, "apphost.ts"));
603var appHostFile = new FileInfo(Path.Combine(root.FullName, "AppHost.java"));
775var scriptPath = Path.Combine(
891var appHostFile = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.ts"));
914var logFilePath = Path.Combine(Path.GetTempPath(), $"guest-output-test-{Guid.NewGuid()}.log");
1161var appHostFile = new FileInfo(Path.Combine(tempDir, "apphost.ts"));
1165var migrationFilePath = Path.Combine(tempDir, migrationFileName);
1187var migrationFilePath = Path.Combine(tempDir, migrationFileName);
1209var appHostFile = new FileInfo(Path.Combine(tempDir, "apphost.ts"));
1275var runtime = CreateRuntime(CreateUpToDateSpec(requiredOutputs: [Path.Combine("classes", "AppHost.class")]));
1294var input = Path.Combine(workspace.WorkspaceRoot.FullName, relativeInput.Replace('/', Path.DirectorySeparatorChar));
1315var classFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.class");
1343File.Delete(Path.Combine(workspace.WorkspaceRoot.FullName, relativeInput.Replace('/', Path.DirectorySeparatorChar)));
1358var pom = Path.Combine(workspace.WorkspaceRoot.FullName, "pom.xml");
1382File.WriteAllText(Path.Combine(dependencies, "guava-32.0.0.jar"), "");
1393File.Delete(Path.Combine(dependencies, "guava-32.0.0.jar"));
1394File.WriteAllText(Path.Combine(dependencies, "guava-33.0.0.jar"), "");
1396var runtime = CreateRuntime(CreateUpToDateSpec(extraInputs: [Path.Combine("target", "dependency")]));
1411var jar = Path.Combine(dependencies, "guava-32.0.0.jar");
1420var runtime = CreateRuntime(CreateUpToDateSpec(extraInputs: [Path.Combine("target", "dependency")]));
1456StampFile = Path.Combine("classes", ".aspire-compile-stamp")
1553File.WriteAllText(Path.Combine(unreadable, "Hidden.java"), "class Hidden { }");
1612StampFile = Path.Combine("classes", ".aspire-compile-stamp")
1620var appHostFile = new FileInfo(Path.Combine(root.FullName, "AppHost.java"));
1622File.WriteAllText(Path.Combine(root.FullName, "Helper.java"), "class Helper { }");
1626File.WriteAllText(Path.Combine(generated, "Generated.java"), "class Generated { }");
1630File.WriteAllText(Path.Combine(sources, "Service.java"), "class Service { }");
1632Directory.CreateDirectory(Path.Combine(root.FullName, "classes"));
1668var executable = Path.Combine(binDirectory.FullName, OperatingSystem.IsWindows() ? $"{command}.exe" : command);
Projects\JavaAppHostToolchainResolverTests.cs (72)
16var path = Path.Combine(directory, wrapperName);
84File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
95File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
104File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
105File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
114File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
138File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
148["-B", "-q", "dependency:copy-dependencies", $"-DoutputDirectory={Path.Combine("target", "aspire-deps")}", "-DincludeScope=runtime"],
161"-d", Path.Combine("target", "classes"),
171["-cp", $"{Path.Combine("target", "classes")}{Path.PathSeparator}{Path.Combine("target", "aspire-deps", "*")}", "AppHost"],
186File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
210Outputs = [Path.Combine(".java-build", "AppHost.class")],
212StampFile = Path.Combine(".java-build", ".aspire-compile-stamp")
231Assert.Contains(Path.Combine(outputDirectoryName, "aspire-deps"), inputs);
233? Path.Combine("target", "classes")
235Assert.Equal([Path.Combine(expectedClassesDirectory, "AppHost.class")], check.Outputs!);
243File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
281File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
315var wrapperPath = Path.Combine(workspace.Path, expectedWrapper);
352var rootWrapperPath = Path.Combine(workspace.Path, expectedWrapper);
355var moduleDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "apphost"));
356File.WriteAllText(Path.Combine(moduleDirectory.FullName, useMaven ? "pom.xml" : "build.gradle"), "");
362Assert.Equal(["/c", "call", Path.Combine("..", expectedWrapper)], invocation.PrefixArgs);
376var localRepository = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-maven-repository"));
386Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
410Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
417$"-DoutputDirectory={Path.Combine("target", "aspire-deps")}",
442var localRepository = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-maven-repository"));
452Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
480Path.Combine(workspace.Path, "pom.xml"),
484var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "standalone"));
485File.WriteAllText(Path.Combine(appHostDirectory.FullName, "pom.xml"), "<project />");
496$"-DoutputDirectory={Path.Combine("target", "aspire-deps")}",
504File.WriteAllText(Path.Combine(root, "pom.xml"), """
521var libraryDirectory = Directory.CreateDirectory(Path.Combine(root, "library"));
522File.WriteAllText(Path.Combine(libraryDirectory.FullName, "pom.xml"), """
536Path.Combine(librarySources.FullName, "Library.java"),
539var appHostProjectDirectory = Directory.CreateDirectory(Path.Combine(root, "apphost"));
540File.WriteAllText(Path.Combine(appHostProjectDirectory.FullName, "pom.xml"), """
562Path.Combine(appHostDirectory.FullName, "AppHost.java"),
571Path.Combine(wrapperSource, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
572Path.Combine(root, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"));
576Path.Combine(wrapperDirectory.FullName, "maven-wrapper.properties"));
583File.WriteAllText(Path.Combine(root, "pom.xml"), """
596var appHostProjectDirectory = Directory.CreateDirectory(Path.Combine(root, "apphost"));
597File.WriteAllText(Path.Combine(appHostProjectDirectory.FullName, "pom.xml"), """
608Path.Combine(appHostDirectory.FullName, "AppHost.java"),
617Path.Combine(wrapperSource, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
618Path.Combine(root, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"));
622Path.Combine(wrapperDirectory.FullName, "maven-wrapper.properties"));
693File.WriteAllText(Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? windowsWrapperName : wrapperName), "");
695var innerCheckout = Directory.CreateDirectory(Path.Combine(workspace.Path, "inner"));
696Directory.CreateDirectory(Path.Combine(innerCheckout.FullName, ".git"));
697File.WriteAllText(Path.Combine(innerCheckout.FullName, useMaven ? "pom.xml" : "build.gradle"), "");
709File.WriteAllText(Path.Combine(directory, "pom.xml"), "");
713File.WriteAllText(Path.Combine(directory, "settings.gradle"), "");
721File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
740File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
756File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
760await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), "");
773File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
777Assert.False(Directory.Exists(Path.Combine(workspace.Path, "target")));
784File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
789await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), "");
806File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
823File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
838File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
848File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
859Assert.Contains(Path.Combine(toProjectRoot, "pom.xml"), spec.InstallDependencies.Args);
864Assert.Contains($"-DoutputDirectory={Path.Combine("target", "aspire-deps")}", spec.InstallDependencies.Args);
890File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
904Assert.Equal(scriptPath, Path.GetFullPath(Path.Combine(appHostDirectory.FullName, initScriptArgument)));
Projects\PrebuiltAppHostServerTests.cs (62)
31var path = Path.Combine(workspace.WorkspaceRoot.FullName, "IntegrationRestore.csproj");
48var path = Path.Combine(workspace.WorkspaceRoot.FullName, "IntegrationRestore.csproj");
61var path = Path.Combine(workspace.WorkspaceRoot.FullName, "IntegrationRestore.csproj");
121var referencedProject = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Hosting.Java.csproj");
139var referencedProject = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Hosting.Java.csproj");
144var packagesProps = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props");
160var leaf = Path.Combine(workspace.WorkspaceRoot.FullName, "Leaf.csproj");
162var referencedProject = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Hosting.Java.csproj");
180var leaf = Path.Combine(workspace.WorkspaceRoot.FullName, "Leaf.csproj");
182var referencedProject = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Hosting.Java.csproj");
195var first = Path.Combine(workspace.WorkspaceRoot.FullName, "First.csproj");
196var second = Path.Combine(workspace.WorkspaceRoot.FullName, "Second.csproj");
212var referencedProject = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Hosting.Java.csproj");
226var referencedProject = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Hosting.Java.csproj");
241var referencedProject = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Hosting.Java.csproj");
352var objDir = Path.Combine(restoreDir, "obj");
356File.WriteAllText(Path.Combine(objDir, "project.assets.json"), "{}");
359File.WriteAllText(Path.Combine(objDir, "aspire-restore.stamp"), fingerprint);
445Assert.Equal(Path.Combine("/tmp/work", PrebuiltAppHostServer.ClosureMetadataFileName), doc.Descendants(ns + "AspireClosureMetadataFile").FirstOrDefault()?.Value);
446Assert.Equal(Path.Combine("/tmp/work", PrebuiltAppHostServer.ClosureSourcesFileName), doc.Descendants(ns + "AspireClosureSourcesFile").FirstOrDefault()?.Value);
447Assert.Equal(Path.Combine("/tmp/work", PrebuiltAppHostServer.ClosureTargetsFileName), doc.Descendants(ns + "AspireClosureTargetsFile").FirstOrDefault()?.Value);
448Assert.Equal(Path.Combine("/tmp/work", PrebuiltAppHostServer.ProjectRefAssemblyNamesFileName), doc.Descendants(ns + "AspireProjectRefAssemblyNamesFile").FirstOrDefault()?.Value);
602var firstAppHost = workspace.CreateDirectory(Path.Combine("apps", "api"));
603var secondAppHost = workspace.CreateDirectory(Path.Combine("apps", "web"));
778var expectedCachePath = Path.Combine(
835var expectedCachePath = Path.Combine(
958var expectedCachePath = Path.Combine(
1257new DirectoryInfo(Path.Combine(Path.GetTempPath(), "hives")),
1258new DirectoryInfo(Path.Combine(Path.GetTempPath(), "cache")),
1259new DirectoryInfo(Path.Combine(Path.GetTempPath(), "sdks")),
1260new DirectoryInfo(Path.Combine(Path.GetTempPath(), "logs")),
1369var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1399var appSettingsPath = Path.Combine(workingDirectory, "appsettings.json");
1539var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1588var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1638var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1687var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1737var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1781var missingPackageSource = Path.Combine(workspace.WorkspaceRoot.FullName, "this-hive-was-deleted");
1783var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1841var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1908var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1997var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2079var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2302Assert.Equal(Path.Combine(layoutPath, "libs"), startInfo.Environment[KnownConfigNames.IntegrationLibsPath]);
2365var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories)
2366.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/'))
2419var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories)
2420.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/'))
2575var firstSourcePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2576var secondSourcePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2620var firstPackagePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2621var secondPackagePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2622var projectPath = Path.Combine(projectRoot.FullName, "MyIntegration.dll");
2757Path.Combine(
2778var sourcePath = Path.Combine(sourceRoot.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar));
2798File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ClosureMetadataFileName), metadataLines);
2799File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ClosureSourcesFileName), sourcePaths);
2800File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ClosureTargetsFileName), targetPaths);
2801File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ProjectRefAssemblyNamesFileName), projectReferenceAssemblyNames);
2844File.WriteAllText(Path.Combine(objDirectory.FullName, "project.assets.json"), projectAssetsContent);
2940var dashboardPath = Path.Combine(
Projects\ProjectLocatorTests.cs (220)
39var appHostFile = new FileInfo(Path.Combine(directory.FullName, "apphost.cs"));
71var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
75var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
78var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
102var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
106var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
109var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
131var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
135var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
138var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
164var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
168var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
171var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
197var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
201var firstAlternative = new FileInfo(Path.Combine(alternativesDirectory.FullName, "FirstAlternative.csproj"));
203var secondAlternative = new FileInfo(Path.Combine(alternativesDirectory.FullName, "SecondAlternative.csproj"));
206var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
230var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
234var alternativeAppHost = new FileInfo(Path.Combine(alternativeDirectory.FullName, "Alternative.csproj"));
237var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
259var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
262var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
283var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
286var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
308var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, $"AppHost{index}.csproj"));
313var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
363var configuredPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
365var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.csproj");
380var configuredPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
382var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.csproj");
398var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
402var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
405var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
429var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
433var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
436var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
465var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
469var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
472var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
514var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
535var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
556Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
567var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
571var decoyAppHost = new FileInfo(Path.Combine(decoyDirectory.FullName, "HealthyAppHost.csproj"));
574var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
576var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
606Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
617var outsideAppHost = new FileInfo(Path.Combine(outsideDirectory.FullName, "OutsideAppHost.csproj"));
621var configPath = Path.Combine(workingDirectory.FullName, AspireConfigFile.FileName);
655var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
687var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Missing.csproj"));
718var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebApp.csproj"));
747var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
751var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
755var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
780var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
784var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
811var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
815var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
838var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
843var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
879var staleProjectFile = new FileInfo(Path.Combine(staleProjectDirectory.FullName, "StaleProject.csproj"));
882var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
886var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
932var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
955var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
990var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
994var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj"));
997var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1028var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1032var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj"));
1035var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1065var guestAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
1068var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1102var configuredAppHostProjectFile = new FileInfo(Path.Combine(configuredAppHostDirectory.FullName, "ConfiguredAppHost.csproj"));
1105var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
1108var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1155var configuredAppHostProjectFile = new FileInfo(Path.Combine(configuredAppHostDirectory.FullName, "ConfiguredAppHost.csproj"));
1158var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
1161var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1207var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1211var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
1214var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1244var settingsAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SettingsAppHost.csproj"));
1250var configPath = Path.Combine(workingDirectory.FullName, AspireConfigFile.FileName);
1283var settingsAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.custom"));
1286var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1318var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1322var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
1348var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
1351var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
1366var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1369var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
1412var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectFileExtension}"));
1430var onDiskProjectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
1463var onDiskProjectFile = new FileInfo(Path.Combine(realDirectory.FullName, "RealAppHost.csproj"));
1466var linkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "LinkedAppHost");
1469var linkedProjectFile = new FileInfo(Path.Combine(linkDirectory, onDiskProjectFile.Name));
1494var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1509var legacyAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
1510var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"));
1513await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), JsonSerializer.Serialize(new
1548var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1568var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName));
1585var appHostFile = new FileInfo(Path.Combine(srcDirectory.FullName, "apphost.ts"));
1588var adjacentConfigPath = Path.Combine(srcDirectory.FullName, AspireConfigFile.FileName);
1633Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1652var appHost1File = new FileInfo(Path.Combine(appHost1Directory.FullName, "apphost.ts"));
1654var appHost1ConfigPath = Path.Combine(appHost1Directory.FullName, AspireConfigFile.FileName);
1664var appHost2File = new FileInfo(Path.Combine(appHost2Directory.FullName, "apphost.ts"));
1666var appHost2ConfigPath = Path.Combine(appHost2Directory.FullName, AspireConfigFile.FileName);
1703Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1722var appHostFile = new FileInfo(Path.Combine(srcDirectory.FullName, "apphost.ts"));
1757Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1771var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "MyAppHost.csproj"));
1778var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
1779var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
1801var aspireConfigFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1815var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1840var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
1866var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs"));
1876var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj"));
1881var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs"));
1921var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1941var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj"));
1946var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs"));
1982var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2009var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2033var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2054var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2057var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2080var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2091var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj"));
2106var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt"));
2126var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2131var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
2204: Path.Combine(executionContext.WorkingDirectory.FullName, AspireConfigFile.FileName);
2318var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
2373var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "UnbuildableAppHost.csproj"));
2391Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
2403var first = new FileInfo(Path.Combine(firstProjectDirectory.FullName, "FirstAppHost.csproj"));
2406var second = new FileInfo(Path.Combine(secondProjectDirectory.FullName, "SecondAppHost.csproj"));
2443var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2448var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2485var healthyAppHost = new FileInfo(Path.Combine(healthyDirectory.FullName, "HealthyAppHost.csproj"));
2490var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2493var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2526var configuredAppHost = new FileInfo(Path.Combine(configuredDirectory.FullName, "ConfiguredAppHost.csproj"));
2531var firstAppHost = new FileInfo(Path.Combine(firstDirectory.FullName, "FirstAppHost.csproj"));
2534var secondAppHost = new FileInfo(Path.Combine(secondDirectory.FullName, "SecondAppHost.csproj"));
2537var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2571var unsupportedAppHost = new FileInfo(Path.Combine(unsupportedDirectory.FullName, "UnsupportedAppHost.csproj"));
2576var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2627var appHostFile = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj"));
2630var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
2645var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2649var firstHealthy = new FileInfo(Path.Combine(firstHealthyDirectory.FullName, "FirstHealthyAppHost.csproj"));
2653var secondHealthy = new FileInfo(Path.Combine(secondHealthyDirectory.FullName, "SecondHealthyAppHost.csproj"));
2656var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2695var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj"));
2697var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj"));
2732var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs"));
2760var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj"));
2799var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
2804var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.cs"));
2842var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
2846var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
2884var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
2907var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2928var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2950var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3010var cachedProject = new FileInfo(Path.Combine(nugetCacheDir, "Aspire.AppHost1.csproj"));
3075var customCacheDir = Path.Combine(workspace.WorkspaceRoot.FullName, "custom-nuget-cache");
3078var cachedProject = new FileInfo(Path.Combine(cachedProjectDir, "Aspire.AppHost1.csproj"));
3107var customCacheDir = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
3112var siblingProject = new FileInfo(Path.Combine(siblingDir, "AppHost.csproj"));
3118var cachedProject = new FileInfo(Path.Combine(cachedProjectDir, "Aspire.AppHost1.csproj"));
3148var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyAppHost.csproj"));
3171var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3177var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3201var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "RealAppHost.csproj"));
3225await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "Not a real apphost");
3228await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "Not a real apphost");
3246var appHost1File = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
3249var appHost2File = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
3252var slowValidationFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SlowValidation.csproj"));
3305var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3309var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3313var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
3315var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
3338var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3342var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3346var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
3348var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
3537var configuredAppHost = new FileInfo(Path.Combine(configuredDirectory.FullName, "ConfiguredAppHost.csproj"));
3541var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3701var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3705var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3739var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3768var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.unknown"));
3772var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3801var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3805var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3849var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3884var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3915var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3942var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3967var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3992var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
4022var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
4049var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
4076var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
4114var realAppHost = new FileInfo(Path.Combine(realAppDirectory.FullName, "AppHost.csproj"));
4121var linkDirectory = Path.Combine(nodeModulesDir.FullName, "link");
4135var pathThroughLink = Path.Combine(linkDirectory, "AppHost.csproj");
4143var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
4186var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4189var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "APPHOST.csproj");
4197var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
4224var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
Projects\ProjectUpdaterTests.cs (79)
31var appHostProject = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj"));
34var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
36var appHostProjectViaSymlink = new FileInfo(Path.Combine(symlinkDirectory, appHostProject.Name));
48var lowerCaseProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.csproj"));
50var upperCaseProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
66var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
69var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
72var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
176var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
179var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
182var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
195var aspireConfigFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"));
340var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
343var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
346var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
358var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json"));
447var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
450var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
453var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
463var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json"));
617var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
737var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj"));
740var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj"));
743var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj"));
746var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj"));
870var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
873var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
875var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1006var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1008var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1108var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1110var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1230var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1232var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1341var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1420var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1497var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1498var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1597Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1598Assert.False(File.Exists(Path.Combine(appHostProjectFile.DirectoryName!, "nuget.config")));
1612var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1666Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1672var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1809var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1811var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1922var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1924var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2046var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2048var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2160var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2162var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2271var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2365var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2367var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2467var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2546var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2628var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2721var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2815var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2891var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2973var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3059var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3137var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3215var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3339var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3341var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
3466var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3499var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3531var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3568var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3604var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3637var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3674var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3692var directoryPackagesPropsFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props");
3745var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "Issue15891.AppHost.csproj"));
3859var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3936var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3990var existingConfigFile = new FileInfo(Path.Combine(executionContext.WorkingDirectory.FullName, "nuget.config"));
4026var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
Projects\RepositoryToolUpdaterTests.cs (23)
26var workingDirectory = root.CreateSubdirectory(Path.Combine("src", "app"));
60var unrelatedPath = Path.Combine(child.CreateSubdirectory(".config").FullName, "dotnet-tools.json");
80var rootManifestPath = Path.Combine(child.CreateSubdirectory(".config").FullName, "dotnet-tools.json");
105var gitPath = Path.Combine(root.FullName, ".git");
142var unrelatedPath = Path.Combine(child.FullName, "package.json");
167var link = Path.Combine(root.FullName, directoryLink ? ".config" : "package.json");
169var alias = Path.Combine(workspace.WorkspaceRoot.FullName, "alias");
193var manifestPath = Path.Combine(configDirectory.FullName, "dotnet-tools.json");
212var unrelatedPath = Path.Combine(root.FullName, "package.json");
215var workingDirectory = root.CreateSubdirectory(Path.Combine("src", "app"));
216var localManifestPath = Path.Combine(workingDirectory.CreateSubdirectory(".config").FullName, "dotnet-tools.json");
253var manifestPath = Path.Combine(root.FullName, "package.json");
317var lockPath = Path.Combine(root.FullName, "package-lock.json");
385Assert.False(File.Exists(Path.Combine(root.FullName, "package-lock.json")));
386Assert.False(File.Exists(Path.Combine(root.FullName, "npm-shrinkwrap.json")));
461var lockPath = Path.Combine(root.FullName, "package-lock.json");
552var path = Path.Combine(root.FullName, isNpm ? "package.json" : "dotnet-tools.json");
576var lockPath = Path.Combine(root.FullName, "package-lock.json");
609var dotNetPath = Path.Combine(root.FullName, "dotnet-tools.json");
610var npmPath = Path.Combine(root.FullName, "package.json");
731var path = Path.Combine(directory.FullName, isNpm ? "package.json" : "dotnet-tools.json");
762var packageLockPath = Path.Combine(directory.FullName, "package-lock.json");
763var shrinkwrapPath = Path.Combine(directory.FullName, "npm-shrinkwrap.json");
Projects\TypeScriptAppHostToolchainResolverTests.cs (39)
18File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
29File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"deno@2.9.0\" }");
42var packageJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "package.json");
57File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
58File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "deno.lock"), "{ \"version\": \"5\" }");
70File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
71File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "deno.json"), "{}");
83File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
84File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "deno.jsonc"), "{ /* Deno configuration */ }");
96File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
97File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "pnpm-lock.yaml"), "lockfileVersion: '9.0'");
108var packageJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "package.json");
120File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"yarn@4.14.1\" }");
131File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
132var yarnLockPath = Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock");
146File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
147File.WriteAllText(Path.Combine(parentDirectory.FullName, "package.json"), "{ \"name\": \"workspace\" }");
148var yarnLockPath = Path.Combine(parentDirectory.FullName, "yarn.lock");
162File.WriteAllText(Path.Combine(parentDirectory.FullName, "package.json"), "{ \"name\": \"workspace\" }");
163File.WriteAllText(Path.Combine(parentDirectory.FullName, "yarn.lock"), string.Empty);
164File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
165File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package-lock.json"), "{}");
177File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
178File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package-lock.json"), "{}");
179File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock"), string.Empty);
191File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
192Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".yarn"));
203File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
214File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
215File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock"), string.Empty);
234File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.12.1\" }");
235File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
248File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.12.1\" }");
249File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
254Assert.Equal($"packageManager 'bun@1.2.0' found in {Path.Combine(appHostDirectory.FullName, "package.json")}", resolution.Reason);
263File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"yarn@4.14.1\" }");
264File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
265File.WriteAllText(Path.Combine(appHostDirectory.FullName, "pnpm-lock.yaml"), "lockfileVersion: '9.0'");
277File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
Scaffolding\ScaffoldingServiceTests.cs (11)
36File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}");
41Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName),
74File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}");
156var appHostDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName));
157File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{ \"packageManager\": \"npm@10.0.0\" }");
158File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.0.0\" }");
228var scaffoldDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName));
251File.WriteAllText(Path.Combine(rootDirectory.FullName, ".gitignore"), "node_modules/\n");
252File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}");
253File.WriteAllText(Path.Combine(rootDirectory.FullName, "apphost.mts"), string.Empty);
290Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ".vscode"));
Telemetry\InternalMicrosoftDetectorTests.cs (12)
630await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
631await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
668await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
669await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
702await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
703await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
893macPlatformSsoPath: Path.Combine(workspace.Path, "missing-app-sso"));
906var appSsoPath = Path.Combine(workspace.Path, "app-sso");
1044await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
1045await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
1075await File.WriteAllTextAsync(Path.Combine(workspace.Path, executable), string.Empty);
1106await File.WriteAllTextAsync(Path.Combine(workspace.Path, executable), string.Empty);
Templating\DotNetTemplateFactoryTests.cs (17)
39var path = Path.Combine(dir.FullName, "nuget.config");
64var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
96var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
109var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
134var parentConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
140var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
153var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
176var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
190var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
203var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
207var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
220var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
229var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
230var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
241var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
250var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
251var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
Templating\JavaStarterScaffoldTests.cs (7)
62.EnumerateFiles(Path.Combine(outputDirectory, "api"), "*", SearchOption.AllDirectories)
96Assert.True(File.Exists(Path.Combine(outputDirectory, "AppHost.java")));
105Assert.True(File.Exists(Path.Combine(outputDirectory, ".project")));
106Assert.True(File.Exists(Path.Combine(outputDirectory, ".classpath")));
108Assert.Contains("<name>JavaStarterOut</name>", File.ReadAllText(Path.Combine(outputDirectory, ".project")));
110using var config = JsonDocument.Parse(File.ReadAllText(Path.Combine(outputDirectory, "aspire.config.json")));
151return new ScaffoldedTemplate(workspace, Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName));
Templating\OutputPathHelperTests.cs (6)
36File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
52File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
67File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
99var path = Path.Combine(workspace.WorkspaceRoot.FullName, "new-dir");
122File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
159File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
Templating\TemplateNuGetConfigServiceTests.cs (25)
31Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"),
60var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config"));
101var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config"));
115Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"),
125Path.Combine(outputDirectory.FullName, "nuget.config"),
145var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config"));
179Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
449Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"),
647File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
648File.WriteAllText(Path.Combine(prPackagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty);
721File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
722File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"), string.Empty);
763Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"),
800File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty);
801File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.99.0.0.nupkg"), string.Empty);
836File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.99.0.0.nupkg"), string.Empty);
877File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty);
878File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.7.0-dev.nupkg"), string.Empty);
978File.WriteAllText(Path.Combine(packagesDir.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
1123var configPath = Path.Combine(outputDir.FullName, "nuget.config");
1161Assert.False(File.Exists(Path.Combine(outputDir.FullName, "nuget.config")));
1172Path.Combine(outputDir.FullName, "nuget.config"),
1206var configPath = Path.Combine(outputDir.FullName, "nuget.config");
1233Path.Combine(outputDir.FullName, "nuget.config"),
1262var configPath = Path.Combine(outputDir.FullName, "nuget.config");
TestServices\FakePlaywrightServices.cs (8)
66_bundleDirectory = new DirectoryInfo(Path.Combine(executionContext.WorkingDirectory.FullName, ".fake-aspire-skills-bundle"));
100[(CommonAgentApplicators.AspireSkillName, Path.Combine("references", "app-commands.md"))] = "# App commands",
101[(CommonAgentApplicators.AspireSkillName, Path.Combine("evals", "evals.json"))] = "{}",
120[(CommonAgentApplicators.AspireDeploymentSkillName, Path.Combine("references", "preflight.md"))] = "# Preflight",
157[(AspireProjectV2MigrationSkillName, Path.Combine("references", "migration-patterns.md"))] = "# Migration patterns",
158[(AspireProjectV2MigrationSkillName, Path.Combine("references", "compatibility-and-validation.md"))] = "# Compatibility and validation",
159[(AspireProjectV2MigrationSkillName, Path.Combine("evals", "eval.yaml"))] = "stimuli: []"
190await File.WriteAllTextAsync(Path.Combine(_bundleDirectory.FullName, "skill-manifest.json"), manifestJson, cancellationToken);
Utils\CliPathHelperTests.cs (12)
156var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
157var binDir = Path.Combine(installPrefix, "bin");
169var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
198var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "portable");
223Assert.Equal(Path.Combine("/home/user", ".aspire"), result);
259var target = Path.Combine(workspace.WorkspaceRoot.FullName, "target-aspire");
262var link = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
334var realPath = Path.Combine(workspace.WorkspaceRoot.FullName, "binary-under-test");
350var realPath = Path.Combine(workspace.WorkspaceRoot.FullName, "binary-under-test");
370var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "portable");
389var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
391File.WriteAllText(Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName), $$"""{"source":"{{source}}"}""");
Utils\DevCertsCheckTests.cs (28)
68var certUtilPath = Path.Combine(directory.FullName, CertificateHelpers.CertUtilCommand);
81? Path.Combine(directory.FullName, "openssl.cmd")
82: Path.Combine(directory.FullName, "openssl");
116File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificatePem);
117File.WriteAllText(Path.Combine(trustDirectory.FullName, hashEntryName), certificatePem);
343["PATH"] = Path.Combine(AppContext.BaseDirectory, Guid.NewGuid().ToString("N"))
406var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
450var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
501var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
556var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
557File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
606var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
607File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
665var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
666File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
722var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
723File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
764var trustDirectory = Path.Combine(tempDirectory.FullName, "missing-trust");
808var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
852var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
854File.WriteAllText(Path.Combine(trustDirectory.FullName, corruptCertificateFileName), "not a certificate");
898var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
900File.WriteAllText(Path.Combine(trustDirectory.FullName, corruptCertificateFileName), "not a certificate");
944var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
946File.WriteAllText(Path.Combine(trustDirectory.FullName, "unrelated.pem"), "not a certificate");
988var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
989File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), staleCertificate.ExportCertificatePem());
1042["PATH"] = Path.Combine(AppContext.BaseDirectory, Guid.NewGuid().ToString("N"))
Utils\FileSystemHelperTests.cs (57)
16var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
19File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "content1");
20File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "content2");
21File.WriteAllText(Path.Combine(sourceDir.FullName, "file3.cs"), "using System;");
28Assert.True(File.Exists(Path.Combine(destDir, "file1.txt")));
29Assert.True(File.Exists(Path.Combine(destDir, "file2.txt")));
30Assert.True(File.Exists(Path.Combine(destDir, "file3.cs")));
32Assert.Equal("content1", File.ReadAllText(Path.Combine(destDir, "file1.txt")));
33Assert.Equal("content2", File.ReadAllText(Path.Combine(destDir, "file2.txt")));
34Assert.Equal("using System;", File.ReadAllText(Path.Combine(destDir, "file3.cs")));
43var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
49File.WriteAllText(Path.Combine(sourceDir.FullName, "root.txt"), "root content");
50File.WriteAllText(Path.Combine(subDir1.FullName, "level1.txt"), "level 1 content");
51File.WriteAllText(Path.Combine(subDir2.FullName, "level2.txt"), "level 2 content");
58Assert.True(File.Exists(Path.Combine(destDir, "root.txt")));
59Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1")));
64Assert.Equal("root content", File.ReadAllText(Path.Combine(destDir, "root.txt")));
75var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "empty_destination");
91var nonExistentSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nonexistent");
92var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
104var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
128var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
153var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
156var binaryFilePath = Path.Combine(sourceDir.FullName, "binary.dat");
165var copiedFilePath = Path.Combine(destDir, "binary.dat");
178var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
185File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}");
195currentDest = Path.Combine(currentDest, $"level{i}");
197var filePath = Path.Combine(currentDest, $"file{i}.txt");
209var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
212File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "new content 1");
213File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "new content 2");
216File.WriteAllText(Path.Combine(subDir.FullName, "project.assets.json"), "new assets");
217File.WriteAllText(Path.Combine(subDir.FullName, "project.csproj.nuget.dgspec.json"), "new dgspec");
221File.WriteAllText(Path.Combine(destDir, "file1.txt"), "old content 1");
222File.WriteAllText(Path.Combine(destDir, "file2.txt"), "old content 2");
224var destSubDir = Directory.CreateDirectory(Path.Combine(destDir, "obj"));
225File.WriteAllText(Path.Combine(destSubDir.FullName, "project.assets.json"), "old assets");
226File.WriteAllText(Path.Combine(destSubDir.FullName, "project.csproj.nuget.dgspec.json"), "old dgspec");
232Assert.Equal("new content 1", File.ReadAllText(Path.Combine(destDir, "file1.txt")));
233Assert.Equal("new content 2", File.ReadAllText(Path.Combine(destDir, "file2.txt")));
244var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
247File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "new content");
251File.WriteAllText(Path.Combine(destDir, "file1.txt"), "old content");
284Assert.Equal(Path.Combine("folder1", "Project.csproj"), result[paths[0]]);
285Assert.Equal(Path.Combine("folder2", "Project.csproj"), result[paths[1]]);
299Assert.Equal(Path.Combine("folder1", "Project.csproj"), result[paths[0]]);
300Assert.Equal(Path.Combine("folder2", "Project.csproj"), result[paths[1]]);
325Assert.Equal(Path.Combine("MyApp", "AppHost.cs"), result[paths[0]]);
348Assert.Equal(Path.Combine("App1", "AppHost.cs"), result[paths[0]]);
362Assert.Equal(Path.Combine("App1", "AppHost.cs"), result[paths[0]]);
363Assert.Equal(Path.Combine("App2", "AppHost.cs"), result[paths[1]]);
393Assert.Equal(Path.Combine("App2", "AppHost.cs"), result[paths[1]]);
416Assert.Equal(Path.Combine("folder1", "Project.csproj"), result[paths[0]]);
417Assert.Equal(Path.Combine("folder2", "Project.csproj"), result[paths[1]]);
449Assert.Equal(Path.Combine("Folder", "Project.csproj"), result[paths[0]]);
450Assert.Equal(Path.Combine("folder", "Project.csproj"), result[paths[1]]);
Utils\LegacySettingsFileCheckTests.cs (16)
15var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
17await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
21var subDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "src"));
43Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
60var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
62await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
64Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
83Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
88var subDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "src"));
105var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
107await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
131var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
133await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
136var childDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "project"));
139Path.Combine(childDir.FullName, AspireConfigFile.FileName),
143var workingDir = new DirectoryInfo(Path.Combine(childDir.FullName, "src"));
Utils\PathNormalizerTests.cs (14)
20var file = new FileInfo(Path.Combine(subdir.FullName, "app.csproj"));
41var file = new FileInfo(Path.Combine(directory.FullName, "App.csproj"));
60var file = new FileInfo(Path.Combine(directory.FullName, "App.csproj"));
91var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "target.csproj"));
94var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "link.csproj");
116var file = new FileInfo(Path.Combine(nested.FullName, "app.csproj"));
119var linkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
137var missingTarget = Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj");
138var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "broken-link.csproj");
156var projectFile = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj"));
159var linkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
162var linkPath = Path.Combine(linkDirectory, projectFile.Name);
176var file = new FileInfo(Path.Combine(tempDirectory.FullName, "AppHost.csproj"));
204Assert.EndsWith(Path.Combine("Missing.AppHost", "Missing.AppHost.csproj"), resolved, StringComparison.Ordinal);
Utils\ReparsePointTests.cs (59)
16var target = Path.Combine(root, "real");
18File.WriteAllText(Path.Combine(target, "marker"), "hello");
20var link = Path.Combine(root, "link");
27Assert.Equal("hello", File.ReadAllText(Path.Combine(link, "marker")));
43var target1 = Path.Combine(root, "t1");
44var target2 = Path.Combine(root, "t2");
47File.WriteAllText(Path.Combine(target1, "id"), "one");
48File.WriteAllText(Path.Combine(target2, "id"), "two");
50var link = Path.Combine(root, "link");
52Assert.Equal("one", File.ReadAllText(Path.Combine(link, "id")));
58Assert.Equal("two", File.ReadAllText(Path.Combine(link, "id")));
77var real = Path.Combine(root, "link");
79File.WriteAllText(Path.Combine(real, "legacy"), "legacy");
81var target = Path.Combine(root, "target");
90Assert.True(File.Exists(Path.Combine(real, "legacy")));
97var dir = Path.Combine(workspace.WorkspaceRoot.FullName, "plain");
107Assert.False(ReparsePoint.IsReparsePoint(Path.Combine(workspace.WorkspaceRoot.FullName, "nope")));
116var target = Path.Combine(root, "target");
118var markerPath = Path.Combine(target, "keep");
121var link = Path.Combine(root, "link");
134var dir = Path.Combine(workspace.WorkspaceRoot.FullName, "plain");
135Directory.CreateDirectory(Path.Combine(dir, "nested"));
147ReparsePoint.RemoveIfExists(Path.Combine(workspace.WorkspaceRoot.FullName, "missing"));
156var link = Path.Combine(root, "bundle");
159var resolvedTarget = ReparsePoint.ResolveTargetPath(link, Path.Combine("versions", "v1"));
170var link = Path.Combine(root, "bundle");
173Directory.CreateSymbolicLink(link, Path.Combine("versions", "missing"));
210var target = Path.Combine(root, "real");
212File.WriteAllText(Path.Combine(target, "marker"), "hello");
214var link = Path.Combine(root, "junction");
223Assert.Equal("hello", File.ReadAllText(Path.Combine(link, "marker")));
241var target = Path.Combine(root, "real");
242var nestedDir = Path.Combine(target, "nested");
244File.WriteAllText(Path.Combine(nestedDir, "data.txt"), "payload");
246var link = Path.Combine(root, "junction");
254var nestedThroughLink = Path.Combine(link, "nested");
256Assert.Equal("payload", File.ReadAllText(Path.Combine(nestedThroughLink, "data.txt")));
280var target = Path.Combine(root, "real");
282var markerPath = Path.Combine(target, "keep");
285var link = Path.Combine(root, "junction");
304var target = Path.Combine(root, "real");
307var link = Path.Combine(root, "junction");
348var targetV1 = Path.Combine(root, "v1");
349var targetV2 = Path.Combine(root, "v2");
352File.WriteAllText(Path.Combine(targetV1, "id"), "one");
353File.WriteAllText(Path.Combine(targetV2, "id"), "two");
355var link = Path.Combine(root, "link");
362Assert.Equal("one", File.ReadAllText(Path.Combine(link, "id")));
372Assert.Equal("two", File.ReadAllText(Path.Combine(link, "id")));
382Assert.True(File.Exists(Path.Combine(targetV1, "id")));
404var probe = Path.Combine(root, "symlink-probe");
405var probeTarget = Path.Combine(root, "probe-target");
428var targetV1 = Path.Combine(root, "v1");
429var targetV2 = Path.Combine(root, "v2");
432File.WriteAllText(Path.Combine(targetV1, "id"), "one");
433File.WriteAllText(Path.Combine(targetV2, "id"), "two");
435var link = Path.Combine(root, "link");
453Assert.Equal("two", File.ReadAllText(Path.Combine(link, "id")));
456Assert.True(File.Exists(Path.Combine(targetV1, "id")));
Aspire.Components.Common.TestUtilities (1)
Aspire.Dashboard (28)
ServiceClient\DashboardRunStore.cs (17)
133DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName);
140CurrentWorkingDirectory = Path.Combine(_runsDirectory, runId);
141DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName);
149File.WriteAllText(Path.Combine(CurrentWorkingDirectory, _applicationMarkerFileName), string.Empty);
157_metadataPath = Path.Combine(CurrentWorkingDirectory, "run.json");
162CurrentWorkingDirectory = Path.Combine(resumesDirectory, _applicationMarkerFileName);
163DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName);
222!File.Exists(Path.Combine(directory, DatabaseFileName)))
326var metadataPath = Path.Combine(runDirectory, "run.json");
414if (!File.Exists(Path.Combine(directory, _applicationMarkerFileName)))
419var metadataPath = Path.Combine(directory, "run.json");
547var metadataPath = Path.Combine(runDirectory, "run.json");
607Path.Combine(runDirectory, metadata.DatabaseFileName),
616return Path.Combine(GetResumesDirectory(dataRoot), GetApplicationDirectoryName(applicationName));
619internal static string GetRunsDirectory(string? dataRoot) => Path.Combine(GetDataRoot(dataRoot), "runs");
621internal static string GetResumesDirectory(string? dataRoot) => Path.Combine(GetDataRoot(dataRoot), "resumes");
625? Path.Combine(AspireHomeDirectory.GetDefault(), "dashboard")
Aspire.Dashboard.Components.Tests (5)
Aspire.Dashboard.Tests (65)
Model\DashboardDataSourceTests.cs (29)
40var expectedRunsDirectory = Path.Combine(workspace.Path, "runs");
42Assert.True(File.Exists(Path.Combine(runStore.CurrentWorkingDirectory, applicationDirectoryName)));
43Assert.False(Directory.Exists(Path.Combine(workspace.Path, applicationDirectoryName)));
55var expectedResumesDirectory = Path.Combine(workspace.Path, "resumes");
56Assert.Equal(Path.Combine(expectedResumesDirectory, applicationDirectoryName), runStore.CurrentWorkingDirectory);
57Assert.True(File.Exists(Path.Combine(expectedResumesDirectory, $"{applicationDirectoryName}.lock")));
142var metadataPath = Path.Combine(runStore.CurrentWorkingDirectory, "run.json");
176using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(runStore.CurrentWorkingDirectory, "run.json")));
199metadataPath = Path.Combine(historicalRunStore.CurrentWorkingDirectory, "run.json");
256using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(currentRunStore.CurrentWorkingDirectory, "run.json")));
284Assert.False(File.Exists(Path.Combine(runStore.CurrentWorkingDirectory, "run.json")));
403File.WriteAllText(Path.Combine(abandonedDirectory, "dashboard.db"), string.Empty);
426var abandonedLockPath = Path.Combine(temporaryRoot, $"aspire-dashboard-{Guid.NewGuid():N}.lock");
427var activeLockPath = Path.Combine(temporaryRoot, $"aspire-dashboard-{Guid.NewGuid():N}.lock");
428var unrelatedLockPath = Path.Combine(temporaryRoot, $"unrelated-{Guid.NewGuid():N}.lock");
507File.WriteAllText(Path.Combine(otherDirectory, "dashboard.db"), string.Empty);
648var databasePath = Path.Combine(workspace.Path, $"malformed-{Guid.NewGuid():N}.db");
755var metadataPath = Path.Combine(incompatibleRunDirectory, "run.json");
796var metadataPath = Path.Combine(futureRunDirectory, "run.json");
840var metadataPath = Path.Combine(incompatibleRunDirectory, "run.json");
951var abandonedLockPath = Path.Combine(runsDirectory, "abandoned.lock");
952var activeLockPath = Path.Combine(runsDirectory, "active.lock");
1038using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(pinnedRunDirectories[^1], "run.json")));
1213using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(Path.GetDirectoryName(historicalRun.DatabasePath)!, "run.json")));
1307var historicalDirectory = Path.Combine(workspace.Path, "historical");
1308var historicalDatabasePath = Path.Combine(historicalDirectory, DashboardRunStore.DatabaseFileName);
1313var malformedDirectory = Path.Combine(workspace.Path, "malformed");
1314var malformedDatabasePath = Path.Combine(malformedDirectory, DashboardRunStore.DatabaseFileName);
1373var database = new DashboardSqliteDatabase(Path.Combine(workspace.Path, "connection.db"));
Model\DashboardSqliteDatabaseTests.cs (11)
27using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
38var databasePath = Path.Combine(_workspace.Path, "dashboard.db");
56using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
74using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
106using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
129using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
146using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
165using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
185using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
206using var observedDatabase = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "observed.db"), pooling: false);
207using var otherDatabase = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "other.db"), pooling: false);
Aspire.Deployment.EndToEnd.Tests (166)
AzureSandboxesDeploymentTests.cs (19)
59var defaultUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-default-url.txt");
60var anonymousUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-anonymous-url.txt");
61var deployOutputFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-deploy-output.txt");
62var stateMarkerFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-state-marker");
248var firstDeployOutputFile = Path.Combine(workspace.WorkspaceRoot.FullName, "first-deploy-output.txt");
249var secondDeployOutputFile = Path.Combine(workspace.WorkspaceRoot.FullName, "second-deploy-output.txt");
250var firstUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "first-url.txt");
251var secondUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "second-url.txt");
252var stateMarkerFile = Path.Combine(workspace.WorkspaceRoot.FullName, "state-marker");
419var siteDir = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "site"));
420File.WriteAllText(Path.Combine(siteDir.FullName, "Dockerfile"), """
425File.WriteAllText(Path.Combine(siteDir.FullName, "index.html"), $$"""
433File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"), """
465var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
466var appHostFilePath = Path.Combine(projectDir, "apphost.cs");
513var serviceDir = Path.Combine(projectDir, serviceName);
514var propertiesDir = Directory.CreateDirectory(Path.Combine(serviceDir, "Properties"));
560File.WriteAllText(Path.Combine(serviceDir, "Program.cs"), program);
561File.WriteAllText(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
FoundryHostedAgentDeploymentTests.cs (7)
756var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
757var hostedAgentDir = Path.Combine(projectDir, "DotNetHostedAgent");
758var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost");
768File.WriteAllText(Path.Combine(hostedAgentDir, "DotNetHostedAgent.csproj"), """
792File.WriteAllText(Path.Combine(hostedAgentDir, "Program.cs"), """
864File.WriteAllText(Path.Combine(hostedAgentDir, ".dockerignore"), """
883var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
TypeScriptJavaScriptHostingDeploymentTests.cs (7)
123var apiDir = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "api"));
124File.WriteAllText(Path.Combine(apiDir.FullName, "package.json"), """
134File.WriteAllText(Path.Combine(apiDir.FullName, "server.js"), """
144var staticSiteDir = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "staticsite"));
145File.WriteAllText(Path.Combine(staticSiteDir.FullName, "package.json"), """
155File.WriteAllText(Path.Combine(staticSiteDir.FullName, "index.html"), """
168File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"), """
Aspire.EndToEnd.Tests (35)
tests\Shared\TemplatesTesting\AspireProject.cs (19)
23Path.Combine(BuildEnvironment.TestAssetsPath, "nuget8.config");
32public string ServiceDefaultsProjectPath => Path.Combine(RootDir, $"{Id}.ServiceDefaults");
33public string TestsProjectDirectory => Path.Combine(RootDir, $"{Id}.Tests");
48LogPath = Path.Combine(_buildEnv.LogRootPath, Id);
50AppHostProjectDirectory = Path.Combine(RootDir, $"{Id}.AppHost");
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
72string targetNuGetConfigPath = Path.Combine(dir, "nuget.config");
93projectDir = Path.Combine(rootDir, id);
97rootDir = projectDir = Path.Combine(BuildEnvironment.TestRootPath, id);
100string logPath = Path.Combine(BuildEnvironment.ForDefaultFramework.LogRootPath, id);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
153File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
154string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
332workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
336var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
339var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
Aspire.Hosting (61)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (11)
Aspire.Hosting.Azure.Functions (3)
Aspire.Hosting.Azure.Kubernetes (1)
Aspire.Hosting.Azure.Kubernetes.Tests (1)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Tests (46)
AzureEnvironmentResourceTests.cs (15)
38var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
75var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
126var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
174var mainBicep = File.ReadAllText(Path.Combine(workspace.FullName, "main.bicep"));
203var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
248var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
264var outputPath = Path.Combine(workspace.Path, "exclude-main");
273Assert.False(File.Exists(Path.Combine(outputPath, "main.bicep")));
293var outputPath = Path.Combine(workspace.Path, "write-main");
309var mainBicep = await File.ReadAllTextAsync(Path.Combine(outputPath, "main.bicep"));
367var mainBicepPath = Path.Combine(workspace.Path, "main.bicep");
398var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
425var bicepFilePath = Path.Combine(workspace, bicepFileName);
444var outputDir = Path.Combine(workspace, "output");
461var mainBicepPath = Path.Combine(outputDir, "main.bicep");
Aspire.Hosting.Blazor (7)
Aspire.Hosting.Blazor.Tests (18)
EndpointsManifestTransformerTests.cs (10)
38var manifestPath = Path.Combine(_tempDir, "endpoints.json");
63var manifestPath = Path.Combine(_tempDir, "endpoints.json");
94var manifestPath = Path.Combine(_tempDir, "endpoints.json");
118var manifestPath = Path.Combine(_tempDir, "endpoints.json");
175var app1Path = Path.Combine(_tempDir, "app1.runtime.json");
176var app2Path = Path.Combine(_tempDir, "app2.runtime.json");
190var outputPath = Path.Combine(_tempDir, "merged.json");
239var app1Path = Path.Combine(_tempDir, "app1.runtime.json");
240var app2Path = Path.Combine(_tempDir, "app2.runtime.json");
254var outputPath = Path.Combine(_tempDir, "merged.json");
Aspire.Hosting.Browsers (9)
Aspire.Hosting.Browsers.Tests (43)
BrowserLogsSessionManagerTests.cs (26)
25var executablePath = Path.Combine(userDataDirectory, "browser");
64var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
104var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
139var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
173var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
259Path.Combine(userDataDirectory.FullName, "browser"),
289Path.Combine(userDataDirectory.FullName, "bröwser"),
319Path.Combine(userDataDirectory.FullName, "browser"),
352Path.Combine(userDataDirectory.FullName, "browser"),
382Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
395Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
396Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
398Path.Combine(userDataDirectory, "Local State"),
425Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
426Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
427Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 2"));
428Directory.CreateDirectory(Path.Combine(userDataDirectory, "System Profile"));
430Path.Combine(userDataDirectory, "Local State"),
480Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
481Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
482File.WriteAllText(Path.Combine(userDataDirectory, "Local State"), "{");
508Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
509Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
511Path.Combine(userDataDirectory, "Local State"),
631Path.Combine(AppContext.BaseDirectory, "browser"),
632Path.Combine(AppContext.BaseDirectory, "user-data")),
Aspire.Hosting.CodeGeneration.Go (2)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
Aspire.Hosting.CodeGeneration.Java (3)
Aspire.Hosting.CodeGeneration.Java.Tests (11)
Aspire.Hosting.CodeGeneration.Python (3)
Aspire.Hosting.CodeGeneration.Python.Tests (3)
Aspire.Hosting.CodeGeneration.Rust (2)
Aspire.Hosting.CodeGeneration.Rust.Tests (8)
RustLanguageSupportTests.cs (5)
42File.WriteAllText(Path.Combine(workspace.Path, "apphost.rs"), "// marker");
43File.WriteAllText(Path.Combine(workspace.Path, "Cargo.toml"), "[package]");
57File.WriteAllText(Path.Combine(workspace.Path, "apphost.ts"), "// typescript");
58File.WriteAllText(Path.Combine(workspace.Path, "Cargo.toml"), "[package]");
70File.WriteAllText(Path.Combine(workspace.Path, "apphost.rs"), "// marker");
Aspire.Hosting.CodeGeneration.TypeScript (5)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (8)
Aspire.Hosting.Containers.Tests (11)
Aspire.Hosting.DevTunnels.Tests (1)
Aspire.Hosting.Docker (9)
Aspire.Hosting.Docker.Tests (64)
DockerComposePublisherTests.cs (49)
101var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
102var envPath = Path.Combine(workspace.Path, ".env");
124var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml"));
162var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
163var envPath = Path.Combine(workspace.Path, ".env");
185var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml"));
186var environment = File.ReadAllText(Path.Combine(workspace.Path, ".env"));
210var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
239var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
290var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
292var envPath = Path.Combine(workspace.Path, ".env");
303var envFilePath = Path.Combine(workspace.Path, ".env");
334var envFilePath = Path.Combine(workspace.Path, ".env");
389var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
415var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
447var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
478var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
506var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
540var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
564var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
592var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
622var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
651var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
683var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
708var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
732var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
759var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
788var envFilePath = Path.Combine(workspace.Path, ".env.Staging");
822var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
844var envFilePath = Path.Combine(workspace.Path, ".env.Production");
878var envFilePath = Path.Combine(workspace.Path, ".env.Staging");
911var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml"));
912var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
944var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
970var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
995var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
996var envPath = Path.Combine(workspace.Path, ".env");
1022var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1053var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1054var envPath = Path.Combine(workspace.Path, ".env");
1081var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1117var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1118var envPath = Path.Combine(workspace.Path, ".env");
1165var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1166var envPath = Path.Combine(workspace.Path, ".env");
1199var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1200var envPath = Path.Combine(workspace.Path, ".env");
1243var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1277var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
Aspire.Hosting.Dotnet (19)
Aspire.Hosting.Dotnet.Tests (142)
DotnetProjectBuildArtifactManagerTests.cs (5)
56Directory.Delete(Path.Combine(buildDirectory, ".artifacts"), recursive: true);
174Path.Combine(buildDirectory, ".old.tmp"),
175Path.Combine(stateDirectory, ".old.tmp"),
179Path.Combine(buildDirectory, ".recent.tmp"),
180Path.Combine(stateDirectory, ".recent.tmp"),
DotnetProjectBuildCoordinatorTests.cs (90)
132var globalJsonPath = Path.Combine(workspace.Path, "global.json");
204var firstDotnetPath = Path.Combine(workspace.Path, "first-sdk");
205var secondDotnetPath = Path.Combine(workspace.Path, "second-sdk");
409var filePath = Path.Combine(workspace.Path, "worker.cs");
480var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "worker"));
481var filePath = Path.Combine(fileDirectory.FullName, "worker.cs");
570var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt");
571var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt");
636var appPath = Path.Combine(workspace.Path, "worker.cs");
637var sentinelPath = Path.Combine(workspace.Path, "worker-ran.txt");
753var customTargetsPath = Path.Combine(workspace.Path, "CustomNuGet.targets");
855Assert.True(File.Exists(Path.Combine(Path.GetDirectoryName(projectPath)!, "restore-ran.txt")));
864var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj");
936var feed = Directory.CreateDirectory(Path.Combine(projectRoot, "feed")).FullName;
942File.WriteAllText(Path.Combine(projectRoot, "nuget.config"), $$"""
950File.WriteAllText(Path.Combine(projectRoot, "Directory.Build.props"), """
962var versionsPath = Path.Combine(projectRoot, "Directory.Packages.props");
999var escapedDirectory = Path.Combine(projectRoot, "First's Project;100% (test)");
1001firstProject = Path.Combine(escapedDirectory, Path.GetFileName(firstProject));
1019File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt")));
1020Assert.True(File.Exists(Path.Combine(Path.GetDirectoryName(project)!, "packages.lock.json")));
1038File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt")));
1046File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt")));
1091var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj");
1558var appPath = Path.Combine(workspace.Path, "app.cs");
2018var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName;
2019var sdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime")).FullName;
2067var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-1")).FullName;
2068var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-2")).FullName;
2110var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName;
2111File.WriteAllText(Path.Combine(sourceRoot, "global.json"), "{}");
2114var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName;
2136Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName,
2140var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "foreign")).FullName;
2141File.WriteAllText(Path.Combine(foreignRoot, "global.json"), "{}");
2142var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(foreignRoot, "runtime")).FullName;
2221var filePath = Path.Combine(workspace.Path, "worker.cs");
2272File.WriteAllText(Path.Combine(Path.GetDirectoryName(firstPath)!, "global.json"), """
2296Assert.True(File.Exists(Path.Combine(firstBuild.WorkingDirectory, "global.json")));
2317var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "Physical"));
2319File.WriteAllText(Path.Combine(physicalRoot.FullName, "global.json"), """
2327var linkPath = Path.Combine(workspace.Path, "Alias");
2351Assert.True(File.Exists(Path.Combine(linkedBuild.WorkingDirectory, "global.json")));
2571File.WriteAllText(Path.Combine(Path.GetDirectoryName(firstPath)!, "global.json"), """
2629var linkDirectory = Path.Combine(workspace.Path, "ServiceAlias");
2640var aliasPath = Path.Combine(linkDirectory, Path.GetFileName(projectPath));
2713var escapedDirectory = Path.Combine(workspace.Path, "Api's Project 100% (test)");
2715apiProject = Path.Combine(escapedDirectory, Path.GetFileName(apiProject));
2716var apiSentinel = Path.Combine(workspace.Path, "api-ran.txt");
2717var workerSentinel = Path.Combine(workspace.Path, "worker-ran.txt");
2757var restoreCountPath = Path.Combine(Path.GetDirectoryName(project)!, "restore-count.txt");
2773File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """
2780var sentinels = Directory.CreateDirectory(Path.Combine(workspace.Path, "instances")).FullName;
2868var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt");
2869var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt");
2913var secondBuildMarker = Path.Combine(workspace.Path, "second-built.txt");
2919var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt");
2975File.WriteAllText(Path.Combine(Path.GetDirectoryName(validProject)!, "Program.cs"), """
2978var sentinelPath = Path.Combine(workspace.Path, "valid-ran.txt");
3078var sentinelPath = Path.Combine(workspace.Path, "environment-build-ran.txt");
3079File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """
3130var sentinelPath = Path.Combine(Path.GetDirectoryName(projectPath)!, "build-sentinel.txt");
3186var filePath = Path.Combine(workspace.Path, "worker.cs");
3419var filePath = Path.Combine(workspace.Path, "worker.cs");
3453var filePath = Path.Combine(workspace.Path, "worker.cs");
3519Path.Combine(workspace.Path, "missing-dotnet");
3555var fileApp = Path.Combine(workspace.Path, "worker.cs");
3556var sentinel = Path.Combine(workspace.Path, "worker-ran.txt");
3617var releaseBuild = Path.Combine(workspace.Path, "release-build");
3619var fileApp = Path.Combine(workspace.Path, "worker.cs");
3620var sentinel = Path.Combine(workspace.Path, "worker-ran.txt");
3730using var archive = ZipFile.Open(Path.Combine(feed, $"Aspire.RestoreTest.{version}.nupkg"), ZipArchiveMode.Create);
3758var directory = Directory.CreateDirectory(Path.Combine(root, directoryName));
3759var path = Path.Combine(directory.FullName, projectFileName);
3767Path.Combine(Path.GetDirectoryName(projectPath)!, "Properties"));
3768File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), $$"""
3803File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "SharedValue.cs"), """
3816var directory = Directory.CreateDirectory(Path.Combine(root, name));
3818var projectPath = Path.Combine(directory.FullName, $"{name}.csproj");
3837File.WriteAllText(Path.Combine(directory.FullName, "Program.cs"), """
3858File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """
3877File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "BuildGate.cs"), $$"""
3908File.WriteAllText(Path.Combine(projectDirectory, "Program.cs"), "System.Console.WriteLine(\"Started\");");
3925File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), "this does not compile");
3931var directory = Directory.CreateDirectory(Path.Combine(root, name));
3932var projectPath = Path.Combine(directory.FullName, $"{name}.csproj");
3939var directory = Directory.CreateDirectory(Path.Combine(root, name));
3940var appPath = Path.Combine(directory.FullName, $"{name}.cs");
3952Path.Combine(Path.GetDirectoryName(projectPath)!, "build-count.txt");
4077var responseFilePath = Path.Combine(directory, "build-properties.rsp");
DotnetProjectResourceTests.cs (38)
55var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
260await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Dockerfile"), "FROM scratch");
299var appPath = Path.Combine(workspace.Path, "app.cs");
306var archivePath = Path.Combine(workspace.Path, "app.tar.gz");
334var sentinelDockerfilePath = Path.Combine(workspace.Path, "Dockerfile.sentinel");
335await File.WriteAllTextAsync(Path.Combine(workspace.Path, "sentinel.txt"), marker, cancellation.Token);
382var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project"));
383var projectPath = Path.Combine(projectDirectory.FullName, "Project.csproj");
396Path.Combine(projectDirectory.FullName, "Program.cs"),
398var archivePath = Path.Combine(workspace.Path, "project.tar.gz");
425var projectPath = Path.Combine(workspace.Path, "Project.csproj");
432context.OutputPath = Path.Combine(workspace.Path, "project.tar");
451var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project"));
453var runtimeDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime"));
454File.WriteAllText(Path.Combine(projectDirectory.FullName, "Dockerfile"), "FROM scratch");
477var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
478var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
495var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "AmbiguousService"));
496File.WriteAllText(Path.Combine(projectDir.FullName, "First.csproj"), "<Project />");
497File.WriteAllText(Path.Combine(projectDir.FullName, "Second.csproj"), "<Project />");
562var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
563var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
566var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
567await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
608var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
665var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
666var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
669var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
670await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
735var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
736var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
739var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
740await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
834var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
869var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
1057var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
1141var projectDirectory = Directory.CreateDirectory(Path.Combine(workspacePath, "MyService"));
1148var path = Path.Combine(directory, fileName);
Aspire.Hosting.EntityFrameworkCore (6)
Aspire.Hosting.EntityFrameworkCore.Tests (3)
Aspire.Hosting.Foundry.Tests (1)
Aspire.Hosting.Garnet.Tests (1)
Aspire.Hosting.Go (4)
Aspire.Hosting.Go.Tests (33)
AddGoAppTests.cs (27)
88File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
95var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
779File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.23\n");
780File.WriteAllText(Path.Combine(sourceDir.FullName, "main.go"), "package main\nfunc main() {}");
787var dockerfilePath = Path.Combine(outputDir.FullName, "api.Dockerfile");
807var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
819File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.22\n");
829var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
841File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
851var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
864File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch");
880File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.22\n");
888var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
902File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
910var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
922File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
930var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
978File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
995var dockerfile = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1012File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1035var dockerfile = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1080File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1087var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1154File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1161var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1173File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1181var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
GoVersionDetectorTests.cs (5)
22File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n\ngo 1.23\n");
33File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n\ngo 1.23.4\n");
44File.WriteAllText(Path.Combine(workspace.Path, "go.mod"),
57File.WriteAllText(Path.Combine(workspace.Path, "go.mod"),
69File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n");
Aspire.Hosting.Java (31)
JavaBuildToolResolver.cs (8)
31var hasMaven = File.Exists(Path.Combine(appDirectory, "pom.xml"));
32var hasGradle = s_gradleBuildFileNames.Any(fileName => File.Exists(Path.Combine(appDirectory, fileName)));
78FindWrapperInBuildRoot(appDirectory, wrapperName, tool) ?? Path.Combine(appDirectory, wrapperName));
86var candidate = Path.Combine(directory.FullName, wrapperName);
99var gitPath = Path.Combine(directory.FullName, ".git");
116JavaBuildTool.Gradle => File.Exists(Path.Combine(directory, "settings.gradle"))
117|| File.Exists(Path.Combine(directory, "settings.gradle.kts")),
120JavaBuildTool.Maven => File.Exists(Path.Combine(directory, "pom.xml")),
JavaHostingExtensions.cs (8)
94Path.Combine(builder.AppHostDirectory, appDirectory));
117if (File.Exists(Path.Combine(appDirectory, "Dockerfile")))
956Path.Combine(builder.Resource.WorkingDirectory, wrapperPath));
1244resolved = Path.GetFullPath(Path.Combine(builder.Resource.WorkingDirectory, authored));
1861var jarPath = Path.GetFullPath(Path.Combine(resource.WorkingDirectory, NormalizeJarPathForJava(jar.JarPath)));
1895JavaBuildTool.Maven => Path.Combine(resource.WorkingDirectory, "target"),
2015JavaBuildTool.Maven => TryReadMavenArtifactId(Path.Combine(resource.WorkingDirectory, "pom.xml")),
2082var settingsPath = Path.Combine(workingDirectory, fileName);
JavaVersionDetector.cs (6)
45DetectFromGradle(Path.Combine(appDirectory, "build.gradle")),
46DetectFromGradle(Path.Combine(appDirectory, "build.gradle.kts")),
47DetectFromPom(Path.Combine(appDirectory, "pom.xml"), buildArgs: null),
52Path.Combine(appDirectory, "pom.xml"),
54DetectFromGradle(Path.Combine(appDirectory, "build.gradle")),
55DetectFromGradle(Path.Combine(appDirectory, "build.gradle.kts")),
Aspire.Hosting.Java.Tests (129)
AddJavaAppPublishTests.cs (77)
54var destination = Path.Combine(workspace.Path, "app.jar");
234File.WriteAllText(Path.Combine(sourceDir.FullName, "build.gradle"), "");
406File.WriteAllText(Path.Combine(source, ".dockerignore"), "secrets/\n");
421File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
427Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
442File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
473File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
505var manifest = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "aspire-manifest.json"), TestContext.Current.CancellationToken);
522File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), $"""
543File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
571File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
594File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
618File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
689File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "plugins { id 'java' }");
699File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
724File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
908File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), script);
1020File.WriteAllText(Path.Combine(appDirectory.Path, fileName), script);
1030File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), """
1043File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1046File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "sourceCompatibility = '21'");
1062File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1065File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "sourceCompatibility = '21'");
1079File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1082File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "plugins { id 'java' }");
1094File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1117File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1139File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1160File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), "<project>");
1192File.WriteAllText(Path.Combine(appDirectory.Path, fileName), "");
1209File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), "<project />");
1210File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "");
1256File.WriteAllText(Path.Combine(sourceDir.FullName, "pom.xml"), "<project/>");
1381var wrapperDirectory = Path.Combine(source, "scripts");
1405File.Delete(Path.Combine(sourceDir.FullName, "mvnw"));
1431Directory.Delete(Path.Combine(sourceDir.FullName, supportDirectory), recursive: true);
1453Directory.CreateDirectory(Path.Combine(source, "scripts"));
1454WriteWrapper(Path.Combine(source, "scripts"), "custom-mvnw");
1458.WithWrapperPath(Path.Combine("scripts", "custom-mvnw")));
1470Directory.CreateDirectory(Path.Combine(source, "target"));
1473jarPath: Path.Combine("target", "worker.jar"));
1490Directory.CreateDirectory(Path.Combine(source, "target"));
1493jarPath: Path.Combine("target", "worker.jar"),
1506Directory.CreateDirectory(Path.Combine(source, "target"));
1509jarPath: Path.Combine("target", "worker.jar"));
1523jarPath: Path.Combine("target", "api.jar"));
1541Path.Combine(sourceDir.FullName, "App.java"),
1562builder.AddJavaApp("api", sourceDir.FullName, Path.Combine("target", "app.jar"), ["--greeting", "hello"]);
1571await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "aspire-manifest.json"), TestContext.Current.CancellationToken));
1581Path.Combine(outputDir.FullName, "api.Dockerfile"),
1582Path.Combine(sourceDir.FullName, "Dockerfile"));
1584Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"),
1585Path.Combine(sourceDir.FullName, ".dockerignore"));
1621Path.Combine(sourceDir.FullName, "pom.xml"),
1654Path.Combine(sourcePath.FullName, "App.java"),
1688Path.Combine(outputDir.FullName, "api.Dockerfile"),
1689Path.Combine(sourceDir.FullName, "Dockerfile"));
1691Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"),
1692Path.Combine(sourceDir.FullName, ".dockerignore"));
1824var stagingDirectory = Path.Combine(workspace.Path, "staged");
1865Assert.Equal("runner", File.ReadAllText(Path.Combine(stagingDirectory, "quarkus-run.jar")));
1870Assert.False(Directory.Exists(Path.Combine(stagingDirectory, "lib")));
2088Path.Combine(source, "pom.xml"),
2089File.ReadAllText(Path.Combine(source, "pom.xml")).Replace(
2134var nested = Directory.CreateDirectory(Path.Combine(sourceDir.FullName, "build tools"));
2140.WithWrapperPath(Path.Combine("build tools", "mvnw"));
2172File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")),
2198return await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
2421return await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
2445var ignorePath = Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore");
2456File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2473File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), """
2499File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2516File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2544File.WriteAllText(Path.Combine(sourceDirectory, "build.gradle"), contents);
2550File.WriteAllText(Path.Combine(sourceDirectory, wrapperName), "#!/bin/sh\nexit 0\n");
2568Path.Combine(supportDirectory, gradle ? "gradle-wrapper.properties" : "maven-wrapper.properties"),
AddJavaAppTests.cs (34)
46Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper), tempDir.Path, "spring-boot:run"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
59Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultGradleWrapper), tempDir.Path, "bootRun", "--no-daemon"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
320var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultGradleWrapper));
338var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper));
351File.WriteAllText(Path.Combine(repo.Path, "settings.gradle"), "include 'services:api'");
353File.WriteAllText(Path.Combine(module, "build.gradle"), "");
359var expectedWrapper = Path.GetFullPath(Path.Combine(repo.Path, JavaHostingExtensions.s_defaultGradleWrapper));
371File.WriteAllText(Path.Combine(repo.Path, "pom.xml"), "<project />");
373File.WriteAllText(Path.Combine(module, "pom.xml"), "<project />");
379var expectedWrapper = Path.GetFullPath(Path.Combine(repo.Path, JavaHostingExtensions.s_defaultMavenWrapper));
392File.WriteAllText(Path.Combine(module, JavaHostingExtensions.s_defaultGradleWrapper), "#!/bin/sh\n");
398var expectedWrapper = Path.GetFullPath(Path.Combine(module, JavaHostingExtensions.s_defaultGradleWrapper));
553var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, "scripts/custom-mvnw"));
571var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, "scripts/custom-gradlew"));
788.WithWrapperPath(Path.Combine("tools", "mvnw"));
815var wrapper = Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper);
1314var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, "tools/mvn"));
1376var javaExecutable = Path.Combine(tempDir.Path, fileName);
1392var command = Path.Combine(tempDir.Path, fileName);
1404var command = Path.Combine("bin", OperatingSystem.IsWindows() ? "java.exe" : "java");
1418var javaExecutable = Path.Combine(tempDir.Path, OperatingSystem.IsWindows() ? "java.exe" : "java");
1445var javaExecutable = Path.Combine(tempDir.Path, OperatingSystem.IsWindows() ? "java.exe" : "java");
1470var wrapperCommand = Path.Combine(tempDir.Path, OperatingSystem.IsWindows() ? "cmd.exe" : "sh");
1526var jarPath = Path.Combine(directory, fileName);
1659Assert.Equal(Path.Combine(tempDir.Path, "no-main.jar"), Assert.Single(noMainClassConfiguration.ClassPaths!));
1663Assert.Equal(Path.Combine(tempDir.Path, "does-not-exist.jar"), Assert.Single(missingConfiguration.ClassPaths!));
1679Path.Combine(outputDirectory, "catalog-0.0.1-SNAPSHOT.jar"),
1689Path.Combine(tempDir.Path, tool == "maven" ? "pom.xml" : "settings.gradle"),
1797File.WriteAllText(Path.Combine(tempDir.Path, "pom.xml"), """
1827File.WriteAllText(Path.Combine(tempDir.Path, "settings.gradle"), "rootProject.name = 'orders'\n");
1861Path.Combine(tempDir.Path, "settings.gradle"),
1882File.WriteAllText(Path.Combine(tempDir.Path, "pom.xml"), """
1894Path.Combine("target", "worker-0.0.1-SNAPSHOT.jar"),
1898.AddJavaApp("worker", tempDir.Path, Path.Combine("target", "worker-0.0.1-SNAPSHOT.jar"))
AddSpringBootAppTests.cs (4)
26Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper), tempDir.Path, "spring-boot:run"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
43Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultGradleWrapper), tempDir.Path, "bootRun"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
119Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper),
321.WithOtelAgent(Path.Combine(Path.GetTempPath(), "opentelemetry-javaagent.jar"));
JavaBuildToolResolverTests.cs (9)
26Assert.Equal(Path.GetFullPath(Path.Combine(tempDir.Path, expectedWrapperName)), wrapperPath);
54Assert.Equal(Path.GetFullPath(Path.Combine(root.RootPath, "mvnw")), wrapperPath);
78Assert.Equal(Path.GetFullPath(Path.Combine(module, "mvnw")), wrapperPath);
105Assert.Equal(Path.GetFullPath(Path.Combine(root.RootPath, "mvnw")), wrapperPath);
120Path.Combine(root.RootPath, "mvnw"),
129Assert.Equal(Path.GetFullPath(Path.Combine(module, "mvnw")), wrapperPath);
143File.WriteAllText(Path.Combine(_root.FullName, "pom.xml"), "<project/>");
144File.WriteAllText(Path.Combine(_root.FullName, "mvnw"), "#!/bin/sh\n");
152File.WriteAllText(Path.Combine(module.FullName, "pom.xml"), "<project/>");
Aspire.Hosting.JavaScript (36)
JavaScriptHostingExtensions.cs (28)
186if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
274if (File.Exists(Path.Combine(appDirectory, "package.json")))
514if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
679if (File.Exists(Path.Combine(appDirectory, "package.json")))
888if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
1042if (File.Exists(Path.Combine(appDirectory, "package.json")) ||
1043File.Exists(Path.Combine(appDirectory, "deno.json")) ||
1044File.Exists(Path.Combine(appDirectory, "deno.jsonc")))
1176appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
1686if (File.Exists(Path.Combine(appDirectory, "Dockerfile")))
2016appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
2217appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
2395var hasBunLock = File.Exists(Path.Combine(workingDirectory, "bun.lock")) ||
2396File.Exists(Path.Combine(workingDirectory, "bun.lockb"));
2401if (File.Exists(Path.Combine(workingDirectory, "bun.lock")))
2405if (File.Exists(Path.Combine(workingDirectory, "bun.lockb")))
2486if (File.Exists(Path.Combine(workingDirectory, manifest)))
2549File.Exists(Path.Combine(resource.Resource.WorkingDirectory, "package-lock.json"))
2567var hasYarnLock = File.Exists(Path.Combine(workingDirectory, "yarn.lock"));
2568var hasYarnrc = File.Exists(Path.Combine(workingDirectory, ".yarnrc.yml"));
2569var hasYarnBerryDir = Directory.Exists(Path.Combine(workingDirectory, ".yarn"));
2646var hasPnpmLock = File.Exists(Path.Combine(workingDirectory, "pnpm-lock.yaml"));
2647var hasPnpmWorkspace = File.Exists(Path.Combine(workingDirectory, "pnpm-workspace.yaml"));
2701var packageJsonPath = Path.Combine(workingDirectory, "package.json");
3161var configPath = Path.Combine(appDirectory, configFileName);
3286var nvmrcPath = Path.Combine(workingDirectory, ".nvmrc");
3299var nodeVersionPath = Path.Combine(workingDirectory, ".node-version");
3312var toolVersionsPath = Path.Combine(workingDirectory, ".tool-versions");
Aspire.Hosting.JavaScript.Tests (306)
AddBunAppTests.cs (18)
36var appDir = Path.Combine(workspace.Path, "js");
41File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
48var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
64var appDir = Path.Combine(workspace.Path, "js");
66File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
75await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")));
84var appDir = Path.Combine(workspace.Path, "js");
86File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
95var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore");
101Assert.False(File.Exists(Path.Combine(appDir, ".dockerignore")), "Aspire should not write a .dockerignore into the user's source tree.");
115var appDir = Path.Combine(workspace.Path, "js");
117File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
123var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore");
129var userIgnorePath = Path.Combine(appDir, ".dockerignore");
145File.WriteAllText(Path.Combine(workspace.Path, "server.ts"), "console.log('hi');");
167File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
351File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
384File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
AddDenoAppTests.cs (132)
63var appDir = Path.Combine(workspace.Path, "js");
68File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
75var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
91var appDir = Path.Combine(workspace.Path, "js");
93File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
102var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
114var appDir = Path.Combine(workspace.Path, "js");
116File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
125var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore");
131Assert.False(File.Exists(Path.Combine(appDir, ".dockerignore")), "Aspire should not write a .dockerignore into the user's source tree.");
146var appDir = Path.Combine(workspace.Path, "js");
153var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
181var appDir = Path.Combine(workspace.Path, "js");
184File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
190var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
201var appDir = Path.Combine(workspace.Path, "js");
203File.WriteAllText(Path.Combine(appDir, "custom.lock"), "{}");
213var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
225var appDir = Path.Combine(workspace.Path, "js");
227File.WriteAllText(Path.Combine(appDir, "custom.lock"), "{}");
239await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")));
248var appDir = Path.Combine(workspace.Path, "js");
250File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
257var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
268var appDir = Path.Combine(workspace.Path, "js");
270File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
271File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
282var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
295var appDir = Path.Combine(workspace.Path, "js");
297File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"build":"deno run -A build.ts","start":"deno run -A main.ts"}}""");
306var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
321var appDir = Path.Combine(workspace.Path, "js");
324Path.Combine(appDir, "deno.json"),
337var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
352var appDir = Path.Combine(workspace.Path, "js");
372var appDir = Path.Combine(workspace.Path, "js");
392var appDir = Path.Combine(workspace.Path, "js");
394File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"importMap":"import_map.json","tasks":{"start":"deno run main.ts"}}""");
395File.WriteAllText(Path.Combine(appDir, "import_map.json"), """{"imports":{}}""");
402var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile"));
416var appDir = Path.Combine(workspace.Path, "js");
418File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"importMap":"import_map.json","tasks":{"start":"deno run main.ts"}}""");
419File.WriteAllText(Path.Combine(appDir, "import_map.json"), """{"imports":{}}""");
427var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile"));
441var appDir = Path.Combine(workspace.Path, "js");
447var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
459var appDir = Path.Combine(workspace.Path, "js");
466var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
478var appDir = Path.Combine(workspace.Path, "js");
487var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
505var appDir = Path.Combine(workspace.Path, "js");
524var appDir = Path.Combine(workspace.Path, "js");
526File.WriteAllText(Path.Combine(appDir, "Dockerfile"), "FROM denoland/deno:2.9.0");
533Assert.False(File.Exists(Path.Combine(workspace.Path, "js.Dockerfile")));
542var appDir = Path.Combine(workspace.Path, "js");
544File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
554var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
569var appDir = Path.Combine(workspace.Path, "js");
571File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
585var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
612var appDir = Path.Combine(workspace.Path, "js");
614File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
623var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
633var appDir = Path.Combine(workspace.Path, "js");
635File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
644var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
654var appDir = Path.Combine(workspace.Path, "js");
656File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"build prod":"deno run -A build.ts","start":"deno run -A main.ts"}}""");
665var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
676var appDir = Path.Combine(workspace.Path, "js");
678File.WriteAllText(Path.Combine(appDir, "package.json"), """{"scripts":{"build prod":"echo build","start":"node main.js"}}""");
688var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
698var appDir = Path.Combine(workspace.Path, "js");
700File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
709var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
727var appDir = Path.Combine(workspace.Path, "js");
729File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
747var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
758var appDir = Path.Combine(workspace.Path, "js");
760File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
768var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
862var appDir = Path.Combine(workspace.Path, "js");
864File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
874var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
886var appDir = Path.Combine(workspace.Path, "js");
888File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
895var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
905var appDir = Path.Combine(workspace.Path, "js");
907File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
914var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
953var appDir = Path.Combine(workspace.Path, "js");
962var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
974var appDir = Path.Combine(workspace.Path, "js");
976File.WriteAllText(Path.Combine(appDir, "custom lock's.lock"), "{}");
985var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
997var appDir = Path.Combine(workspace.Path, "js");
1006var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1023var appDir = Path.Combine(workspace.Path, "js");
1031var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1041var appDir = Path.Combine(workspace.Path, "js");
1050var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1062var appDir = Path.Combine(workspace.Path, "js");
1071var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1083var appDir = Path.Combine(workspace.Path, "js");
1095var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1107var appDir = Path.Combine(workspace.Path, "js");
1125var appDir = Path.Combine(workspace.Path, "js");
1152var appDir = Path.Combine(workspace.Path, "js");
1181var appDir = Path.Combine(workspace.Path, "js");
1200var appDir = Path.Combine(workspace.Path, "js");
1229var appDir1 = Path.Combine(workspace.Path, "js1");
1230var appDir2 = Path.Combine(workspace.Path, "js2");
1244var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js2.Dockerfile"));
1254File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');");
1276File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
1303File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
1325File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');");
1579var appDir = Path.Combine(workspace.Path, "js");
1588var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1603var appDir = Path.Combine(workspace.Path, "js");
1613var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1630var appDir = Path.Combine(workspace.Path, "js");
1639var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1650var appDir = Path.Combine(workspace.Path, "js");
1658var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1685var appDir = Path.Combine(workspace.Path, "js");
2349var appDir = Path.Combine(workspace.Path, "deno-app");
2351await File.WriteAllTextAsync(Path.Combine(appDir, "main.ts"), """
2360var dockerfilePath = Path.Combine(workspace.Path, "deno-app.Dockerfile");
2587File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
2605File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
2624File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
AddJavaScriptAppTests.cs (44)
27var appDir = Path.Combine(workspace.Path, "js");
36var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
49var appDir = Path.Combine(workspace.Path, "js");
59var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
69var appDir = Path.Combine(workspace.Path, "js");
79var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
89var appDir = Path.Combine(workspace.Path, "js");
99var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
112var appDir = Path.Combine(workspace.Path, "js");
117File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), string.Empty);
126var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
138var appDir = Path.Combine(workspace.Path, "js");
147var dockerfileLines = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
172var appDir = Path.Combine(workspace.Path, "js");
177File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), string.Empty);
187var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
350var appDir = Path.Combine(workspace.Path, "js");
353File.WriteAllText(Path.Combine(appDir, "pnpm-workspace.yaml"), "allowBuilds: {}\n");
361var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
381var appDir = Path.Combine(workspace.Path, "js");
384Path.Combine(appDir, "package.json"),
397var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
415var appDir = Path.Combine(workspace.Path, "js");
418Path.Combine(appDir, "package.json"),
432var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
447var appDir = Path.Combine(workspace.Path, "js");
450Path.Combine(appDir, "package.json"),
463var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
476var appDir = Path.Combine(workspace.Path, "js");
479Path.Combine(appDir, "package.json"),
492var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
515var appDir = Path.Combine(workspace.Path, "js");
517var packageJsonPath = Path.Combine(appDir, "package.json");
542var appDir = Path.Combine(workspace.Path, "pnpm-app");
556await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson);
564var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile");
579var dockerfileInContext = Path.Combine(appDir, "Dockerfile");
637var appDir = Path.Combine(workspace.Path, "pnpm-app");
651await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson);
660var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile");
669var dockerfileInContext = Path.Combine(appDir, "Dockerfile");
715var appDir = Path.Combine(rootDirectory, "js");
725File.WriteAllText(Path.Combine(appDir, "Dockerfile"), dockerfile);
726File.WriteAllText(Path.Combine(appDir, "package.json"), """
AddNodeAppTests.cs (19)
101var appDir = Path.Combine(workspace.Path, "js");
106File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
107File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "{}");
114var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
169var appDir = Path.Combine(workspace.Path, "js");
171File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
183var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
216var appDir = Path.Combine(workspace.Path, "js");
218File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
229var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
238File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "{}");
265File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
339File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
340File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
365var nodeDockerfilePath = Path.Combine(outputDir.FullName, "nodeapp.Dockerfile");
396File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
397File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
422var nodeDockerfilePath = Path.Combine(outputDir.FullName, "nodeapp.Dockerfile");
562File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "console.log('hello');");
AddViteAppTests.cs (77)
28var viteDir = Path.Combine(workspace.Path, "vite");
32File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
63var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
89var viteDir = Path.Combine(workspace.Path, "vite");
91File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
99var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
115var viteDir = Path.Combine(workspace.Path, "vite");
117File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
119var apiDir = Path.Combine(workspace.Path, "api");
121File.WriteAllText(Path.Combine(apiDir, "package-lock.json"), "empty");
132var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
142var viteDir = Path.Combine(workspace.Path, "vite");
144File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
163var viteDir = Path.Combine(workspace.Path, "vite");
165File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
167var apiDir = Path.Combine(workspace.Path, "api");
169File.WriteAllText(Path.Combine(apiDir, "package-lock.json"), "empty");
193var appDir = Path.Combine(workspace.Path, "angular");
195File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "empty");
203var dockerfilePath = Path.Combine(workspace.Path, "angular.Dockerfile");
219var appDir = Path.Combine(workspace.Path, "vite");
221File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "empty");
229var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
242var nextDir = Path.Combine(workspace.Path, "nextjs");
244File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
251var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile");
263var nextDir = Path.Combine(workspace.Path, "nextjs");
265File.WriteAllText(Path.Combine(nextDir, "pnpm-lock.yaml"), "");
272var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile");
282var appDir = Path.Combine(workspace.Path, "nuxt");
284File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), "");
292var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile");
302var appDir = Path.Combine(workspace.Path, "nuxt");
304File.WriteAllText(Path.Combine(appDir, "bun.lock"), "");
312var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile");
322File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), "18.20.0");
330var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
342File.WriteAllText(Path.Combine(workspace.Path, ".node-version"), "v21.5.0");
350var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
367File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions);
375var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
393File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions);
401var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
419File.WriteAllText(Path.Combine(workspace.Path, "package.json"), packageJson);
427var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
444var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
460File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), versionString);
468var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
490var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
548Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
551var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
596Assert.Contains(Path.Combine("node_modules", ".aspire"), newConfigPath);
609Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
612var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
713var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
756Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
759var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
811var repoRoot = Path.Combine(workspace.Path, "repo");
814Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules"));
817var viteConfigPath = Path.Combine(appDir, "vite.config.ts");
887var repoRoot = Path.Combine(workspace.Path, "repo");
892Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules"));
894var firstConfigPath = Path.Combine(firstAppDirectory, "vite.config.ts");
895var secondConfigPath = Path.Combine(secondAppDirectory, "vite.config.ts");
950var repoRoot = Path.Combine(workspace.Path, "repo");
955Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules"));
957var firstConfigPath = Path.Combine(firstAppDirectory, "vite.config.ts");
958var secondConfigPath = Path.Combine(secondAppDirectory, "vite.config.ts");
996Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
999var viteConfigPath = Path.Combine(workspace.Path, configFileName);
1050var nextDir = Path.Combine(workspace.Path, "nextjs");
1052File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
1066var nextDir = Path.Combine(workspace.Path, "nextjs");
1068File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
1083var nextDir = Path.Combine(workspace.Path, "nextjs");
1085File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
1086File.WriteAllText(Path.Combine(nextDir, "next.config.ts"), "const nextConfig = {}; export default nextConfig;");
PackageInstallationTests.cs (7)
458File.WriteAllText(Path.Combine(workspace.Path, "package-lock.json"), "empty");
485File.WriteAllText(Path.Combine(workspace.Path, "yarn.lock"), "empty");
506File.WriteAllText(Path.Combine(workspace.Path, "yarn.lock"), "empty");
507File.WriteAllText(Path.Combine(workspace.Path, ".yarnrc.yml"), "empty");
522File.WriteAllText(Path.Combine(workspace.Path, "yarn.lock"), "empty");
538File.WriteAllText(Path.Combine(workspace.Path, "pnpm-lock.yaml"), "empty");
553File.WriteAllText(Path.Combine(workspace.Path, "bun.lock"), "empty");
Aspire.Hosting.Kafka.Tests (1)
Aspire.Hosting.Keycloak.Tests (2)
Aspire.Hosting.Kubernetes (17)
Aspire.Hosting.Kubernetes.Tests (73)
KubernetesDeployTests.cs (32)
846var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml"));
877var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml"));
940var outputPath = Path.Combine(workspace.Path, "env");
951await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml);
970var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
987var outputPath = Path.Combine(workspace.Path, "env");
990await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
999var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1007var outputPath = Path.Combine(workspace.Path, "env");
1010await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
1029var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1081var outputPath = Path.Combine(workspace.Path, "env");
1084await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
1105var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1238var outputPath = Path.Combine(workspace.Path, "env");
1249await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml);
1274var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1288var outputPath = Path.Combine(workspace.Path, "env");
1298var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1337var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1412var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1439var outputPath = Path.Combine(workspace.Path, "deploy");
1471var overridePath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("myenv"));
1529var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1590var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1635var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1675var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1676await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml")
1753var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1792var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1827var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1863var valuesPath = Path.Combine(workspace.Path, "values.yaml");
KubernetesPublisherTests.cs (34)
72var filePath = Path.Combine(workspace.Path, expectedFile);
111var deploymentPath = Path.Combine(workspace.Path, "templates/service/deployment.yaml");
169var filePath = Path.Combine(workspace.Path, expectedFile);
213var manifestPath = Path.Combine(workspace.Path, "templates/myapp/scaler.yaml");
296var filePath = Path.Combine(workspace.Path, expectedFile);
352var filePath = Path.Combine(workspace.Path, expectedFile);
384var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
459var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
508var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
543var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
636var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
732var filePath = Path.Combine(workspace.Path, expectedFile);
760await Verify(File.ReadAllText(Path.Combine(workspace.Path, "Chart.yaml")), "yaml")
761.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.Path, "values.yaml")), "yaml")
797var filePath = Path.Combine(workspace.Path, expectedFile);
841var filePath = Path.Combine(workspace.Path, expectedFile);
867var servicePath = Path.Combine(workspace.Path, "templates/database/service.yaml");
903var filePath = Path.Combine(workspace.Path, expectedFile);
955var filePath = Path.Combine(workspace.Path, expectedFile);
1000var filePath = Path.Combine(workspace.Path, expectedFile);
1045var filePath = Path.Combine(workspace.Path, expectedFile);
1200var filePath = Path.Combine(workspace.Path, expectedFile);
1246var filePath = Path.Combine(workspace.Path, expectedFile);
1307var filePath = Path.Combine(workspace.Path, expectedFile);
1358var filePath = Path.Combine(workspace.Path, expectedFile);
1420var filePath = Path.Combine(workspace.Path, expectedFile);
1479var filePath = Path.Combine(workspace.Path, expectedFile);
1533var filePath = Path.Combine(workspace.Path, expectedFile);
1590var filePath = Path.Combine(workspace.Path, expectedFile);
1684var filePath = Path.Combine(workspace.Path, expectedFile);
1739var filePath = Path.Combine(workspace.Path, expectedFile);
1853var filePath = Path.Combine(workspace.Path, expectedFile);
1903var filePath = Path.Combine(workspace.Path, expectedFile);
2097var valuesPath = Path.Combine(workspace.Path, "values.yaml");
Aspire.Hosting.Maui (9)
Aspire.Hosting.Maui.Tests (65)
MauiPlatformExtensionsTests.cs (38)
98var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
121var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
141var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
160var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
189var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
237var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
256var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
280var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
309var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
335var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
358var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
381var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
404var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
432var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
457var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
486var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
511var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
538var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
565var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
632var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
662var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
686var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
709var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
747var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
800var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
865var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
904var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
957var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1023var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1060var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1077var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1099var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1130var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1157var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1187var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1269var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1305var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1368var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiWithArgsTests.cs (11)
21var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
39var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
58var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
78var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
95var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
115var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
132var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
151var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
168var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
188var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
210var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
Aspire.Hosting.Milvus.Tests (1)
Aspire.Hosting.MongoDB.Tests (3)
Aspire.Hosting.MySql.Tests (3)
Aspire.Hosting.Oracle.Tests (2)
Aspire.Hosting.PostgreSQL.Tests (5)
Aspire.Hosting.Python (15)
PythonAppResourceBuilderExtensions.cs (13)
434if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
512if (File.Exists(Path.Combine(appDirectoryFullPath, "pyproject.toml")) ||
513File.Exists(Path.Combine(appDirectoryFullPath, "requirements.txt")))
532var uvLockPath = Path.Combine(resource.WorkingDirectory, "uv.lock");
641var requirementsTxtPath = Path.Combine(resource.WorkingDirectory, "requirements.txt");
681var pyprojectTomlPath = Path.Combine(resource.WorkingDirectory, "pyproject.toml");
776return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
784var venvPath = Path.Combine(currentDirectory, virtualEnvironmentPath);
814return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
1157if (File.Exists(Path.Combine(workingDirectory, "pyproject.toml")))
1162else if (File.Exists(Path.Combine(workingDirectory, "requirements.txt")))
1270var fullPath = Path.Combine(directory, commandWithExt);
1283var fullPath = Path.Combine(directory, command);
Aspire.Hosting.Python.Tests (119)
AddPythonAppTests.cs (112)
29var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
67var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
289var scriptPath = Path.Combine(projectDirectory, "main.py");
292var requirementsPath = Path.Combine(projectDirectory, "requirements.txt");
296var dockerFilePath = Path.Combine(projectDirectory, "Dockerfile");
419var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
532var appVenvPath = Path.Combine(appDir.FullName, ".venv");
545var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, appDir.FullName));
546var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv");
562var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
566var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
608var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
612var appVenvPath = Path.Combine(appDirPath, ".venv");
615var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
665var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, appDir.FullName));
666var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv");
682var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
686var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
690var customVenvPath = Path.Combine(appDirPath, "custom-venv");
742var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
992var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
1026var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
1060var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
1269File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1270File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1271File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1273var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
1292var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1295var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile");
1298var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile");
1335File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1337File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1339var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
1358var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1361var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile");
1364var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile");
1397var appDirectory = Path.Combine(workspace.Path, "myapp");
1399var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1441var appDirectory = Path.Combine(workspace.Path, "myapp");
1443var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1481var appDirectory = Path.Combine(workspace.Path, "myapp");
1483var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1516var appDirectory = Path.Combine(workspace.Path, "myapp");
1518var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1527Assert.Equal(Path.Combine(appDirectory, "main.py"), launchConfig.ProgramPath);
1537var appDirectory = Path.Combine(workspace.Path, "myapp");
1539var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1561var appDirectory = Path.Combine(workspace.Path, "myapp");
1563var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1585var appDirectory = Path.Combine(workspace.Path, "myapp");
1587var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1589var customWorkingDirectory = Path.Combine(workspace.Path, "custom");
1600Path.Combine(builder.AppHostDirectory, customWorkingDirectory));
1612var appDirectory = Path.Combine(workspace.Path, "myapp");
1614var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1616var customWorkingDirectory = Path.Combine(workspace.Path, "custom");
1626Path.Combine(builder.AppHostDirectory, customWorkingDirectory));
1628Assert.Equal(Path.Combine(expectedWorkingDirectory, "main.py"), launchConfig.ProgramPath);
1653var appDirectory = Path.Combine(workspace.Path, "myapp");
1655var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1686var appDirectory = Path.Combine(workspace.Path, "myapp");
1688var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1795File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1796File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1797File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1812var dockerfilePath = Path.Combine(outputDir.FullName, "custom-images-app.Dockerfile");
1842File.WriteAllText(Path.Combine(projectDirectory, "requirements.txt"), requirementsContent);
1843File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1854var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1892File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1893File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1904var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1925File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1936var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1959File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1960File.WriteAllText(Path.Combine(projectDirectory, ".python-version"), pythonVersionContent);
1973var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1976var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile");
1979var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile");
2008var scriptPath = Path.Combine(workspace.Path, scriptName);
2012var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml");
2042var scriptPath = Path.Combine(workspace.Path, scriptName);
2046var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2077var scriptPath = Path.Combine(workspace.Path, scriptName);
2081var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml");
2083var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2107var scriptPath = Path.Combine(workspace.Path, scriptName);
2131var scriptPath = Path.Combine(workspace.Path, scriptName);
2154var scriptPath = Path.Combine(workspace.Path, scriptName);
2158var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2182var scriptPath = Path.Combine(workspace.Path, scriptName);
2186var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2211var scriptPath = Path.Combine(workspace.Path, "main.py");
2239var scriptPath = Path.Combine(workspace.Path, "main.py");
2243var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2282var scriptPath = Path.Combine(workspace.Path, "main.py");
2285var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2312var scriptPath = Path.Combine(workspace.Path, "main.py");
2315var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2346var scriptPath = Path.Combine(workspace.Path, "main.py");
2349var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2382var scriptPath = Path.Combine(workspace.Path, "main.py");
2385var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2412var scriptPath = Path.Combine(workspace.Path, "main.py");
2415var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2444var scriptPath = Path.Combine(workspace.Path, "main.py");
2447var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2476var scriptPath = Path.Combine(workspace.Path, "main.py");
2479var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2512var scriptPath = Path.Combine(workspace.Path, "main.py");
2566var scriptPath = Path.Combine(workspace.Path, scriptName);
2569var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
Aspire.Hosting.Qdrant.Tests (1)
Aspire.Hosting.Radius (7)
Aspire.Hosting.Radius.Tests (16)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.RemoteHost (2)
Aspire.Hosting.RemoteHost.Tests (25)
AssemblyLoaderTests.cs (11)
30[integrationLibs.Path, applicationBase.Path, Path.Combine(applicationBase.Path, "missing")]);
82var runtimeAssemblyPath = System.IO.Path.Combine(packageAssemblyDirectory.Path, "Aspire.Hosting.Azure.OperationalInsights.dll");
88var manifestPath = System.IO.Path.Combine(manifestDirectory.Path, "integration-package-probe-manifest.json");
108applicationBasePath: System.IO.Path.Combine(manifestDirectory.Path, "missing"),
128var packageAssemblyPath = System.IO.Path.Combine(packageAssemblyDirectory.Path, "Aspire.Hosting.PackageIntegration.dll");
131var manifestPath = System.IO.Path.Combine(manifestDirectory.Path, "integration-package-probe-manifest.json");
145applicationBasePath: System.IO.Path.Combine(manifestDirectory.Path, "missing"),
204var firstAssemblyPath = System.IO.Path.Combine(closureDirectory.Path, "Aspire.Hosting.Test.First.dll");
205var secondAssemblyPath = System.IO.Path.Combine(closureDirectory.Path, "Aspire.Hosting.Test.Second.dll");
209var manifestPath = System.IO.Path.Combine(manifestDirectory.Path, IntegrationPackageProbeManifest.FileName);
282File.WriteAllText(System.IO.Path.Combine(Path, fileName), string.Empty);
Aspire.Hosting.Rust (12)
Aspire.Hosting.Rust.Tests (68)
AddRustAppPublishTests.cs (48)
40File.WriteAllText(Path.Combine(source, "rust-toolchain.toml"), """
418Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
473Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
497File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
503Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
515File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
521Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
531var customDockerfile = Path.Combine(customContext.FullName, "Dockerfile.prod");
545Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
566Path.Combine(outputDir.FullName, "api.Dockerfile"),
591File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
594if (!File.Exists(Path.Combine(sourceDir.FullName, differentlyCasedPath)))
604var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
617var manifestDirectory = Directory.CreateDirectory(Path.Combine(sourceDir.FullName, decomposedDirectoryName));
619File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
621var composedManifestPath = Path.Combine(composedDirectoryName, "Cargo.toml");
622if (!File.Exists(Path.Combine(sourceDir.FullName, composedManifestPath)))
634var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
651var sourceDir = Directory.CreateDirectory(Path.Combine(restrictedAncestor.FullName, "source"));
655File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
679Path.Combine(outputDir.FullName, "api.Dockerfile"),
717var manifestDirectory = Directory.CreateDirectory(Path.Combine(source, @"crates\api"));
718File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
754var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
773File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
793var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
805File.WriteAllText(Path.Combine(outsideDir.FullName, "Cargo.toml"), "[package]\nname = \"outside\"\n");
806CreateDirectorySymbolicLinkOrSkip(Path.Combine(sourceDir.FullName, "linked"), outsideDir.FullName);
813Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
822var firstLink = Path.Combine(sourceDir.FullName, "linked");
823var secondLink = Path.Combine(sourceDir.FullName, "loop");
836Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
863configureResource: app => app.WithCargoManifestPath(Path.Combine(Path.GetTempPath(), "Cargo.toml"))));
874File.WriteAllText(Path.Combine(source, "Cargo.lock"), "version = 4\n"));
883configureSource: source => File.WriteAllText(Path.Combine(source, "Cargo.lock"), "version = 4\n"),
927var first = await File.ReadAllTextAsync(Path.Combine(firstOutputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
928var second = await File.ReadAllTextAsync(Path.Combine(secondOutputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
945var first = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
946var second = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "worker.Dockerfile"), TestContext.Current.CancellationToken);
974var ignore = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"), TestContext.Current.CancellationToken);
988File.WriteAllText(Path.Combine(sourceDir.FullName, ".dockerignore"), "*.md\n");
995Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore")));
1010File.WriteAllText(Path.Combine(relocatedDir.FullName, "Dockerfile"), "FROM scratch\n");
1031Assert.Equal(Path.Combine(relocatedDir.FullName, "Dockerfile"), dockerfile.DockerfilePath);
1053File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Cargo.lock"), "version = 4\n");
1057File.WriteAllText(Path.Combine(sourceDir.FullName, "Cargo.lock"), "version = 4\n");
1066var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
1143return await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
RustDockerfileShellTests.cs (8)
31Assert.Equal("current", File.ReadAllText(Path.Combine(artifactDirectory, "api")));
41var cargoStub = Path.Combine(workspace.WorkspaceRoot.FullName, "cargo-stub");
56Assert.False(File.Exists(Path.Combine(artifactDirectory, "api")));
87Assert.Equal("current", File.ReadAllText(Path.Combine(artifactDirectory, "api")));
97var markerPath = Path.Combine(workspace.WorkspaceRoot.FullName, "command-substitution-ran");
121var invocationLog = Path.Combine(workspace.WorkspaceRoot.FullName, "invocations");
153var invocationLog = Path.Combine(workspace.WorkspaceRoot.FullName, "invocations");
181var stubPath = Path.Combine(directory, name);
RustPublicApiTests.cs (6)
359Directory.CreateDirectory(Path.Combine(crate.Path, "src"));
360crate.Write(Path.Combine("src", "main.rs"), "fn main() {}");
381Path.Combine("debug", OperatingSystem.IsWindows() ? "first.exe" : "first"),
384Path.Combine("debug", OperatingSystem.IsWindows() ? "second.exe" : "second"),
448Assert.EndsWith(Path.Combine("debug", OperatingSystem.IsWindows() ? "first.exe" : "first"), Assert.IsType<RustCargoLaunchTarget>(first.Cargo).ExecutablePath);
449Assert.EndsWith(Path.Combine("debug", OperatingSystem.IsWindows() ? "second.exe" : "second"), Assert.IsType<RustCargoLaunchTarget>(second.Cargo).ExecutablePath);
Aspire.Hosting.Sdk.Tests (102)
AppHostSdkTargetsTests.cs (100)
104var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
128var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
167var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
197var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
223var nonExecutableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "non-executable"));
224var nonExecutableDnxPath = Path.Combine(nonExecutableDirectory.FullName, "dnx");
231var executableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "executable"));
252var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(project.ProjectDirectory, RelativeCliDirectory));
271var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
292var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
307var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@"));
325var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
332var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
350var appHostDirectory = Path.Combine(workspace.Path, "FileApp");
352var appHostFile = Path.Combine(appHostDirectory, "apphost.cs");
373var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
424var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli"));
425var captureFile = Path.Combine(workspace.Path, "aspire-args.txt");
461var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli"));
462var captureFile = Path.Combine(workspace.Path, "dnx-args.txt");
504var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native aspire"));
505var captureFile = Path.Combine(workspace.Path, "aspire-native-args.txt");
544var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@"));
545var captureFile = Path.Combine(workspace.Path, "aspire-args.txt");
581var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
582var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
597var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
604var aspireHome = Path.Combine(workspace.Path, "aspire-home");
630var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli"));
636var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, dnxDirectoryName));
641var aspireHome = Path.Combine(workspace.Path, aspireHomeDirectoryName);
681File.Move(bundle.DashboardPath, Path.Combine(managedDir, Path.GetFileName(bundle.DashboardPath)));
712var managedPath = Path.Combine(managedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed");
718expectedDashboardPath = Path.Combine(managedDir, Path.GetFileName(bundle.DashboardPath));
751Path.Combine(workspace.Path, "cli $HOME `aspire-test-command`"));
753var aspireHome = Path.Combine(workspace.Path, "empty-aspire-home");
775var selectedCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected-cli"));
777var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli"));
780var aspireHome = Path.Combine(workspace.Path, "aspire-home");
806var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native%ASPIRE_TEST_LITERAL%"));
808var aspireHome = Path.Combine(workspace.Path, "aspire-home");
824Assert.False(Directory.Exists(Path.Combine(workspace.Path, "nativeexpanded")));
832var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
835var aspireHome = Path.Combine(workspace.Path, "aspire-home");
861var fakeCommandDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-command"));
863var commandShimPath = Path.Combine(fakeCommandDirectory.FullName, "aspire.cmd");
869var childPidPath = Path.Combine(workspace.Path, "child.pid");
871var projectPath = Path.Combine(workspace.Path, "RunAspireCliCommand.proj");
929var commandPath = Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "hang.cmd" : "hang");
998var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1000var environmentAspireHome = Path.Combine(workspace.Path, "environment-aspire-home");
1001var propertyAspireHome = Path.Combine(workspace.Path, "property-aspire-home");
1015Assert.False(Directory.Exists(Path.Combine(propertyAspireHome, "bundle")));
1023var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1049var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1050var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1065var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1066var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1081var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1082var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1097var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1098var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1113var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1114var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1129var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
1143var projectDirectory = Path.Combine(workspace.Path, "AppHost");
1149await File.WriteAllTextAsync(Path.Combine(projectDirectory, "AppHost.csproj"),
1189var projectDirectory = Path.Combine(workspace, "AppHost");
1193var projectFile = Path.Combine(projectDirectory, "AppHost.csproj");
1224await File.WriteAllTextAsync(Path.Combine(projectDirectory, "Program.cs"), """
1299var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1315var aspirePath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1354File.WriteAllText(Path.Combine(bundle.DcpDirectory, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), "");
1364var bundleRoot = Path.Combine(layoutRoot, "bundle");
1365var dcpDirectory = Path.Combine(bundleRoot, "dcp");
1366var dashboardDirectory = Path.Combine(bundleRoot, "dashboard");
1367var dashboardPath = Path.Combine(dashboardDirectory, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
1373var aspirePath = Path.Combine(fakeCliDirectory, $"aspire{extension}");
1409var dnxPath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "dnx.cmd" : "dnx");
1414await File.WriteAllTextAsync(Path.Combine(fakeSdkDirectory.FullName, "dotnet.dll"), "");
1464await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "fail-version"), "");
1478var aspirePath = Path.Combine(fakeCliDirectory, "aspire.exe");
1489File.Copy(sourcePath, Path.Combine(destinationDirectory, Path.GetFileName(sourcePath)), overwrite: true);
1492return Path.Combine(destinationDirectory, Path.GetFileName(fakeCommandHostPath));
1497var captureFile = Path.Combine(workingDirectory, $"{command}-shadow-invoked.txt");
1501Path.Combine(workingDirectory, $"{command}.cmd"),
1516await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$"""
1528var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1544await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$"""
1557var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1578await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1591var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1608await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1625var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1646await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1662var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1764=> OperatingSystem.IsWindows() ? Path.Combine(Path.GetDirectoryName(dnxPath)!, "dotnet.exe") : dnxPath;
1890return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName)));
1999while (directory is not null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
Aspire.Hosting.Seq.Tests (2)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.Tasks (13)
ResolveAspireCliBundle.cs (11)
217if (TryResolveBundleRoot(Path.Combine(fullPath, BundleDirectoryName), out resolution))
229var dcpDir = Path.Combine(bundleRoot, "dcp");
230var dcpPath = Path.Combine(dcpDir, IsWindows() ? "dcp.exe" : "dcp");
231var managedDir = Path.Combine(bundleRoot, "managed");
232var managedPath = Path.Combine(managedDir, IsWindows() ? "aspire-managed.exe" : "aspire-managed");
238var dashboardDir = Path.Combine(bundleRoot, "dashboard");
239var dashboardPath = Path.Combine(dashboardDir, IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
250dashboardPath = Path.Combine(managedDir, IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
363var versionsRoot = Path.Combine(layoutPath, VersionsDirectoryName);
459var sidecarPath = Path.Combine(cliDirectory, InstallSidecarFileName);
486? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspire")
Aspire.Hosting.Testing (1)
Aspire.Hosting.Testing.Tests (6)
Aspire.Hosting.Tests (439)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (14)
73var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
103var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
139var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
179var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
222var dockerfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "Dockerfile");
223var differentCasingDockerfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "DOCKERFILE");
242var contextPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app");
243var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "out");
247var dockerfilePath = Path.Combine(outputPath, "Dockerfile");
261await File.WriteAllTextAsync(Path.Combine(contextPath, ".dockerignore"), "secrets\n");
272var contextPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app");
273var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "out");
277var dockerfilePath = Path.Combine(outputPath, "Dockerfile");
279await File.WriteAllTextAsync(Path.Combine(contextPath, ".dockerignore"), "secrets\n");
Dashboard\DashboardEventHandlersTests.cs (12)
570var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
571var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
659var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard.exe");
660var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
661var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
728var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard");
729var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
730var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
797var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
798var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
862var dashboardExecutable = Path.Combine(tempDir.FullName, executableName);
891var dashboardDll = Path.Combine(tempDirectory.FullName, "Aspire.Dashboard.dll");
Dcp\DcpCliArgsTests.cs (11)
69var explicitDcpPath = Path.Combine("explicit", "dcp");
70var explicitDashboardPath = Path.Combine("explicit", "dashboard");
72builder.Configuration[BundleDiscovery.DcpPathEnvVar] = Path.Combine("bundle", "dcp");
73builder.Configuration[BundleDiscovery.DashboardPathEnvVar] = Path.Combine("bundle", "dashboard");
80Assert.Equal(Path.Combine("explicit", "ext"), dcpOptions.ExtensionsPath);
88var bundleDcpPath = Path.Combine("bundle", "dcp");
89var bundleDashboardPath = Path.Combine("bundle", "dashboard");
99Assert.Equal(Path.Combine(bundleDcpPath, "ext"), dcpOptions.ExtensionsPath);
107var bundleDcpPath = Path.Combine("bundle", "dcp");
108var bundleDashboardPath = Path.Combine("bundle", "dashboard");
118Assert.Equal(Path.Combine(bundleDcpPath, "ext"), dcpOptions.ExtensionsPath);
Dcp\DcpHostNotificationTests.cs (11)
582var terminalHostPath = Path.Combine(directory.FullName, "aspire-managed.exe");
584File.WriteAllText(Path.Combine(directory.FullName, "conpty.dll"), "");
585Directory.CreateDirectory(Path.Combine(directory.FullName, architectureDirectory));
612var terminalHostPath = Path.Combine(directory.FullName, "aspire-managed.exe");
615Directory.CreateDirectory(Path.Combine(nativeDirectory, nativeHostDirectory));
616File.WriteAllText(Path.Combine(nativeDirectory, "conpty.dll"), "");
642var terminalHostPath = Path.Combine(directory.FullName, "aspire-managed.exe");
646File.WriteAllText(Path.Combine(directory.FullName, "conpty.dll"), "");
652Directory.CreateDirectory(Path.Combine(directory.FullName, architectureDirectory));
970var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test");
1144var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test");
DistributedApplicationBuilderTests.cs (32)
125Path.Combine(projectDirectory, "appsettings.json"),
141Path.Combine(projectDirectory, "appsettings.PolyglotTest.json"),
154AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts")
171Path.Combine(projectDirectory, "appsettings.json"),
185AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts")
213Assert.Equal(Path.Combine(projectDirectory, "aspire-output"), outputService.GetOutputDirectory());
236Assert.Equal(Path.Combine(Environment.CurrentDirectory, "aspire-output"), outputService.GetOutputDirectory());
498var appHostPath = Path.Combine(projectDirectory.FullName, "apphost.ts");
511AppHostFilePath = Path.Combine(projectDirectory.FullName, "AppHost.ts"),
547var appHostPath = Path.Combine(realDirectory.FullName, "apphost.ts");
550var symlinkDirectory = Path.Combine(projectDirectory.FullName, "link");
552var appHostPathViaSymlink = Path.Combine(symlinkDirectory, "apphost.ts");
588var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
600AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
648AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
673AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
683var currentDirectory = Path.Combine(deploymentsDirectory, currentSha);
684var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha);
685var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
686var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
732AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
742var currentDirectory = Path.Combine(deploymentsDirectory, currentSha);
743var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha);
744var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
745var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
796AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
806var currentDirectory = Path.Combine(deploymentsDirectory, currentSha);
807var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha);
808var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
809var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
858AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
868var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
MSBuildTests.cs (98)
28var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
31File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
60File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
85var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
88File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
116File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
127var appHostMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "_AppHost.ProjectMetadata.g.cs"));
128var appMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "App.ProjectMetadata.g.cs"));
155File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
167File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
182var libraryDirectory = Path.Combine(basePath, name);
185File.WriteAllText(Path.Combine(libraryDirectory, $"{name}.csproj"),
197File.WriteAllText(Path.Combine(libraryDirectory, "Class1.cs"),
209var appDirectory = Path.Combine(basePath, name);
212File.WriteAllText(Path.Combine(appDirectory, $"{name}.csproj"),
223File.WriteAllText(Path.Combine(appDirectory, "Program.cs"),
328var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Plain.AppHost.csproj");
380var layoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "layout");
404var layoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "layout");
450var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
452var bundle = CreateFakeCliBundle(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home"));
474var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
475var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
488var bundleRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName);
489var expectedDcpDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "dcp"));
490var expectedDashboardDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName));
493Assert.Equal(Path.Combine(expectedDashboardDir, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"), resolvedPaths[2]);
494Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName)));
503var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
504var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
522Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName)));
523Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName)));
532var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
533var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
562var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
563var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
592var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
594var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, literalSegment));
612var bundleRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName);
613Assert.Equal(EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DcpDirectoryName)), resolvedPaths[0]);
614Assert.Equal(EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName)), resolvedPaths[1]);
626var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, literalSegment));
639["ASPIRE_HOME"] = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"),
654var bundle = CreateFakeCliBundle(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home"));
690File.WriteAllText(Path.Combine(nativeCliDirectory.FullName, ".aspire-install.json"), """{"source":"dotnet-tool"}""");
714var repoDcpDir = EnsureTrailingSeparator(Path.Combine(workspace.WorkspaceRoot.FullName, "repo-dcp"));
715var repoDashboardDir = EnsureTrailingSeparator(Path.Combine(workspace.WorkspaceRoot.FullName, "repo-dashboard"));
733Assert.Contains(Path.Combine(repoDashboardDir, "Aspire.Dashboard"), resolvedPaths[2]);
742var missingBundlePath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing-bundle");
780var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
781var dnxPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "dnx.exe" : "dnx");
786File.Copy(Path.Combine(Environment.SystemDirectory, "where.exe"), dnxPath);
798["ASPIRE_HOME"] = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"),
817var missingCliPath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing-aspire");
839var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
841File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.fsproj"),
899var appHostDirectory = Path.Combine(basePath, "AppHost");
902File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
940File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
957File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
967File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
982return CreateFakeCliBundleAtLayoutRoot(Path.Combine(basePath, "layout"));
987return CreateFakeCliBundleRoot(layoutRoot, Path.Combine(layoutRoot, "bundle"));
997var dcpDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "dcp"));
998var managedDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "managed"));
999var dashboardDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName));
1004File.WriteAllText(Path.Combine(dcpDir, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), "");
1005var managedPath = Path.Combine(managedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed");
1007var dashboardPath = Path.Combine(dashboardDir, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
1015var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
1022var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1060var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1086var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1141return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName)));
1156var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1159File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1188File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
1215var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1218File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1247File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
1268var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1271File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1288File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1317var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1320File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1337File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1366var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1393var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1439var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1449var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1451var nuGetConfigPath = Path.Combine(projectDirectory, "NuGet.config");
1495File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1518File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1545File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
1557File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
1582var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1585File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1613File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
PathLookupHelperTests.cs (50)
13var binPath = Path.Combine(workspace.WorkspaceRoot.FullName, "bin");
17var executablePath = Path.Combine(binPath, executableName);
47var firstBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "first-bin");
48var secondBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "second-bin");
52var nonExecutablePath = Path.Combine(firstBinPath, "mycommand");
56var executablePath = Path.Combine(secondBinPath, "mycommand");
74var binPath = Path.Combine(workspace.WorkspaceRoot.FullName, "bin");
76File.WriteAllText(Path.Combine(binPath, "mycommand"), string.Empty);
94var binPath = Path.Combine(workspace.WorkspaceRoot.FullName, "bin");
96File.WriteAllText(Path.Combine(binPath, "mycommand.exe"), string.Empty);
111Path.Combine("/usr/bin", "mycommand")
118Assert.Equal(Path.Combine("/usr/bin", "mycommand"), result);
166Path.Combine("/first/path", "mycommand"),
167Path.Combine("/second/path", "mycommand")
174Assert.Equal(Path.Combine("/first/path", "mycommand"), result);
180var firstPath = Path.Combine("/first/path", "mycommand");
181var secondPath = Path.Combine("/second/path", "mycommand");
212var firstBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "first-bin");
213var secondBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "second-bin");
217var nonExecutablePath = Path.Combine(firstBinPath, "mycommand");
221var executablePath = Path.Combine(secondBinPath, "mycommand");
264var path = string.Join(';', Path.Combine("first", "bin"), Path.Combine("second", "bin"));
275var dir = Path.Combine("testdir", "bin");
276var expectedPath = Path.Combine(dir, "mycommand");
293var dir = Path.Combine("testdir", "bin");
294var expectedPath = Path.Combine(dir, "code.CMD");
312var dir = Path.Combine("testdir", "bin");
313var exePath = Path.Combine(dir, "code.EXE");
314var cmdPath = Path.Combine(dir, "code.CMD");
336var dir = Path.Combine("testdir", "bin");
337var exactPath = Path.Combine(dir, "code");
338var cmdPath = Path.Combine(dir, "code.CMD");
357var dir = Path.Combine("testdir", "bin");
358var exactPath = Path.Combine(dir, "mytool");
376var dir = Path.Combine("testdir", "bin");
377var expectedPath = Path.Combine(dir, "code.CMD");
395var dir = Path.Combine("testdir", "bin");
410var dir = Path.Combine("testdir", "bin");
411var cmdPath = Path.Combine(dir, "code.CMD");
433Path.Combine(dir, "code.cmd")
450Path.Combine(dir, "code.cmd")
467var dir1 = Path.Combine("first", "bin");
468var dir2 = Path.Combine("second", "bin");
469var dir1CmdPath = Path.Combine(dir1, "code.CMD");
470var dir2ExePath = Path.Combine(dir2, "code.EXE");
489var dir1 = Path.Combine("first", "bin");
490var dir2 = Path.Combine("second", "bin");
491var dir1ExactPath = Path.Combine(dir1, "mytool");
492var dir2ExePath = Path.Combine(dir2, "mytool.EXE");
Publishing\ContainerImageArchiveRewriterTests.cs (22)
20var sourceArchive = Path.Combine(workspace.Path, "source.tar");
21var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
105var sourceArchive = Path.Combine(workspace.Path, "source.tar");
106var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
181var sourceArchive = Path.Combine(workspace.Path, "source.tar");
182var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
217var sourceArchive = Path.Combine(workspace.Path, "source.tar");
218var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
290var sourceArchive = Path.Combine(workspace.Path, "source.tar");
291var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
311var sourceArchive = Path.Combine(workspace.Path, "source.tar");
312var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
333var sourceArchive = Path.Combine(workspace.Path, "source.tar");
334var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
357var sourceArchive = Path.Combine(workspace.Path, "source.tar");
358var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
390var sourceArchive = Path.Combine(workspace.Path, "source.tar");
391var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
412var sourceArchive = Path.Combine(workspace.Path, "source.tar");
413var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
436var sourceArchive = Path.Combine(workspace.Path, "source.tar");
437var compressedArchive = Path.Combine(workspace.Path, "custom-extension.archive");
Publishing\DotnetProgramArchiveTests.cs (12)
41var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
77var firstArchive = Path.Combine(firstWorkspace.WorkspaceRoot.FullName, "program.tar");
78var secondArchive = Path.Combine(secondWorkspace.WorkspaceRoot.FullName, "program.tar");
136var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"));
182var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"));
220var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz");
262var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
285var blockedDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
290Path.Combine(blockedDirectory, "program.tar.gz"));
318var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"));
348var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, path);
382return builder.AddProject("program", Path.Combine(workspacePath, "program.csproj"), static options => options.ExcludeLaunchProfile = true)
Publishing\PodmanSaveArgumentsTests.cs (6)
24OutputPath = Path.Combine("out", "archives"),
41OutputPath = Path.Combine("out", "archives"),
58OutputPath = Path.Combine("out", "archives")
72var outputPath = Path.Combine("out", "archives");
95var outputPath = Path.Combine("out", "archives");
147Assert.Contains($"--output \"{Path.Combine("out", "container-abc123.tar")}\"", arguments, StringComparison.Ordinal);
Publishing\ResourceContainerImageManagerTests.cs (28)
60var appPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs");
66var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar.gz");
309var tempOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NewFolder"); // tests that the folder is created if it doesn't exist
690.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj")))
721.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj")))
754.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj")))
801.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj")))
811context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
839var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj");
852context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
893var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz");
895var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj");
982var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz");
985.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj")))
1033.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs")))
1038context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar");
1074var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj");
1080context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar");
1114var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj");
1175var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj");
1210var probePath = Path.Combine(workspace.WorkspaceRoot.FullName, "properties.proj");
1258var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.csproj");
1259var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archive;100%.tar");
1285var probePath = Path.Combine(workspace.WorkspaceRoot.FullName, "properties.proj");
1554var tempSecretFile = System.IO.Path.Combine(workspace.WorkspaceRoot.FullName, ".npmrc");
1939ctx.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archives");
2063ctx.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archives");
2130var dockerfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "Dockerfile");
Schema\SchemaTests.cs (9)
60var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
62var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
72var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
74var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
90var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
92var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
123var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
219var relativePath = Path.Combine("Schema", "aspire-8.0.json");
232var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: Path.Combine(manifestDir, "not-used.json"), step: "publish-json-manifest");
Utils\SocketPermissionHelperTests.cs (27)
25var directory = Path.Combine(root.FullName, "custom");
31var socketPath = Path.Combine(directory, "s.sock");
71var socketPath = Path.Combine(directory, "occupied");
96var directory = Path.Combine(root.FullName, "custom");
138var directory = SocketPermissionHelper.CreateDirectory(Path.Combine(root.FullName, "custom"), repairExisting: false);
164Directory.CreateDirectory(Path.Combine(root.FullName, ".aspire"));
169Assert.ThrowsAny<IOException>(() => SocketPermissionHelper.Bind(socket, Path.Combine(directory, "s.sock")));
191var target = Directory.CreateDirectory(Path.Combine(root.FullName, "target"));
192Directory.CreateDirectory(Path.Combine(target.FullName, "home"));
193var link = Path.Combine(root.FullName, "homes");
195var profile = Path.Combine(link, "home");
225var target = Directory.CreateDirectory(Path.Combine(root.FullName, "target"));
227var link = Path.Combine(root.FullName, "base");
274var home = Directory.CreateDirectory(Path.Combine(root.FullName, "home"));
275var profile = Path.Combine(root.FullName, "profile");
277var target = Path.Combine(root.FullName, "target");
280var link = Path.Combine(profile, linkedSuffix);
310var target = Path.Combine(root.FullName, "target");
315var profile = Path.Combine(root.FullName, "profile");
346var target = Path.Combine(root.FullName, "target");
349Directory.CreateDirectory(Path.Combine(root.FullName, ".aspire"));
391var socketPath = Path.Combine(directory, "s.sock");
451Assert.Equal(Path.Combine(root.FullName, "custom"), directory.FullName);
468var directory = Path.Combine(root.FullName, dcpLayout ? "aspire-dcp-test" : ".aspire/pty");
499var target = Directory.CreateDirectory(Path.Combine(root.FullName, "target"));
500var directory = Path.Combine(target.FullName, "pty");
503Directory.CreateSymbolicLink(Path.Combine(root.FullName, ".aspire"), target.FullName);
WithTerminalTests.cs (17)
20private string _terminalDirectory => Path.Combine(_terminalRoot, "terminals");
513var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.MetadataSuffix}");
514var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
515var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ConsumerSockPurpose}.sock");
516var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ControlSockPurpose}.sock");
568var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.MetadataSuffix}");
569var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
619var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}");
620var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
651var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{TerminalHostPaths.MetadataSuffix}");
657var sentinelPath = Path.Combine(trmnlDirectory, maliciousPrefix + "-sentinel.tmp");
786var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.MetadataSuffix}");
787var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
816var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}");
817var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
999var publishDirectory = Path.Combine(_terminalDirectory, "publish");
1394var directory = Path.Combine(_terminalRoot, "custom");
Aspire.Hosting.TestUtilities (11)
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (2)
Aspire.Managed.Tests (13)
TerminalHostSignalTests.cs (11)
25var socketDirectory = new DirectoryInfo(Path.Combine(root.FullName, "terminals"));
26var producerPath = Path.Combine(socketDirectory.FullName, "p.sock");
27var consumerPath = Path.Combine(socketDirectory.FullName, "h.sock");
28var controlPath = Path.Combine(socketDirectory.FullName, "c.sock");
99var socketDirectory = new DirectoryInfo(Path.Combine(root.FullName, "terminals"));
100var parentProducerPath = Path.Combine(socketDirectory.FullName, "pp.sock");
101var parentConsumerPath = Path.Combine(socketDirectory.FullName, "ph.sock");
102var parentControlPath = Path.Combine(socketDirectory.FullName, "pc.sock");
104var producerPath = Path.Combine(socketDirectory.FullName, "p.sock");
105var consumerPath = Path.Combine(socketDirectory.FullName, "h.sock");
106var controlPath = Path.Combine(socketDirectory.FullName, "c.sock");
Aspire.Playground.Tests (3)
Aspire.Templates.Tests (45)
tests\Shared\TemplatesTesting\AspireProject.cs (19)
23Path.Combine(BuildEnvironment.TestAssetsPath, "nuget8.config");
32public string ServiceDefaultsProjectPath => Path.Combine(RootDir, $"{Id}.ServiceDefaults");
33public string TestsProjectDirectory => Path.Combine(RootDir, $"{Id}.Tests");
48LogPath = Path.Combine(_buildEnv.LogRootPath, Id);
50AppHostProjectDirectory = Path.Combine(RootDir, $"{Id}.AppHost");
65File.WriteAllText(Path.Combine(dir, "Directory.Build.props"), "<Project />");
66File.WriteAllText(Path.Combine(dir, "Directory.Build.targets"), "<Project />");
72string targetNuGetConfigPath = Path.Combine(dir, "nuget.config");
93projectDir = Path.Combine(rootDir, id);
97rootDir = projectDir = Path.Combine(BuildEnvironment.TestRootPath, id);
100string logPath = Path.Combine(BuildEnvironment.ForDefaultFramework.LogRootPath, id);
107File.WriteAllText(Path.Combine(rootDir, "Directory.Build.props"), "<Project />");
108File.WriteAllText(Path.Combine(rootDir, "Directory.Build.targets"), "<Project />");
153File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "EndPointWriterHook_cs"), Path.Combine(project.AppHostProjectDirectory, "EndPointWriterHook.cs"));
154string programCsPath = Path.Combine(project.AppHostProjectDirectory, "AppHost.cs");
332workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost");
336var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true");
339var buildArgs = $"build \"-bl:{Path.Combine(LogPath!, $"{Id}-build.binlog")}\" /p:TreatWarningsAsErrors=true";
Aspire.TerminalHost (2)
Aspire.TerminalHost.Tests (10)
TerminalHostAppTests.cs (8)
43var dcpDir = Path.Combine(workspace.Path, "terminals");
48var producer = Path.Combine(dcpDir, "p.sock");
49var consumer = Path.Combine(hostDir, "r.sock");
50var control = Path.Combine(ctrlDir, "c.sock");
700Directory.CreateDirectory(Path.Combine(workspace.Path, ".aspire"));
706Path.Combine(parentFile, "consumer.sock"),
1255Directory.CreateDirectory(Path.Combine(workspace.Path, ".aspire"));
1260Path.Combine(parentFile, "producer.sock"), CancellationToken.None));
Aspire.TestTools (2)
Aspire.TestUtilities (1)
Binding.UDS.IntegrationTests (2)
blazor-devserver (1)
CodeStyleConfigFileGenerator (3)
ConfigurationSchemaGenerator.Tests (2)
CreateLayout (17)
Program.cs (17)
170var managedDir = Path.Combine(_outputPath, "managed");
178var managedExePath = Path.Combine(managedPublishPath, managedExeName);
184File.Copy(managedExePath, Path.Combine(managedDir, managedExeName), overwrite: true);
198var destination = Path.Combine(managedDir, relativePath);
200File.Copy(Path.Combine(managedPublishPath, relativePath), destination, overwrite: true);
221var dashboardExePath = Path.Combine(dashboardPublishPath, dashboardExeName);
227var wwwrootPath = Path.Combine(dashboardPublishPath, "wwwroot");
242var sqliteLibraryPath = Path.Combine(dashboardPublishPath, sqliteLibraryName);
250var dashboardDir = Path.Combine(_outputPath, "dashboard");
270var dcpDir = Path.Combine(_outputPath, "dcp");
282var archivePath = Path.Combine(Path.GetDirectoryName(_outputPath)!, archiveName + ".tar.gz");
402var dcpPackagePath = Path.Combine(nugetPackages, dcpPackageName);
415var toolsPath = Path.Combine(latestVersion.Path, "tools");
426var oldPackagePath = Path.Combine(nugetPackages, oldPackageName);
436var toolsPath = Path.Combine(latestVersion, "tools");
459var destFile = Path.Combine(destination, Path.GetFileName(file));
472var destDir = Path.Combine(destination, Path.GetFileName(dir));
crossgen2 (2)
Crossgen2Tasks (2)
csc (8)
CSharpSyntaxGenerator (4)
csi (1)
datacollector (3)
datacollector.arm64 (3)
dotnet (5)
dotnet-aot (43)
parent\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (8)
102string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json");
129var workloadSetVersionFilePath = Path.Combine(advertisedPath, Constants.workloadSetVersionFileName);
222File.WriteAllText(Path.Combine(adManifestPath, "AdvertisedManifestFeatureBand.txt"), band.ToString());
235File.WriteAllText(Path.Combine(adManifestPath, Constants.workloadSetVersionFileName), workloadSetVersion);
297var manifestPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "WorkloadManifest.json");
307var adManifestFeatureBandPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "AdvertisedManifestFeatureBand.txt");
369private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}");
373internal static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}");
dotnet-dev-certs (8)
dotnet-format (6)
dotnet-getdocument (5)
dotnet-Microsoft.XmlSerializer.Generator (1)
dotnet-openapi (2)
dotnet-razorpagegenerator (1)
dotnet-suggest (7)
dotnet-svcutil-lib (38)
Shared\MSBuildProj.cs (9)
67public string FullPath { get { return Path.Combine(DirectoryPath, FileName); } }
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName;
338fullPath = Path.Combine(fullPath, binReference);
340else if (Directory.Exists(Path.Combine(msbuildProj.DirectoryPath, fullPath)))
427string filePath = Path.Combine(dirPath, DirBuildProps);
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
881outputPath = Path.Combine(this.DirectoryPath, outputPath.Trim(new char[] { '\"' }));
885Path.Combine(outputPath, $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json") :
919dependency = ProjectDependency.FromAssembly(Path.Combine(outputPath, assetPath));
dotnet-svcutil-lib.Tests (68)
E2ETests.cs (9)
20this_TestGroupBaselinesDir = Path.Combine(g_BaselinesDir, this_TestCaseName);
21this_TestGroupOutputDir = Path.Combine(g_TestResultsDir, this_TestCaseName);
22this_TestGroupBootstrapDir = Path.Combine(g_TestBootstrapDir, this_TestCaseName);
92Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
214var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
228var typeReuseProjectsPath = Path.Combine(g_TestCasesDir, "TypeReuse");
250Directory.CreateDirectory(Path.Combine(this_TestCaseBootstrapDir, "SvcutilBootstrapper"));
252var uri = PathHelper.GetRelativePath(Path.Combine(this_TestGroupOutputDir, "TypeReuseSvc.wsdl"), new DirectoryInfo(this_TestCaseOutputDir));
374File.Copy(f, Path.Combine(this_TestCaseProject.DirectoryPath, Path.GetFileName(f)));
GlobalToolTests.cs (20)
135Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
158File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.cs"), Path.Combine(this_TestCaseOutputDir, "FullFramework.cs"), true);
159File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.csproj"), Path.Combine(this_TestCaseOutputDir, "FullFramework.csproj"), true);
162var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
179this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
181this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
182this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
183this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
186File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, "Program.cs"), Path.Combine(this_TestCaseOutputDir, "Program.cs"), true);
187File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, $"{testCaseName}.csproj"), Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), true);
188this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None);
194var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
207this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testClientFolder);
210this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
211this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{this_TestCaseName}.log");
212this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testClientFolder);
215FileUtil.CopyDirectory(Path.Combine(g_TestCasesDir, this_TestCaseName), this_TestGroupOutputDir, true);
216this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None);
224var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
246var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json");
TestInit.cs (26)
60File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
61File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
93var filePath = Path.Combine(this_TestGroupProjDir, this_TestGroupProjectName);
111var projectPath = Path.Combine(outputDir, $"{projectName}.csproj");
112var programPath = Path.Combine(outputDir, $"{projectName}.cs");
144g_TestResultsDir = Path.Combine(g_TestOutputDir, "TestResults");
145g_TestBootstrapDir = Path.Combine(g_TestOutputDir, "TestBootstrap");
146g_TestCasesDir = Path.Combine(vsTestsRoot, "TestCases");
147g_BaselinesDir = Path.Combine(vsTestsRoot, "Baselines");
173File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
174File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
210var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
234var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
242this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
247this_TestCaseBootstrapDir = Path.Combine(this_TestGroupBootstrapDir, testCaseName);
250this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
266this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
267var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
353var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
428var expected = Path.Combine(baselineDir, relativePath);
446var globalScriptPath = Path.Combine(g_TestOutputDir, @"TestScripts\deleteAll.cmd");
537if (!Directory.Exists(Path.Combine(vstestDir, "TestCases")))
606File.WriteAllText(Path.Combine(directory, "global.json"), globalConfig);
624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
dotnet-svcutil.xmlserializer (1)
dotnet-user-jwts (13)
dotnet-user-secrets (6)
dotnet-watch (7)
DotnetTool.AppHost (1)
GenerateAnalyzerNuspec (17)
Program.cs (17)
147string assemblyPathForNuspec = Path.Combine(assemblyFolder, assembly);
158var resourceAssemblyFullPath = Path.Combine(directory, resourceAssemblyName);
163string targetForNuspec = Path.Combine(target, directoryName);
174var fileWithPath = Path.IsPathRooted(file) ? file : Path.Combine(projectDir, file);
180readmeFile = Path.IsPathRooted(readmeFile) ? readmeFile : Path.GetFullPath(Path.Combine(projectDir, readmeFile));
194result.AppendLine(FileElement(fileWithPath, Path.Combine("lib", tfm)));
216var fileWithPath = Path.Combine(folderPath, file);
217var targetPath = tfms.Length > 1 ? Path.Combine(folder, tfm) : folder;
224result.AppendLine(FileElement(Path.Combine(assetsDir, "Install.ps1"), "tools"));
225result.AppendLine(FileElement(Path.Combine(assetsDir, "Uninstall.ps1"), "tools"));
234result.AppendLine(FileElement(Path.Combine(rulesetsDir, ruleset), "rulesets"));
246result.AppendLine(FileElement(Path.Combine(directory, editorconfig), $"editorconfig\\{directoryName}"));
257result.AppendLine(FileElement(Path.Combine(globalAnalyzerConfigsDir, globalconfig), $"buildTransitive\\config"));
268var fileWithPath = Path.Combine(analyzerDocumentationFileDir, analyzerDocumentationFileName);
277var fileWithPath = Path.Combine(analyzerSarifFileDir, analyzerSarifFileName);
286var fileWithPath = Path.Combine(analyzerConfigurationFileDir, analyzerConfigurationFileName);
293result.AppendLine(FileElement(Path.Combine(assetsDir, "ThirdPartyNotices.txt"), ""));
GenerateDocumentationAndConfigFiles (17)
Program.cs (12)
433var fileWithPath = Path.Combine(directory.FullName, args.PropsFileName);
442fileWithPath = Path.Combine(directory.FullName, args.PropsFileToDisableNetAnalyzersInNuGetPackageName);
544var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerDocumentationFileName);
640var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerSarifFileName);
734Validate(Path.Combine(directory.FullName, args.AnalyzerSarifFileName), stringWriter.ToString(), fileNamesWithValidationFailures);
776var fileWithPath = Path.Combine(directory.FullName, "RulesMissingDocumentation.md");
1081return Path.Combine(assemblyDir, assembly);
1112var rulesetFilePath = Path.Combine(directory.FullName, rulesetFileName);
1176var directory = Directory.CreateDirectory(Path.Combine(analyzerEditorconfigsDir, editorconfigFolder));
1177var editorconfigFilePath = Path.Combine(directory.FullName, ".editorconfig");
1400var configFilePath = Path.Combine(directory.FullName, fileName.ToLowerInvariant());
1612var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
GetDocument.Insider (1)
ilasm (3)
ilc (2)
ILCompiler.Compiler (1)
ILCompiler.Diagnostics (3)
ILCompiler.ReadyToRun (7)
illink (11)
Infrastructure.Common (2)
Infrastructure.Tests (950)
BuildWarningPolicyTests.cs (11)
21var script = Path.Combine(workspace.Path, "evaluate.ps1");
98File.Copy(Path.Combine(RepoRoot.Path, file), Path.Combine(root, file));
102await File.WriteAllTextAsync(Path.Combine(root, "Directory.Build.props"), scenario == "invalid-policy" || clean ? "<Project>" : """
121await File.WriteAllTextAsync(Path.Combine(common, "tools.ps1"), """
133await File.WriteAllTextAsync(Path.Combine(common, "tools.sh"), """
146await File.WriteAllTextAsync(Path.Combine(common, "build.ps1"), """
166var commonBash = Path.Combine(common, "build.sh");
269var harness = Path.Combine(root, "run.ps1");
279var report = Path.Combine(root, "report.txt");
280var bootstrap = Path.Combine(root, "bootstrap.txt");
CreateFailingTestIssue\CreateFailingTestIssueToolTests.cs (23)
72var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
84Path.Combine(fixtureDirectory, "search-issue.json"),
89Path.Combine(fixtureDirectory, "create-issue.json"),
123Path.Combine(fixtureDirectory, "search-issue.json"),
133File.WriteAllText(Path.Combine(fixtureDirectory, "add-issue-comment.json"), "{}");
153var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
164Path.Combine(fixtureDirectory, "search-issue.json"),
174File.WriteAllText(Path.Combine(fixtureDirectory, "reopen-issue.json"), "{}");
175File.WriteAllText(Path.Combine(fixtureDirectory, "add-issue-comment.json"), "{}");
195var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
206Path.Combine(fixtureDirectory, "search-issue.json"),
211Path.Combine(fixtureDirectory, "create-issue.json"),
237var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
248Path.Combine(fixtureDirectory, "search-issue.json"),
258Path.Combine(fixtureDirectory, "create-issue.json"),
285var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
431var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
530var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
560var queuedDiagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
586var failedDiagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
691var fixtureDirectory = Path.Combine(_workspace.Path, Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture));
832var fixtureDirectory = Path.Combine(_workspace.Path, Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture));
988return Path.Combine(fixtureDirectory, $"{fileName}{extension}");
CreateLayout\CreateLayoutTests.cs (19)
18using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "win-x64", configuration, "1.0.0", verbose: false);
39using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "win-x64", "Debug", "1.0.0", verbose: false);
51var outputPath = Path.Combine(workspace.Path, "layout");
97var filePath = Path.Combine(publishPath, relativePath);
102var outputPath = Path.Combine(workspace.Path, "layout");
107var dashboardPath = Path.Combine(outputPath, "dashboard");
113Assert.Equal(File.ReadAllBytes(Path.Combine(publishPath, relativePath)), File.ReadAllBytes(Path.Combine(dashboardPath, relativePath)));
122var wwwrootPath = Path.Combine(publishPath, "wwwroot");
124var outputPath = Path.Combine(workspace.Path, "layout");
130Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard")));
150var outputPath = Path.Combine(workspace.Path, "layout");
156Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard")));
170var sqliteLibraryPath = Path.Combine(publishPath, sqliteLibraryName);
180var outputPath = Path.Combine(workspace.Path, "layout");
186Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard")));
195File.WriteAllText(Path.Combine(publishPath, executableName), "executable");
196File.WriteAllText(Path.Combine(publishPath, sqliteLibraryName), "sqlite");
197File.WriteAllText(Path.Combine(frameworkPath, "blazor.web.js"), "static asset");
ExtractTestPartitions\ExtractTestPartitionsTests.cs (21)
31var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
37var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
56var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
62var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
77var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
83var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
101var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
104var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
119var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
126var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
144var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
151var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
167var nonExistentPath = Path.Combine(_workspace.Path, "DoesNotExist.dll");
168var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
193var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
213var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
218var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
235var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
242var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
260var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
267var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
GenerateTestSummary\GenerateTestSummaryToolTests.cs (20)
31var trxPath = Path.Combine(_workspace.Path, "sample.trx");
53var trxPath = Path.Combine(_workspace.Path, "mixed.trx");
60var jsonPath = Path.Combine(_workspace.Path, "failed.json");
81var trxPath = Path.Combine(_workspace.Path, "aborted.trx");
87var jsonPath = Path.Combine(_workspace.Path, "failed.json");
104var trxPath = Path.Combine(_workspace.Path, "allpass.trx");
110var jsonPath = Path.Combine(_workspace.Path, "failed.json");
133var trxDir = Path.Combine(_workspace.Path, "corrupt");
135await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<");
137var jsonPath = Path.Combine(_workspace.Path, "failed.json");
160var trxDir = Path.Combine(_workspace.Path, "partial");
163Path.Combine(trxDir, "clean.trx"),
165await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<");
167var jsonPath = Path.Combine(_workspace.Path, "failed.json");
187var trxDir = Path.Combine(_workspace.Path, "partial-with-failure");
190Path.Combine(trxDir, "failed.trx"),
192await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<");
194var jsonPath = Path.Combine(_workspace.Path, "failed.json");
216var trxPath = Path.Combine(_workspace.Path, "timestamped.trx");
225var jsonPath = Path.Combine(_workspace.Path, "failed.json");
Hex1bNativePublishingTests.cs (16)
83var artifacts = Path.Combine(_workspace.Path, "artifacts");
96WriteFile(Path.Combine(publish, file), file);
112WriteFile(Path.Combine(dashboardPublish, file), file);
126var packages = Path.Combine(_workspace.Path, "packages");
128var layout = Path.Combine(_workspace.Path, "layout");
145var managed = Path.Combine(layout, "managed");
150Assert.True(File.ReadAllBytes(Path.Combine(publish, file)).SequenceEqual(File.ReadAllBytes(Path.Combine(managed, file))), file);
153var dashboard = Path.Combine(layout, "dashboard");
158Assert.True(File.ReadAllBytes(Path.Combine(dashboardPublish, file)).SequenceEqual(File.ReadAllBytes(Path.Combine(dashboard, file))), file);
169var layout = Path.Combine(_workspace.Path, "layout");
170var marker = Path.Combine(layout, "existing.txt");
181"--output", layout, "--artifacts", Path.Combine(_workspace.Path, "missing-artifacts"), "--rid", rid, "--configuration", "Release"]);
198var repositoryTargets = XDocument.Load(Path.Combine(RepoRoot.Path, "Directory.Build.targets"));
317var projectPath = Path.Combine(_workspace.Path, "Publish.proj");
Pipelines\NpmCliPackageTests.cs (23)
180var testScriptPath = Path.Combine(_workspace.Path, $"{Path.GetRandomFileName()}.js");
220var testScriptPath = Path.Combine(_workspace.Path, $"{Path.GetRandomFileName()}.js");
249var packageJson = ReadJsonObject(Path.Combine(package.PointerPackageRoot, "package.json"));
270var readme = await File.ReadAllTextAsync(Path.Combine(package.PointerPackageRoot, "README.md"));
335var packageJson = ReadJsonObject(Path.Combine(package.RidPackageRoot, "package.json"));
355var readme = await File.ReadAllTextAsync(Path.Combine(package.RidPackageRoot, "README.md"));
572=> File.ReadAllTextAsync(Path.Combine(_repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
576var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName());
577var nodeModulesRoot = Path.Combine(testRoot, "node_modules");
579var pointerBinRoot = Path.Combine(pointerPackageRoot, "bin");
584Path.Combine(pointerBinRoot, "aspire.js"));
587Path.Combine(pointerPackageRoot, "package.json"),
601await File.WriteAllTextAsync(Path.Combine(pointerBinRoot, "aspire-package-map.json"), packageMap.ToJsonString());
608var ridBinRoot = Path.Combine(ridPackageRoot, "bin");
612Path.Combine(ridPackageRoot, "package.json"),
620await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire"), "native binary stub");
621await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire.exe"), "native binary stub");
641var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName());
642var stagingRoot = Path.Combine(testRoot, "staging");
643var outputPath = Path.Combine(testRoot, "output");
644var nativeBinaryPath = Path.Combine(testRoot, "native-aspire-stub");
665Path.Combine(stagingRoot, "rid"),
666Path.Combine(stagingRoot, "pointer"));
PowerShellScripts\BuildTestMatrixTests.cs (69)
33var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
37Path.Combine(artifactsDir, "MyProject.tests-metadata.json"),
42var outputFile = Path.Combine(_workspace.Path, "matrix.json");
63var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
67Path.Combine(artifactsDir, "ProjectA.tests-metadata.json"),
72Path.Combine(artifactsDir, "ProjectB.tests-metadata.json"),
76var outputFile = Path.Combine(_workspace.Path, "matrix.json");
95var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
99Path.Combine(artifactsDir, "SplitProject.tests-metadata.json"),
105Path.Combine(artifactsDir, "SplitProject.tests-partitions.json"),
108var outputFile = Path.Combine(_workspace.Path, "matrix.json");
136var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
140Path.Combine(artifactsDir, "ClassSplitProject.tests-metadata.json"),
146Path.Combine(artifactsDir, "ClassSplitProject.tests-partitions.json"),
149var outputFile = Path.Combine(_workspace.Path, "matrix.json");
172var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
177Path.Combine(artifactsDir, "NoTimeouts.tests-metadata.json"),
181var outputFile = Path.Combine(_workspace.Path, "matrix.json");
199var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
203Path.Combine(artifactsDir, "CustomTimeouts.tests-metadata.json"),
208var outputFile = Path.Combine(_workspace.Path, "matrix.json");
226var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
230Path.Combine(artifactsDir, "NeedsNugets.tests-metadata.json"),
236Path.Combine(artifactsDir, "NoNugets.tests-metadata.json"),
241var outputFile = Path.Combine(_workspace.Path, "matrix.json");
260var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
264Path.Combine(artifactsDir, "FilterTest.tests-metadata.json"),
269Path.Combine(artifactsDir, "FilterTest.tests-partitions.json"),
272var outputFile = Path.Combine(_workspace.Path, "matrix.json");
290var emptyArtifactsDir = Path.Combine(_workspace.Path, "empty-artifacts");
293var outputFile = Path.Combine(_workspace.Path, "matrix.json");
310var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
314Path.Combine(artifactsDir, "SplitProject.tests-metadata.json"),
322Path.Combine(artifactsDir, "SplitProject.tests-partitions.json"),
325var outputFile = Path.Combine(_workspace.Path, "matrix.json");
351var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
355Path.Combine(artifactsDir, "SdkProject.tests-metadata.json"),
360var outputFile = Path.Combine(_workspace.Path, "matrix.json");
378var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
382Path.Combine(artifactsDir, "LinuxOnly.tests-metadata.json"),
387var outputFile = Path.Combine(_workspace.Path, "matrix.json");
406var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
410Path.Combine(artifactsDir, "OsRestrictedSplit.tests-metadata.json"),
417Path.Combine(artifactsDir, "OsRestrictedSplit.tests-partitions.json"),
420var outputFile = Path.Combine(_workspace.Path, "matrix.json");
443var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
447Path.Combine(artifactsDir, "CustomRunner.tests-metadata.json"),
452var outputFile = Path.Combine(_workspace.Path, "matrix.json");
472var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
476Path.Combine(artifactsDir, "NoRunner.tests-metadata.json"),
480var outputFile = Path.Combine(_workspace.Path, "matrix.json");
498var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
502Path.Combine(artifactsDir, "SplitRunner.tests-metadata.json"),
509Path.Combine(artifactsDir, "SplitRunner.tests-partitions.json"),
512var outputFile = Path.Combine(_workspace.Path, "matrix.json");
534var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
538Path.Combine(artifactsDir, "ClassRunner.tests-metadata.json"),
549Path.Combine(artifactsDir, "ClassRunner.tests-partitions.json"),
552var outputFile = Path.Combine(_workspace.Path, "matrix.json");
577var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
581Path.Combine(artifactsDir, "DefaultProps.tests-metadata.json"),
585var outputFile = Path.Combine(_workspace.Path, "matrix.json");
612var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
628Path.Combine(artifactsDir, "PartialProps.tests-metadata.json"),
631var outputFile = Path.Combine(_workspace.Path, "matrix.json");
699var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
703Path.Combine(artifactsDir, "SplitProps.tests-metadata.json"),
710Path.Combine(artifactsDir, "SplitProps.tests-partitions.json"),
713var outputFile = Path.Combine(_workspace.Path, "matrix.json");
PowerShellScripts\ExpandTestMatrixGitHubTests.cs (43)
39var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
42var outputFile = Path.Combine(_workspace.Path, "expanded.json");
66var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
69var outputFile = Path.Combine(_workspace.Path, "expanded.json");
92var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
95var outputFile = Path.Combine(_workspace.Path, "expanded.json");
116var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
119var outputFile = Path.Combine(_workspace.Path, "expanded.json");
142var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
145var outputFile = Path.Combine(_workspace.Path, "expanded.json");
169var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
172var outputFile = Path.Combine(_workspace.Path, "expanded.json");
200var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
203var outputFile = Path.Combine(_workspace.Path, "expanded.json");
238var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
241var outputFile = Path.Combine(_workspace.Path, "expanded.json");
265var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
268var outputFile = Path.Combine(_workspace.Path, "expanded.json");
282var nonExistentFile = Path.Combine(_workspace.Path, "does-not-exist.json");
283var outputFile = Path.Combine(_workspace.Path, "expanded.json");
301var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
304var outputFile = Path.Combine(_workspace.Path, "expanded.json");
327var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
330var outputFile = Path.Combine(_workspace.Path, "expanded.json");
353var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
356var outputFile = Path.Combine(_workspace.Path, "expanded.json");
386var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
389var outputFile = Path.Combine(_workspace.Path, "expanded.json");
413var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
416var outputFile = Path.Combine(_workspace.Path, "expanded.json");
452var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
455var outputFile = Path.Combine(_workspace.Path, "expanded.json");
486var canonicalMatrix = Path.Combine(_workspace.Path, "canonical.json");
489var outputFile = Path.Combine(_workspace.Path, "expanded.json");
509var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
513Path.Combine(artifactsDir, "RegularProject.tests-metadata.json"),
519Path.Combine(artifactsDir, "SplitMultiOS.tests-metadata.json"),
526Path.Combine(artifactsDir, "SplitMultiOS.tests-partitions.json"),
530Path.Combine(artifactsDir, "LinuxE2E.tests-metadata.json"),
538Path.Combine(artifactsDir, "CliE2E.tests-metadata.json"),
548var canonicalFile = Path.Combine(_workspace.Path, "canonical.json");
558var expandedFile = Path.Combine(_workspace.Path, "expanded.json");
564var githubOutputFile = Path.Combine(_workspace.Path, "github_output.txt");
PowerShellScripts\SplitTestProjectsTests.cs (10)
42var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
48var outputFile = Path.Combine(_workspace.Path, "partitions.json");
72var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
77var outputFile = Path.Combine(_workspace.Path, "partitions.json");
100var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
106var outputFile = Path.Combine(_workspace.Path, "partitions.json");
131var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
138var outputFile = Path.Combine(_workspace.Path, "partitions.json");
166var nonExistentPath = Path.Combine(_workspace.Path, "DoesNotExist.dll");
167var outputFile = Path.Combine(_workspace.Path, "partitions.json");
PowerShellScripts\ValidateNpmPackageSignaturesTests.cs (10)
37var missing = Path.Combine(_workspace.Path, "does-not-exist");
54var filePath = Path.Combine(_workspace.Path, "not-a-directory.txt");
71File.WriteAllText(Path.Combine(shipping, "Aspire.Hosting.13.4.0.nupkg"), "decoy");
84var tgz = Path.Combine(shipping, "microsoft-aspire-cli-linux-x64-13.4.0.tgz");
100var tgz = Path.Combine(shipping, "microsoft-aspire-cli-linux-x64-13.4.0.tgz");
118var tgz = Path.Combine(shipping, "microsoft-aspire-cli-linux-x64-13.4.0.tgz");
137var tgz = Path.Combine(shipping, "microsoft-aspire-cli-linux-x64-13.4.0.tgz");
163var tgz = Path.Combine(shipping, "microsoft-aspire-cli-linux-x64-13.4.0.tgz");
187var tgzMissing = Path.Combine(shipping, "microsoft-aspire-cli-linux-x64-13.4.0.tgz");
188var tgzBadPrefix = Path.Combine(shipping, "microsoft-aspire-cli-win-x64-13.4.0.tgz");
PowerShellScripts\WriteClassModeTestPropsTests.cs (13)
28var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
32Path.Combine(artifactsDir, "RegularProject.tests-metadata.json"),
37Path.Combine(artifactsDir, "PartitionSplitProject.tests-metadata.json"),
42Path.Combine(artifactsDir, "PartitionSplitProject.tests-partitions.json"),
46Path.Combine(artifactsDir, "ClassSplitProject.tests-metadata.json"),
50var outputPropsPath = Path.Combine(_workspace.Path, "ClassModeProjects.props");
67var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
71Path.Combine(artifactsDir, "PartitionSplitProject.tests-metadata.json"),
76Path.Combine(artifactsDir, "PartitionSplitProject.tests-partitions.json"),
79var outputPropsPath = Path.Combine(_workspace.Path, "ClassModeProjects.props");
94var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
98Path.Combine(artifactsDir, "Broken.tests-metadata.json"),
106var outputPropsPath = Path.Combine(_workspace.Path, "ClassModeProjects.props");
TestTriggerMap\GraphAffectedProjectsTests.cs (9)
318var changedFilesPath = System.IO.Path.Combine(_workspace.Path, "changed.txt");
320return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: null, to: null, changedFilesPath: changedFilesPath).AffectedProjects;
325var changedFilesPath = System.IO.Path.Combine(_workspace.Path, "changed.txt");
327return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: null, to: null, changedFilesPath: changedFilesPath);
334System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"),
348var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
440var newFull = System.IO.Path.Combine(_workspace.Path, newRelativePath.Replace('/', System.IO.Path.DirectorySeparatorChar));
445return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: baseSha, to: "HEAD", changedFilesPath: null).AffectedProjects;
450var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
TestTriggerMap\SelectTestsCliTests.cs (40)
99Assert.Contains("## SelectTests", File.ReadAllText(Path.Combine(repoRoot, "summary")));
167File.WriteAllText(Path.Combine(dir.FullName, "map.yml"), Map);
171var propsPath = Path.Combine(dir.FullName, "BeforeBuildProps.props");
220var commentPath = Path.Combine(repoRoot, "comment.md");
272var commentPath = Path.Combine(repoRoot, "comment.md");
328var commentPath = Path.Combine(repoRoot, "comment.md");
369var commentPath = Path.Combine(repoRoot, "comment.md");
400var commentPath = Path.Combine(repoRoot, "comment.md");
446var commentPath = Path.Combine(repoRoot, "comment.md");
462var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
499var commentPath = Path.Combine(repoRoot, "comment.md");
524var solution = File.ReadAllText(Path.Combine(RepoRoot.Path, "Aspire.slnx"));
532var project = File.ReadAllText(Path.Combine(RepoRoot.Path, projectPath));
575var commentPath = Path.Combine(repoRoot, "comment.md");
618var jsonPath = Path.Combine(repoRoot, "selection.json");
662var missing = Path.Combine(repoRoot, "does-not-exist.txt");
856var missing = Path.Combine(repoRoot, "does-not-exist.txt");
863var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
901var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
939var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
965var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
988var commentPath = Path.Combine(repoRoot, "comment.md");
989var jsonPath = Path.Combine(repoRoot, "selection.json");
1002var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
1043var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1084var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1122var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1138var changed = Path.Combine(repoRoot, "changed.txt");
1243File.WriteAllText(Path.Combine(repoRoot, "skip-patterns.txt"), "# docs\n**.md\n");
1249var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
1257File.WriteAllText(Path.Combine(repoRoot, "skip-patterns.txt"), ".github/workflows/**\n");
1280MapPath: Path.Combine(repoRoot, "map.yml"),
1281SlnxPath: slnxPath ?? Path.Combine(repoRoot, "Aspire.slnx"),
1294var changed = Path.Combine(repoRoot, "changed.txt");
1310File.WriteAllText(Path.Combine(dir.FullName, "Aspire.slnx"), slnx);
1311File.WriteAllText(Path.Combine(dir.FullName, "map.yml"), map);
1314body(dir.FullName, Path.Combine(dir.FullName, "BeforeBuildProps.props"), output));
1348var outputPath = Path.Combine(dir, "output");
1350Environment.SetEnvironmentVariable("GITHUB_STEP_SUMMARY", Path.Combine(dir, "summary"));
1393var fullPath = Path.Combine(repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar));
TestTriggerMap\SelectTestsLayer1IntegrationTests.cs (24)
39var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
45MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
46SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
79var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
85MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
86SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
134var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
139MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
140SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
170var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
174var commentPath = System.IO.Path.Combine(fixture.Path, "comment.md");
175var jsonPath = System.IO.Path.Combine(fixture.Path, "selection.json");
184MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
185SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
197var summary = File.ReadAllText(System.IO.Path.Combine(fixture.Path, "summary"));
233var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
237var commentPath = System.IO.Path.Combine(fixture.Path, "comment.md");
238var jsonPath = System.IO.Path.Combine(fixture.Path, "selection.json");
247MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
248SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
381var changed = System.IO.Path.Combine(_workspace.Path, "changed.txt");
412var outputPath = System.IO.Path.Combine(_workspace.Path, "output");
414Environment.SetEnvironmentVariable("GITHUB_STEP_SUMMARY", System.IO.Path.Combine(_workspace.Path, "summary"));
445var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
TestTriggerMap\TestTriggerMapTests.cs (9)
221var slnx = File.ReadAllText(Path.Combine(RepoRoot.Path, "Aspire.slnx"));
243var testsRoot = Path.Combine(RepoRoot.Path, "tests");
249.Where(rel => File.Exists(Path.Combine(RepoRoot.Path, rel)))
371var testsYml = File.ReadAllText(Path.Combine(workflowsDir, "tests.yml"));
373bool WorkflowExists(string file) => File.Exists(Path.Combine(workflowsDir, file));
1394Assert.True(File.Exists(Path.Combine(RepoRoot.Path, s_map.Prefilter.PatternsFile!)),
1563Path.Combine(RepoRoot.Path, "tests"), "*.csproj", SearchOption.AllDirectories)
1637var solutionPath = Path.Combine(RepoRoot.Path, "Aspire.slnx");
1653var solutionPath = Path.Combine(RepoRoot.Path, "Aspire.slnx");
TypeScriptApiCompat\TypeScriptApiCompatTests.cs (14)
126var baselineRoot = Path.Combine(workspace.Path, "baseline");
127var currentRoot = Path.Combine(workspace.Path, "current");
197var suppressionPath = Path.Combine(workspace.Path, "Pkg.tscompat.suppression.txt");
240var currentSuppressions = ApiCompatSuppressionLoader.Load(Path.Combine(workspace.Path, "current"));
241var baselineSuppressions = ApiCompatSuppressionLoader.Load(Path.Combine(workspace.Path, "baseline"));
253var baselineRoot = Path.Combine(workspace.Path, "baseline");
254var currentRoot = Path.Combine(workspace.Path, "current");
255var reportPath = Path.Combine(workspace.Path, "report.md");
289var baselineRoot = Path.Combine(workspace.Path, "baseline");
290var currentRoot = Path.Combine(workspace.Path, "current");
291var reportPath = Path.Combine(workspace.Path, "report.md");
292var excludedPackagesPath = Path.Combine(workspace.Path, "excluded-packages.txt");
293var suppressionPath = Path.Combine(workspace.Path, "Excluded.tscompat.suppression.txt");
330File.WriteAllText(Path.Combine(apiDirectory, $"{packageName}.ats.txt"), content);
WorkflowScripts\AnalyzeCiFailureWorkflowTests.cs (482)
24Path.Combine(RepoRoot.Path, ValidationScriptRelativePath));
26Path.Combine(RepoRoot.Path, CandidatesScriptRelativePath));
28Path.Combine(RepoRoot.Path, IssueScriptRelativePath));
30Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath));
68var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
69var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log");
70var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
98["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "github-output"),
266var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
267var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
272Path.Combine(RepoRoot.Path, HistoryScriptRelativePath),
273Path.Combine(workflowDirectory, Path.GetFileName(HistoryScriptRelativePath)));
275Path.Combine(RepoRoot.Path, CandidatesScriptRelativePath),
276Path.Combine(workflowDirectory, Path.GetFileName(CandidatesScriptRelativePath)));
277var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log");
286["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "github-output"),
311var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
312var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
354Path.Combine(fakeBinDirectory, "git"),
362Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
363Path.Combine(workflowDirectory, Path.GetFileName(PersistenceScriptRelativePath)));
365var githubOutputPath = Path.Combine(_workspace.Path, "github-output");
434var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
435var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
445var githubOutputPath = Path.Combine(_workspace.Path, "github-output");
453["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"),
464var ghCalls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"));
509var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
510var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
512var githubOutputPath = Path.Combine(_workspace.Path, "github-output");
513var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log");
573var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
574var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
576var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log");
586["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "github-output"),
652var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
653var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
662var githubOutputPath = Path.Combine(_workspace.Path, "github-output");
663var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log");
699var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
735var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
749var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
770var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
787var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
806Path.Combine(priorCausesDirectory, "nuget-timeout.json"),
809var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
828Path.Combine(priorCausesDirectory, "flaky-failure.json"),
831var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
852var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
884var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
911var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
943var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
962var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
995var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1030var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1058var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1079var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1100var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1119var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1139var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1159var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1182var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1201var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1224var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1256var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1289var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1325var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1344var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1365var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1414var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1449var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1496var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1526var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1546var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1605var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1621var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1644var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1675var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1711var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1738var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1761Path.Combine(priorCausesDirectory, "nuget-timeout.json"),
1771var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1790var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1810var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1835var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1877var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
1878var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
1885Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
1904var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
1905var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
1935Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
1950var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
1951var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
1993Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
2149var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
2200var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
2223var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
2242var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
2270var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
2291var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
2324var causePath = Path.Combine(_workspace.Path, "main-build-break.json");
2325var runContextPath = Path.Combine(_workspace.Path, "run-context.json");
2326var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json");
2327var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json");
2328var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
2329var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
2330var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
2342Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
2407var causePath = Path.Combine(_workspace.Path, "main-build-break.json");
2408var runContextPath = Path.Combine(_workspace.Path, "run-context.json");
2409var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json");
2410var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json");
2411var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
2412var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
2413var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
2427Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
2487var causePath = Path.Combine(_workspace.Path, "flaky-failure.json");
2488var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
2489var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
2505Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
2803Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2804Path.Combine(workflowDirectory, Path.GetFileName(PersistenceScriptRelativePath)));
2806Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
2808Path.Combine(failureDataDirectory, "run-context.json"),
2810await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "failed-jobs.json"), "[]");
2812Path.Combine(failureDataDirectory, "last-successful-main-run.json"),
2815Path.Combine(failureDataDirectory, "triggering-merge-pr.json"),
2818Path.Combine(failureDataDirectory, "candidate-merge-history-status.json"),
2821Path.Combine(failureDataDirectory, "candidate-merges.json"),
2839Path.Combine(failureDataDirectory, "analysis-summary.md"));
3033var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3039var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3042Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3055var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3061var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3064Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3086var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3091var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3094Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3106var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3111var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3114Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3126var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3131var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3135Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3158var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3170var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3173Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3185var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3190var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3193Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3205var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
3214var outputDirectory = Path.Combine(_workspace.Path, "extracted");
3217Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3229var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3243var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3258Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3279var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3300var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3314Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3339var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3341var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3353Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3370var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3382var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3394Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3415var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3443var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3465Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3490var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3492var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3506Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3526var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3528var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3542Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3562var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3564var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3578Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3598var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
3612var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3631Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3651var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3653Path.Combine(testResultsDirectory.FullName, "00001.trx"),
3670var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3676var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3679Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3700var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3702Path.Combine(testResultsDirectory.FullName, "00001.json"),
3713var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3717var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3720Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3742var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3744Path.Combine(testResultsDirectory.FullName, "00001.json"),
3755var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3759var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3762Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3780var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3782Path.Combine(testResultsDirectory.FullName, "00001.json"),
3799var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3803var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3806Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3824var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3826var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3830var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3833Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3851var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3853Path.Combine(testResultsDirectory.FullName, "00001.json"),
3856var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3860var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3863Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3885var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3887Path.Combine(testResultsDirectory.FullName, "00001.trx"),
3896Path.Combine(testResultsDirectory.FullName, "00002.trx"),
3898var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3902var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3905Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3926var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3928Path.Combine(testResultsDirectory.FullName, "00001.trx"),
3930var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3934var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3937Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3958var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3959await File.WriteAllTextAsync(Path.Combine(testResultsDirectory.FullName, "results.xml"), "<TestRun />");
3960var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
3964var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
3967Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3988var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
3990Path.Combine(testResultsDirectory.FullName, "00001.trx"),
3998var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
4002var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
4005Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4037var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json");
4038var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json");
4043Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4080Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4108Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4130Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4145var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log");
4156var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json");
4157var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json");
4160Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4224var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4225var gitCallLog = Path.Combine(_workspace.Path, "git-calls.log");
4227Path.Combine(fakeBinDirectory, "gh"),
4230Path.Combine(fakeBinDirectory, "git"),
4244["GH_AW_AGENT_OUTPUT"] = Path.Combine(_workspace.Path, "output.json"),
4245["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output"),
4266Path.Combine(causesDirectory, "nuget-timeout.json"),
4268var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4269var tempDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "temp")).FullName;
4270var ghCallLog = Path.Combine(_workspace.Path, "gh-calls.log");
4272Path.Combine(fakeBinDirectory, "gh"),
4284Path.Combine(fakeBinDirectory, "git"),
4295["GH_AW_AGENT_OUTPUT"] = Path.Combine(_workspace.Path, "output.json"),
4296["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output"),
4325var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output");
4326var causesDirectory = Directory.CreateDirectory(Path.Combine(analysisDirectory, "causes")).FullName;
4327var failureDataDirectory = Path.Combine(_workspace.Path, "ci-failure-data");
4332Path.Combine(analysisDirectory, "analysis-result.json"),
4335Path.Combine(causesDirectory, "main-failure.json"),
4338Path.Combine(failureDataDirectory, "run-context.json"),
4341Path.Combine(failureDataDirectory, "last-successful-main-run.json"),
4344Path.Combine(failureDataDirectory, "triggering-merge-pr.json"),
4347Path.Combine(failureDataDirectory, "candidate-merge-history-status.json"),
4350var currentBodyPath = Path.Combine(_workspace.Path, "current-issue-body.md");
4351var storedCausePath = Path.Combine(_workspace.Path, "stored-main-cause.json");
4352var editedBodyPath = Path.Combine(_workspace.Path, "edited-issue-body.md");
4353var editedTitlePath = Path.Combine(_workspace.Path, "edited-issue-title.txt");
4354var editedLabelsPath = Path.Combine(_workspace.Path, "edited-issue-labels.txt");
4410var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4412Path.Combine(fakeBinDirectory, "git"),
4426Path.Combine(fakeBinDirectory, "gh"),
4478["GH_AW_AGENT_OUTPUT"] = Path.Combine(_workspace.Path, "output.json"),
4479["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output"),
4523var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4524var ghCallLog = Path.Combine(_workspace.Path, "gh-calls.log");
4526Path.Combine(fakeBinDirectory, "gh"),
4543["GH_AW_AGENT_OUTPUT"] = Path.Combine(_workspace.Path, "output.json"),
4544["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output"),
4561var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4562var tempDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "temp")).FullName;
4563var ghCallLog = Path.Combine(_workspace.Path, "gh-calls.log");
4565Path.Combine(fakeBinDirectory, "gh"),
4583["GH_AW_AGENT_OUTPUT"] = Path.Combine(_workspace.Path, "output.json"),
4584["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output"),
4603var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4604var ghCallLog = Path.Combine(_workspace.Path, "gh-calls.log");
4606Path.Combine(fakeBinDirectory, "gh"),
4625["GH_AW_AGENT_OUTPUT"] = Path.Combine(_workspace.Path, "output.json"),
4626["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output"),
4644var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4645var tempDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "temp")).FullName;
4646var ghCallLog = Path.Combine(_workspace.Path, "gh-calls.log");
4647var prLookupCountPath = Path.Combine(_workspace.Path, "pr-lookup-count");
4649Path.Combine(fakeBinDirectory, "gh"),
4680["GH_AW_AGENT_OUTPUT"] = Path.Combine(_workspace.Path, "output.json"),
4681["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output"),
5130Path.Combine(_workspace.Path, "last-success.json"));
5133using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json")));
5136Assert.Contains("per_page=100", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")), StringComparison.Ordinal);
5138await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
5164var outputPath = Path.Combine(_workspace.Path, "last-success.json");
5199var outputPath = Path.Combine(_workspace.Path, "last-success.json");
5206await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
5234var outputPath = Path.Combine(_workspace.Path, "last-success.json");
5242await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
5264Path.Combine(_workspace.Path, "last-success.json"));
5282Path.Combine(_workspace.Path, "last-success.json"));
5309Path.Combine(_workspace.Path, "last-success.json"));
5312using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json")));
5314Assert.True(int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count"))) >= 2);
5316(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")))
5343Path.Combine(_workspace.Path, "last-success.json"));
5346using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json")));
5348Assert.Equal(2, int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count"))));
5351(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")))
5364Path.Combine(_workspace.Path, "last-success.json"));
5377var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5378var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5398var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5399var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5442var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5443var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5491var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5492var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5503var ghCalls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"));
5551var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5552var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5563await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
5592var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5593var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5636var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5637var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5676var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
5677var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
5719var outputPath = Path.Combine(_workspace.Path, "persisted-main.json");
5777var outputPath = Path.Combine(_workspace.Path, $"persisted-{historyState}.json");
5818var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json");
5871var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json");
5903var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json");
5922var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
5924Path.Combine(failureDataDirectory, "run-context.json"),
5926var causeFile = Path.Combine(_workspace.Path, "cause.json");
5932Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
5948var newCausePath = Path.Combine(_workspace.Path, "new-cause.json");
5949var existingCausePath = Path.Combine(_workspace.Path, "existing-cause.json");
5950var outputPath = Path.Combine(_workspace.Path, "merged-cause.json");
5959Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
5976var causePath = Path.Combine(_workspace.Path, "prior-cause.json");
5993Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6012var metadataPath = Path.Combine(_workspace.Path, "metadata.json");
6026Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6044var diagnosticsPath = Path.Combine(_workspace.Path, "diagnostics.json");
6053Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6067var logPath = Path.Combine(_workspace.Path, "job.log");
6073Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6120var inputPath = Path.Combine(_workspace.Path, "job.log");
6121var outputPath = Path.Combine(_workspace.Path, "sanitized.log");
6125Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6136var inputPath = Path.Combine(_workspace.Path, "job.log");
6137var outputPath = Path.Combine(_workspace.Path, "sanitized.log");
6143Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6156var causePath = Path.Combine(_workspace.Path, "cause.json");
6157var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
6158var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
6164Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
6222var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
6223var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
6251Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
6281var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
6282var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
6305Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6325var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
6326var canonicalBodyPath = Path.Combine(_workspace.Path, "canonical-body.md");
6327var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
6398Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6446var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
6447var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
6464Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6499var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
6500var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
6521Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6538var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
6539var firstOutputPath = Path.Combine(_workspace.Path, "first-output.md");
6540var secondOutputPath = Path.Combine(_workspace.Path, "second-output.md");
6561Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6570Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6604var causePath = Path.Combine(_workspace.Path, "cause.json");
6605var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
6606var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
6612Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
6664var causePath = Path.Combine(_workspace.Path, "cause.json");
6665var runContextPath = Path.Combine(_workspace.Path, "run-context.json");
6666var lastSuccessfulPath = Path.Combine(_workspace.Path, "last-successful.json");
6667var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge.json");
6668var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
6669var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
6670var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
6686Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
6713var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
6714var buildCausePath = Path.Combine(_workspace.Path, "build-cause.json");
6715var testCausePath = Path.Combine(_workspace.Path, "test-cause.json");
6716var multiJobCausePath = Path.Combine(_workspace.Path, "multi-job-cause.json");
6727var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
6729Path.Combine(failureDataDirectory, "run-context.json"),
6733Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6736Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6739Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6742Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6745Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
6777var buildBodyPath = Path.Combine(_workspace.Path, "build-body.md");
6778var buildMetadataPath = Path.Combine(_workspace.Path, "build-metadata.json");
6779var testBodyPath = Path.Combine(_workspace.Path, "test-body.md");
6780var testMetadataPath = Path.Combine(_workspace.Path, "test-metadata.json");
6782Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
6798Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
6916var scriptPath = Path.Combine(RepoRoot.Path, ValidationScriptRelativePath);
6927process.StartInfo.Environment["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output");
6946var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
6947var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
6957Path.Combine(RepoRoot.Path, HistoryScriptRelativePath),
6962["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"),
6963["GH_CALL_COUNT_FILE"] = Path.Combine(_workspace.Path, "gh-call-count"),
6969var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
6970var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
6980Path.Combine(RepoRoot.Path, CandidatesScriptRelativePath),
6985["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"),
7003var analysisDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName;
7004var causesDirectory = Directory.CreateDirectory(Path.Combine(analysisDirectory, "causes")).FullName;
7005var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
7007Path.Combine(_workspace.Path, "output.json"),
7012await File.WriteAllTextAsync(Path.Combine(analysisDirectory, "analysis-result.json"), analysis);
7013await File.WriteAllTextAsync(Path.Combine(causesDirectory, "nuget-timeout.json"), cause);
7015Path.Combine(failureDataDirectory, "run-context.json"),
7024Path.Combine(failureDataDirectory, "failed-jobs.json"),
7027Path.Combine(failureDataDirectory, "test-evidence.json"),
7030Path.Combine(failureDataDirectory, "test-failures.json"),
7034var priorCausesDirectory = Directory.CreateDirectory(Path.Combine(failureDataDirectory, "prior-causes")).FullName;
7035await File.WriteAllTextAsync(Path.Combine(priorCausesDirectory, "nuget-timeout.json"), priorCause);
7045var requestPath = Path.Combine(_workspace.Path, "rerun-request.json");
7046var outputPath = Path.Combine(_workspace.Path, "rerun-result.json");
7053agentOutputPath = Path.Combine(_workspace.Path, "output.json"),
7054analysisDir = Path.Combine(_workspace.Path, "ci-analysis-output"),
7076var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, $"fake-bin-{Guid.NewGuid():N}")).FullName;
7077var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
7087Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
7088Path.Combine(workflowDirectory, Path.GetFileName(PersistenceScriptRelativePath)));
7090Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
7091Path.Combine(workflowDirectory, Path.GetFileName(CommentScriptRelativePath)));
7093Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
7094Path.Combine(workflowDirectory, Path.GetFileName(IssueScriptRelativePath)));
7096var analysisDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName;
7097var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
7099Path.Combine(analysisDirectory, "analysis-result.json"),
7102Path.Combine(failureDataDirectory, "run-context.json"),
7105Path.Combine(failureDataDirectory, "failed-jobs.json"),
7108Path.Combine(failureDataDirectory, "run.json"),
7110await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "output.json"), """{"items":[]}""");
7200var analysisDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName;
7201var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
7202await File.WriteAllTextAsync(Path.Combine(analysisDirectory, "analysis-result.json"), analysis);
7203await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run-context.json"), runContext);
7204await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run.json"), run);
7205await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "failed-jobs.json"), trustedFailedJobs);
7206await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "triggering-merge-pr.json"), triggeringMerge);
7207await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "last-successful-main-run.json"), lastSuccessfulRun);
7208await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "candidate-merges.json"), candidateMerges);
7209await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "candidate-merge-history-status.json"), candidateHistoryStatus);
7210await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "pr-metadata.json"), prMetadata);
7227Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
7231["CI_FAILURE_DATA_DIR"] = Path.Combine(_workspace.Path, "ci-failure-data"),
7289var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output");
7290var failureDataDirectory = Path.Combine(_workspace.Path, "ci-failure-data");
7294await File.WriteAllTextAsync(Path.Combine(analysisDirectory, "analysis-result.json"), analysis);
7295await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run-context.json"), runContext);
7296await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "failed-jobs.json"), trustedFailedJobs);
7298Path.Combine(failureDataDirectory, "run.json"),
7301Path.Combine(failureDataDirectory, "test-evidence.json"),
7335Path.Combine(failureDataDirectory, "test-failures.json"),
7359await File.WriteAllTextAsync(Path.Combine(causesDirectory, fileName), cause);
7365var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
7376var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (6)
315var scriptPath = Path.Combine(RepoRoot.Path, ScriptRelativePath);
408await WriteWorkspaceFileAsync(_workspace.Path, Path.Combine("docs", "late-main.md"), "non-extension main change");
441Path.Combine("extension", "package.json"),
451=> await WriteWorkspaceFileAsync(workingDirectory, Path.Combine("extension", "CHANGELOG.md"), content);
455var fullPath = Path.Combine(workingDirectory, relativePath);
522var workflowPath = Path.Combine(RepoRoot.Path, WorkflowRelativePath);
installer.tasks (1)
Microsoft.Agents.AI.ProjectTemplates.Tests (12)
Microsoft.Analyzers.Extra.Tests (3)
Microsoft.Analyzers.Local.Tests (3)
Microsoft.Arcade.Common (2)
Microsoft.AspNetCore (1)
Microsoft.AspNetCore.Components.Testing (11)
Microsoft.AspNetCore.Components.Testing.Tasks (6)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.Components.WebView.Maui (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
Microsoft.AspNetCore.Components.WebView.Wpf (3)
Microsoft.AspNetCore.DataProtection (2)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (8)
Microsoft.AspNetCore.Hosting (6)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.InternalTesting (13)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Testing (3)
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
Microsoft.AspNetCore.Server.IntegrationTesting (17)
Microsoft.AspNetCore.Server.Kestrel.Core (17)
Microsoft.AspNetCore.SpaProxy (5)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets (3)
Microsoft.AspNetCore.StaticFiles (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.WebUtilities (2)
Microsoft.Build (84)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (8)
752? Path.Combine(GetOrInitializeX64Clr2Path(toolName, basePath64), toolName)
753: Path.Combine(GetOrInitializeX32Clr2Path(toolName, basePath), toolName);
758return Path.Combine(s_pathToX64Clr4 ??= basePath64, toolName);
763return Path.Combine(s_pathToArm64Clr4 ??= basePathArm64, toolName);
766return Path.Combine(s_pathToX32Clr4 ??= basePath, toolName);
878string fullPath = Path.Combine(envPath, toolName);
1135string appHostPath = Path.Combine(msbuildAssemblyPath, Constants.MSBuildExecutableName);
1138: (Path.Combine(msbuildAssemblyPath, Constants.MSBuildAssemblyName), false);
Evaluation\Evaluator.cs (5)
1334string projectFullPath = Path.Combine(projectDirectory, projectFile);
1999ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(sdkResult.Path, project),
2012ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(additionalPath, project),
2049string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(sdkResult.Path, 5), Constants.DotnetProcessName);
2265importFileUnescaped = Path.Combine(directoryOfImportingFile, importFileUnescaped);
Microsoft.Build.Framework (61)
FileUtilities.cs (9)
87string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
152cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
468string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
712return NormalizePath(Path.Combine(directory, file));
869return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
969string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
1047var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1512return paths.Aggregate(root, Path.Combine);
1685string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
Utilities\FrameworkLocationHelper.cs (17)
445? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
455? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
465? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV30)
475? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV35)
485? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV40)
495? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV45)
505? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
515? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
596Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
836var frameworkPath = Path.Combine(NativeMethods.FrameworkBasePath, prefix ?? string.Empty);
846return Path.Combine(complusInstallRoot, complusVersion);
987? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
988: Path.Combine(NativeMethods.FrameworkBasePath, "xbuild-frameworks");
1145string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1468(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) &&
1469!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1501frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
Microsoft.Build.NuGetSdkResolver (5)
Microsoft.Build.Tasks.CodeAnalysis (12)
Microsoft.Build.Tasks.Core (106)
AssemblyDependency\ReferenceTable.cs (7)
966companionFile = Path.Combine(Path.GetDirectoryName(baseName), implementationFile);
1009string satelliteAssembly = Path.Combine(subDirectory, satelliteFilename);
1013reference.AddSatelliteFile(Path.Combine(cultureName, satelliteFilename));
1032string serializationAssemblyPath = Path.Combine(reference.DirectoryName, serializationAssemblyFilename);
2770AddRelatedItem(serializationAssemblyItems, relatedItemBase, Path.Combine(reference.DirectoryName, serializationAssemblyFile));
2776AddRelatedItem(scatterItems, relatedItemBase, Path.Combine(reference.DirectoryName, scatterFile));
2789AddRelatedItem(satelliteItems, relatedItemBase, Path.Combine(reference.DirectoryName, satelliteFile));
BootstrapperUtil\BootstrapperBuilder.cs (21)
176string strOutputExe = System.IO.Path.Combine(settings.OutputPath, SETUP_EXE);
363string setupSourceFile = System.IO.Path.Combine(bootstrapperPath, SETUP_BIN);
505private string BootstrapperPath => System.IO.Path.Combine(Path, ENGINE_PATH);
507private string PackagePath => System.IO.Path.Combine(Path, PACKAGE_PATH);
509private string SchemaPath => System.IO.Path.Combine(Path, SCHEMA_PATH);
530string startDirectory = System.IO.Path.Combine(BootstrapperPath, RESOURCES_PATH);
537string resourceDirectory = System.IO.Path.Combine(startDirectory, subDirectory);
538string resourceFilePath = System.IO.Path.Combine(resourceDirectory, SETUP_RESOURCES_FILE);
882string strSubDirectoryFullPath = System.IO.Path.Combine(packagePath, strSubDirectory);
885string strBaseManifestFilename = System.IO.Path.Combine(strSubDirectoryFullPath, ROOT_MANIFEST_FILE);
886string strBaseManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
924UpdatePackageFileNodes(packageFilesNode, System.IO.Path.Combine(packagePath, strSubDirectory), strSubDirectory);
937string strLangManifestFilename = System.IO.Path.Combine(strLanguageDirectory, CHILD_MANIFEST_FILE);
938string strLangManifestSchemaFileName = System.IO.Path.Combine(SchemaPath, MANIFEST_FILE_SCHEMA);
1174string strSourceFile = System.IO.Path.Combine(strSourcePath, relativePath);
1178targetPathAttribute.Value = System.IO.Path.Combine(strTargetPath, relativePath);
1181string newNameValue = System.IO.Path.Combine(strTargetPath, relativePath);
1470string strDestinationFileName = System.IO.Path.Combine(settings.OutputPath, packageFileDestination.Value);
2005using (var xmlwriter = new XmlTextWriter(System.IO.Path.Combine(s_logPath, fileName), Encoding.UTF8))
2047using (var fileWriter = new StreamWriter(System.IO.Path.Combine(s_logPath, fileName), append))
2208string logPath = System.IO.Path.Combine(
GetSDKReferenceFiles.cs (6)
514string xmlFile = Path.Combine(directory, fileNameNoExtension + ".xml");
630string targetPath = Path.Combine(targetPathRoot, relativeToBase);
960referencesCacheFile = Path.Combine(_cacheFileDirectory, GetCacheFileName(saveContext.SdkIdentity, saveContext.SdkRoot, cacheFileInfo.Hash.ToString("X", CultureInfo.InvariantCulture)));
1085string referencesCacheFile = Path.Combine(cacheFileFolder, GetCacheFileName(sdkIdentity, sdkRoot, hash.ToString("X", CultureInfo.InvariantCulture)));
1165string redistPath = Path.Combine(sdkRoot, "Redist");
1179string referencesPath = Path.Combine(sdkRoot, "References");
Microsoft.Build.Tasks.Git (23)
Microsoft.Build.Utilities.Core (47)
ToolLocationHelper.cs (37)
664string legacyWindowsMetadataLocation = Path.Combine(sdkRoot, "Windows Metadata");
1224return Path.Combine(sdkLocation, folderName);
1238: Path.Combine(matchingSdk.Path, folderName);
1436var folders = string.IsNullOrEmpty(subFolder) ? vsInstallFolders : vsInstallFolders.Select(i => Path.Combine(i, subFolder));
1501string fullPath = Path.Combine(root, file);
1766if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
1840if (legacyMsCorlib20Path != null && FileSystems.Default.FileExists(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll")))
1857if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll")))
2553string pathToSDKManifest = Path.Combine(sdkVersionDirectory.FullName, "SDKManifest.xml");
2628string platformSDKDirectory = Path.Combine(rootPathWithIdentifier.FullName, version);
2629string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2652string sdkFolderPath = Path.Combine(platformSDKDirectory, "ExtensionSDKs");
2747string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml");
2825string sdkManifestFileLocation = Path.Combine(directoryName, "SDKManifest.xml");
2903string localAppdataFolder = Path.Combine(userLocalAppData, "Microsoft SDKs");
2910string defaultProgramFilesLocation = Path.Combine(
3028string platformsRoot = Path.Combine(sdk.Path, platformsFolderName);
3056string pathToPlatformManifest = Path.Combine(platformVersion.FullName, "Platform.xml");
3115string redistListFolder = Path.Combine(path, "RedistList");
3116string redistFilePath = Path.Combine(redistListFolder, "FrameworkList.xml");
3200pathToReturn = Path.Combine(pathToReturn, includeFramework);
3349pathToSdk = Path.Combine(pathToSdk, "x64");
3352pathToSdk = Path.Combine(pathToSdk, "ia64");
3360string filePath = Path.Combine(pathToSdk, fileName);
3469pathToSdk = Path.Combine(pathToSdk, "bin");
3510pathToSdk = Path.Combine(pathToSdk, "x86");
3513pathToSdk = Path.Combine(pathToSdk, "x64");
3521string filePath = Path.Combine(pathToSdk, fileName);
3584toolPath = Path.Combine(toolPath, fileName);
3614return pathToFx == null ? null : Path.Combine(pathToFx, fileName);
3622public static string GetPathToSystemFile(string fileName) => Path.Combine(PathToSystem, fileName);
3840string frameworkIdentifierPath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3898string frameworkProfilePath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier);
3899frameworkProfilePath = Path.Combine(frameworkProfilePath, frameworkVersion);
3900frameworkProfilePath = Path.Combine(frameworkProfilePath, "Profiles");
3945string dotNextFx30RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30);
3952string dotNextFx35RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
Microsoft.CodeAnalysis (26)
Microsoft.CodeAnalysis.Analyzers (5)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BuildClient.Package (7)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Microsoft.CodeAnalysis.Features (13)
Microsoft.CodeAnalysis.NetAnalyzers (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.Scripting (12)
Microsoft.CodeAnalysis.Workspaces (20)
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (3)
Microsoft.Data.Analysis.Tests (2)
Microsoft.Diagnostics.NETCore.Client (2)
Microsoft.DiaSymReader (1)
Microsoft.DotNet.ApiCompat.Task (3)
Microsoft.DotNet.ApiSymbolExtensions (3)
Microsoft.DotNet.Arcade.Sdk (6)
Microsoft.DotNet.Build.Tasks.Installers (30)
src\CreateWixBuildWixpack.cs (20)
124AbsolutePath destPathAbsolute = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, Path.GetFileName(projectPath)));
157OutputFile = Path.Combine(OutputFolder, $"{_installerFilename}{_packageExtension}");
195AbsolutePath destinationDir = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, randomDirName));
219var tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
300_defineConstantsDictionary["TargetPath"] = Path.Combine("%outputfolder%", Path.GetFileName(targetPath));
304InstallerFile = Path.Combine("%outputfolder%", Path.GetFileName(InstallerFile));
312PdbFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(PdbFile.ItemSpec));
318BindTrackingFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(BindTrackingFile.ItemSpec));
452AbsolutePath responseFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, "create.rsp"));
467AbsolutePath commandFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, "create.cmd"));
541var copiedXmlPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(xmlPath));
622var filePath = Path.Combine(dir, Path.GetFileName(source));
1042AbsolutePath destDir = TaskEnvironment.GetAbsolutePath(Path.Combine(WixpackWorkingDir, fileId));
1050AbsolutePath destPath = TaskEnvironment.GetAbsolutePath(Path.Combine(destDir, Path.GetFileName(source)));
1069Extensions[i] = new TaskItem(Path.Combine(filename, filename));
1113LocalizationFiles[i] = new TaskItem(Path.Combine(filename, filename));
1123Path.Combine(_wixprojDir, source) :
1124Path.Combine(relativeRoot, source);
1137AbsolutePath destinationFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(destDir, Path.GetFileName(file)));
1144AbsolutePath destinationSubdirectoryPath = TaskEnvironment.GetAbsolutePath(Path.Combine(destDir, Path.GetFileName(dir)));
src\CreateWixCommandPackageDropBase.cs (8)
74OutputFile = Path.Combine(OutputFolder, $"{Path.GetFileName(InstallerFile)}{_packageExtension}");
90AbsolutePath commandFilename = TaskEnvironment.GetAbsolutePath(Path.Combine(packageDropDir, $"create.cmd"));
153AbsolutePath newWixSrcFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(packageDropDir, Path.GetFileName(wixSrcFile.ItemSpec)));
185AbsolutePath destinationPath = TaskEnvironment.GetAbsolutePath(Path.Combine(packageDropDir, Path.GetFileName(locItem.ItemSpec)));
301AbsolutePath possiblePath = TaskEnvironment.GetAbsolutePath(Path.Combine(additionalBasePath.ItemSpec, oldPath));
319newRelativePath = Path.Combine(id, Path.GetFileName(oldPath));
334AbsolutePath newFolder = TaskEnvironment.GetAbsolutePath(Path.Combine(outputPath, id));
340File.Copy(TaskEnvironment.GetAbsolutePath(oldPath), TaskEnvironment.GetAbsolutePath(Path.Combine(outputPath, newRelativePath)), true);
Microsoft.DotNet.Build.Tasks.Packaging (4)
Microsoft.DotNet.Build.Tasks.VisualStudio (6)
Microsoft.DotNet.Build.Tasks.Workloads (14)
Microsoft.DotNet.Cli.CoreUtils (1)
Microsoft.DotNet.Cli.Definitions (5)
Microsoft.DotNet.Cli.Utils (10)
Microsoft.DotNet.CMake.Sdk (5)
Microsoft.DotNet.Configurer (10)
Microsoft.DotNet.GenFacades (3)
Microsoft.DotNet.HotReload.Watch (12)
Microsoft.DotNet.InternalAbstractions (3)
Microsoft.DotNet.MacOsPkg.Core (4)
Microsoft.DotNet.NativeWrapper (2)
Microsoft.DotNet.NuGetRepack.Tasks (5)
Microsoft.DotNet.ProjectTools (6)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.SharedFramework.Sdk (3)
Microsoft.DotNet.SourceBuild.Tasks (3)
Microsoft.DotNet.TemplateLocator (18)
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (14)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
668string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.DotNet.XliffTasks (15)
Tasks\TransformTemplates.cs (8)
77? Path.Combine(TranslatedOutputDirectory, $"{templateName}.default.1033")
78: Path.Combine(TranslatedOutputDirectory, $"{templateName}.{language}");
80string cultureSpecificTemplateFile = Path.Combine(localizedTemplateDirectory, Path.GetFileName(template.ItemSpec));
86string projectFileFullPath = Path.Combine(templateDirectory, projectNode.Attribute("File").Value);
87File.Copy(TaskEnvironment.GetAbsolutePath(projectFileFullPath), TaskEnvironment.GetAbsolutePath(Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value))), overwrite: true);
93string templateItemFullPath = Path.Combine(templateDirectory, templateItem.Value);
94string templateItemDestinationPath = Path.Combine(localizedTemplateDirectory, templateItem.Value);
116File.Copy(TaskEnvironment.GetAbsolutePath(Path.Combine(TranslatedOutputDirectory, localizedFileName)), templateItemDestinationAbsolutePath, overwrite: true);
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.Abstractions.Tests (33)
Contents\DataContentTests.cs (25)
316string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.json");
343string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.bin");
370string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.unknownextension");
396string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.png");
459string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.bin");
486string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
516string tempDir = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
518string expectedPath = Path.Combine(tempDir, "myfile.json");
545string tempDir = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
574string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.txt");
602string expectedAbsolute = Path.Combine(cwdBefore, filename);
660string expectedAbsolute = Path.Combine(cwdBefore, content.Name!);
710string tempDir = Path.Combine(Path.GetTempPath(), $"test_subdir_{Guid.NewGuid()}");
711string subDir = Path.Combine(tempDir, "subdir");
716string filePath = Path.Combine(subDir, "nested.html");
743string tempDir = Path.Combine(Path.GetTempPath(), $"test_dir_noname_{Guid.NewGuid()}");
770string tempPath = Path.Combine(Path.GetTempPath(), $"test_cancel_{Guid.NewGuid()}.txt");
801string tempPath = Path.Combine(Path.GetTempPath(), $"test_save_cancel_{Guid.NewGuid()}.bin");
841string tempDir = Path.Combine(Path.GetTempPath(), $"test_dir_name_{Guid.NewGuid()}");
843string expectedPath = Path.Combine(tempDir, content.Name);
869string tempDir = Path.Combine(Path.GetTempPath(), $"test_nonexist_{Guid.NewGuid()}");
871string filePath = Path.Combine(tempDir, "newfile");
898string tempPath = Path.Combine(Path.GetTempPath(), $"test_large_{Guid.NewGuid()}.bin");
927string tempPath = Path.Combine(Path.GetTempPath(), $"test_save_large_{Guid.NewGuid()}.bin");
950string tempPath = Path.Combine(Path.GetTempPath(), $"test_existing_{Guid.NewGuid()}.bin");
Files\HostedFileClientExtensionsTests.cs (8)
63var tempFile = Path.Combine(Path.GetTempPath(), $"test-{Guid.NewGuid()}.txt");
123var tempFile = Path.Combine(Path.GetTempPath(), $"download-{Guid.NewGuid()}.bin");
150var tempDir = Path.Combine(Path.GetTempPath(), $"dldir-{Guid.NewGuid()}");
162Assert.Equal(Path.Combine(tempDir, "result.bin"), savedPath);
175var tempDir = Path.Combine(Path.GetTempPath(), $"dldir2-{Guid.NewGuid()}");
187Assert.Equal(Path.Combine(tempDir, "file-id-fallback"), savedPath);
210string expectedAbsolute = Path.Combine(cwdBefore, fileName);
232var tempFile = Path.Combine(Path.GetTempPath(), $"existing-{Guid.NewGuid()}.bin");
Microsoft.Extensions.AI.Evaluation.Console (3)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (14)
DiskBased\PathValidationTests.cs (14)
112string root = Path.Combine(Path.GetTempPath(), "testroot");
123string root = Path.Combine(Path.GetTempPath(), "testroot");
134string root = Path.Combine(Path.GetTempPath(), "testroot") + Path.DirectorySeparatorChar;
135string child = Path.Combine(root, "file.txt");
149string root = Path.Combine(Path.GetTempPath(), "testroot");
169string root = Path.Combine(Path.GetTempPath(), "testroot");
180string root = Path.Combine(Path.GetTempPath(), "testroot");
190string root = Path.Combine(Path.GetTempPath(), "testroot");
337string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting");
348string longChild = Path.Combine(longRoot, "file.txt");
385string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting");
397string child = Path.Combine(shortRoot, "file.txt");
398File.WriteAllText(Path.Combine(longRoot, "file.txt"), string.Empty);
431string root = Path.Combine(Path.GetTempPath(), "TestRoot");
Microsoft.Extensions.AI.OpenAI.Tests (2)
Microsoft.Extensions.AI.Templates.Tests (12)
Microsoft.Extensions.DataIngestion.MarkItDown (1)
Microsoft.Extensions.DataIngestion.Tests (5)
Microsoft.Extensions.DependencyModel (7)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.DotNetDeltaApplier (1)
Microsoft.Extensions.FileProviders.Physical (6)
Microsoft.Extensions.FileSystemGlobbing (6)
Microsoft.Extensions.Hosting (1)
Microsoft.Extensions.Http.Resilience.Tests (2)
Microsoft.Extensions.Logging.AzureAppServices (2)
Microsoft.Extensions.ML.Tests (4)
Microsoft.Extensions.ServiceDiscovery.Dns (3)
Microsoft.Gen.BuildMetadata (1)
Microsoft.Gen.BuildMetadata.Unit.Tests (2)
Microsoft.Gen.ComplianceReports (2)
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Logging.Unit.Tests (7)
Microsoft.Gen.MetadataExtractor (4)
Microsoft.Gen.MetadataExtractor.Unit.Tests (7)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.Metrics.Unit.Tests (2)
Microsoft.Gen.MetricsReports (2)
Microsoft.Gen.MetricsReports.Unit.Tests (7)
Microsoft.Maui (1)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Resizetizer (32)
Microsoft.ML.AutoML (3)
Microsoft.ML.AutoML.Samples (2)
Microsoft.ML.AutoML.Tests (16)
ColumnInferenceTests.cs (8)
81var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithEmptyColumn.txt"), DefaultColumnNames.Label, groupColumns: false);
89var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "BinaryDatasetWithBoolColumn.txt"), DefaultColumnNames.Label);
108var filePath = Path.Combine("TestData", "DatasetWithoutHeader.txt");
136var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "NameColumnIsOnlyFeatureDataset.txt"), DefaultColumnNames.Label);
153.InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
173var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
204var dataset = Path.Combine("TestData", "DatasetWithNewlineBetweenQuotes.txt");
245var wiki = Path.Combine("TestData", "wiki-column-inference.json");
Microsoft.ML.CodeGenerator (9)
Microsoft.ML.Core (17)
Microsoft.ML.Core.Tests (16)
UnitTests\TestEntryPoints.cs (3)
4560TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS1.csv")), "sep=, col=Features:R4:1 header=+",
4589TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "real_1.csv")), "sep=, col=Features:R4:1 header=+",
4613TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS2.csv")), "sep=, col=Features:R4:1 header=+",
Microsoft.ML.Data (3)
Microsoft.ML.DnnImageFeaturizer.AlexNet (1)
Microsoft.ML.DnnImageFeaturizer.ResNet101 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet18 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet50 (1)
Microsoft.ML.Ensemble (2)
Microsoft.ML.GenAI.Core.Tests (1)
Microsoft.ML.GenAI.Mistral (1)
Microsoft.ML.GenAI.Phi (2)
Microsoft.ML.GenAI.Samples (8)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Maml (2)
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.PerformanceTests (11)
Microsoft.ML.Predictor.Tests (8)
CompareBaselines.cs (8)
66string dir1 = Path.Combine(root1, rel);
67string dir2 = Path.Combine(root2, rel);
74string relCur = Path.Combine(rel, name);
89log.WriteLine("*** Missing left file: '{0}'", Path.Combine(rel, kvp.Key));
97string relCur = Path.Combine(rel, name);
112log.WriteLine("*** Missing left directory: '{0}'", Path.Combine(rel, kvp.Key));
167using (var rdr1 = OpenReader(Path.Combine(root1, rel)))
168using (var rdr2 = OpenReader(Path.Combine(root2, rel)))
Microsoft.ML.Samples (30)
Microsoft.ML.Samples.GPU (26)
Microsoft.ML.SamplesUtils (8)
SamplesDatasetUtils.cs (8)
27while (!Directory.Exists(Path.Combine(directory, ".git")) && directory != null)
179string varPath = Path.Combine(path, "variables");
183Download(Path.Combine(remotePath, "saved_model.pb"), Path.Combine(path, "saved_model.pb")).Wait();
184Download(Path.Combine(remotePath, "imdb_word_index.csv"), Path.Combine(path, "imdb_word_index.csv")).Wait();
185Download(Path.Combine(remotePath, "variables", "variables.data-00000-of-00001"), Path.Combine(varPath, "variables.data-00000-of-00001")).Wait();
186Download(Path.Combine(remotePath, "variables", "variables.index"), Path.Combine(varPath, "variables.index")).Wait();
Microsoft.ML.SearchSpace.Tests (2)
Microsoft.ML.Sweeper (2)
Microsoft.ML.TensorFlow (5)
Microsoft.ML.TensorFlow.Tests (20)
TensorflowTests.cs (20)
34tempFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
35assetsPath = Path.Combine(tempFolder, "assets");
36parentWorkspacePath = Path.Combine(assetsPath, "cached");
73_fullImagesetFolderPath = Path.Combine(
750var varDir = Path.Combine(modelLocation, "variables");
1433if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName))
1434&& File.Exists(Path.Combine(workspacePath, validationSetBottleneckCachedValuesFileName)))
1449string workspacePath = Path.Combine(TensorFlowScenariosTestsFixture.parentWorkspacePath, finalImagesFolderName + "_" + (int)arch);
1734Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.TrainSetBottleneckCachedValuesFileName)));
1735Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.ValidationSetBottleneckCachedValuesFileName)));
1834string fullImagesetFolderPath = Path.Combine(
1942UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1944if (!Directory.Exists(Path.Combine(imagesDownloadFolder, filenameAlias)))
1945Directory.Move(Path.Combine(imagesDownloadFolder, Path.GetFileNameWithoutExtension(fileName)), Path.Combine(imagesDownloadFolder, "FPTSUT"));
1955UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1967string relativeFilePath = Path.Combine(destDir, destFileName);
1983if (File.Exists(Path.Combine(destFolder, flag)))
1987File.Create(Path.Combine(destFolder, flag));
2010string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.ML.TestFramework (9)
Microsoft.ML.TestFrameworkCommon (6)
Microsoft.ML.Tests (14)
Microsoft.ML.TimeSeries.Tests (4)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (35)
BpeTests.cs (9)
366using Stream vocabStream = File.OpenRead(Path.Combine(@"Gpt-2", "vocab.json"));
367using Stream mergesStream = File.OpenRead(Path.Combine(@"Gpt-2", "merges.txt"));
380string vocabFile = Path.Combine(@"Gpt-2", "vocab.json");
381string mergesFile = Path.Combine(@"Gpt-2", "merges.txt");
546using Stream vocabStream = File.OpenRead(Path.Combine(@"Gpt-2", "vocab.json"));
547using Stream mergesStream = File.OpenRead(Path.Combine(@"Gpt-2", "merges.txt"));
894BpeOptions options = new BpeOptions(Path.Combine(@"Gpt-2", "vocab.json"), Path.Combine(@"Gpt-2", "merges.txt"))
951using Stream jsonModelStream = File.OpenRead(Path.Combine(@"DeepSeek", "tokenizer-DeepSeek-R1.json"));
Microsoft.ML.TorchSharp (6)
Microsoft.ML.Transforms (2)
Microsoft.ML.Vision (18)
DnnRetrainTransform.cs (9)
118var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(DnnRetrainTransformer) + "_" + Guid.NewGuid()));
130string fullFilePath = Path.Combine(tempDirPath, relativeFile);
409var path = Path.Combine(modelDir, DefaultModelFileNames.TmpMlnetModel);
416var variablesPath = Path.Combine(modelDir, DefaultModelFileNames.VariablesFolder);
420File.Copy(f, Path.Combine(archivePath, Path.GetFileName(f)));
439var destination = Path.Combine(variablesPath, DefaultModelFileNames.Data);
446var destination = Path.Combine(variablesPath, DefaultModelFileNames.Index);
533_modelLocation = Path.IsPathRooted(modelLocation) ? modelLocation : Path.Combine(Directory.GetCurrentDirectory(), modelLocation);
705Path.Combine(_modelLocation, DefaultModelFileNames.Graph),
ImageClassificationTrainer.cs (9)
537_resourcePath = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, "MLNET");
570_checkpointPath = Path.Combine(_options.WorkspacePath, _options.FinalModelPrefix +
572_sizeFile = Path.Combine(_options.WorkspacePath, "TrainingSetSize.txt");
668string trainSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
671string validationSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
856Path.Combine(_options.WorkspacePath, _options.ValidationSetBottleneckCachedValuesFileName),
954trainWriter = tf.summary.FileWriter(Path.Combine(_options.WorkspacePath, "train"),
1149var evalGraph = LoadMetaGraph(Path.Combine(_resourcePath, ModelFileName[_options.Arch]));
1313var modelFilePath = Path.Combine(_resourcePath, modelFileName);
Microsoft.NET.Build.Containers (5)
Microsoft.NET.Build.Extensions.Tasks (1)
Microsoft.NET.Build.Tasks (62)
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (14)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
668string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.NET.HostModel (1)
Microsoft.NET.ProjectData (19)
Microsoft.NET.ProjectData.Tasks (14)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (4)
Microsoft.NET.Sdk.Publish.Tasks (24)
Microsoft.NET.Sdk.Razor.Tasks (6)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (13)
Microsoft.NET.Sdk.WorkloadManifestReader (18)
SdkDirectoryWorkloadManifestProvider.cs (14)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
668string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (9)
Microsoft.TemplateEngine.Cli (10)
Microsoft.TemplateEngine.Core (3)
Microsoft.TemplateEngine.Edge (16)
Microsoft.TemplateEngine.IDE (1)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (4)
Microsoft.TemplateEngine.Utils (14)
InMemoryFileSystem.cs (10)
53dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
77dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
86targetFile = new FileSystemFile(parts[parts.Length - 1], Path.Combine(currentDir.FullPath, parts[parts.Length - 1]));
451dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
507dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
565dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
597dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
628dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
659dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
701path = Path.Combine(GetCurrentDirectory(), path);
Microsoft.TemplateSearch.Common (2)
Microsoft.TestPlatform.CoreUtilities (7)
Microsoft.TestPlatform.CrossPlatEngine (13)
Microsoft.TestPlatform.Extensions.BlameDataCollector (10)
Microsoft.TestPlatform.PlatformAbstractions (5)
Microsoft.TestPlatform.TestHostRuntimeProvider (15)
Microsoft.TestPlatform.Utilities (2)
Microsoft.VisualStudio.TestPlatform.Client (1)
Microsoft.VisualStudio.TestPlatform.Common (9)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (3)
Microsoft.VisualStudio.TestPlatform.Extensions.TestIds.TestLogger (4)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (17)
Microsoft.VisualStudio.TestPlatform.ObjectModel (4)
Microsoft.Web.XmlTransform (1)
Mono.Cecil (2)
MSBuild (13)
MSBuild.Coordinator (1)
NuGet.Build.Tasks (11)
NuGet.Build.Tasks.Console (5)
NuGet.Build.Tasks.Pack (15)
NuGet.CommandLine.XPlat (3)
NuGet.Commands (30)
NuGet.Common (27)
NuGet.Configuration (15)
Settings\Settings.cs (10)
577var defaultSettingsFilePath = Path.Combine(userSettingsDir, DefaultSettingsFileName);
609Path.Combine(rootDirectory, configFileName));
623? Path.Combine(rootDirectory, "TestingGlobalPath")
629return Path.Combine(userSettingsDirectory, ConfigurationConstants.Config);
713var fullPath = Path.Combine(root ?? string.Empty, settingsPath);
769var rawPath = Path.Combine(originDirectoryPath, ResolvePath(Path.GetDirectoryName(originFilePath)!, path));
803return Path.Combine(Path.GetPathRoot(configDirectory)!, value.Substring(1));
805return Path.Combine(configDirectory, value);
816settingsPath = Path.Combine(settingsRoot, settingsPath);
865var file = Path.Combine(directory, nugetConfigCasing);
NuGet.PackageManagement (27)
NuGet.Packaging (32)
NuGet.ProjectModel (6)
NuGet.Protocol (22)
Pipelines.Library (2)
PresentationBuildTasks (4)
PresentationCore (4)
PresentationFramework (2)
PresentationUI (2)
ProjectResourceExtensions.AppHost (1)
RepoTasks (14)
Roslyn.Diagnostics.Analyzers (5)
rzc (18)
sdk-tasks (17)
SelectTests (4)
Stress.ApiService (2)
Stress.AppHost (12)
CommandResources.cs (12)
500var processCommandScriptsDirectory = Path.Combine(builder.AppHostDirectory, "process-command-scripts");
501var processCommandStdinScriptPath = Path.Combine(processCommandScriptsDirectory, "stdin.js");
502var processCommandEnvironmentScriptPath = Path.Combine(processCommandScriptsDirectory, "environment.js");
503var processCommandWorkingDirectoryScriptPath = Path.Combine(processCommandScriptsDirectory, "working-directory.js");
504var processCommandStderrFailureScriptPath = Path.Combine(processCommandScriptsDirectory, "stderr-failure.js");
505var processCommandOutputLimitScriptPath = Path.Combine(processCommandScriptsDirectory, "output-limit.js");
506var processCommandBackupRestoreScriptPath = Path.Combine(processCommandScriptsDirectory, "backup-restore.js");
507var processCommandContainerExecScriptPath = Path.Combine(processCommandScriptsDirectory, "container-exec.js");
508var processCommandSampleBackupPath = Path.Combine(processCommandScriptsDirectory, "sample-backup.dump");
510var processCommandCSharpArgumentsAndStdinAppPath = Path.Combine(processCommandFileAppsDirectory, "arguments-and-stdin.cs");
511var processCommandCSharpWorkingDirectoryFailureAppPath = Path.Combine(processCommandFileAppsDirectory, "working-directory-failure.cs");
512var processCommandIssueToolAppPath = Path.Combine(processCommandFileAppsDirectory, "issue-tool.cs");
SuperFileCheck (3)
System.CodeDom (1)
System.ComponentModel.Composition (1)
System.Configuration.ConfigurationManager (12)
System.Diagnostics.EventLog (4)
System.Diagnostics.PerformanceCounter (1)
System.Diagnostics.Process (1)
System.Diagnostics.TextWriterTraceListener (1)
System.Formats.Tar (3)
System.IO.Compression.ZipFile (1)
System.IO.IsolatedStorage (2)
System.IO.MemoryMappedFiles (1)
System.IO.Packaging (1)
System.IO.Pipes (1)
System.Net.Mail (1)
System.Net.Ping (2)
System.Net.Quic (1)
System.Private.CoreLib (21)
System.Private.Xml (3)
System.Reflection.MetadataLoadContext (1)
testhost (3)
testhost.arm64 (3)
testhost.x86 (3)
vbc (7)
VBCSCompiler (24)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (16)
152var cachedAssemblyPath = Path.Combine(entryDir, AssemblyFileName);
205return !File.Exists(Path.Combine(entryDir, cachedFileName));
215copyAndUpdateTimestamp(Path.Combine(entryDir, cachedFileName), targetPath, outputTimestampUtc);
242var dllCacheDir = Path.Combine(_cachePath, dllName);
268var keyPath = Path.Combine(entryPath, dllName + ".key");
302var dllCacheDir = Path.Combine(_cachePath, dllName);
322stagingDir = Path.Combine(dllCacheDir, hashKey + "." + Guid.NewGuid().ToString("N") + ".tmp");
325File.Copy(outputFiles.AssemblyPath, Path.Combine(stagingDir, AssemblyFileName), overwrite: false);
327tryCopyOptional(outputFiles.PdbPath, Path.Combine(stagingDir, PdbFileName));
328tryCopyOptional(outputFiles.RefAssemblyPath, Path.Combine(stagingDir, RefAssemblyFileName));
329tryCopyOptional(outputFiles.XmlDocPath, Path.Combine(stagingDir, XmlDocFileName));
331File.WriteAllText(Path.Combine(stagingDir, dllName + ".key"), deterministicKey, Encoding.UTF8);
332File.WriteAllText(Path.Combine(stagingDir, CreatedFileName), DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture));
459var path = Path.Combine(entryDir, LastUsedFileName);
555var lastUsedPath = Path.Combine(entryDir, LastUsedFileName);
583var createdPath = Path.Combine(entryDir, CreatedFileName);
vbi (1)
vstest.console (8)
vstest.console.arm64 (8)
Yarp.AppHost (1)