7889 references to Combine
aspire (389)
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, "skills")) ||
1068File.Exists(Path.Combine(versionCacheDirectory, "skill-manifest.json")) ||
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, "skills"));
1080TryDeleteFile(Path.Combine(versionCacheDirectory, "skill-manifest.json"));
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 (19)
112var lockPath = Path.Combine(extractDir, ".aspire-bundle-lock");
157var lockPath = Path.Combine(destinationPath, ".aspire-bundle-lock");
235var versionsRoot = Path.Combine(destinationPath, VersionsDirectoryName);
240var activeVersionDir = Path.Combine(versionsRoot, versionId);
319var tempDir = Path.Combine(versionsRoot, $"{versionId}{TempSuffixPrefix}{Guid.NewGuid():N}");
471var sidecarPath = Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName);
500var linkPath = Path.Combine(layoutPath, dir);
515var linkPath = Path.Combine(layoutPath, dir);
566var linkPath = Path.Combine(layoutPath, dir);
598var managedDir = Path.Combine(versionDir, BundleDiscovery.ManagedDirectoryName);
599var managedExe = Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName));
619var dcpDir = Path.Combine(versionDir, BundleDiscovery.DcpDirectoryName);
670var bundlePath = Path.Combine(extractDir, BundleDiscovery.BundleDirectoryName);
706: Path.Combine(layoutPath, target));
739var legacyPath = Path.Combine(layoutPath, dir);
836var markerPath = Path.Combine(extractDir, VersionMarkerFileName);
846var markerPath = Path.Combine(extractDir, VersionMarkerFileName);
891var fullPath = Path.GetFullPath(Path.Combine(destinationPath, relativePath));
928var 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 (9)
250var bundlePath = Path.Combine(layoutPath, BundleDiscovery.BundleDirectoryName);
251var bundleManagedPath = Path.Combine(bundlePath, BundleDiscovery.ManagedDirectoryName);
252var bundleDcpPath = Path.Combine(bundlePath, BundleDiscovery.DcpDirectoryName);
262var bundleManagedExe = Path.Combine(bundleManagedPath, managedExeName);
274Dcp = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName),
275Managed = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName),
282var managedPath = Path.Combine(layoutPath, BundleDiscovery.ManagedDirectoryName);
283var dcpPath = Path.Combine(layoutPath, BundleDiscovery.DcpDirectoryName);
296var managedExePath = Path.Combine(managedPath, managedExeName);
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)
100public string BuildPath => Path.Combine(_projectModelPath, BuildFolder);
107public string GetProjectFilePath() => Path.Combine(_projectModelPath, ProjectFileName);
111var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
123var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
282File.WriteAllText(Path.Combine(_projectModelPath, "Program.cs"), programCs);
385var repoDirectoryPackagesProps = Path.Combine(_repoRoot, "Directory.Packages.props");
397var projectFileName = Path.Combine(_projectModelPath, ProjectFileName);
464if (!File.Exists(Path.Combine(_projectModelPath, fileName)))
484var objPath = Path.Combine(_projectModelPath, "obj");
506File.WriteAllText(Path.Combine(_projectModelPath, fileName), content);
509projectDocument.Save(Path.Combine(_projectModelPath, ProjectFileName));
515var staleNugetConfig = Path.Combine(_projectModelPath, "nuget.config");
546var projectFile = new FileInfo(Path.Combine(_projectModelPath, ProjectFileName));
597var assemblyPath = Path.Combine(BuildPath, ProjectDllName);
752var globalNuGetPath = Path.Combine(userProfile, ".nuget");
Projects\JavaAppHostToolchainResolver.cs (18)
131if (File.Exists(Path.Combine(candidate.FullName, MavenPomFileName)))
138if (File.Exists(Path.Combine(candidate.FullName, gradleBuildFileName)))
189var candidate = Path.Combine(directory.FullName, wrapperName);
204var gitPath = Path.Combine(directory.FullName, ".git");
221JavaAppHostToolchain.Gradle => File.Exists(Path.Combine(directory, GradleSettingsFileName))
222|| File.Exists(Path.Combine(directory, GradleKotlinSettingsFileName)),
225JavaAppHostToolchain.Maven => File.Exists(Path.Combine(directory, MavenPomFileName)),
402var scriptPath = Path.Combine(resolution.ProjectDirectory.FullName, GradleInitScriptPath);
461var dependencyDirectory = Path.Combine(
500return projectPath is null ? path : Path.Combine(projectPath, path);
517JavaAppHostToolchain.Maven => ["-f", Path.Combine(projectPath, MavenPomFileName)],
531JavaAppHostToolchain.Maven => Path.Combine("target", "classes"),
541JavaAppHostToolchain.Maven => Path.Combine("target", DependencyDirectoryName),
542JavaAppHostToolchain.Gradle => Path.Combine("build", DependencyDirectoryName),
631Path.Combine("gradle", "libs.versions.toml")
655"-classpath", Path.Combine(dependencyDirectory, "*"),
703StampFile = Path.Combine(classesDirectory, Path.GetFileName(baseCompile.UpToDateCheck.StampFile))
713var classPath = string.Join(Path.PathSeparator, [classesDirectory, Path.Combine(dependencyDirectory, "*")]);
Projects\PrebuiltAppHostServer.cs (21)
199_integrationProbeManifestPath = Path.Combine(_workingDirectory, IntegrationPackageProbeManifest.FileName);
514references.Add(Path.Combine(projectDirectory, include.Replace('\\', Path.DirectorySeparatorChar)));
546var candidate = Path.Combine(directory, fileName);
647var objDir = Path.Combine(restoreDir, "obj");
649await File.WriteAllTextAsync(Path.Combine(objDir, RestoreStampFileName), fingerprint, cancellationToken).ConfigureAwait(false);
740var restoreDir = Path.Combine(_workingDirectory, "integration-restore");
762var projectFilePath = Path.Combine(restoreDir, IntegrationProjectFileName);
774Path.Combine(restoreDir, "Directory.Packages.props"), directoryPackagesProps, cancellationToken);
778Path.Combine(restoreDir, "Directory.Build.props"), "<Project />", cancellationToken);
780Path.Combine(restoreDir, "Directory.Build.targets"), "<Project />", cancellationToken);
818var closureSourcesPath = Path.Combine(restoreDir, ClosureSourcesFileName);
819var closureMetadataPath = Path.Combine(restoreDir, ClosureMetadataFileName);
820var closureTargetsPath = Path.Combine(restoreDir, ClosureTargetsFileName);
832Path.Combine(restoreDir, ProjectRefAssemblyNamesFileName),
857Path.Combine(restoreDir, ClosureManifestFileName),
882new XElement("AspireClosureMetadataFile", Path.Combine(restoreDir, ClosureMetadataFileName)),
883new XElement("AspireClosureSourcesFile", Path.Combine(restoreDir, ClosureSourcesFileName)),
884new XElement("AspireClosureTargetsFile", Path.Combine(restoreDir, ClosureTargetsFileName)),
885new XElement("AspireProjectRefAssemblyNamesFile", Path.Combine(restoreDir, ProjectRefAssemblyNamesFileName)));
1233return Path.Combine(
1710Path.Combine(contentRootPath, "appsettings.json"),
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)));
485var outputPath = Path.Combine(directoryPath, LanguageInfo.GeneratedFolderName);
490var filePath = Path.Combine(outputPath, fileName);
509!File.Exists(Path.Combine(directory.FullName, PackageJsonFileName)) ||
549var filePath = Path.Combine(rootDirectory, fileName);
aspire-managed (18)
NuGet\Commands\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));
Aspire.Acquisition.Tests (252)
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 (60)
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");
120var brewPath = Path.Combine(mockBinDir, "brew");
194var curlPath = Path.Combine(mockBinDir, "curl");
227var mockBinDir = Path.Combine(env.TempDirectory, "mock-winget-bin");
228var wingetLog = Path.Combine(env.TempDirectory, "winget.log");
234var implPath = Path.Combine(mockBinDir, "winget-impl.ps1");
369var wingetCmd = Path.Combine(mockBinDir, "winget.cmd");
375var aspireCmd = Path.Combine(mockBinDir, "aspire.cmd");
388await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-arm64-13.3.0.tar.gz"), "fake arm64 archive");
389await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-x64-13.3.0.tar.gz"), "fake x64 archive");
399await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip"), "stub-x64-13.3.0");
400await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip"), "stub-arm64-13.3.0");
524var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact"));
563var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact"));
568var result = await cmd.ExecuteAsync(Path.Combine(localDir, "aspire.rb"));
580var caskPath = Path.Combine(env.TempDirectory, "aspire.rb");
599var archiveRoot = Path.Combine(env.TempDirectory, "archives");
609"--output-dir", Path.Combine(env.TempDirectory, "homebrew-output"),
616var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
626var archiveRoot = Path.Combine(env.TempDirectory, "archives");
629var outputDir = Path.Combine(env.TempDirectory, "homebrew-output");
642var cask = await File.ReadAllTextAsync(Path.Combine(outputDir, "aspire.rb"));
646Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-arm64-13.3.0.tar.gz"))).ToLowerInvariant(), cask);
647Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-x64-13.3.0.tar.gz"))).ToLowerInvariant(), cask);
649Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.sh")));
658var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
720var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
759var archiveRoot = Path.Combine(env.TempDirectory, "archives");
761var outputDir = Path.Combine(env.TempDirectory, "winget-output");
772var installerManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml"));
781var localeManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.locale.en-US.yaml"));
783Assert.True(File.Exists(Path.Combine(outputDir, "Microsoft.Aspire.yaml")));
784Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.ps1")));
793var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
801var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log"));
812var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
848var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log"));
853var originalInstaller = await File.ReadAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.installer.yaml"));
902var archiveRoot = Path.Combine(env.TempDirectory, "archives");
905var x64Zip = Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip");
906var arm64Zip = Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip");
910var outputDir = Path.Combine(env.TempDirectory, "winget-output");
921var installerYaml = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml"));
927var extractDir = Path.Combine(env.TempDirectory, $"extract-{Path.GetFileNameWithoutExtension(archive)}");
931var expected = Path.Combine(extractDir, rel.Replace('/', Path.DirectorySeparatorChar));
Scripts\PRScriptPowerShellTests.cs (12)
101var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
115var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
129var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
142var customPath = Path.Combine(env.TempDirectory, "custom");
187var localDir = Path.Combine(env.TempDirectory, "local artifacts");
212var localDir = Path.Combine(env.TempDirectory, "raw-build");
215await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
295var customPath = Path.Combine(env.TempDirectory, "custom");
420var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
516var customPath = Path.Combine(env.TempDirectory, "custom-prefix");
601var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
624var 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)
92var mockGhPath = Path.Combine(mockBinPath, "gh");
106var mockGhPath = Path.Combine(mockBinPath, "gh");
119var customPath = Path.Combine(env.TempDirectory, "custom");
145var localDir = Path.Combine(env.TempDirectory, "local artifacts");
170var localDir = Path.Combine(env.TempDirectory, "raw-build");
173await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
349var customPath = Path.Combine(env.TempDirectory, "custom");
496var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
581var customPath = Path.Combine(env.TempDirectory, "custom-prefix");
664var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
689var 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 (305)
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"));
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");
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)
607if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
1113var configPath = Path.Combine(projectRoot, "aspire.config.json");
1143destDir = Path.Combine(destDir, label);
1146using var logWriter = new StreamWriter(Path.Combine(
1168var destFile = Path.Combine(destDir, captureFileName);
1180? Path.Combine(githubWorkspace, "testresults")
1181: Path.Combine(AppContext.BaseDirectory, "TestResults");
1194var destFile = Path.Combine(destDir, Path.GetFileName(file));
1212CopyDirectory(dir, Path.Combine(destDir, destDirName), log);
Helpers\CliInstallStrategyTests.cs (7)
480File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.25175.1.nupkg"), "");
481File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0-preview.1.25175.1.nupkg"), "");
777File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.12345.1.nupkg"), "");
795File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0.nupkg"), "");
813File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0.nupkg"), "");
814File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.4.0.nupkg"), "");
833File.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"), """
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 (22)
80var viteProjectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "viteapp");
96var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
119var appHostLockFilePath = Path.Combine(
126var viteLockFilePath = Path.Combine(
195var viteProjectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "viteapp");
206var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
225var appHostLockFilePath = Path.Combine(
232var guestLockFilePath = Path.Combine(
281var lockFilePath = Path.Combine(
331Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"),
353var packageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "package.json")))!.AsObject();
359originalTsConfig = File.ReadAllText(Path.Combine(projectRoot, "tsconfig.json"));
361File.WriteAllText(Path.Combine(projectRoot, "package.json"), packageJson.ToJsonString(new JsonSerializerOptions { WriteIndented = true }));
384packageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "package.json")))!.AsObject();
401Assert.Equal(originalTsConfig, File.ReadAllText(Path.Combine(projectRoot, "tsconfig.json")));
402Assert.False(File.Exists(Path.Combine(projectRoot, "tsconfig.apphost.json")));
403Assert.False(File.Exists(Path.Combine(projectRoot, "apphost.mts")));
405var appHostDirectory = Path.Combine(projectRoot, "aspire-apphost");
406var appHostPath = Path.Combine(appHostDirectory, "apphost.mts");
409var appHostPackageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(appHostDirectory, "package.json")))!.AsObject();
421Assert.True(File.Exists(Path.Combine(appHostDirectory, "tsconfig.apphost.json")));
424var 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 (2290)
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 (51)
85var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
107var cacheLockPath = Path.Combine(cacheRoot, $".{AspireSkillsInstaller.Version}.lock");
229Assert.True(File.Exists(Path.Combine(
282Assert.False(File.Exists(Path.Combine(
345await File.ReadAllTextAsync(Path.Combine(
350await File.ReadAllTextAsync(Path.Combine(
407await File.ReadAllTextAsync(Path.Combine(
457Assert.False(File.Exists(Path.Combine(cachedBundleDirectory, "skill-manifest.json")));
458Assert.False(Directory.Exists(Path.Combine(cachedBundleDirectory, "skills")));
464await File.ReadAllTextAsync(Path.Combine(
487await File.WriteAllTextAsync(Path.Combine(cachedBundleDirectory, "skill-manifest.json"), "{");
520Directory.CreateDirectory(Path.Combine(cachedBundleDirectory, ".lastused"));
561Path.Combine(staleCacheDirectory, ".lastused"),
592var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
593var staleVersionDirectory = Path.Combine(cacheRoot, "9.9.9");
637var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
638var staleVersionDirectory = Path.Combine(cacheRoot, "9.9.9");
640var staleCacheDirectory = Path.Combine(staleVersionDirectory, staleArchiveSha512);
684var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
717var staleVersionLockPath = Path.Combine(cacheRoot, $".{staleVersion}.lock");
753var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
761var staleVersionLockPath = Path.Combine(cacheRoot, $".{staleVersion}.lock");
897var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
900Path.Combine(cacheRoot, $".{AspireSkillsInstaller.Version}.lock"),
944var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
951var staleDirectory = Directory.CreateDirectory(Path.Combine(cacheRoot, $"{prefix}stale")).FullName;
954recentDirectories.Add(Directory.CreateDirectory(Path.Combine(cacheRoot, $"{prefix}recent")).FullName);
1016var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
1417var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1448var stageDirectory = new DirectoryInfo(Path.Combine(rootDirectory, ".stage-test"));
1449var targetDirectory = Path.Combine(rootDirectory, "cached");
1460Assert.True(File.Exists(Path.Combine(targetDirectory, "skill-manifest.json")));
1476var archivePath = Path.Combine(rootDirectory, "bundle.tgz");
1481var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1506var archivePath = Path.Combine(rootDirectory, "bundle.tgz");
1510var bundleDirectory = Path.Combine(rootDirectory, "bundle");
1535var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1609await File.ReadAllTextAsync(Path.Combine(
1614await File.ReadAllTextAsync(Path.Combine(
1776Assert.False(File.Exists(Path.Combine(
2014var skillPath = Path.Combine(skillDirectory, "SKILL.md");
2048await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
2052await File.WriteAllTextAsync(Path.Combine(bundleDirectory, AspireSkillsInstaller.ArchiveSha512FileName), archiveSha512);
2058Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubArchiveSha256FileName),
2065Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubAttestationVerifiedFileName),
2073Path.Combine(cacheDirectory, ".lastused"),
2097var bundleDirectory = Path.Combine(rootDirectory, $"aspire-skills-v{AspireSkillsInstaller.Version}");
2102Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubAttestationVerifiedFileName),
2107await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), "{");
2154return Path.Combine(
2283var archivePath = Path.Combine(bundleDirectory.FullName, $".test-embedded-{Guid.NewGuid():N}.tgz");
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 (11)
58Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot")));
117var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
118var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
156var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
157var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
175var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
176var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
192var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
193var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
222Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot")));
223Assert.False(Directory.Exists(Path.Combine(home.FullName, ".claude")));
Backchannel\AppHostConnectionResolverTests.cs (10)
56string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")),
90string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")),
291var realProjectFile = new FileInfo(Path.Combine(realDirectory.FullName, "TestAppHost.csproj"));
295var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
297var projectFileViaSymlink = new FileInfo(Path.Combine(symlinkDirectory, "TestAppHost.csproj"));
334Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
445Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
504var commonGitDirectory = Path.Combine(primaryCheckout.FullName, ".git");
514var projectFile = new FileInfo(Path.Combine(directory.FullName, fileName));
526var socketPath = Path.Combine(
Backchannel\AuxiliaryBackchannelMonitorTests.cs (14)
24var realDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "real"));
25var symlinkDirectory = Path.Combine(tempRoot.FullName, "link");
29var appHostPathViaReal = Path.Combine(realDirectory.FullName, "apphost.cs");
33var appHostPathViaSymlink = Path.Combine(symlinkDirectory, "apphost.cs");
48var workingDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "wd")).FullName;
73Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
75TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
77var primaryAppHost = Path.Combine(primaryRoot, "AppHost.csproj");
78var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj");
98Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
104var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
120Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
122var adminDirectory = TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
125var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
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 (41)
49var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
55var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
116var v1BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v1", "cli-v1");
117var v2BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v2", "cli-v2-longer");
130var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
171var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
175Directory.CreateDirectory(Path.Combine(versionsDir, "stale-aaaaaaaaaaaaaaaa"));
176Directory.CreateDirectory(Path.Combine(versionsDir, $"stale{BundleService.TempSuffixPrefix}deadbeef"));
177Directory.CreateDirectory(Path.Combine(versionsDir, $"stale{BundleService.BadSuffixPrefix}99999"));
212Assert.False(Directory.Exists(Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)));
221var destinationPath = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
222var lockedFilePath = Path.Combine(sourcePath, "locked.dll");
251var binDir = Path.Combine(layoutRoot, ".fake-bins");
259File.WriteAllText(Path.Combine(binDir, ".aspire-install.json"), "{\"source\":\"script\"}");
265var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
300var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
301var staleVersionDir = Path.Combine(versionsDir, "stale-version");
315var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
316var staleVersionDir = Path.Combine(versionsDir, "stale-version");
317var leasesDir = Path.Combine(staleVersionDir, BundleVersionLease.LeasesDirectoryName);
319File.WriteAllText(Path.Combine(leasesDir, "orphan.lease"), "{}");
363File.WriteAllText(Path.Combine(ridDir, ".aspire-install.json"), "{\"source\":\"dotnet-tool\"}");
371var bundleLink = Path.Combine(ridDir, BundleDiscovery.BundleDirectoryName);
437var bundleLink = Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName);
448Directory.Exists(Path.Combine(binaryDir, BundleDiscovery.BundleDirectoryName)),
451Directory.Exists(Path.Combine(Path.GetDirectoryName(binaryDir)!, BundleDiscovery.BundleDirectoryName)),
457var versionsDir = Path.Combine(aspireHome, BundleService.VersionsDirectoryName);
498Assert.True(Directory.Exists(Path.Combine(dest, BundleDiscovery.DcpDirectoryName)));
513var v1BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v1", "cli-v1");
514var v2BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v2", "cli-v2-longer");
522var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
594var linkPath = Path.Combine(layoutRoot, dir);
614var path = Path.Combine(directory, name);
627var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
628var managedDir = Path.Combine(bundleDir, BundleDiscovery.ManagedDirectoryName);
629var dcpDir = Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName);
631var managedExe = Path.Combine(managedDir, managedExeName);
644Managed = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName),
645Dcp = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName),
652var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
657LayoutComponent.Dcp => Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName),
BundleServiceTests.cs (13)
77var processPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
148Directory.Delete(Path.Combine(dir, BundleDiscovery.DcpDirectoryName), recursive: true);
159File.Delete(BundleDiscovery.GetDcpExecutablePath(Path.Combine(dir, BundleDiscovery.DcpDirectoryName)));
196var versionsRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
200Directory.CreateDirectory(Path.Combine(versionsRoot, active));
201Directory.CreateDirectory(Path.Combine(versionsRoot, "stale-bbbbbbbbbbbbbbbb"));
202Directory.CreateDirectory(Path.Combine(versionsRoot, $"active{BundleService.TempSuffixPrefix}deadbeef"));
203Directory.CreateDirectory(Path.Combine(versionsRoot, $"active{BundleService.BadSuffixPrefix}99999"));
207Assert.True(Directory.Exists(Path.Combine(versionsRoot, active)));
224Directory.CreateDirectory(Path.Combine(dir, BundleDiscovery.BundleDirectoryName));
231var managedDir = Path.Combine(root, BundleDiscovery.ManagedDirectoryName);
234Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
237var 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 (17)
23var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb"));
24var parentPidFile = Path.Combine(tempDirectory.FullName, "certutil-parent.pid");
25var childPidFile = Path.Combine(tempDirectory.FullName, "certutil-child.pid");
75var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb"));
117["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"),
119["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db")
125var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{certificate.Thumbprint}.pem");
152["PATH"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-tools"),
154["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-nss-db")
161File.WriteAllText(Path.Combine(corruptOpenSslDirectory.FullName, certificateFileName), "not a certificate");
162File.WriteAllText(Path.Combine(validOpenSslDirectory.FullName, certificateFileName), certificate.ExportCertificatePem());
187["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"),
188["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db"),
196var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{savedCertificate.Thumbprint}.pem");
222["PATH"] = Path.Combine(nssDbDirectory.FullName, "missing-certutil"),
249var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil"));
273var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil"));
CliBootstrapTests.cs (13)
122var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
127Assert.Equal(Path.Combine(installPrefix, "logs"), loggingOptions.LogsDirectory);
135var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
138var logsDirectory = Path.Combine(installPrefix, "logs");
139var logFilePath = Path.Combine(logsDirectory, "aspire.log");
156Assert.Equal(Path.Combine(installPrefix, "hives"), context.HivesDirectory.FullName);
157Assert.Equal(Path.Combine(installPrefix, "cache"), context.CacheDirectory.FullName);
158Assert.Equal(Path.Combine(installPrefix, "sdks"), context.SdksDirectory.FullName);
159Assert.Equal(Path.Combine(installPrefix, "packages"), context.PackagesDirectory?.FullName);
185logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"),
207logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"),
264var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
267File.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 (27)
102var blockedSkillParentPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".agents");
162Path.Combine(".agents", "skills"),
163Path.Combine(".claude", "skills"),
164Path.Combine(".github", "skills"),
165Path.Combine(".opencode", "skill")
384AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
385AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".claude", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
386AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".github", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
387AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".opencode", "skill"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
475var agentsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".agents");
513AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireSkillName);
514AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireDeploymentSkillName);
515AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireInitSkillName);
516AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
517AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireOrchestrationSkillName);
558AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), skillName);
580AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireOrchestrationSkillName);
616AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireSkillName);
617AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireDeploymentSkillName);
618AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireInitSkillName);
619AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
620AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireOrchestrationSkillName);
718AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireifySkillName);
826AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireSkillName);
841var bundleDirectory = new DirectoryInfo(Path.Combine(workspaceRoot.FullName, $".test-aspire-skills-bundle-{Guid.NewGuid():N}"));
849var skillPath = Path.Combine(skillDirectory, "SKILL.md");
886var manifestPath = Path.Combine(bundleDirectory.FullName, "skill-manifest.json");
Commands\AppHostLauncherTests.cs (11)
61var logsDirectory = Path.Combine(Path.GetTempPath(), "aspire-cli-tests");
85var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
88var realProjectPath = Path.Combine(realDirectory.FullName, "AppHost.csproj");
90var appHostPathViaSymlink = Path.Combine(symlinkDirectory, "AppHost.csproj");
961var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
989var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1012var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1074var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1166var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1175Path.Combine(logsDirectory.FullName, "parent.log"),
1255var 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\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 (72)
66var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
69var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectFileName));
109Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
117var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
150Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
166Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
168var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
193var runJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json");
220var aspireConfig = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
263File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), existingAspireConfig);
274var runJson = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")))!.AsObject();
313var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
338Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")));
362Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
397Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
399var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
410var existingAppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
413File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), """{ "type": "commonjs" }""");
428Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
429Assert.Equal("""{ "type": "commonjs" }""", File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json")));
436File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{}");
445File.WriteAllText(Path.Combine(scaffoldDirectory.FullName, context.Language.AppHostFileName!), string.Empty);
475Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
587Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
609Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
629Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
653var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
671var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
704var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
723var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
743var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
787File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
796var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
873var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
939var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
988var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1058Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
1060var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1093Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
1095var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1130var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1154var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1203var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1247var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1362var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1469var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1548var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1636var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1639var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1697var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1726var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1744var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1748var appHostDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost"));
1750Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1771var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1789var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
1791Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1808var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1827var solutionFile = new FileInfo(Path.Combine(solutionDir.FullName, "Test.sln"));
1857Assert.True(File.Exists(Path.Combine(solutionDir.FullName, "nuget.config")),
1859Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
1861AssertNuGetConfigHasChannelShape(Path.Combine(solutionDir.FullName, "nuget.config"), contextChannel);
1877var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1889var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1938var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1970var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1993var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
2038File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
2054var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.slnx"));
2084var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2188File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, appHostFileName), string.Empty);
2198File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, AspireConfigFile.FileName), config.ToJsonString());
Commands\NewCommandTemplateConfigPersistenceTests.cs (8)
260File.WriteAllText(Path.Combine(outputPath, $"{name}.generated"), templateName);
296var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName);
301var appHostFile = Path.Combine(outputDirectory, "apphost.cs");
310var csharpNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config"));
334var dotNetNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config"));
409var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName);
521var installPrefix = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "custom-aspire-prefix"));
527File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{s_prVersion}.nupkg"), string.Empty);
Commands\NewCommandTests.cs (76)
148var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TemplateOut");
149var nugetConfigPath = Path.Combine(outputDirectory, "nuget.config");
554var config = AspireConfigFile.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "output"));
767var doc = XDocument.Load(Path.Combine(outputPath, "nuget.config"));
966File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1132File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1157File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), """
1195File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1223File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1300AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource);
1310var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "relative-feed");
1312File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1343AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource);
1355var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
1357File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1380File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, scaffoldFileName), "// test apphost");
1392AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
1403var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
1405File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1416AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
1451Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output")));
1483var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.org");
1486Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output")));
1506File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1545File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1581File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.py"), "# test apphost");
1664var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1665var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json");
1666var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json");
1698var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1699var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json");
1700var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json");
1773var outputRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1775var aspireConfigPath = Path.Combine(outputRoot, "aspire.config.json");
1782var appHostRunJsonPath = Path.Combine(outputRoot, "apphost.run.json");
1907var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestApp");
1952await File.WriteAllTextAsync(Path.Combine(context.TargetDirectory.FullName, "aspire.config.json"), """
2046var modulesDir = Directory.CreateDirectory(Path.Combine(directory.FullName, LanguageInfo.GeneratedFolderName));
2047File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.mts"), "// generated sdk");
2132var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
2136File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
2171File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.ts"), "// generated sdk");
2184AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
2232AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
2242var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
2246File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
2341var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2366var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2463Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-starter"), capturedOutputPath);
2498var result = command.Parse($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None");
2540var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2659Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2775Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2806var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2871workspaceRoot => Path.Combine(workspaceRoot, "source") + Path.DirectorySeparatorChar,
2876workspaceRoot => Path.Combine(workspaceRoot, projectName) + Path.DirectorySeparatorChar,
2877workspaceRoot => Path.Combine(workspaceRoot, projectName));
2903Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2914File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
2930Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
2940File.WriteAllText(Path.Combine(selectedParent.FullName, "existing.txt"), "existing content");
2977File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
2992var expectedPath = Path.Combine(selectedParent.FullName, projectName);
2994Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
3004var collidingProject = Directory.CreateDirectory(Path.Combine(collidingParent.FullName, projectName));
3005File.WriteAllText(Path.Combine(collidingProject.FullName, "existing.txt"), "existing content");
3070Assert.Equal(Path.Combine(validParent.FullName, projectName), capturedOutputPath);
3130File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3145var expectedPath = Path.Combine(selectedParent.FullName, projectName);
3147Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
3199File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3215Assert.True(File.Exists(Path.Combine(selectedOutputPath.FullName, "apphost.ts")));
3253File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3269Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
3361File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content");
3410File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content");
Commands\RunCommandTests.cs (43)
157var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
158File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
206var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
207File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), $$"""
373var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
437var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
525var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
630var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
787await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
790await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
921Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
1087var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1160var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1161File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
1312var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1388var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1452var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1514var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1572var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1634var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1695var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1758var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1819var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1881var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2441var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [run].log");
2565var appHostProjectPath = Path.Combine(appHostDirectory.FullName, "MyApp.AppHost.csproj");
3206var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3254var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3298var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3346var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3389var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3433var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3477var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3771var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
3833var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
3890var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
3939var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3941var relativeCapturePath = Path.Combine("Profile Output", "profile.zip");
4006var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4034var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4282var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4323var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
4337var socketPath = Path.Combine(
Commands\StartCommandTests.cs (11)
216var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
217File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
268await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
271await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
299await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
302await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
330var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
383var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
650Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
667var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
681var 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");
474var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
498Assert.Contains(interactionService.DisplayedMessages, message => message.Message == string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "AppHost.csproj")));
508var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
540var runningAppHostFile = new FileInfo(Path.Combine(runningAppHostDirectory.FullName, "Running.AppHost.csproj"));
543var discoveredAppHostFile = new FileInfo(Path.Combine(discoveredAppHostDirectory.FullName, "Discovered.AppHost.csproj"));
582Path.Combine("RunningAppHost", "Running.AppHost.csproj"));
592var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
624var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
659var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
699var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
734var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
774var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
814var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
853var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts"));
889string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "apphost.ts")),
899var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
936var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
981var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1019var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1057var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1125var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1298var homeDirectory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".home"));
1306var socketPath = Path.Combine(
Commands\UpdateCommandTests.cs (91)
88var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
186var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
187var oldBackup1 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
188var oldBackup2 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.9876543210");
189var otherFile = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.something");
210var oldBackup = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
235FileDeleteHelper.TryCleanupOldItems(Path.Combine("C:", "NonExistent"), "aspire.exe");
307return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
376var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
439var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
494var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
564return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
627var toolPath = Path.Combine(installDir.FullName, "custom tool path");
643return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
720return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
793return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
836return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
877return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
961return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1014Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.DetectedContext.AppHostFile.FullName);
1042Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.DetectedContext.AppHostFile.FullName);
1044Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.AppliedContext.AppHostFile.FullName);
1119return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1258var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
1301UseOrFindAppHostProjectFileAsyncCallback = (_, _, _) => Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")))
1383var toolPath = Path.Combine(installDir.FullName, "custom tool path");
1466var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1492var processPath = Path.Combine(installDirectory.FullName, "aspire");
1496var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName);
1534var processPath = Path.Combine(installDirectory.FullName, "aspire");
1539var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName);
1591var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1632var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1666return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1731return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1795return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1853return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1930return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1975return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2031var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2050var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2052var globalSettingsPath = Path.Combine(globalDir, "settings.global.json");
2070var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2088var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2090File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "daily" }""");
2092var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2112var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2114File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2133var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2142return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2195Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")))
2248var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2249var projectConfigPath = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName);
2254updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2268Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2271var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2273File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2275var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2279updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2296Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2299var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2301Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2306updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2322Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2325var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2327File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2329var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2331Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2336updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2379Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2416return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2502var resolved = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2587return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2629var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2630var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "AppHost.csproj"));
2633Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2776Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2828return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(projectDirectory.FullName, "AppHost.csproj")));
2959var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3004var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3049var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3082var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3115return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
3269var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3291var executablePath = Path.Combine(contentDirectory.FullName, "aspire");
3309var tarPath = Path.Combine(archiveDirectory.FullName, "aspire.tar");
3312var archivePath = Path.Combine(archiveDirectory.FullName, "aspire.tar.gz");
3339var processPath = Path.Combine(toolPath, GetAspireExecutableName());
3365var processPath = Path.Combine(binaryDir, GetAspireExecutableName());
3367File.WriteAllText(Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName), """{"source":"nix"}""");
3435var 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 (14)
17var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
21var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
118var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
151File.WriteAllText(Path.Combine(configRoot.FullName, AspireConfigFile.FileName), "{}");
170Path.Combine(workspace.WorkspaceRoot.FullName, AspireJsonConfiguration.SettingsFolder),
191var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
199var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
203var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
229var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
239var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
245var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
263var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
267var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
276var migratedPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
DotNet\DotNetCliRunnerTests.cs (83)
35return Path.Combine(dotnetRoot, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
45var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
94var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, appHostFileName));
133var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
167var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
169var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd"));
209var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
211var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd"));
250var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
278var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
312var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
314File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
325var cliPath = Path.Combine(cliDirectory.FullName, "aspire");
327File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
329var linkDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
330var linkPath = Path.Combine(linkDirectory.FullName, "aspire");
340var dotnetDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet"));
341var dotnetPath = Path.Combine(dotnetDirectory.FullName, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
351var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
352var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
354File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
355File.WriteAllText(Path.Combine(cliDirectory.FullName, ".aspire-install.json"), """{"source":"script"}""");
364var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
365var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
367File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
368Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "dcp"));
369Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "managed"));
380var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
408var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
445var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
474var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
503var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
576var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
613var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
654var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
699var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
754var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
851var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
891var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
933var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
980var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1022[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1043var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1077[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1089var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1115[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1131var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1157[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1173var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1226var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1293var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1359var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1432var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1437var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj"));
1441var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj"));
1479var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1482var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj"));
1512var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1559var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1605var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1642var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1679var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1720var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1765var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1817var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1866var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1914var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1951var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1986var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2029var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2071var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2111var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2150var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "RunPropertiesApp"));
2151var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "RunPropertiesApp.csproj"));
2162await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "Program.cs"), "Console.WriteLine(\"Hello\");");
2188Assert.Equal(Path.Combine(projectDirectory.FullName, "relative-working-directory"), properties.GetProperty("RunWorkingDirectory").GetString());
2196var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2417var packagePath = Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{packageVersion}.nupkg");
2487var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2525var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2563var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2603var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2642var 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"));
Layout\LayoutDiscoveryReparsePointTests.cs (23)
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 versionedDcp = Path.Combine(versionsDir, BundleDiscovery.DcpDirectoryName);
103Path.Combine(versionedManaged, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
108var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
141var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
182var relativeLayoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "colocated");
183var binDir = Path.Combine(relativeLayoutRoot, "bin");
185var binaryPath = Path.Combine(binDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
223? Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)
225var managedDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.ManagedDirectoryName));
226Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DcpDirectoryName));
228Path.Combine(managedDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
230var binaryPath = Path.Combine(layoutRoot, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
245var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
246var managedDir = Path.Combine(bundleDir, BundleDiscovery.ManagedDirectoryName);
247var dcpDir = Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName);
251Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
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 (16)
24var managedPath = Path.Combine(
51Assert.Equal(Path.Combine(restoreDirectory, "obj"), GetArgumentValue(invocations[0], "--output"));
65var managedPath = Path.Combine(
99var managedPath = Path.Combine(
104var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
136var managedPath = Path.Combine(
180var managedPath = Path.Combine(
233var managedPath = Path.Combine(
264var firstAppHost = workspace.CreateDirectory(Path.Combine("apps", "api"));
265var secondAppHost = workspace.CreateDirectory(Path.Combine("apps", "web"));
268var managedPath = Path.Combine(
312var managedPath = Path.Combine(
383var managedPath = Path.Combine(
391var legacyLibsDirectory = Path.Combine(restoreDirectory, "libs");
393var lockedFilePath = Path.Combine(legacyLibsDirectory, "Microsoft.Extensions.DependencyInjection.xml");
413Assert.Equal(Path.Combine(restoreDirectory, "integration-package-probe-manifest.json"), result);
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"),
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 (15)
63var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json");
84var programCsPath = Path.Combine(project.ProjectModelPath, "Program.cs");
106var programCs = Path.Combine(project.ProjectModelPath, "Program.cs");
129var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json");
211Path.Combine("src", "Aspire.Hosting.Redis"));
212var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "Aspire.Hosting.Redis.csproj");
259var expectedRoot = Path.Combine(CliPathHelper.GetAspireHomeDirectory(), "hosts");
260var expectedPath = Path.Combine(expectedRoot, pathDir);
320var aspireConfigPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
368var projectModelPath = Path.Combine(appPath, ".aspire_server");
399var projectFilePath = Path.Combine(project.ProjectModelPath, DotNetBasedAppHostServerProject.ProjectFileName);
424var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName);
442var projectModelPath = Path.Combine(appPath, ".aspire_server");
478var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName);
496var projectModelPath = Path.Combine(appPath, ".aspire_server");
Projects\DotNetAppHostProjectTests.cs (77)
266File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
450Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]);
482var customDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "custom-dcp"));
484var customDashboardPath = Path.Combine(
535var inheritedDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dcp")).FullName;
537var inheritedDashboardPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dashboard");
598: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dcp");
601: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dashboard");
870var repoLocalManaged = Path.Combine(_workspace.WorkspaceRoot.FullName, "repo-local-aspire-managed");
928var customTerminalHost = Path.Combine(_workspace.WorkspaceRoot.FullName, "my-custom-terminal-host");
981var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "run-cwd"));
985Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1080Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1122"--log-file", Path.Combine(_workspace.WorkspaceRoot.FullName, "child.log"),
1164Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1250Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1292Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1336Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1383Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1428Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1548var targetPath = Path.Combine(outputDirectory.FullName, "AppHost.dll");
1632Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1699Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1803File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "AppHost.run.json"), """
1868Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "My Project"));
1929Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1994Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2051Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2149Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]);
2176File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
2378File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
2532var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs");
2553var socketPath = Path.Combine(
2563var targetPath = Path.Combine(outputDirectory.FullName, fileName);
2572var commandPath = Path.Combine(outputDirectory.FullName, fileName);
2946WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3038WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3043WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.targets"), """
3232WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3267WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
3272WriteIsLikelyAppHostProject(Path.Combine("repo", "Custom.props"), """
3302WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
3337WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3369WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3409WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3452WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3490WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3518WriteIsLikelyAppHostProject(Path.Combine("outer", "directory.build.props"), """
3542WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """
3573WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """
3635WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3659WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3718var projectFile = WriteIsLikelyAppHostProject(Path.Combine("proj", "MyApp.csproj"), """
3727WriteIsLikelyAppHostProject(Path.Combine("proj", "Directory.Build.props"), $"""
3732WriteIsLikelyAppHostProject(Path.Combine("external", "Directory.Build.props"), """
3808WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3826WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3844WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3865WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3887WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3938WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3976WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4009WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
4028WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
4060WriteIsLikelyAppHostProject(Path.Combine("outer", "Repo.marker"), "<Project />");
4061WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4137var projectFile = new FileInfo(Path.Combine(repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
4155while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
4171Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, ".git"));
4173var path = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4208var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4225var projectPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4239var bundleRoot = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, Guid.NewGuid().ToString()));
4240var dcpDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName));
4241var managedDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.ManagedDirectoryName));
4244Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
4299=> File.WriteAllText(Path.Combine(directory, "aspire.config.json"), content);
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 (47)
52Directory.CreateDirectory(Path.Combine(outputPath, "aspire"));
61[Path.Combine("aspire", "Kept.java"), Path.Combine("aspire", "RemovedResource.java")],
69[Path.Combine("aspire", "Kept.java")],
81var handWritten = Path.Combine(outputPath, "HandWritten.java");
95var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "Generated.java");
111var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "Generated.java");
125var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "New.java");
136var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire_app.py");
178var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
198var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
384var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
444var launchSettingsPath = Path.Combine(propertiesDir.FullName, "launchSettings.json");
533var aspireConfigPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
725var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
733var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
778var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
786var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
819var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
843var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
852var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
899var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
907var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
954var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
963var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1024var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1041var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1138var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1180var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1229var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1259var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1267var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1348var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1356var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1443var socketPath = Path.Combine(
1471var logFilePath = Path.Combine(_workspace.WorkspaceRoot.FullName, $"test-guest-{Guid.NewGuid()}.log");
1536var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
1552Assert.False(Directory.Exists(Path.Combine(_workspace.WorkspaceRoot.FullName, "bundles")));
1558var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
1579var lowerCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "certificates");
1580var upperCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "CERTIFICATES");
1583var devCertificatePath = Path.Combine(lowerCaseDirectory, "aspire.pem");
1584var existingBundlePath = Path.Combine(upperCaseDirectory, "ASPIRE.PEM");
1633var existingBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "existing-ca-certs.pem");
1634var inheritedBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-ca-certs.pem");
1636var devCertificatePath = Path.Combine(devCertificateDirectory, "aspire-dev-cert.pem");
1708var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
Projects\GuestRuntimeTests.cs (25)
285var appHostFile = new FileInfo(Path.Combine(directory.FullName, "apphost.ts"));
702var appHostFile = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.ts"));
725var logFilePath = Path.Combine(Path.GetTempPath(), $"guest-output-test-{Guid.NewGuid()}.log");
971var appHostFile = new FileInfo(Path.Combine(tempDir, "apphost.ts"));
975var migrationFilePath = Path.Combine(tempDir, migrationFileName);
997var migrationFilePath = Path.Combine(tempDir, migrationFileName);
1019var appHostFile = new FileInfo(Path.Combine(tempDir, "apphost.ts"));
1089var input = Path.Combine(workspace.WorkspaceRoot.FullName, relativeInput.Replace('/', Path.DirectorySeparatorChar));
1110var classFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.class");
1138File.Delete(Path.Combine(workspace.WorkspaceRoot.FullName, relativeInput.Replace('/', Path.DirectorySeparatorChar)));
1153var pom = Path.Combine(workspace.WorkspaceRoot.FullName, "pom.xml");
1177File.WriteAllText(Path.Combine(dependencies, "guava-32.0.0.jar"), "");
1188File.Delete(Path.Combine(dependencies, "guava-32.0.0.jar"));
1189File.WriteAllText(Path.Combine(dependencies, "guava-33.0.0.jar"), "");
1191var runtime = CreateRuntime(CreateUpToDateSpec(extraInputs: [Path.Combine("target", "dependency")]));
1206var jar = Path.Combine(dependencies, "guava-32.0.0.jar");
1215var runtime = CreateRuntime(CreateUpToDateSpec(extraInputs: [Path.Combine("target", "dependency")]));
1251StampFile = Path.Combine("classes", ".aspire-compile-stamp")
1348File.WriteAllText(Path.Combine(unreadable, "Hidden.java"), "class Hidden { }");
1406StampFile = Path.Combine("classes", ".aspire-compile-stamp")
1414var appHostFile = new FileInfo(Path.Combine(root.FullName, "AppHost.java"));
1416File.WriteAllText(Path.Combine(root.FullName, "Helper.java"), "class Helper { }");
1420File.WriteAllText(Path.Combine(generated, "Generated.java"), "class Generated { }");
1424File.WriteAllText(Path.Combine(sources, "Service.java"), "class Service { }");
1426Directory.CreateDirectory(Path.Combine(root.FullName, "classes"));
Projects\JavaAppHostToolchainResolverTests.cs (42)
13var path = Path.Combine(directory, wrapperName);
81File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
92File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
101File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
102File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
111File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
135File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
145["-B", "-q", "dependency:copy-dependencies", $"-DoutputDirectory={Path.Combine("target", "aspire-deps")}", "-DincludeScope=runtime"],
158"-d", Path.Combine("target", "classes"),
168["-cp", $"{Path.Combine("target", "classes")}{Path.PathSeparator}{Path.Combine("target", "aspire-deps", "*")}", "AppHost"],
183File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
208StampFile = Path.Combine(".java-build", ".aspire-compile-stamp")
226Assert.Contains(Path.Combine(outputDirectoryName, "aspire-deps"), inputs);
234File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
272File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
306var wrapperPath = Path.Combine(workspace.Path, expectedWrapper);
343var rootWrapperPath = Path.Combine(workspace.Path, expectedWrapper);
346var moduleDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "apphost"));
347File.WriteAllText(Path.Combine(moduleDirectory.FullName, useMaven ? "pom.xml" : "build.gradle"), "");
353Assert.Equal(["/c", "call", Path.Combine("..", expectedWrapper)], invocation.PrefixArgs);
372File.WriteAllText(Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? windowsWrapperName : wrapperName), "");
374var innerCheckout = Directory.CreateDirectory(Path.Combine(workspace.Path, "inner"));
375Directory.CreateDirectory(Path.Combine(innerCheckout.FullName, ".git"));
376File.WriteAllText(Path.Combine(innerCheckout.FullName, useMaven ? "pom.xml" : "build.gradle"), "");
388File.WriteAllText(Path.Combine(directory, "pom.xml"), "");
392File.WriteAllText(Path.Combine(directory, "settings.gradle"), "");
400File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
419File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
435File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
439await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), "");
452File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
456Assert.False(Directory.Exists(Path.Combine(workspace.Path, "target")));
463File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
468await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), "");
485File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
502File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
517File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
527File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
538Assert.Contains(Path.Combine(toProjectRoot, "pom.xml"), spec.InstallDependencies.Args);
543Assert.Contains($"-DoutputDirectory={Path.Combine("target", "aspire-deps")}", spec.InstallDependencies.Args);
569File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
583Assert.Equal(scriptPath, Path.GetFullPath(Path.Combine(appHostDirectory.FullName, initScriptArgument)));
Projects\PrebuiltAppHostServerTests.cs (61)
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")),
1372var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1402var appSettingsPath = Path.Combine(workingDirectory, "appsettings.json");
1563var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1622var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1682var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1741var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1801var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1852var missingPackageSource = Path.Combine(workspace.WorkspaceRoot.FullName, "this-hive-was-deleted");
1856var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1921var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2004var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2093var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2175var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2402Assert.Equal(Path.Combine(layoutPath, "libs"), startInfo.Environment[KnownConfigNames.IntegrationLibsPath]);
2465var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories)
2466.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/'))
2519var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories)
2520.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/'))
2675var firstSourcePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2676var secondSourcePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2720var firstPackagePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2721var secondPackagePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
2722var projectPath = Path.Combine(projectRoot.FullName, "MyIntegration.dll");
2859Path.Combine(
2880var sourcePath = Path.Combine(sourceRoot.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar));
2900File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ClosureMetadataFileName), metadataLines);
2901File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ClosureSourcesFileName), sourcePaths);
2902File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ClosureTargetsFileName), targetPaths);
2903File.WriteAllLines(Path.Combine(restoreDirectory.FullName, PrebuiltAppHostServer.ProjectRefAssemblyNamesFileName), projectReferenceAssemblyNames);
2946File.WriteAllText(Path.Combine(objDirectory.FullName, "project.assets.json"), projectAssetsContent);
Projects\ProjectLocatorTests.cs (211)
38var appHostFile = new FileInfo(Path.Combine(directory.FullName, "apphost.cs"));
64var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
68var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
71var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
95var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
99var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
102var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
124var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
128var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
131var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
157var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
161var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
164var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
190var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
194var firstAlternative = new FileInfo(Path.Combine(alternativesDirectory.FullName, "FirstAlternative.csproj"));
196var secondAlternative = new FileInfo(Path.Combine(alternativesDirectory.FullName, "SecondAlternative.csproj"));
199var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
223var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
227var alternativeAppHost = new FileInfo(Path.Combine(alternativeDirectory.FullName, "Alternative.csproj"));
230var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
252var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
255var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
276var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
279var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
301var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, $"AppHost{index}.csproj"));
306var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
371var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
375var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
378var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
402var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
406var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
409var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
438var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
442var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
445var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
487var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
508var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
529Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
540var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
544var decoyAppHost = new FileInfo(Path.Combine(decoyDirectory.FullName, "HealthyAppHost.csproj"));
547var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
549var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
579Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
590var outsideAppHost = new FileInfo(Path.Combine(outsideDirectory.FullName, "OutsideAppHost.csproj"));
594var configPath = Path.Combine(workingDirectory.FullName, AspireConfigFile.FileName);
628var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
660var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Missing.csproj"));
691var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebApp.csproj"));
720var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
724var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
728var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
753var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
757var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
784var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
788var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
811var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
816var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
852var staleProjectFile = new FileInfo(Path.Combine(staleProjectDirectory.FullName, "StaleProject.csproj"));
855var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
859var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
905var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
928var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
963var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
967var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj"));
970var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1001var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1005var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj"));
1008var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1038var guestAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
1041var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1075var configuredAppHostProjectFile = new FileInfo(Path.Combine(configuredAppHostDirectory.FullName, "ConfiguredAppHost.csproj"));
1078var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
1081var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1128var configuredAppHostProjectFile = new FileInfo(Path.Combine(configuredAppHostDirectory.FullName, "ConfiguredAppHost.csproj"));
1131var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
1134var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1180var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1184var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
1187var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1217var settingsAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SettingsAppHost.csproj"));
1223var configPath = Path.Combine(workingDirectory.FullName, AspireConfigFile.FileName);
1256var settingsAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.custom"));
1259var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1291var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1295var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
1321var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
1324var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
1339var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1342var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
1385var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectFileExtension}"));
1403var onDiskProjectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
1432var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1447var legacyAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
1448var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"));
1451await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), JsonSerializer.Serialize(new
1486var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1506var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName));
1523var appHostFile = new FileInfo(Path.Combine(srcDirectory.FullName, "apphost.ts"));
1526var adjacentConfigPath = Path.Combine(srcDirectory.FullName, AspireConfigFile.FileName);
1571Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1590var appHost1File = new FileInfo(Path.Combine(appHost1Directory.FullName, "apphost.ts"));
1592var appHost1ConfigPath = Path.Combine(appHost1Directory.FullName, AspireConfigFile.FileName);
1602var appHost2File = new FileInfo(Path.Combine(appHost2Directory.FullName, "apphost.ts"));
1604var appHost2ConfigPath = Path.Combine(appHost2Directory.FullName, AspireConfigFile.FileName);
1641Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1660var appHostFile = new FileInfo(Path.Combine(srcDirectory.FullName, "apphost.ts"));
1695Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1709var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "MyAppHost.csproj"));
1716var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
1717var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
1739var aspireConfigFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1753var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1778var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
1804var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs"));
1814var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj"));
1819var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs"));
1859var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1879var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj"));
1884var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs"));
1920var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1947var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1971var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1992var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1995var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2018var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2029var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj"));
2044var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt"));
2064var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2069var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
2142: Path.Combine(executionContext.WorkingDirectory.FullName, AspireConfigFile.FileName);
2256var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
2311var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "UnbuildableAppHost.csproj"));
2329Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
2341var first = new FileInfo(Path.Combine(firstProjectDirectory.FullName, "FirstAppHost.csproj"));
2344var second = new FileInfo(Path.Combine(secondProjectDirectory.FullName, "SecondAppHost.csproj"));
2381var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2386var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2423var healthyAppHost = new FileInfo(Path.Combine(healthyDirectory.FullName, "HealthyAppHost.csproj"));
2428var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2431var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2464var configuredAppHost = new FileInfo(Path.Combine(configuredDirectory.FullName, "ConfiguredAppHost.csproj"));
2469var firstAppHost = new FileInfo(Path.Combine(firstDirectory.FullName, "FirstAppHost.csproj"));
2472var secondAppHost = new FileInfo(Path.Combine(secondDirectory.FullName, "SecondAppHost.csproj"));
2475var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2509var unsupportedAppHost = new FileInfo(Path.Combine(unsupportedDirectory.FullName, "UnsupportedAppHost.csproj"));
2514var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2563var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2567var firstHealthy = new FileInfo(Path.Combine(firstHealthyDirectory.FullName, "FirstHealthyAppHost.csproj"));
2571var secondHealthy = new FileInfo(Path.Combine(secondHealthyDirectory.FullName, "SecondHealthyAppHost.csproj"));
2574var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2613var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj"));
2615var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj"));
2650var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs"));
2678var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj"));
2717var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
2722var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.cs"));
2760var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
2764var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
2802var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
2825var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2846var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2868var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2928var cachedProject = new FileInfo(Path.Combine(nugetCacheDir, "Aspire.AppHost1.csproj"));
2993var customCacheDir = Path.Combine(workspace.WorkspaceRoot.FullName, "custom-nuget-cache");
2996var cachedProject = new FileInfo(Path.Combine(cachedProjectDir, "Aspire.AppHost1.csproj"));
3025var customCacheDir = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
3030var siblingProject = new FileInfo(Path.Combine(siblingDir, "AppHost.csproj"));
3036var cachedProject = new FileInfo(Path.Combine(cachedProjectDir, "Aspire.AppHost1.csproj"));
3066var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyAppHost.csproj"));
3089var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3095var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3119var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "RealAppHost.csproj"));
3143await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "Not a real apphost");
3146await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "Not a real apphost");
3164var appHost1File = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
3167var appHost2File = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
3170var slowValidationFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SlowValidation.csproj"));
3223var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3227var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3231var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
3233var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
3256var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3260var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3264var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
3266var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
3455var configuredAppHost = new FileInfo(Path.Combine(configuredDirectory.FullName, "ConfiguredAppHost.csproj"));
3459var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3619var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3623var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3657var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3686var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.unknown"));
3690var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3719var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3723var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3767var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3802var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3833var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3860var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3885var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3910var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3940var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
3967var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
3994var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
4032var realAppHost = new FileInfo(Path.Combine(realAppDirectory.FullName, "AppHost.csproj"));
4039var linkDirectory = Path.Combine(nodeModulesDir.FullName, "link");
4053var pathThroughLink = Path.Combine(linkDirectory, "AppHost.csproj");
4061var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
4094var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4097var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "APPHOST.csproj");
4105var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
4132var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
Projects\ProjectUpdaterTests.cs (74)
31var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
34var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
37var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
141var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
144var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
147var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
160var aspireConfigFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"));
305var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
308var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
311var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
323var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json"));
412var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
415var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
418var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
428var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json"));
582var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
702var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj"));
705var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj"));
708var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj"));
711var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj"));
835var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
838var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
840var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
971var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
973var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1073var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1075var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1195var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1197var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1306var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1385var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1462var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1463var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1562Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1563Assert.False(File.Exists(Path.Combine(appHostProjectFile.DirectoryName!, "nuget.config")));
1577var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1631Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1637var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1774var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1776var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1887var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1889var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2011var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2013var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2125var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2127var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2236var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2330var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2332var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2432var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2511var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2593var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2686var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2780var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2856var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
2938var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3024var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3102var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3180var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3304var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3306var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
3431var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3464var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3496var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3533var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3569var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3602var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3639var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3657var directoryPackagesPropsFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props");
3710var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "Issue15891.AppHost.csproj"));
3824var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3901var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3955var existingConfigFile = new FileInfo(Path.Combine(executionContext.WorkingDirectory.FullName, "nuget.config"));
3991var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
Projects\TypeScriptAppHostToolchainResolverTests.cs (31)
18File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
29File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
30File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "pnpm-lock.yaml"), "lockfileVersion: '9.0'");
41var packageJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "package.json");
53File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"yarn@4.14.1\" }");
64File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
65var yarnLockPath = Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock");
79File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
80File.WriteAllText(Path.Combine(parentDirectory.FullName, "package.json"), "{ \"name\": \"workspace\" }");
81var yarnLockPath = Path.Combine(parentDirectory.FullName, "yarn.lock");
95File.WriteAllText(Path.Combine(parentDirectory.FullName, "package.json"), "{ \"name\": \"workspace\" }");
96File.WriteAllText(Path.Combine(parentDirectory.FullName, "yarn.lock"), string.Empty);
97File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
98File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package-lock.json"), "{}");
110File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
111File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package-lock.json"), "{}");
112File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock"), string.Empty);
124File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
125Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".yarn"));
136File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
147File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
148File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock"), string.Empty);
167File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.12.1\" }");
168File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
181File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.12.1\" }");
182File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
187Assert.Equal($"packageManager 'bun@1.2.0' found in {Path.Combine(appHostDirectory.FullName, "package.json")}", resolution.Reason);
196File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"yarn@4.14.1\" }");
197File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
198File.WriteAllText(Path.Combine(appHostDirectory.FullName, "pnpm-lock.yaml"), "lockfileVersion: '9.0'");
210File.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"), "{}");
140var appHostDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName));
141File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{ \"packageManager\": \"npm@10.0.0\" }");
142File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.0.0\" }");
212var scaffoldDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName));
235File.WriteAllText(Path.Combine(rootDirectory.FullName, ".gitignore"), "node_modules/\n");
236File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}");
237File.WriteAllText(Path.Combine(rootDirectory.FullName, "apphost.mts"), string.Empty);
274Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ".vscode"));
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\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 (5)
63_bundleDirectory = new DirectoryInfo(Path.Combine(executionContext.WorkingDirectory.FullName, ".fake-aspire-skills-bundle"));
97[(CommonAgentApplicators.AspireSkillName, Path.Combine("references", "app-commands.md"))] = "# App commands",
98[(CommonAgentApplicators.AspireSkillName, Path.Combine("evals", "evals.json"))] = "{}",
117[(CommonAgentApplicators.AspireDeploymentSkillName, Path.Combine("references", "preflight.md"))] = "# Preflight",
174await File.WriteAllTextAsync(Path.Combine(_bundleDirectory.FullName, "skill-manifest.json"), manifestJson, cancellationToken);
Utils\AppHostHelperTests.cs (24)
19var homeDirectory = Path.Combine(Path.GetTempPath(), "testuser");
255var socket1 = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
256var socket2 = Path.Combine(backchannelsDir, $"{appHostId}Z9y8X7w6.67890");
260var otherSocket = Path.Combine(backchannelsDir, "differentId1a1b2C3d4.99999");
282var oldFormatSocket = Path.Combine(legacyBackchannelsDir, $"auxi.sock.{hash}");
285var legacyPidSocket = Path.Combine(legacyBackchannelsDir, $"auxi.sock.{hash}.12345");
309var badSeparator = Path.Combine(backchannelsDir, $"{appHostId}AbCdEfGhX12345");
313var badPid = Path.Combine(backchannelsDir, $"{appHostId}AbCdEfGh.notapid");
332var otherSocket = Path.Combine(backchannelsDir, "differentId1a1b2C3d4.99999");
352var oldFormatSocket = Path.Combine(backchannelsDir, appHostId);
356var orphanedSocket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.{deadPid}");
360var liveSocket = Path.Combine(backchannelsDir, $"{appHostId}Z9y8X7w6.{currentPid}");
390var orphanedSocket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.{deadPid}");
391var liveSocket = Path.Combine(backchannelsDir, $"{appHostId}Z9y8X7w6.{currentPid}");
392var pidlessSocket = Path.Combine(backchannelsDir, appHostId);
420var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
423var projectFileViaSymlink = Path.Combine(symlinkDirectory, "TestAppHost.csproj");
457var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
460var realProjectPath = Path.Combine(realDirectory.FullName, "TestAppHost.csproj");
462var projectFileViaSymlink = Path.Combine(symlinkDirectory, "TestAppHost.csproj");
496var projectFile = new FileInfo(Path.Combine(Path.GetTempPath(), "test.csproj"));
569var socket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
600var socket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
630var legacySocket = Path.Combine(backchannelsDir, $"auxi.sock.{legacyHash}.a1b2c3d4e5f6.99999");
Utils\CliPathHelperTests.cs (12)
151var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
152var binDir = Path.Combine(installPrefix, "bin");
164var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
193var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "portable");
218Assert.Equal(Path.Combine("/home/user", ".aspire"), result);
254var target = Path.Combine(workspace.WorkspaceRoot.FullName, "target-aspire");
257var link = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
329var realPath = Path.Combine(workspace.WorkspaceRoot.FullName, "binary-under-test");
345var realPath = Path.Combine(workspace.WorkspaceRoot.FullName, "binary-under-test");
365var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "portable");
384var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
386File.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\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 (14)
ServiceClient\DashboardRunStore.cs (13)
123DatabasePath = Path.Combine(RunDirectory, DatabaseFileName);
130_runsDirectory = Path.Combine(applicationDirectory, "runs");
131RunDirectory = Path.Combine(_runsDirectory, runId);
132DatabasePath = Path.Combine(RunDirectory, DatabaseFileName);
137_metadataPath = Path.Combine(RunDirectory, "run.json");
141DatabasePath = Path.Combine(RunDirectory, DatabaseFileName);
200!File.Exists(Path.Combine(directory, DatabaseFileName)))
267var metadataPath = Path.Combine(runDirectory, "run.json");
352var metadataPath = Path.Combine(directory, "run.json");
472var metadataPath = Path.Combine(runDirectory, "run.json");
531Path.Combine(runDirectory, metadata.DatabaseFileName),
542dataRoot = Path.Combine(AspireHomeDirectory.GetDefault(), "dashboard");
545return Path.Combine(Path.GetFullPath(dataRoot), GetApplicationDirectoryName(applicationName));
Aspire.Dashboard.Components.Tests (5)
Aspire.Dashboard.Tests (43)
Model\DashboardDataSourceTests.cs (13)
111var metadataPath = Path.Combine(runStore.RunDirectory, "run.json");
150using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(currentRunStore.RunDirectory, "run.json")));
178Assert.False(File.Exists(Path.Combine(runStore.RunDirectory, "run.json")));
297File.WriteAllText(Path.Combine(abandonedDirectory, "dashboard.db"), string.Empty);
334File.WriteAllText(Path.Combine(otherDirectory, "dashboard.db"), string.Empty);
475var databasePath = Path.Combine(workspace.Path, $"malformed-{Guid.NewGuid():N}.db");
692using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(pinnedRunDirectories[^1], "run.json")));
867using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(Path.GetDirectoryName(historicalRun.DatabasePath)!, "run.json")));
961var historicalDirectory = Path.Combine(workspace.Path, "historical");
962var historicalDatabasePath = Path.Combine(historicalDirectory, DashboardRunStore.DatabaseFileName);
967var malformedDirectory = Path.Combine(workspace.Path, "malformed");
968var malformedDatabasePath = Path.Combine(malformedDirectory, DashboardRunStore.DatabaseFileName);
1027var 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);
102using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
125using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
142using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
161using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
181using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
202using var observedDatabase = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "observed.db"), pooling: false);
203using var otherDatabase = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "other.db"), pooling: false);
Aspire.Deployment.EndToEnd.Tests (132)
FoundryHostedAgentDeploymentTests.cs (7)
102var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
103var hostedAgentDir = Path.Combine(projectDir, "DotNetHostedAgent");
104var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost");
114File.WriteAllText(Path.Combine(hostedAgentDir, "DotNetHostedAgent.csproj"), """
138File.WriteAllText(Path.Combine(hostedAgentDir, "Program.cs"), """
210File.WriteAllText(Path.Combine(hostedAgentDir, ".dockerignore"), """
229var 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 (56)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (11)
Aspire.Hosting.Azure.Functions (3)
Aspire.Hosting.Azure.Kubernetes (2)
Aspire.Hosting.Azure.Kubernetes.Tests (1)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Tests (36)
AzureEnvironmentResourceTests.cs (10)
34var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
71var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
122var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
170var mainBicep = File.ReadAllText(Path.Combine(workspace.FullName, "main.bicep"));
218var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
250var mainBicepPath = Path.Combine(workspace.Path, "main.bicep");
281var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
305var bicepFilePath = Path.Combine(workspace, bicepFileName);
324var outputDir = Path.Combine(workspace, "output");
341var 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 (2)
Aspire.Hosting.CodeGeneration.Java.Tests (7)
Aspire.Hosting.CodeGeneration.Python (3)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
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.Docker (9)
Aspire.Hosting.Docker.Tests (57)
DockerComposePublisherTests.cs (42)
100var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
101var envPath = Path.Combine(workspace.Path, ".env");
137var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
138var envPath = Path.Combine(workspace.Path, ".env");
165var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
194var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
245var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
247var envPath = Path.Combine(workspace.Path, ".env");
258var envFilePath = Path.Combine(workspace.Path, ".env");
289var envFilePath = Path.Combine(workspace.Path, ".env");
344var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
370var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
402var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
433var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
461var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
487var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
515var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
547var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
572var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
596var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
623var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
652var envFilePath = Path.Combine(workspace.Path, ".env.Staging");
686var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
708var envFilePath = Path.Combine(workspace.Path, ".env.Production");
742var envFilePath = Path.Combine(workspace.Path, ".env.Staging");
775var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml"));
776var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
808var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
834var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
859var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
860var envPath = Path.Combine(workspace.Path, ".env");
886var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
917var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
918var envPath = Path.Combine(workspace.Path, ".env");
956var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
957var envPath = Path.Combine(workspace.Path, ".env");
1004var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1005var envPath = Path.Combine(workspace.Path, ".env");
1038var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1039var envPath = Path.Combine(workspace.Path, ".env");
1082var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1116var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
Aspire.Hosting.Dotnet (9)
Aspire.Hosting.Dotnet.Tests (24)
DotnetProjectResourceTests.cs (23)
61var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
165Assert.False(File.Exists(Path.Combine(workspace.Path, "aspire-manifest.json")));
398await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Dockerfile"), "FROM scratch");
432var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
433var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
450var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "AmbiguousService"));
451File.WriteAllText(Path.Combine(projectDir.FullName, "First.csproj"), "<Project />");
452File.WriteAllText(Path.Combine(projectDir.FullName, "Second.csproj"), "<Project />");
476var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
477var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
480var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
481await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
563var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
564var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
567var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
568await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
633var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
634var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
637var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
638await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
879var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
931var projectDirectory = Directory.CreateDirectory(Path.Combine(workspacePath, "MyService"));
938var path = Path.Combine(directory, fileName);
Aspire.Hosting.EntityFrameworkCore (6)
Aspire.Hosting.EntityFrameworkCore.Tests (1)
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));
1836var jarPath = Path.GetFullPath(Path.Combine(resource.WorkingDirectory, NormalizeJarPathForJava(jar.JarPath)));
1870JavaBuildTool.Maven => Path.Combine(resource.WorkingDirectory, "target"),
1990JavaBuildTool.Maven => TryReadMavenArtifactId(Path.Combine(resource.WorkingDirectory, "pom.xml")),
2057var settingsPath = Path.Combine(workingDirectory, fileName);
JavaVersionDetector.cs (6)
44DetectFromGradle(Path.Combine(appDirectory, "build.gradle")),
45DetectFromGradle(Path.Combine(appDirectory, "build.gradle.kts")),
46DetectFromPom(Path.Combine(appDirectory, "pom.xml")),
50DetectFromPom(Path.Combine(appDirectory, "pom.xml")),
51DetectFromGradle(Path.Combine(appDirectory, "build.gradle")),
52DetectFromGradle(Path.Combine(appDirectory, "build.gradle.kts")),
Aspire.Hosting.Java.Tests (115)
AddJavaAppPublishTests.cs (69)
54var destination = Path.Combine(workspace.Path, "app.jar");
234File.WriteAllText(Path.Combine(sourceDir.FullName, "build.gradle"), "");
395File.WriteAllText(Path.Combine(source, ".dockerignore"), "secrets/\n");
410File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
416Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
431File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
462File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
494var manifest = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "aspire-manifest.json"), TestContext.Current.CancellationToken);
511File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), $"""
532File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
562File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
640File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), script);
650File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
653File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "sourceCompatibility = '21'");
669File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
672File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "sourceCompatibility = '21'");
686File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
689File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "plugins { id 'java' }");
701File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
724File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
746File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
767File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), "<project>");
799File.WriteAllText(Path.Combine(appDirectory.Path, fileName), "");
816File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), "<project />");
817File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "");
863File.WriteAllText(Path.Combine(sourceDir.FullName, "pom.xml"), "<project/>");
988var wrapperDirectory = Path.Combine(source, "scripts");
1012File.Delete(Path.Combine(sourceDir.FullName, "mvnw"));
1038Directory.Delete(Path.Combine(sourceDir.FullName, supportDirectory), recursive: true);
1060Directory.CreateDirectory(Path.Combine(source, "scripts"));
1061WriteWrapper(Path.Combine(source, "scripts"), "custom-mvnw");
1065.WithWrapperPath(Path.Combine("scripts", "custom-mvnw")));
1077Directory.CreateDirectory(Path.Combine(source, "target"));
1080jarPath: Path.Combine("target", "worker.jar"));
1097Directory.CreateDirectory(Path.Combine(source, "target"));
1100jarPath: Path.Combine("target", "worker.jar"),
1113Directory.CreateDirectory(Path.Combine(source, "target"));
1116jarPath: Path.Combine("target", "worker.jar"));
1130jarPath: Path.Combine("target", "api.jar"));
1148Path.Combine(sourceDir.FullName, "App.java"),
1169builder.AddJavaApp("api", sourceDir.FullName, Path.Combine("target", "app.jar"), ["--greeting", "hello"]);
1178await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "aspire-manifest.json"), TestContext.Current.CancellationToken));
1188Path.Combine(outputDir.FullName, "api.Dockerfile"),
1189Path.Combine(sourceDir.FullName, "Dockerfile"));
1191Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"),
1192Path.Combine(sourceDir.FullName, ".dockerignore"));
1228Path.Combine(sourceDir.FullName, "pom.xml"),
1261Path.Combine(sourcePath.FullName, "App.java"),
1295Path.Combine(outputDir.FullName, "api.Dockerfile"),
1296Path.Combine(sourceDir.FullName, "Dockerfile"));
1298Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"),
1299Path.Combine(sourceDir.FullName, ".dockerignore"));
1431var stagingDirectory = Path.Combine(workspace.Path, "staged");
1472Assert.Equal("runner", File.ReadAllText(Path.Combine(stagingDirectory, "quarkus-run.jar")));
1477Assert.False(Directory.Exists(Path.Combine(stagingDirectory, "lib")));
1695Path.Combine(source, "pom.xml"),
1696File.ReadAllText(Path.Combine(source, "pom.xml")).Replace(
1741var nested = Directory.CreateDirectory(Path.Combine(sourceDir.FullName, "build tools"));
1747.WithWrapperPath(Path.Combine("build tools", "mvnw"));
1779File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")),
1805return await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
2028return await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
2052var ignorePath = Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore");
2063File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2080File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2097File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2125File.WriteAllText(Path.Combine(sourceDirectory, "build.gradle"), contents);
2131File.WriteAllText(Path.Combine(sourceDirectory, wrapperName), "#!/bin/sh\nexit 0\n");
2149Path.Combine(supportDirectory, gradle ? "gradle-wrapper.properties" : "maven-wrapper.properties"),
AddJavaAppTests.cs (28)
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"));
1415var jarPath = Path.Combine(directory, fileName);
1546Assert.Equal(Path.Combine(tempDir.Path, "no-main.jar"), Assert.Single(noMainClassConfiguration.ClassPaths!));
1550Assert.Equal(Path.Combine(tempDir.Path, "does-not-exist.jar"), Assert.Single(missingConfiguration.ClassPaths!));
1566Path.Combine(outputDirectory, "catalog-0.0.1-SNAPSHOT.jar"),
1576Path.Combine(tempDir.Path, tool == "maven" ? "pom.xml" : "settings.gradle"),
1684File.WriteAllText(Path.Combine(tempDir.Path, "pom.xml"), """
1714File.WriteAllText(Path.Combine(tempDir.Path, "settings.gradle"), "rootProject.name = 'orders'\n");
1748Path.Combine(tempDir.Path, "settings.gradle"),
1769File.WriteAllText(Path.Combine(tempDir.Path, "pom.xml"), """
1781Path.Combine("target", "worker-0.0.1-SNAPSHOT.jar"),
1785.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 (29)
JavaScriptHostingExtensions.cs (23)
177if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
281if (File.Exists(Path.Combine(appDirectory, "package.json")))
520if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
706if (File.Exists(Path.Combine(appDirectory, "package.json")))
801appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
1170if (File.Exists(Path.Combine(appDirectory, "Dockerfile")))
1471appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
1672appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
1850var hasBunLock = File.Exists(Path.Combine(workingDirectory, "bun.lock")) ||
1851File.Exists(Path.Combine(workingDirectory, "bun.lockb"));
1856if (File.Exists(Path.Combine(workingDirectory, "bun.lock")))
1860if (File.Exists(Path.Combine(workingDirectory, "bun.lockb")))
1900File.Exists(Path.Combine(resource.Resource.WorkingDirectory, "package-lock.json"))
1918var hasYarnLock = File.Exists(Path.Combine(workingDirectory, "yarn.lock"));
1919var hasYarnrc = File.Exists(Path.Combine(workingDirectory, ".yarnrc.yml"));
1920var hasYarnBerryDir = Directory.Exists(Path.Combine(workingDirectory, ".yarn"));
1997var hasPnpmLock = File.Exists(Path.Combine(workingDirectory, "pnpm-lock.yaml"));
1998var hasPnpmWorkspace = File.Exists(Path.Combine(workingDirectory, "pnpm-workspace.yaml"));
2052var packageJsonPath = Path.Combine(workingDirectory, "package.json");
2441var configPath = Path.Combine(appDirectory, configFileName);
2566var nvmrcPath = Path.Combine(workingDirectory, ".nvmrc");
2579var nodeVersionPath = Path.Combine(workingDirectory, ".node-version");
2592var toolVersionsPath = Path.Combine(workingDirectory, ".tool-versions");
Aspire.Hosting.JavaScript.Tests (171)
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"), "{}");
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 (16)
Aspire.Hosting.Kubernetes.Tests (64)
KubernetesDeployTests.cs (30)
878var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml"));
909var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml"));
972var outputPath = Path.Combine(workspace.Path, "env");
983await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml);
1002var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1019var outputPath = Path.Combine(workspace.Path, "env");
1022await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
1031var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1039var outputPath = Path.Combine(workspace.Path, "env");
1042await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
1061var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1113var outputPath = Path.Combine(workspace.Path, "env");
1116await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
1137var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1270var outputPath = Path.Combine(workspace.Path, "env");
1281await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml);
1306var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1320var outputPath = Path.Combine(workspace.Path, "env");
1330var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1369var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1444var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1471var outputPath = Path.Combine(workspace.Path, "deploy");
1503var overridePath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("myenv"));
1561var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1622var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1667var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1707var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1708await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml")
1780var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1815var valuesPath = Path.Combine(workspace.Path, "values.yaml");
KubernetesPublisherTests.cs (27)
71var filePath = Path.Combine(workspace.Path, expectedFile);
110var deploymentPath = Path.Combine(workspace.Path, "templates/service/deployment.yaml");
168var filePath = Path.Combine(workspace.Path, expectedFile);
212var manifestPath = Path.Combine(workspace.Path, "templates/myapp/scaler.yaml");
290var filePath = Path.Combine(workspace.Path, expectedFile);
346var filePath = Path.Combine(workspace.Path, expectedFile);
378var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
453var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
546var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
642var filePath = Path.Combine(workspace.Path, expectedFile);
688var filePath = Path.Combine(workspace.Path, expectedFile);
714var servicePath = Path.Combine(workspace.Path, "templates/database/service.yaml");
750var filePath = Path.Combine(workspace.Path, expectedFile);
802var filePath = Path.Combine(workspace.Path, expectedFile);
847var filePath = Path.Combine(workspace.Path, expectedFile);
892var filePath = Path.Combine(workspace.Path, expectedFile);
1047var filePath = Path.Combine(workspace.Path, expectedFile);
1093var filePath = Path.Combine(workspace.Path, expectedFile);
1154var filePath = Path.Combine(workspace.Path, expectedFile);
1205var filePath = Path.Combine(workspace.Path, expectedFile);
1267var filePath = Path.Combine(workspace.Path, expectedFile);
1326var filePath = Path.Combine(workspace.Path, expectedFile);
1380var filePath = Path.Combine(workspace.Path, expectedFile);
1437var filePath = Path.Combine(workspace.Path, expectedFile);
1531var filePath = Path.Combine(workspace.Path, expectedFile);
1586var filePath = Path.Combine(workspace.Path, expectedFile);
1845var valuesPath = Path.Combine(workspace.Path, "values.yaml");
Aspire.Hosting.Maui (9)
Aspire.Hosting.Maui.Tests (54)
MauiPlatformExtensionsTests.cs (27)
94var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
117var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
137var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
156var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
185var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
233var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
252var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
276var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
304var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
330var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
353var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
376var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
399var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
427var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
452var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
481var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
506var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
533var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
561var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
591var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
615var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
638var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
676var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
728var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
792var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
816var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
843var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiWithArgsTests.cs (11)
20var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
38var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
57var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
77var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
94var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
114var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
131var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
150var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
167var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
187var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
209var 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 (6)
Aspire.Hosting.Radius.Tests (8)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.RemoteHost (2)
Aspire.Hosting.RemoteHost.Tests (53)
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);
LayoutCommandTests.cs (25)
34var assetsPath = Path.Combine(workspaceRoot, "project.assets.json");
37var outputPath = Path.Combine(workspaceRoot, "out");
49Assert.Equal(GetExpectedRuntimeContent(), await File.ReadAllTextAsync(Path.Combine(outputPath, "Test.Package.dll")));
51Assert.Equal("runtime-native", await File.ReadAllTextAsync(Path.Combine(outputPath, GetNativeFileName())));
84var assetsPath = Path.Combine(workspaceRoot, "project.assets.json");
87var outputPath = Path.Combine(workspaceRoot, "out");
99Assert.Equal(GetExpectedRuntimeContent(), await File.ReadAllTextAsync(Path.Combine(outputPath, "Test.Package.dll")));
122var assetsPath = Path.Combine(workspaceRoot, "project.assets.json");
125var outputPath = Path.Combine(workspaceRoot, "out");
137Assert.Equal("base", await File.ReadAllTextAsync(Path.Combine(outputPath, "Test.Package.dll")));
167var assetsPath = Path.Combine(workspaceRoot, "project.assets.json");
170var outputPath = Path.Combine(workspaceRoot, "integration-package-probe-manifest.json");
182Assert.False(Directory.Exists(Path.Combine(workspaceRoot, "libs")));
191assembly.GetProperty("path").GetString() == Path.Combine(packageRoot, GetExpectedRuntimeAssemblyPath().Replace('/', Path.DirectorySeparatorChar)));
220var sourcePath = Path.Combine(workspaceRoot, "source");
224var globalPackagesPath = Path.Combine(workspaceRoot, "global-packages");
225var nugetConfigPath = Path.Combine(workspaceRoot, "nuget.config");
243var assetsPath = Path.Combine(objPath, "project.assets.json");
281var packagesPath = Path.Combine(rootPath, "packages") + Path.DirectorySeparatorChar;
283var outputPath = Path.Combine(rootPath, "obj") + Path.DirectorySeparatorChar;
368var packagePath = Path.Combine(sourcePath, "Test.Package.1.0.0.nupkg");
427var packagesPath = Path.Combine(rootPath, "packages") + Path.DirectorySeparatorChar;
429var outputPath = Path.Combine(rootPath, "obj") + Path.DirectorySeparatorChar;
497var packagesPath = Path.Combine(rootPath, "packages") + Path.DirectorySeparatorChar;
499var outputPath = Path.Combine(rootPath, "obj") + Path.DirectorySeparatorChar;
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 (99)
AppHostSdkTargetsTests.cs (97)
103var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
127var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
166var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
196var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
222var nonExecutableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "non-executable"));
223var nonExecutableDnxPath = Path.Combine(nonExecutableDirectory.FullName, "dnx");
230var executableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "executable"));
251var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(project.ProjectDirectory, RelativeCliDirectory));
270var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
291var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
306var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@"));
324var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
331var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
349var appHostDirectory = Path.Combine(workspace.Path, "FileApp");
351var appHostFile = Path.Combine(appHostDirectory, "apphost.cs");
372var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
423var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli"));
424var captureFile = Path.Combine(workspace.Path, "aspire-args.txt");
460var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli"));
461var captureFile = Path.Combine(workspace.Path, "dnx-args.txt");
503var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native aspire"));
504var captureFile = Path.Combine(workspace.Path, "aspire-native-args.txt");
543var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@"));
544var captureFile = Path.Combine(workspace.Path, "aspire-args.txt");
580var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
581var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
596var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
603var aspireHome = Path.Combine(workspace.Path, "aspire-home");
629var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli"));
635var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, dnxDirectoryName));
640var aspireHome = Path.Combine(workspace.Path, aspireHomeDirectoryName);
677Path.Combine(workspace.Path, "cli $HOME `aspire-test-command`"));
679var aspireHome = Path.Combine(workspace.Path, "empty-aspire-home");
701var selectedCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected-cli"));
703var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli"));
706var aspireHome = Path.Combine(workspace.Path, "aspire-home");
732var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native%ASPIRE_TEST_LITERAL%"));
734var aspireHome = Path.Combine(workspace.Path, "aspire-home");
750Assert.False(Directory.Exists(Path.Combine(workspace.Path, "nativeexpanded")));
758var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
761var aspireHome = Path.Combine(workspace.Path, "aspire-home");
786var fakeCommandDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-command"));
788var commandShimPath = Path.Combine(fakeCommandDirectory.FullName, "aspire.cmd");
794var childPidPath = Path.Combine(workspace.Path, "child.pid");
796var projectPath = Path.Combine(workspace.Path, "RunAspireCliCommand.proj");
854var commandPath = Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "hang.cmd" : "hang");
923var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
925var environmentAspireHome = Path.Combine(workspace.Path, "environment-aspire-home");
926var propertyAspireHome = Path.Combine(workspace.Path, "property-aspire-home");
940Assert.False(Directory.Exists(Path.Combine(propertyAspireHome, "bundle")));
948var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
974var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
975var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
990var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
991var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1006var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1007var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1022var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1023var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1038var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1039var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1054var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
1068var projectDirectory = Path.Combine(workspace.Path, "AppHost");
1074await File.WriteAllTextAsync(Path.Combine(projectDirectory, "AppHost.csproj"),
1114var projectDirectory = Path.Combine(workspace, "AppHost");
1118var projectFile = Path.Combine(projectDirectory, "AppHost.csproj");
1149await File.WriteAllTextAsync(Path.Combine(projectDirectory, "Program.cs"), """
1224var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1240var aspirePath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1275File.WriteAllText(Path.Combine(bundle.DcpDirectory, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), "");
1282var bundleRoot = Path.Combine(layoutRoot, "bundle");
1283var dcpDirectory = Path.Combine(bundleRoot, "dcp");
1284var managedDirectory = Path.Combine(bundleRoot, "managed");
1285var managedPath = Path.Combine(managedDirectory, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed");
1291var aspirePath = Path.Combine(fakeCliDirectory, $"aspire{extension}");
1327var dnxPath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "dnx.cmd" : "dnx");
1332await File.WriteAllTextAsync(Path.Combine(fakeSdkDirectory.FullName, "dotnet.dll"), "");
1381await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "fail-version"), "");
1395var aspirePath = Path.Combine(fakeCliDirectory, "aspire.exe");
1406File.Copy(sourcePath, Path.Combine(destinationDirectory, Path.GetFileName(sourcePath)), overwrite: true);
1409return Path.Combine(destinationDirectory, Path.GetFileName(fakeCommandHostPath));
1414var captureFile = Path.Combine(workingDirectory, $"{command}-shadow-invoked.txt");
1418Path.Combine(workingDirectory, $"{command}.cmd"),
1433await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$"""
1445var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1461await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$"""
1474var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1495await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1508var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1525await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1542var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1563await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1579var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1681=> OperatingSystem.IsWindows() ? Path.Combine(Path.GetDirectoryName(dnxPath)!, "dotnet.exe") : dnxPath;
1807return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName)));
1916while (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 (10)
Aspire.Hosting.Testing (1)
Aspire.Hosting.Testing.Tests (6)
Aspire.Hosting.Tests (267)
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 (10)
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");
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);
MSBuildTests.cs (96)
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 expectedManagedDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "managed"));
493Assert.Equal(Path.Combine(expectedManagedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed"), 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.ManagedDirectoryName)), 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"));
1002File.WriteAllText(Path.Combine(dcpDir, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), "");
1003var managedPath = Path.Combine(managedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed");
1011var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
1018var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1052var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1078var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1133return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName)));
1148var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1151File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1180File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
1207var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1210File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1239File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
1260var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1263File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1280File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1309var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1312File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1329File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1358var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1385var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1431var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1441var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1443var nuGetConfigPath = Path.Combine(projectDirectory, "NuGet.config");
1487File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1510File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1537File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
1549File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
1574var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1577File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1605File.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\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);
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");
WithTerminalTests.cs (15)
434var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.MetadataSuffix}");
435var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
436var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ConsumerSockPurpose}.sock");
437var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ControlSockPurpose}.sock");
489var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.MetadataSuffix}");
490var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
540var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}");
541var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
572var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{TerminalHostPaths.MetadataSuffix}");
578var sentinelPath = Path.Combine(trmnlDirectory, maliciousPrefix + "-sentinel.tmp");
707var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.MetadataSuffix}");
708var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
737var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}");
738var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
920var publishDirectory = Path.Combine(_terminalDirectory, "publish");
Aspire.Hosting.TestUtilities (11)
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (2)
Aspire.Managed.Tests (20)
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 (8)
Aspire.TestTools (2)
Aspire.TestUtilities (1)
Binding.UDS.IntegrationTests (2)
blazor-devserver (1)
CodeStyleConfigFileGenerator (3)
ConfigurationSchemaGenerator.Tests (2)
crossgen2 (2)
Crossgen2Tasks (3)
csc (8)
CSharpSyntaxGenerator (4)
csi (1)
datacollector (3)
datacollector.arm64 (3)
dotnet (112)
Commands\Project\Convert\ProjectConvertCommand.cs (10)
68string entryPointOutputDir = hasRefs ? Path.Combine(targetDirectory, entryPointName) : targetDirectory;
244string targetItemFullPath = Path.Combine(outputDirectory, item.RelativePath);
284var refPath = refDirective.ResolvedPath ?? Path.GetFullPath(Path.Combine(sourceDirectory, refDirective.Name.Replace('\\', '/')));
293var refTargetDirectory = Path.Combine(targetDirectory, refName);
313var refPath = refDirective.ResolvedPath ?? Path.GetFullPath(Path.Combine(sourceDirectory, refDirective.Name.Replace('\\', '/')));
322var refTargetDirectory = Path.Combine(targetDirectory, refName);
420.Select(item => (item.ItemType, item.RelativePath, OutputFullPath: Path.GetFullPath(Path.Combine(outputDirectory, item.RelativePath))))
517if (Directory.Exists(Path.Combine(sourceDirectory, project.ExpandedName)))
523project = project.WithName(Path.GetRelativePath(relativeTo: outputDirectory, path: Path.Combine(sourceDirectory, project.Name)), CSharpDirective.Project.NameKind.Final);
532var refPath = refDirective.ResolvedPath ?? Path.GetFullPath(Path.Combine(sourceDirectory, refDirective.Name.Replace('\\', '/')));
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);
291var manifestPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "WorkloadManifest.json");
301var adManifestFeatureBandPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "AdvertisedManifestFeatureBand.txt");
363private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}");
367internal static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}");
ToolPackage\ToolPackageDownloaderBase.cs (5)
60_runtimeJsonPath = runtimeJsonPathForTests ?? Path.Combine(AppContext.BaseDirectory!, "PortableRuntimeIdentifierGraph.json");
284CreateAssetFile(packageId, packageVersion, packageDownloadDir, Path.Combine(assetFileDirectory.Value, ToolPackageInstance.AssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
294CreateAssetFile(ridSpecificPackage, packageVersion, packageDownloadDir, Path.Combine(assetFileDirectory.Value, ToolPackageInstance.RidSpecificPackageAssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
311CreateAssetFile(packageId, packageVersion, _localToolDownloadDir, Path.Combine(_localToolAssetDir.Value, ToolPackageInstance.AssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
321Path.Combine(_localToolAssetDir.Value, ToolPackageInstance.RidSpecificPackageAssetsFileName), _runtimeJsonPath, verbosity, targetFramework);
dotnet-aot (40)
src\sdk\src\Cli\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);
291var manifestPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "WorkloadManifest.json");
301var adManifestFeatureBandPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "AdvertisedManifestFeatureBand.txt");
363private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}");
367internal 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 (9)
dotnet-svcutil-lib (38)
Shared\MSBuildProj.cs (9)
67public string FullPath { get { return Path.Combine(DirectoryPath, FileName); } }
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName;
338fullPath = Path.Combine(fullPath, binReference);
340else if (Directory.Exists(Path.Combine(msbuildProj.DirectoryPath, fullPath)))
427string filePath = Path.Combine(dirPath, DirBuildProps);
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
881outputPath = Path.Combine(this.DirectoryPath, outputPath.Trim(new char[] { '\"' }));
885Path.Combine(outputPath, $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json") :
919dependency = ProjectDependency.FromAssembly(Path.Combine(outputPath, assetPath));
dotnet-svcutil-lib.Tests (68)
E2ETests.cs (9)
20this_TestGroupBaselinesDir = Path.Combine(g_BaselinesDir, this_TestCaseName);
21this_TestGroupOutputDir = Path.Combine(g_TestResultsDir, this_TestCaseName);
22this_TestGroupBootstrapDir = Path.Combine(g_TestBootstrapDir, this_TestCaseName);
92Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
214var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
228var typeReuseProjectsPath = Path.Combine(g_TestCasesDir, "TypeReuse");
250Directory.CreateDirectory(Path.Combine(this_TestCaseBootstrapDir, "SvcutilBootstrapper"));
252var uri = PathHelper.GetRelativePath(Path.Combine(this_TestGroupOutputDir, "TypeReuseSvc.wsdl"), new DirectoryInfo(this_TestCaseOutputDir));
374File.Copy(f, Path.Combine(this_TestCaseProject.DirectoryPath, Path.GetFileName(f)));
GlobalToolTests.cs (20)
90Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
113File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.cs"), Path.Combine(this_TestCaseOutputDir, "FullFramework.cs"), true);
114File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.csproj"), Path.Combine(this_TestCaseOutputDir, "FullFramework.csproj"), true);
117var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
134this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
136this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
137this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
138this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
141File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, "Program.cs"), Path.Combine(this_TestCaseOutputDir, "Program.cs"), true);
142File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, $"{testCaseName}.csproj"), Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), true);
143this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None);
149var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
162this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testClientFolder);
165this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
166this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{this_TestCaseName}.log");
167this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testClientFolder);
170FileUtil.CopyDirectory(Path.Combine(g_TestCasesDir, this_TestCaseName), this_TestGroupOutputDir, true);
171this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None);
179var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
201var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json");
TestInit.cs (26)
60File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
61File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
93var filePath = Path.Combine(this_TestGroupProjDir, this_TestGroupProjectName);
111var projectPath = Path.Combine(outputDir, $"{projectName}.csproj");
112var programPath = Path.Combine(outputDir, $"{projectName}.cs");
144g_TestResultsDir = Path.Combine(g_TestOutputDir, "TestResults");
145g_TestBootstrapDir = Path.Combine(g_TestOutputDir, "TestBootstrap");
146g_TestCasesDir = Path.Combine(vsTestsRoot, "TestCases");
147g_BaselinesDir = Path.Combine(vsTestsRoot, "Baselines");
173File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
174File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
210var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
234var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
242this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
247this_TestCaseBootstrapDir = Path.Combine(this_TestGroupBootstrapDir, testCaseName);
250this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
266this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
267var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
353var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
428var expected = Path.Combine(baselineDir, relativePath);
446var globalScriptPath = Path.Combine(g_TestOutputDir, @"TestScripts\deleteAll.cmd");
537if (!Directory.Exists(Path.Combine(vstestDir, "TestCases")))
606File.WriteAllText(Path.Combine(directory, "global.json"), globalConfig);
624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
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 (4)
illink (11)
Infrastructure.Common (1)
Infrastructure.Tests (391)
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}");
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");
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"));
502=> File.ReadAllTextAsync(Path.Combine(_repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
506var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName());
507var nodeModulesRoot = Path.Combine(testRoot, "node_modules");
509var pointerBinRoot = Path.Combine(pointerPackageRoot, "bin");
514Path.Combine(pointerBinRoot, "aspire.js"));
517Path.Combine(pointerPackageRoot, "package.json"),
531await File.WriteAllTextAsync(Path.Combine(pointerBinRoot, "aspire-package-map.json"), packageMap.ToJsonString());
538var ridBinRoot = Path.Combine(ridPackageRoot, "bin");
542Path.Combine(ridPackageRoot, "package.json"),
550await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire"), "native binary stub");
551await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire.exe"), "native binary stub");
571var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName());
572var stagingRoot = Path.Combine(testRoot, "staging");
573var outputPath = Path.Combine(testRoot, "output");
574var nativeBinaryPath = Path.Combine(testRoot, "native-aspire-stub");
595Path.Combine(stagingRoot, "rid"),
596Path.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 (8)
282var changedFilesPath = System.IO.Path.Combine(_workspace.Path, "changed.txt");
284return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: null, to: null, changedFilesPath: changedFilesPath).AffectedProjects;
289var changedFilesPath = System.IO.Path.Combine(_workspace.Path, "changed.txt");
291return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: null, to: null, changedFilesPath: changedFilesPath);
296var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
387var newFull = System.IO.Path.Combine(_workspace.Path, newRelativePath.Replace('/', System.IO.Path.DirectorySeparatorChar));
392return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: baseSha, to: "HEAD", changedFilesPath: null).AffectedProjects;
397var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
TestTriggerMap\SelectTestsCliTests.cs (33)
94File.WriteAllText(Path.Combine(dir.FullName, "map.yml"), Map);
98var propsPath = Path.Combine(dir.FullName, "BeforeBuildProps.props");
147var commentPath = Path.Combine(repoRoot, "comment.md");
199var commentPath = Path.Combine(repoRoot, "comment.md");
255var commentPath = Path.Combine(repoRoot, "comment.md");
296var commentPath = Path.Combine(repoRoot, "comment.md");
327var commentPath = Path.Combine(repoRoot, "comment.md");
357var jsonPath = Path.Combine(repoRoot, "selection.json");
401var missing = Path.Combine(repoRoot, "does-not-exist.txt");
595var missing = Path.Combine(repoRoot, "does-not-exist.txt");
602var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
640var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
678var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
687var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
710var commentPath = Path.Combine(repoRoot, "comment.md");
711var jsonPath = Path.Combine(repoRoot, "selection.json");
724var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
765var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
806var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
844var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
860var changed = Path.Combine(repoRoot, "changed.txt");
965File.WriteAllText(Path.Combine(repoRoot, "skip-patterns.txt"), "# docs\n**.md\n");
971var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
979File.WriteAllText(Path.Combine(repoRoot, "skip-patterns.txt"), ".github/workflows/**\n");
1001MapPath: Path.Combine(repoRoot, "map.yml"),
1002SlnxPath: slnxPath ?? Path.Combine(repoRoot, "Aspire.slnx"),
1014var changed = Path.Combine(repoRoot, "changed.txt");
1030File.WriteAllText(Path.Combine(dir.FullName, "Aspire.slnx"), slnx);
1031File.WriteAllText(Path.Combine(dir.FullName, "map.yml"), map);
1034body(dir.FullName, Path.Combine(dir.FullName, "BeforeBuildProps.props"), output));
1068var outputPath = Path.Combine(dir, "output");
1070Environment.SetEnvironmentVariable("GITHUB_STEP_SUMMARY", Path.Combine(dir, "summary"));
1113var fullPath = Path.Combine(repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar));
TestTriggerMap\SelectTestsLayer1IntegrationTests.cs (21)
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"),
91var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
96MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
97SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
127var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
131var commentPath = System.IO.Path.Combine(fixture.Path, "comment.md");
132var jsonPath = System.IO.Path.Combine(fixture.Path, "selection.json");
141MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
142SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
154var summary = File.ReadAllText(System.IO.Path.Combine(fixture.Path, "summary"));
190var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
194var commentPath = System.IO.Path.Combine(fixture.Path, "comment.md");
195var jsonPath = System.IO.Path.Combine(fixture.Path, "selection.json");
204MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
205SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
320var changed = System.IO.Path.Combine(_workspace.Path, "changed.txt");
351var outputPath = System.IO.Path.Combine(_workspace.Path, "output");
353Environment.SetEnvironmentVariable("GITHUB_STEP_SUMMARY", System.IO.Path.Combine(_workspace.Path, "summary"));
384var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
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\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 (83)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (8)
488? Path.Combine(GetOrInitializeX64Clr2Path(toolName, basePath64), toolName)
489: Path.Combine(GetOrInitializeX32Clr2Path(toolName, basePath), toolName);
494return Path.Combine(s_pathToX64Clr4 ??= basePath64, toolName);
499return Path.Combine(s_pathToArm64Clr4 ??= basePathArm64, toolName);
502return Path.Combine(s_pathToX32Clr4 ??= basePath, toolName);
614string fullPath = Path.Combine(envPath, toolName);
855string appHostPath = Path.Combine(msbuildAssemblyPath, Constants.MSBuildExecutableName);
858: (Path.Combine(msbuildAssemblyPath, Constants.MSBuildAssemblyName), false);
Evaluation\Evaluator.cs (5)
1266string projectFullPath = Path.Combine(projectDirectory, projectFile);
1933ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(sdkResult.Path, project),
1946ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(additionalPath, project),
1983string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(sdkResult.Path, 5), Constants.DotnetProcessName);
2199importFileUnescaped = Path.Combine(directoryOfImportingFile, importFileUnescaped);
Microsoft.Build.Framework (60)
FileUtilities.cs (9)
87string pathWithUpperCase = Path.Combine(Path.GetTempPath(), $"CASESENSITIVETEST{Guid.NewGuid():N}");
152cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id));
452string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
696return NormalizePath(Path.Combine(directory, file));
853return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
953string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
1031var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1472return paths.Aggregate(root, Path.Combine);
1645string 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 (13)
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.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)
114string destPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(projectPath));
147OutputFile = Path.Combine(OutputFolder, $"{_installerFilename}{_packageExtension}");
182CopyDirectoryRecursive(fullSourceDir, Path.Combine(WixpackWorkingDir, randomDirName));
201var tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
280_defineConstantsDictionary["TargetPath"] = Path.Combine("%outputfolder%", Path.GetFileName(targetPath));
284InstallerFile = Path.Combine("%outputfolder%", Path.GetFileName(InstallerFile));
292PdbFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(PdbFile.ItemSpec));
298BindTrackingFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(BindTrackingFile.ItemSpec));
432File.WriteAllText(Path.Combine(WixpackWorkingDir, "create.rsp"), string.Join(System.Environment.NewLine, commandLineArgs));
446File.WriteAllText(Path.Combine(WixpackWorkingDir, "create.cmd"), createCmdFileContents.ToString());
518var copiedXmlPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(xmlPath));
597var filePath = Path.Combine(dir, Path.GetFileName(source));
1016var destDir = Path.Combine(WixpackWorkingDir, fileId);
1023var destPath = Path.Combine(destDir, Path.GetFileName(source));
1042Extensions[i] = new TaskItem(Path.Combine(filename, filename));
1085LocalizationFiles[i] = new TaskItem(Path.Combine(filename, filename));
1095Path.Combine(_wixprojDir, source) :
1096Path.Combine(relativeRoot, source);
1108File.Copy(file, Path.Combine(destDir, Path.GetFileName(file)), overwrite: true);
1113CopyDirectoryRecursive(dir, Path.Combine(destDir, Path.GetFileName(dir)));
src\CreateWixCommandPackageDropBase.cs (8)
67OutputFile = Path.Combine(OutputFolder, $"{Path.GetFileName(InstallerFile)}{_packageExtension}");
81string commandFilename = Path.Combine(packageDropOutputFolder, $"create.cmd");
144string newWixSrcFilePath = Path.Combine(packageDropOutputFolder, Path.GetFileName(wixSrcFile.ItemSpec));
176var destinationPath = Path.Combine(packageDropOutputFolder, Path.GetFileName(locItem.ItemSpec));
292var possiblePath = Path.Combine(additionalBasePath.ItemSpec, oldPath);
310newRelativePath = Path.Combine(id, Path.GetFileName(oldPath));
325string newFolder = Path.Combine(outputPath, id);
331File.Copy(oldPath, Path.Combine(outputPath, newRelativePath), true);
Microsoft.DotNet.Build.Tasks.Packaging (4)
Microsoft.DotNet.Build.Tasks.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 (9)
Microsoft.DotNet.InternalAbstractions (3)
Microsoft.DotNet.MacOsPkg.Core (4)
Microsoft.DotNet.NativeWrapper (2)
Microsoft.DotNet.NuGetRepack.Tasks (6)
Microsoft.DotNet.ProjectTools (6)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.SharedFramework.Sdk (3)
Microsoft.DotNet.SourceBuild.Tasks (3)
Microsoft.DotNet.TemplateLocator (18)
src\sdk\src\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)
76? Path.Combine(TranslatedOutputDirectory, $"{templateName}.default.1033")
77: Path.Combine(TranslatedOutputDirectory, $"{templateName}.{language}");
79string cultureSpecificTemplateFile = Path.Combine(localizedTemplateDirectory, Path.GetFileName(template.ItemSpec));
85string projectFileFullPath = Path.Combine(templateDirectory, projectNode.Attribute("File").Value);
86File.Copy(projectFileFullPath, Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value)), overwrite: true);
92string templateItemFullPath = Path.Combine(templateDirectory, templateItem.Value);
93string templateItemDestinationPath = Path.Combine(localizedTemplateDirectory, templateItem.Value);
114File.Copy(Path.Combine(TranslatedOutputDirectory, localizedFileName), templateItemDestinationPath, 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)
110string root = Path.Combine(Path.GetTempPath(), "testroot");
121string root = Path.Combine(Path.GetTempPath(), "testroot");
132string root = Path.Combine(Path.GetTempPath(), "testroot") + Path.DirectorySeparatorChar;
133string child = Path.Combine(root, "file.txt");
147string root = Path.Combine(Path.GetTempPath(), "testroot");
167string root = Path.Combine(Path.GetTempPath(), "testroot");
178string root = Path.Combine(Path.GetTempPath(), "testroot");
188string root = Path.Combine(Path.GetTempPath(), "testroot");
335string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting");
346string longChild = Path.Combine(longRoot, "file.txt");
383string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting");
395string child = Path.Combine(shortRoot, "file.txt");
396File.WriteAllText(Path.Combine(longRoot, "file.txt"), string.Empty);
429string 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.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 (4)
Microsoft.ML.DnnImageFeaturizer.AlexNet (1)
Microsoft.ML.DnnImageFeaturizer.ResNet101 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet18 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet50 (1)
Microsoft.ML.Ensemble (2)
Microsoft.ML.GenAI.Core.Tests (1)
Microsoft.ML.GenAI.Mistral (1)
Microsoft.ML.GenAI.Phi (2)
Microsoft.ML.GenAI.Samples (8)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Maml (2)
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.PerformanceTests (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)
src\sdk\src\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.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 (11)
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.VisualBasic.Core (4)
Microsoft.VisualStudio.TestPlatform.Client (1)
Microsoft.VisualStudio.TestPlatform.Common (9)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (3)
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 (3)
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 (4)
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)
System.Text.RegularExpressions (1)
testhost (3)
testhost.arm64 (3)
testhost.x86 (3)
vbc (8)
VBCSCompiler (25)
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)