11087 references to Combine
aspire (507)
Agents\AspireSkills\AspireSkillsInstaller.cs (29)
210var archivePath = Path.Combine(tempDirectory.FullName, GetSafeFileName(asset.Name));
671!File.Exists(Path.Combine(cacheDirectory, GitHubAttestationVerifiedFileName)))
681var cachedArchiveSha512Path = Path.Combine(cacheDirectory, ArchiveSha512FileName);
694var cachedGitHubArchiveSha256Path = Path.Combine(cacheDirectory, GitHubArchiveSha256FileName);
767Path.Combine(stageDirectory.FullName, ArchiveSha512FileName),
776Path.Combine(stageDirectory.FullName, GitHubArchiveSha256FileName),
784Path.Combine(stageDirectory.FullName, GitHubAttestationVerifiedFileName),
828File.Delete(Path.Combine(bundleDirectory, ArchiveSha512FileName));
829File.Delete(Path.Combine(bundleDirectory, GitHubArchiveSha256FileName));
830File.Delete(Path.Combine(bundleDirectory, GitHubAttestationVerifiedFileName));
831File.Delete(Path.Combine(bundleDirectory, LastUsedFileName));
859var lockPath = Path.Combine(cacheRoot, $".{GetSafeFileName(version)}.lock");
947return Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
952return Path.Combine(cacheRoot, version);
957return Path.Combine(
1068return Directory.Exists(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.SkillsDirectoryName)) ||
1069File.Exists(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.ManifestFileName)) ||
1070File.Exists(Path.Combine(versionCacheDirectory, ArchiveSha512FileName)) ||
1071File.Exists(Path.Combine(versionCacheDirectory, GitHubArchiveSha256FileName)) ||
1072File.Exists(Path.Combine(versionCacheDirectory, GitHubAttestationVerifiedFileName)) ||
1073File.Exists(Path.Combine(versionCacheDirectory, LastUsedFileName));
1080TryDeleteDirectory(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.SkillsDirectoryName));
1081TryDeleteFile(Path.Combine(versionCacheDirectory, AspireSkillsBundleLayout.ManifestFileName));
1082TryDeleteFile(Path.Combine(versionCacheDirectory, ArchiveSha512FileName));
1083TryDeleteFile(Path.Combine(versionCacheDirectory, GitHubArchiveSha256FileName));
1084TryDeleteFile(Path.Combine(versionCacheDirectory, GitHubAttestationVerifiedFileName));
1085TryDeleteFile(Path.Combine(versionCacheDirectory, LastUsedFileName));
1110File.WriteAllText(Path.Combine(directory, LastUsedFileName), DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture));
1120var markerPath = Path.Combine(directory, LastUsedFileName);
Agents\ClaudeCode\ClaudeCodeAgentClient.cs (10)
26=> Path.Combine(scope is AgentConfigurationScope.Project
27? Path.Combine(workspaceRoot.FullName, ClaudeCodePaths.ConfigDirectoryName)
39AgentConfiguration.EnumerateJsonFiles(Path.Combine(ManagedSettingsDirectory, "managed-settings.d"))), cancellationToken);
44? Path.Combine(workspaceRoot.FullName, ClaudeCodePaths.ConfigDirectoryName)
47return Path.Combine(directory, "settings.json");
55edit.GetJsonFilesForEdit(Path.Combine(ManagedSettingsDirectory, "managed-settings.d"))),
59=> scope is AgentConfigurationScope.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json")
100var settingsPath = Path.Combine(claudeDirectory, "settings.json");
276yield return Path.Combine(ClaudeCodePaths.GetConfigDirectory(context, environment), "settings.json");
282yield return Path.Combine(ManagedSettingsDirectory, "managed-settings.json");
Agents\Copilot\CopilotAgentClient.cs (11)
38=> Path.Combine(scope is AgentConfigurationScope.Project ? workspaceRoot.FullName : context.HomeDirectory.FullName,
49: Path.Combine(GetSettingsDirectory(), "skills");
61return Path.Combine(directory, "settings.json");
71=> scope is AgentConfigurationScope.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json")
72: Path.Combine(GetSettingsDirectory(), "mcp-config.json");
81foreach (var path in new[] { Path.Combine(".vscode", "mcp.json"), Path.Combine(".github", "copilot", "mcp.json") })
83yield return (Path.Combine(workspaceRoot.FullName, path), false);
124var hooksDirectory = Path.Combine(GetSettingsDirectory(), "hooks");
126var filePath = Path.Combine(hooksDirectory, "aspire-telemetry.json");
164yield return Path.Combine(GetSettingsDirectory(), "settings.json");
174yield return Path.Combine(AgentPath.GetManagedSettingsDirectory(context, environment, "GitHubCopilot", "github-copilot"),
Agents\OpenCode\OpenCodePaths.cs (8)
19=> GetConfigPaths(directory.FullName).Concat(GetConfigPaths(Path.Combine(directory.FullName, ".opencode")));
25yield return Path.Combine(directory, "opencode.json");
26yield return Path.Combine(directory, "opencode.jsonc");
30=> Path.Combine(GetOverride("XDG_CONFIG_HOME", context, environment) ??
31Path.Combine(context.HomeDirectory.FullName, ".config"), "opencode");
36? Path.Combine(AgentPath.GetOverride("ProgramData", context, environment) ??
37Path.Combine(Path.GetPathRoot(context.HomeDirectory.FullName)!, "ProgramData"), "opencode")
62=> candidates.LastOrDefault(File.Exists) ?? Path.Combine(directory.FullName, "opencode.jsonc");
Bundles\BundleService.cs (23)
112var lockPath = Path.Combine(extractDir, ".aspire-bundle-lock");
157var lockPath = Path.Combine(destinationPath, ".aspire-bundle-lock");
236var versionsRoot = Path.Combine(destinationPath, VersionsDirectoryName);
241var activeVersionDir = Path.Combine(versionsRoot, versionId);
320var tempDir = Path.Combine(versionsRoot, $"{versionId}{TempSuffixPrefix}{Guid.NewGuid():N}");
472var sidecarPath = Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName);
501var linkPath = Path.Combine(layoutPath, dir);
516var linkPath = Path.Combine(layoutPath, dir);
567var linkPath = Path.Combine(layoutPath, dir);
599var managedDir = Path.Combine(versionDir, BundleDiscovery.ManagedDirectoryName);
600var managedExe = Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName));
607var dashboardDir = Path.Combine(versionDir, BundleDiscovery.DashboardDirectoryName);
608var dashboardExe = Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
611var sqliteLibrary = Path.Combine(dashboardDir, sqliteLibraryName);
617var dcpDir = Path.Combine(versionDir, BundleDiscovery.DcpDirectoryName);
624if (!TerminalHostPayload.IsValid(Path.Combine(versionDir, BundleDiscovery.TerminalHostDirectoryName)))
685var bundlePath = Path.Combine(extractDir, BundleDiscovery.BundleDirectoryName);
721: Path.Combine(layoutPath, target));
757var legacyPath = Path.Combine(layoutPath, dir);
854var markerPath = Path.Combine(extractDir, VersionMarkerFileName);
864var markerPath = Path.Combine(extractDir, VersionMarkerFileName);
909var fullPath = Path.GetFullPath(Path.Combine(destinationPath, relativePath));
946var 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)
337ExportCertificate(certificate, Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.pfx"), includePrivateKey: true, null, CertificateKeyExportFormat.Pfx);
385Path.Combine(s_macOSUserHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx");
413ExportCertificate(diskCert, Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.pfx"), includePrivateKey: true, null, CertificateKeyExportFormat.Pfx);
423var keyPath = Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.key");
Configuration\AspireConfigFile.cs (8)
174var filePath = Path.Combine(directory, FileName);
202var filePath = Path.Combine(directory, FileName);
231var profiles = ReadApphostRunProfiles(Path.Combine(directory, "apphost.run.json"));
241var legacySettingsDir = Path.Combine(directory, AspireJsonConfiguration.SettingsFolder);
243Path.Combine(legacySettingsDir, migratedPath));
417Path.GetFullPath(Path.Combine(configDirectory, entry.Path!))),
421Path.GetFullPath(Path.Combine(configDirectory, entry.Path!))),
434return File.Exists(Path.Combine(directory, FileName));
Configuration\ConfigSourceService.cs (12)
204var path = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName);
219await ApplySnapshotAsync(source, snapshot, Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), cancellationToken);
436using var cacheLock = await FileLock.AcquireAsync(Path.Combine(cacheDirectory, "cache.lock"), cancellationToken);
437var pointer = Path.Combine(cacheDirectory, "current");
439var snapshotDirectory = Path.Combine(cacheDirectory, snapshotName);
440var temporaryPointer = Path.Combine(cacheDirectory, $"{snapshotName}.tmp");
455await File.WriteAllTextAsync(Path.Combine(snapshotDirectory, AspireConfigFile.FileName), configuration.ToJsonString(), cancellationToken);
456await File.WriteAllTextAsync(Path.Combine(snapshotDirectory, "metadata.json"),
504using var cacheLock = await FileLock.AcquireAsync(Path.Combine(cacheDirectory, "cache.lock"), cancellationToken);
505var path = Path.Combine(cacheDirectory, "check.json");
647var repositoryDirectory = new GitRepositoryLocation(new DirectoryInfo(Path.Combine(directory, "repository.git")), IsBare: true);
676return ConfigurationHelper.WriteSettingsFileAtomicallyAsync(Path.Combine(directory, "check.json"), json, cancellationToken);
Layout\LayoutDiscovery.cs (20)
250var bundlePath = Path.Combine(layoutPath, BundleDiscovery.BundleDirectoryName);
251var bundleManagedPath = Path.Combine(bundlePath, BundleDiscovery.ManagedDirectoryName);
252var bundleDashboardPath = Path.Combine(bundlePath, BundleDiscovery.DashboardDirectoryName);
253var bundleDcpPath = Path.Combine(bundlePath, BundleDiscovery.DcpDirectoryName);
265var bundleManagedExe = Path.Combine(bundleManagedPath, managedExeName);
266var bundleDashboardExe = Path.Combine(bundleDashboardPath, dashboardExeName);
272TerminalHostPayload.IsValid(Path.Combine(bundlePath, BundleDiscovery.TerminalHostDirectoryName)))
280Dcp = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName),
281Dashboard = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DashboardDirectoryName),
282Managed = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName),
283AppHostServer = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.AppHostServerDirectoryName),
284TerminalHost = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.TerminalHostDirectoryName),
292var managedPath = Path.Combine(layoutPath, BundleDiscovery.ManagedDirectoryName);
293var dashboardPath = Path.Combine(layoutPath, BundleDiscovery.DashboardDirectoryName);
294var dcpPath = Path.Combine(layoutPath, BundleDiscovery.DcpDirectoryName);
308var managedExePath = Path.Combine(managedPath, managedExeName);
309var dashboardExePath = Path.Combine(dashboardPath, dashboardExeName);
315!TerminalHostPayload.IsValid(Path.Combine(layoutPath, BundleDiscovery.TerminalHostDirectoryName)))
339var relativePath = Path.Combine(bundleDirectory, OperatingSystem.IsWindows()
341return File.Exists(Path.Combine(layoutPath, relativePath)) ? relativePath : null;
NuGet\BundleNuGetService.cs (9)
136var restoreDirectory = Path.Combine(
139var objectDirectory = Path.Combine(restoreDirectory, "obj");
140var manifestPath = Path.Combine(restoreDirectory, IntegrationPackageProbeManifest.FileName);
141var lockPath = Path.Combine(restoreDirectory, "restore.lock");
181Path.Combine(objectDirectory, LockFileFormat.AssetsFileName),
296new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire")),
377new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire")),
561var assemblyPath = Path.Combine(AppContext.BaseDirectory, $"{typeof(BundleNuGetService).Assembly.GetName().Name}.dll");
645return Path.Combine(integrationCacheDirectory.FullName, "package-restore");
NuGet\NuGetPackageAssetResolver.cs (5)
200var sourcePath = Path.Combine(packagePath, relativePath.Replace('/', Path.DirectorySeparatorChar));
332var sourcePath = Path.Combine(packagePath, runtimeTarget.Path.Replace('/', Path.DirectorySeparatorChar));
363var sourcePath = Path.Combine(packagePath, resourceAssembly.Path.Replace('/', Path.DirectorySeparatorChar));
383Path.Combine(locale, Path.GetFileName(sourcePath)),
404var sourcePath = Path.Combine(packagePath, nativeLib.Path.Replace('/', Path.DirectorySeparatorChar));
Projects\AppHostCandidateFinder.cs (5)
76".agents", ".claude", Path.Combine(".github", "skills"), Path.Combine(".opencode", "skill"),
413.Select(path => new FileInfo(Path.Combine(searchDirectory.FullName, path.Replace('/', Path.DirectorySeparatorChar))))
569return new MatcherDirectoryInfo(new DirectoryInfo(Path.Combine(_directory.FullName, path)), _options, _excludePath, _applyDirectoryExclusions, _pathComparison, _counters, _onDirectoryEnumerated, _depth + 1, _maxDepth, _cancellationToken);
574return new MatcherFileInfo(new FileInfo(Path.Combine(_directory.FullName, path)), _options, _excludePath, _applyDirectoryExclusions, _pathComparison, _counters, _onDirectoryEnumerated, _depth, _maxDepth, _cancellationToken);
Projects\AppHostServerClosureSnapshots.cs (12)
20public string IntegrationLibsPath => Path.Combine(LayoutPath, "libs");
338var layoutsDirectory = Path.Combine(Path.GetFullPath(rootPath), LayoutRootFolderName);
339_itemsDirectory = Path.Combine(layoutsDirectory, LayoutItemsFolderName);
340_stagingDirectory = Path.Combine(layoutsDirectory, LayoutStagingFolderName);
381var libsPath = Path.Combine(layoutPath, "libs");
382var manifestPath = Path.Combine(layoutPath, LayoutManifestFileName);
422var stagingPath = Path.Combine(_stagingDirectory, Guid.NewGuid().ToString("n"));
423var libsPath = Path.Combine(stagingPath, "libs");
433var destinationPath = Path.Combine(libsPath, entry.RelativePath.Replace('/', Path.DirectorySeparatorChar));
443await WriteManifestFileAsync(Path.Combine(stagingPath, LayoutManifestFileName), manifest, cancellationToken).ConfigureAwait(false);
479return Path.Combine(_itemsDirectory, fingerprint);
497var copiedPath = Path.Combine(libsPath, entry.RelativePath.Replace('/', Path.DirectorySeparatorChar));
Projects\DotNetBasedAppHostServerProject.cs (15)
91public string BuildPath => Path.Combine(_projectModelPath, BuildFolder);
98public string GetProjectFilePath() => Path.Combine(_projectModelPath, ProjectFileName);
104return Path.Combine(GetDefaultProjectModelPath(pathHash), ProjectFileName);
125var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
137var hashFilePath = Path.Combine(_projectModelPath, ProjectHashFileName);
333var repoDirectoryPackagesProps = Path.Combine(_repoRoot, "Directory.Packages.props");
345var projectFileName = Path.Combine(_projectModelPath, ProjectFileName);
413if (!File.Exists(Path.Combine(_projectModelPath, fileName)))
433var objPath = Path.Combine(_projectModelPath, "obj");
455File.WriteAllText(Path.Combine(_projectModelPath, fileName), content);
458projectDocument.Save(Path.Combine(_projectModelPath, ProjectFileName));
464var staleNugetConfig = Path.Combine(_projectModelPath, "nuget.config");
495var projectFile = new FileInfo(Path.Combine(_projectModelPath, ProjectFileName));
553var assemblyPath = Path.Combine(BuildPath, ProjectDllName);
696var globalNuGetPath = Path.Combine(userProfile, ".nuget");
Projects\GuestAppHostProject.cs (10)
173return new FileInfo(Path.Combine(directory.FullName, appHostFileName));
1107var exitCodePath = Path.Combine(resultDirectory.FullName, "exit-code");
1278var apphostRunPath = Path.Combine(directory.FullName, "apphost.run.json");
2110var outputPath = Path.Combine(appPath, LanguageInfo.GeneratedFolderName);
2118outputPath = Path.Combine(appPath, LanguageInfo.LegacyGeneratedFolderName);
2134var filePath = Path.Combine(outputPath, fileName);
2376var manifestPath = Path.Combine(outputPath, GeneratedManifestFileName);
2424var fullPath = Path.GetFullPath(Path.Combine(outputPath, recordedRelativePath));
2449var hashPath = Path.Combine(generatedPath, ".codegen-hash");
2719var bundlePath = Path.Combine(bundleDirectory, $"{cacheFilePrefix}-{bundleHash}.pem");
Projects\IntegrationClosureBuilder.cs (10)
58projectFile.AddProperty("AspireClosureMetadataFile", Path.Combine(restoreDir, ClosureMetadataFileName));
59projectFile.AddProperty("AspireClosureSourcesFile", Path.Combine(restoreDir, ClosureSourcesFileName));
60projectFile.AddProperty("AspireClosureTargetsFile", Path.Combine(restoreDir, ClosureTargetsFileName));
61projectFile.AddProperty("AspireProjectRefAssemblyNamesFile", Path.Combine(restoreDir, ProjectRefAssemblyNamesFileName));
151new XElement("BaseOutputPath", CliPathHelper.EnsureTrailingSlash(Path.Combine(restoreDir, "bin"))),
191return new DirectoryInfo(Path.Combine(
220var sourcesPath = Path.Combine(restoreDir, ClosureSourcesFileName);
221var metadataPath = Path.Combine(restoreDir, ClosureMetadataFileName);
222var targetsPath = Path.Combine(restoreDir, ClosureTargetsFileName);
283var path = Path.Combine(restoreDir, ProjectRefAssemblyNamesFileName);
Projects\JavaAppHostToolchainResolver.cs (23)
133if (File.Exists(Path.Combine(candidate.FullName, MavenPomFileName)))
140if (File.Exists(Path.Combine(candidate.FullName, gradleBuildFileName)))
191var candidate = Path.Combine(directory.FullName, wrapperName);
206var gitPath = Path.Combine(directory.FullName, ".git");
223JavaAppHostToolchain.Gradle => File.Exists(Path.Combine(directory, GradleSettingsFileName))
224|| File.Exists(Path.Combine(directory, GradleKotlinSettingsFileName)),
227JavaAppHostToolchain.Maven => File.Exists(Path.Combine(directory, MavenPomFileName)),
436var scriptPath = Path.Combine(resolution.ProjectDirectory.FullName, GradleInitScriptPath);
495var dependencyDirectory = Path.Combine(
534return projectPath is null ? path : Path.Combine(projectPath, path);
551JavaAppHostToolchain.Maven => ["-f", Path.Combine(projectPath, MavenPomFileName)],
576"-f", Path.Combine(reactorPath, MavenPomFileName),
602var document = XDocument.Load(Path.Combine(aggregatorDirectory.FullName, MavenPomFileName));
618var moduleDirectory = new DirectoryInfo(Path.GetFullPath(Path.Combine(aggregatorDirectory.FullName, modulePath)));
620|| (File.Exists(Path.Combine(moduleDirectory.FullName, MavenPomFileName))
642JavaAppHostToolchain.Maven => Path.Combine("target", "classes"),
652JavaAppHostToolchain.Maven => Path.Combine("target", DependencyDirectoryName),
653JavaAppHostToolchain.Gradle => Path.Combine("build", DependencyDirectoryName),
784Path.Combine("gradle", "libs.versions.toml")
808"-classpath", Path.Combine(dependencyDirectory, "*"),
856.Select(output => Path.Combine(classesDirectory, Path.GetFileName(output)))
859StampFile = Path.Combine(classesDirectory, Path.GetFileName(baseCompile.UpToDateCheck.StampFile))
869var classPath = string.Join(Path.PathSeparator, [classesDirectory, Path.Combine(dependencyDirectory, "*")]);
Projects\PrebuiltAppHostServer.cs (13)
150var assemblyPath = hostingAssembly?.Path ?? (_integrationLibsPath is not null ? Path.Combine(_integrationLibsPath, "Aspire.Hosting.dll") : null);
249_integrationProbeManifestPath = Path.Combine(_workingDirectory, IntegrationPackageProbeManifest.FileName);
476var dependencyGraphSpecPath = Path.Combine(
584var restoreDir = Path.Combine(_workingDirectory, "integration-restore");
595var intermediateOutputPath = Path.Combine(restoreDir, "obj");
613var projectFilePath = Path.Combine(restoreDir, IntegrationProjectFileName);
625Path.Combine(restoreDir, "Directory.Packages.props"), directoryPackagesProps, cancellationToken);
630Path.Combine(restoreDir, "Directory.Build.props"),
640Path.Combine(restoreDir, "Directory.Build.targets"), "<Project />", cancellationToken);
645var dependencyGraphSpecPath = Path.Combine(
687Path.Combine(intermediateOutputPath, IntegrationClosureBuilder.ProjectAssetsFileName),
698Path.Combine(restoreDir, ClosureManifestFileName),
1008Path.Combine(contentRootPath, "appsettings.json"),
Projects\TypeScriptAppHostToolchainResolver.cs (10)
63if (File.Exists(Path.Combine(candidateDirectory.FullName, BunLockFileName)))
68if (File.Exists(Path.Combine(candidateDirectory.FullName, BunBinaryLockFileName)))
73if (File.Exists(Path.Combine(candidateDirectory.FullName, PnpmLockFileName)))
78var yarnLockFilePath = Path.Combine(candidateDirectory.FullName, YarnLockFileName);
89if (File.Exists(Path.Combine(candidateDirectory.FullName, YarnConfigFileName)))
94if (File.Exists(Path.Combine(candidateDirectory.FullName, DenoLockFileName)))
99if (File.Exists(Path.Combine(candidateDirectory.FullName, DenoJsonFileName)))
104if (File.Exists(Path.Combine(candidateDirectory.FullName, DenoJsoncFileName)))
109if (File.Exists(Path.Combine(candidateDirectory.FullName, PackageLockFileName)))
355var packageJsonPath = Path.Combine(appHostDirectory.FullName, PackageJsonFileName);
Scaffolding\ScaffoldingService.cs (11)
197var filePath = Path.Combine(scaffoldDirectory.FullName, fileName);
255var appHostRunPath = Path.Combine(scaffoldDirectory.FullName, "apphost.run.json");
281if (IsTypeScriptLanguage(language) && File.Exists(Path.Combine(directory.FullName, PackageJsonFileName)))
285return new DirectoryInfo(Path.Combine(directory.FullName, BrownfieldTypeScriptAppHostDirectoryName));
295return Path.Combine(scaffoldDirectory.FullName, appHostFileName);
307var packageJsonPath = Path.Combine(rootDirectory.FullName, PackageJsonFileName);
382Path.GetRelativePath(rootDirectory.FullName, Path.Combine(scaffoldDirectory.FullName, appHostFileName)));
504var outputPath = Path.Combine(directoryPath, LanguageInfo.GeneratedFolderName);
509var filePath = Path.Combine(outputPath, fileName);
528!File.Exists(Path.Combine(directory.FullName, PackageJsonFileName)) ||
568var filePath = Path.Combine(rootDirectory, fileName);
aspire-managed (13)
aspire-tray (28)
Aspire.Acquisition.Tests (361)
Scripts\CompletionScriptTests.cs (74)
21var profile = Path.Combine(env.MockHome, "profile.ps1");
41Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
74var target = Path.Combine(env.TempDirectory, "actual");
75var selected = Path.Combine(env.TempDirectory, "selected");
76var outside = Path.Combine(env.TempDirectory, "outside");
88New-Item -ItemType $linkType -Path '{{Quote(Path.Combine(target, "completions"))}}' -Target '{{Quote(outside)}}' -ErrorAction Stop | Out-Null
110var home = Path.Combine(env.MockHome, "it's $home ` [test]");
166var cli = CreateFakeCli(outsideHome ? Path.Combine(env.TempDirectory, "custom install") : env.MockHome);
167var profile = Path.Combine(env.MockHome, "profile.ps1");
192Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
204var cli = CreateFakeCli(Path.Combine(env.TempDirectory, "custom install"));
205var profile = Path.Combine(Path.GetDirectoryName(cli)!, "outside-profile.ps1");
222Assert.False(Directory.Exists(Path.Combine(Path.GetDirectoryName(cli)!, "completions")));
233var cli = CreateFakeCli(Path.Combine(env.TempDirectory, "it's $install ` [test]"));
234var profile = Path.Combine(env.MockHome, "profile.ps1");
257Assert.False(Directory.Exists(Path.Combine(env.MockHome, ".aspire")));
272var installRoot = Path.Combine(env.TempDirectory, "custom install");
274var profile = Path.Combine(env.MockHome, "profile.ps1");
277var outside = Path.Combine(env.TempDirectory, "custom install-other");
279var sentinel = Path.Combine(outside, "aspire.ps1");
311Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
323var cli = Path.Combine(installRoot, "aspire.ps1");
324var profile = Path.Combine(env.MockHome, "profile.ps1");
355var profile = Path.Combine(env.MockHome, "profile.ps1");
377Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
390var profile = Path.Combine(env.MockHome, "profile.ps1");
417var profile = Path.Combine(env.MockHome, "profile.ps1");
445var profile = Path.Combine(env.MockHome, "profile.ps1");
465Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
473var cli = Path.Combine(home, "fake aspire.ps1");
487Path.Combine(dogfood ? Path.GetDirectoryName(cli)! : Path.Combine(home, ".aspire"), "completions", "aspire.ps1");
500var bashrc = Path.Combine(env.MockHome, ".bashrc");
501var outside = Path.Combine(env.TempDirectory, "outside-profile");
504File.CreateSymbolicLink(Path.Combine(env.MockHome, ".bash_profile"), outside);
529var profiles = new[] { Path.Combine(env.MockHome, ".bashrc"), Path.Combine(env.MockHome, ".bash_profile") };
569var target = Path.Combine(env.TempDirectory, "actual");
570var selected = Path.Combine(env.TempDirectory, "selected");
571var outside = Path.Combine(env.TempDirectory, "outside");
580ln -s '{{Quote(outside)}}' '{{Quote(Path.Combine(target, "completions"))}}'
629var home = Path.Combine(env.MockHome, "it's $home ` [test]");
636_ => Path.Combine(home, ".bashrc")
640var completion = Path.Combine(dogfood ? home : Path.Combine(home, ".aspire"), "completions", $"aspire.{shell}");
697var cli = CreateFakeCli(outsideHome ? Path.Combine(env.TempDirectory, "custom install") : env.MockHome);
698var completion = Path.Combine(dogfood || outsideHome ? Path.GetDirectoryName(cli)! : Path.Combine(env.MockHome, ".aspire"), "completions", "aspire.bash");
701var profile = Path.Combine(env.MockHome, ".bashrc");
724Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
734var installRoot = Path.Combine(env.TempDirectory, "custom install");
736var outside = Path.Combine(installRoot, ".zshrc");
740File.CreateSymbolicLink(Path.Combine(env.MockHome, ".zshrc"), outside);
757Assert.False(Directory.Exists(Path.Combine(installRoot, "completions")));
772var installRoot = Path.Combine(env.TempDirectory, "it's $install ` [test]");
776"zsh" => Path.Combine(env.MockHome, ".zshrc"),
778_ => Path.Combine(env.MockHome, ".bashrc")
803Assert.False(Directory.Exists(Path.Combine(env.MockHome, ".aspire")));
804Assert.False(File.Exists(Path.Combine(env.MockHome, ".bash_profile")));
821var installRoot = Path.Combine(env.TempDirectory, "custom install");
823var profile = Path.Combine(env.MockHome, ".bashrc");
826var outside = Path.Combine(env.TempDirectory, "custom install-other");
828var sentinel = Path.Combine(outside, "aspire.bash");
830var completionDirectory = Path.Combine(installRoot, "completions");
831var completion = Path.Combine(completionDirectory, "aspire.bash");
845File.CreateSymbolicLink(completion, destination == "file-link" ? sentinel : Path.Combine(outside, "missing"));
866Assert.False(File.Exists(Path.Combine(env.MockHome, "called")));
877var cli = Path.Combine(installRoot, "aspire");
878var profile = Path.Combine(env.MockHome, ".bashrc");
907var profile = Path.Combine(env.MockHome, loginProfile);
927Assert.True(File.Exists(Path.Combine(env.MockHome, ".bashrc")));
935File.WriteAllText(Path.Combine(env.MockHome, ".bashrc"), "export ASPIRE_TEST_BASHRC_LOADED=true\n");
960var profile = Path.Combine(env.MockHome, ".bashrc");
977Assert.False(File.Exists(Path.Combine(env.MockHome, ".bash_profile")));
986var profile = Path.Combine(env.MockHome, ".bashrc");
1003Assert.False(File.Exists(Path.Combine(env.MockHome, ".bash_profile")));
1011var cli = Path.Combine(home, "fake aspire");
Scripts\PRScriptFunctionTests.cs (14)
89var pkgDir = Path.Combine(env.TempDirectory, "packages");
112var emptyDir = Path.Combine(env.TempDirectory, "empty-packages");
131var pkgDir = Path.Combine(env.TempDirectory, "packages");
153var pkgDir = Path.Combine(env.TempDirectory, "packages");
229var tempDir = Path.Combine(env.TempDirectory, "download-temp");
231File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
249var tempDir = Path.Combine(env.TempDirectory, "download-temp");
251File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
269var tempDir = Path.Combine(env.TempDirectory, "download-temp");
271File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
294var tempDir = Path.Combine(env.TempDirectory, "work");
318var tempDir = Path.Combine(env.TempDirectory, "work");
341var tempDir = Path.Combine(env.TempDirectory, "work");
372var configFile = Path.Combine(env.MockHome, ".zshrc");
Scripts\PRScriptInstallerModeTests.cs (67)
37await File.WriteAllTextAsync(Path.Combine(root, "aspire.rb"), "cask \"aspire\" do\n version \"13.3.0\"\nend\n");
38await File.WriteAllTextAsync(Path.Combine(root, "dogfood.sh"), "#!/usr/bin/env bash\nexit 0\n");
47await File.WriteAllTextAsync(Path.Combine(root, "Microsoft.Aspire.installer.yaml"), "PackageIdentifier: Microsoft.Aspire\nPackageVersion: 13.3.0\nInstallers: []\n");
48await File.WriteAllTextAsync(Path.Combine(root, "dogfood.ps1"), "exit 0\n");
66var manifestDir = Path.Combine(root, "installer-winget");
67var archiveRoot = Path.Combine(root, "installer-native-archives");
94await File.WriteAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.installer.yaml"), installerYaml);
95await File.WriteAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.yaml"), $"PackageIdentifier: Microsoft.Aspire\nPackageVersion: {version}\nManifestType: version\nManifestVersion: 1.10.0\n");
96await File.WriteAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.locale.en-US.yaml"), $"PackageIdentifier: Microsoft.Aspire\nPackageVersion: {version}\nPackageLocale: en-US\nManifestType: defaultLocale\nManifestVersion: 1.10.0\n");
97await File.WriteAllTextAsync(Path.Combine(manifestDir, "dogfood.ps1"), "exit 0\n");
103await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, $"aspire-cli-win-x64-{version}.zip"), $"stub-x64-{version}");
104await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, $"aspire-cli-win-arm64-{version}.zip"), $"stub-arm64-{version}");
111var mockBinDir = Path.Combine(env.TempDirectory, "mock-homebrew-bin");
112var brewRepository = Path.Combine(env.TempDirectory, "brew-repository");
113var brewPrefix = Path.Combine(env.TempDirectory, "brew-prefix");
114var brewLog = Path.Combine(env.TempDirectory, "brew.log");
115var codesignLog = Path.Combine(env.TempDirectory, "codesign.log");
121var brewPath = Path.Combine(mockBinDir, "brew");
198var curlPath = Path.Combine(mockBinDir, "curl");
206var codesignPath = Path.Combine(mockBinDir, "codesign");
239var mockBinDir = Path.Combine(env.TempDirectory, "mock-winget-bin");
240var wingetLog = Path.Combine(env.TempDirectory, "winget.log");
246var implPath = Path.Combine(mockBinDir, "winget-impl.ps1");
381var wingetCmd = Path.Combine(mockBinDir, "winget.cmd");
387var aspireCmd = Path.Combine(mockBinDir, "aspire.cmd");
400await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-arm64-13.3.0.tar.gz"), "fake arm64 archive");
401await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-x64-13.3.0.tar.gz"), "fake x64 archive");
411await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip"), "stub-x64-13.3.0");
412await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip"), "stub-arm64-13.3.0");
536var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact"));
575var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact"));
580var result = await cmd.ExecuteAsync(Path.Combine(localDir, "aspire.rb"));
592var caskPath = Path.Combine(env.TempDirectory, "aspire.rb");
611var archiveRoot = Path.Combine(env.TempDirectory, "archives");
621"--output-dir", Path.Combine(env.TempDirectory, "homebrew-output"),
628var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
633var codesignLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "codesign.log"));
644var archiveRoot = Path.Combine(env.TempDirectory, "archives");
654"--output-dir", Path.Combine(env.TempDirectory, "homebrew-output"),
658var codesignLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "codesign.log"));
660var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
670var archiveRoot = Path.Combine(env.TempDirectory, "archives");
673var outputDir = Path.Combine(env.TempDirectory, "homebrew-output");
686var cask = await File.ReadAllTextAsync(Path.Combine(outputDir, "aspire.rb"));
692Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-arm64-13.3.0.tar.gz"))).ToLowerInvariant(), cask);
693Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-x64-13.3.0.tar.gz"))).ToLowerInvariant(), cask);
695Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.sh")));
704var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log"));
768var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
807var archiveRoot = Path.Combine(env.TempDirectory, "archives");
809var outputDir = Path.Combine(env.TempDirectory, "winget-output");
820var installerManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml"));
829var localeManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.locale.en-US.yaml"));
831Assert.True(File.Exists(Path.Combine(outputDir, "Microsoft.Aspire.yaml")));
832Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.ps1")));
841var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
849var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log"));
860var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact"));
896var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log"));
901var originalInstaller = await File.ReadAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.installer.yaml"));
950var archiveRoot = Path.Combine(env.TempDirectory, "archives");
953var x64Zip = Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip");
954var arm64Zip = Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip");
958var outputDir = Path.Combine(env.TempDirectory, "winget-output");
969var installerYaml = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml"));
975var extractDir = Path.Combine(env.TempDirectory, $"extract-{Path.GetFileNameWithoutExtension(archive)}");
979var expected = Path.Combine(extractDir, rel.Replace('/', Path.DirectorySeparatorChar));
Scripts\PRScriptPowerShellTests.cs (13)
83Assert.False(Directory.Exists(Path.Combine(env.MockHome, ".aspire")));
115var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
129var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
143var mockGhPath = Path.Combine(mockBinPath, OperatingSystem.IsWindows() ? "gh.cmd" : "gh");
156var customPath = Path.Combine(env.TempDirectory, "custom");
201var localDir = Path.Combine(env.TempDirectory, "local artifacts");
226var localDir = Path.Combine(env.TempDirectory, "raw-build");
229await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
309var customPath = Path.Combine(env.TempDirectory, "custom");
434var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
530var customPath = Path.Combine(env.TempDirectory, "custom-prefix");
615var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
638var aspireRoot = Path.Combine(env.MockHome, ".aspire");
Scripts\PRScriptPSFunctionTests.cs (20)
84var cliBinDir = Path.Combine(env.TempDirectory, "cli-bin");
85var existingPath = $"{cliBinDir}{Path.PathSeparator}{Path.Combine(env.TempDirectory, "other-bin")}";
86var githubPath = Path.Combine(env.TempDirectory, "github-path.txt");
116var pkgDir = Path.Combine(env.TempDirectory, "packages");
139var emptyDir = Path.Combine(env.TempDirectory, "empty-packages");
158var pkgDir = Path.Combine(env.TempDirectory, "packages");
180var pkgDir = Path.Combine(env.TempDirectory, "packages");
260var tempDir = Path.Combine(env.TempDirectory, "download-temp");
262File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
280var tempDir = Path.Combine(env.TempDirectory, "download-temp");
282File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
300var tempDir = Path.Combine(env.TempDirectory, "download-temp");
302File.WriteAllText(Path.Combine(tempDir, "artifact.tar.gz"), "fake");
324var downloadDir = Path.Combine(env.TempDirectory, "cli-download");
326await File.WriteAllTextAsync(Path.Combine(downloadDir, "README.txt"), "no archive here");
328var binDir = Path.Combine(env.TempDirectory, "bin");
346var downloadDir = Path.Combine(env.TempDirectory, "cli-download");
348await File.WriteAllTextAsync(Path.Combine(downloadDir, "aspire-cli-linux-x64.tar.gz"), "fake1");
349await File.WriteAllTextAsync(Path.Combine(downloadDir, "aspire-cli-osx-arm64.tar.gz"), "fake2");
351var binDir = Path.Combine(env.TempDirectory, "bin");
Scripts\PRScriptShellTests.cs (11)
108var mockGhPath = Path.Combine(mockBinPath, "gh");
122var mockGhPath = Path.Combine(mockBinPath, "gh");
135var customPath = Path.Combine(env.TempDirectory, "custom");
161var localDir = Path.Combine(env.TempDirectory, "local artifacts");
186var localDir = Path.Combine(env.TempDirectory, "raw-build");
189await File.WriteAllTextAsync(Path.Combine(localDir, "aspire"), "#!/bin/sh\necho fake\n");
365var customPath = Path.Combine(env.TempDirectory, "custom");
512var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
597var customPath = Path.Combine(env.TempDirectory, "custom-prefix");
680var localDir = Path.Combine(env.TempDirectory, "local-artifacts");
705var aspireRoot = Path.Combine(env.MockHome, ".aspire");
Scripts\PRScriptToolModeTests.cs (62)
49var mockBinDir = Path.Combine(env.TempDirectory, "mock-dotnet-bin");
53var dotnetScriptPath = Path.Combine(mockBinDir, isWindows ? "dotnet.cmd" : "dotnet");
170var localDir = Path.Combine(env.TempDirectory, "artifacts");
196var localDir = Path.Combine(env.TempDirectory, "artifacts");
216var localDir = Path.Combine(env.TempDirectory, "artifacts");
219var customPath = Path.Combine(env.TempDirectory, "custom");
229Assert.Contains($"Would install CLI archive to: {Path.Combine(customPath, "bin")}", result.Output);
325var localDir = Path.Combine(env.TempDirectory, "artifacts");
327var customPath = Path.Combine(env.TempDirectory, "custom");
337Assert.Contains($"dotnet tool install --tool-path {Path.Combine(customPath, "bin")} Aspire.Cli", result.Output);
346var localDir = Path.Combine(env.TempDirectory, "artifacts");
367var localDir = Path.Combine(env.TempDirectory, "artifacts");
387var localDir = Path.Combine(env.TempDirectory, "artifacts");
390var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
418var localDir = Path.Combine(env.TempDirectory, "artifacts");
421var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
446Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
455var localDir = Path.Combine(env.TempDirectory, "artifacts");
458var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
489var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
512Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
583var localDir = Path.Combine(env.TempDirectory, "artifacts");
585var customPath = Path.Combine(env.TempDirectory, "custom");
586var expectedToolPath = Path.Combine(customPath, "bin");
609var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
629var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
631await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.symbols.nupkg"), "fake-symbols-nupkg-content");
632await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.snupkg"), "fake-symbols-package-content");
634await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13_3_0.nupkg"), "fake-invalid-version-content");
653var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
657await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content");
676var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
698var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
752var localDir = Path.Combine(env.TempDirectory, "artifacts");
777var localDir = Path.Combine(env.TempDirectory, "artifacts");
796var localDir = Path.Combine(env.TempDirectory, "artifacts");
799var customPath = Path.Combine(env.TempDirectory, "custom");
808Assert.Contains($"Installing Aspire CLI to {Path.Combine(customPath, "bin")}", result.Output);
902var localDir = Path.Combine(env.TempDirectory, "artifacts");
904var customPath = Path.Combine(env.TempDirectory, "custom");
914Assert.Contains($"dotnet tool install --tool-path {Path.Combine(customPath, "bin")} Aspire.Cli", result.Output);
923var localDir = Path.Combine(env.TempDirectory, "artifacts");
944var localDir = Path.Combine(env.TempDirectory, "artifacts");
964var localDir = Path.Combine(env.TempDirectory, "artifacts");
967var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
994var localDir = Path.Combine(env.TempDirectory, "artifacts");
997var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
1022Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
1033var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt");
1056Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")),
1110var localDir = Path.Combine(env.TempDirectory, "artifacts");
1112var customPath = Path.Combine(env.TempDirectory, "custom");
1113var expectedToolPath = Path.Combine(customPath, "bin");
1136var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
1156var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
1158await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.symbols.nupkg"), "fake-symbols-nupkg-content");
1159await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.snupkg"), "fake-symbols-package-content");
1161await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13_3_0.nupkg"), "fake-invalid-version-content");
1180var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
1183await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content");
1202var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
1224var pkgDir = Path.Combine(env.TempDirectory, "pkgs");
Scripts\ReleaseScriptFunctionTests.cs (16)
372var destPath = Path.Combine(env.TempDirectory, "install-dest");
383Assert.True(File.Exists(Path.Combine(destPath, "aspire")),
393var destPath = Path.Combine(env.TempDirectory, "install-dest-zip");
404Assert.True(File.Exists(Path.Combine(destPath, "aspire.exe")),
504var cliPath = Path.Combine(env.TempDirectory, "aspire");
505var capturePath = Path.Combine(env.TempDirectory, "setup-args.txt");
580File.WriteAllText(Path.Combine(env.MockHome, ".bashrc"), "# existing config\n");
592var bashrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".bashrc"));
604File.WriteAllText(Path.Combine(env.MockHome, ".zshrc"), "# existing config\n");
616var zshrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".zshrc"));
630Path.Combine(env.MockHome, ".bashrc"),
643var bashrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".bashrc"));
676var mockBinDir = Path.Combine(env.TempDirectory, "mock-bin");
679var mockCurl = Path.Combine(mockBinDir, "curl");
713var mockBinDir = Path.Combine(env.TempDirectory, "mock-bin");
716var mockCurl = Path.Combine(mockBinDir, "curl");
Scripts\ReleaseScriptPowerShellTests.cs (18)
46Assert.False(Directory.Exists(Path.Combine(env.MockHome, ".aspire")));
80var customPath = Path.Combine(env.TempDirectory, "custom");
92var installPath = Path.Combine(env.TempDirectory, "install");
93var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
141var installPath = Path.Combine(env.TempDirectory, "install");
142var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
192var installPath = Path.Combine(env.TempDirectory, "install");
193var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
247var installPath = Path.Combine(env.TempDirectory, "install");
248var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
300var installPath = Path.Combine(env.TempDirectory, "install");
356var customPath = Path.Combine(env.TempDirectory, "custom");
430var installPath = Path.Combine(env.TempDirectory, "install");
441await File.ReadAllBytesAsync(Path.Combine(installPath, ".aspire-install.json")));
459var installPath = Path.Combine(env.TempDirectory, "install");
461var sidecarPath = Path.Combine(installPath, ".aspire-install.json");
490var installPath = Path.Combine(env.TempDirectory, "install");
519await File.ReadAllBytesAsync(Path.Combine(installPath, ".aspire-install.json")));
Scripts\ReleaseScriptShellTests.cs (22)
92var customPath = Path.Combine(env.TempDirectory, "custom-bin");
107var installPath = Path.Combine(env.TempDirectory, "install");
108var tempDir = Path.Combine(env.TempDirectory, "download");
109var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
149var installPath = Path.Combine(env.TempDirectory, "install");
150var tempDir = Path.Combine(env.TempDirectory, "download");
151var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
193var installPath = Path.Combine(env.TempDirectory, "install");
194var tempDir = Path.Combine(env.TempDirectory, "download");
195var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
241var installPath = Path.Combine(env.TempDirectory, "install");
242var tempDir = Path.Combine(env.TempDirectory, "download");
243var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
287var installPath = Path.Combine(env.TempDirectory, "install");
288var tempDir = Path.Combine(env.TempDirectory, "download");
289var capturePath = Path.Combine(env.TempDirectory, "downloads.txt");
373var installPath = Path.Combine(env.TempDirectory, "install");
384await File.ReadAllBytesAsync(Path.Combine(installPath, ".aspire-install.json")));
400var installPath = Path.Combine(env.TempDirectory, "install");
413Assert.True(File.Exists(Path.Combine(installPath, ".aspire-install.json")));
420var installPath = Path.Combine(env.TempDirectory, "install");
443await File.ReadAllBytesAsync(Path.Combine(installPath, ".aspire-install.json")));
Aspire.Azure.AI.Extensions.OpenAI.Tests (2)
Aspire.Azure.AI.Projects.Tests (1)
Aspire.Cli.EndToEnd.Tests (446)
AgentCommandTests.cs (10)
97var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json");
152var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json");
186var vscodePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".vscode");
235var vscodeMcpConfigPath = Path.Combine(vscodePath, "mcp.json");
302var vscodePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".vscode");
303var mcpConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json");
425var executablePathFile = Path.Combine(workspace.WorkspaceRoot.FullName, "cli-executable.txt");
483var copilotDirectory = scope == "project" ? Path.Combine(root, ".github", "copilot") : Path.Combine(root, ".copilot");
486(Path.Combine(copilotDirectory, "settings.json"), pluginSettings, expectedPluginSettings),
489(Path.Combine(scope == "project" ? root : Path.Combine(root, ".config", "opencode"), "opencode.jsonc"),
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)
84var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
85var aspireConfigPath = Path.Combine(projectPath, "aspire.config.json");
114var appHostPath = Path.GetFullPath(Path.Combine(projectPath, appHostRelativePath));
254var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
266Path.Combine(projectPath, "aspire.config.json"), expectConfigUpdatePreview: true);
296var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
307Path.Combine(projectPath, "aspire.config.json"), expectConfigUpdatePreview: true);
339var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
354Path.Combine(projectPath, "aspire.config.json"), expectConfigUpdatePreview: false);
CompletionTests.cs (11)
34await File.WriteAllTextAsync(Path.Combine(home.FullName, "globalsettings.json"), legacyConfig);
42var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
60Assert.Equal(string.Empty, await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "completion.stderr")));
61Assert.Equal(string.Empty, await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "suggestions.stderr")));
62Assert.Equal("completions\n", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "suggestions.txt")));
63Assert.Equal("complete -o default -F _aspire_complete aspire\n", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "registration.txt")));
66Assert.Equal(legacyConfig, await File.ReadAllTextAsync(Path.Combine(home.FullName, "globalsettings.json")));
89await File.WriteAllTextAsync(Path.Combine(fakeBin.FullName, "aspire"), ("""
110await File.ReadAllBytesAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-arguments.bin")));
111Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-executed")));
126await File.ReadAllBytesAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-arguments.bin")));
ConfigMigrationTests.cs (14)
45var aspireHomeDir = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home");
125var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
126var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
188var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
189var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
232var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
235Path.Combine(aspireHomeDir, "globalsettings.json"),
288var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
289var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
358var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
359var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
438var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
439var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json");
561var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json");
CSharpInitTests.cs (14)
28[Path.Combine(appDirectory.FullName, "package.json")] = """{"name":"existing-web","private":true}""",
29[Path.Combine(appDirectory.FullName, "Incidental.slnx")] = "<Solution />"
33existingFiles[Path.Combine(appDirectory.FullName, "aspire.config.json")] = """{"appHost":{"language":"typescript/nodejs"}}""";
66var errorOutput = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "init-error.txt"));
82var toolsDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "tools"));
83var projectPath = Path.Combine(toolsDirectory.FullName, "Incidental.csproj");
86[Path.Combine(workspace.WorkspaceRoot.FullName, "Incidental.sln")] = """
91[Path.Combine(toolsDirectory.FullName, "Incidental.slnx")] = """
124Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
125Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")));
126var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
141var description = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "resources.json")));
188var appHostCs = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
189var aspireConfigJson = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
DoctorCommandTests.cs (5)
71Path.Combine(runtimeDirectory.FullName, runtime),
108Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-runtime.txt"),
118Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-runtime.json"),
135Assert.Equal("1", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-text.exit")));
136Assert.Equal("1", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-json.exit")));
EntityFrameworkCoreDeploymentTests.cs (8)
137var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName);
138var targetRuntimePath = Path.Combine(projectDirectory, ".aspire-e2e-rid");
157var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName);
158var appHostDirectory = Path.Combine(projectDirectory, $"{ProjectName}.AppHost");
159var apiDirectory = Path.Combine(projectDirectory, $"{ProjectName}.ApiService");
162Path.Combine(appHostDirectory, "AppHost.cs"),
214Path.Combine(apiDirectory, "Program.cs"),
252var apiProjectPath = Path.Combine(apiDirectory, $"{ProjectName}.ApiService.csproj");
Helpers\CliE2ETestHelpers.cs (9)
656if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
1162var configPath = Path.Combine(projectRoot, "aspire.config.json");
1192destDir = Path.Combine(destDir, label);
1195using var logWriter = new StreamWriter(Path.Combine(
1217var destFile = Path.Combine(destDir, captureFileName);
1229? Path.Combine(githubWorkspace, "testresults")
1230: Path.Combine(AppContext.BaseDirectory, "TestResults");
1243var destFile = Path.Combine(destDir, Path.GetFileName(file));
1261CopyDirectory(dir, Path.Combine(destDir, destDirName), log);
Helpers\CliInstallStrategyTests.cs (8)
564File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.25175.1.nupkg"), "");
565File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0-preview.1.25175.1.nupkg"), "");
861File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.12345.1.nupkg"), "");
883File.WriteAllText(Path.Combine(tempDir.FullName, $"Aspire.Cli.{version}.nupkg"), "");
901File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0.nupkg"), "");
919File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0.nupkg"), "");
920File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.4.0.nupkg"), "");
939File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0.nupkg"), "");
Helpers\ConfigSourceTestContext.cs (11)
31_repository = CliE2ETestHelpers.ToContainerPath(Path.Combine(_root, "configuration source"), workspace);
50await File.WriteAllTextAsync(Path.Combine(context._root, "check-source.cs"), SourceCheckProgram, cancellationToken);
125var consentOutput = await File.ReadAllTextAsync(Path.Combine(_root, "consent.log"), _cancellationToken);
128Assert.False(Directory.Exists(Path.Combine(_root, "SourceApp")));
146Assert.Equal("accepted", await File.ReadAllTextAsync(Path.Combine(_root, "git-authenticated.txt"), _cancellationToken));
195await File.ReadAllTextAsync(Path.Combine(_root, "run.log"), _cancellationToken));
204var updateOutput = await File.ReadAllTextAsync(Path.Combine(_root, "update.log"), _cancellationToken);
254return JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_root, "actual-config.json"), _cancellationToken))!.AsObject();
258=> (await File.ReadAllTextAsync(Path.Combine(_root, "source-version.txt"), _cancellationToken)).Trim();
269await File.WriteAllTextAsync(Path.Combine(directory.FullName, "platform.json"), $$"""
286await File.WriteAllTextAsync(Path.Combine(_root, "ssh-probe.cs"), SshProbeProgram, _cancellationToken);
Helpers\IntegrationHostLifetimeTestHelper.cs (24)
13var evidence = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(recording)!, testName));
20File.Copy(Path.Combine(directory, file), Path.Combine(evidence.FullName, file), overwrite: true);
23Path.Combine(evidence.FullName, "session.log"), overwrite: true);
26Path.Combine(evidence.FullName, "processes.jsonl"),
30File.Copy(Path.Combine(directory, "restart.log"), Path.Combine(evidence.FullName, "restart.log"), overwrite: true);
34File.Copy(Path.Combine(directory, "probe-stalled.log"), Path.Combine(evidence.FullName, "probe-stalled.log"), overwrite: true);
39Path.Combine(evidence.FullName, "install-session.log"), overwrite: true);
40File.Copy(Path.Combine(directory, "install.log"), Path.Combine(evidence.FullName, "install.log"), overwrite: true);
42Path.Combine(evidence.FullName, "install-processes.json"), overwrite: true);
50var integration = Directory.CreateDirectory(Path.Combine(directory, "integration"));
53Path.Combine(integration.FullName, "host-runtime.ts"));
54File.WriteAllText(Path.Combine(integration.FullName, "host.ts"), HostSource);
55File.WriteAllText(Path.Combine(integration.FullName, "package.json"), """
90File.WriteAllText(Path.Combine(directory, "apphost.mts"), $$"""
99File.WriteAllText(Path.Combine(directory, "process-control.mjs"), ControlSource);
101var configPath = Path.Combine(directory, "aspire.config.json");
117var integrationDirectory = Path.Combine(directory, "integration");
118var manifestPath = Path.Combine(integrationDirectory, "package.json");
122File.WriteAllText(Path.Combine(integrationDirectory, "block-install"), "");
123File.WriteAllText(Path.Combine(integrationDirectory, "install-lifetime.mjs"), InstallSource);
Helpers\KubernetesDeployTestHelpers.cs (8)
362var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost");
363var apiDir = Path.Combine(projectDir, $"{projectName}.ApiService");
365Assert.True(File.Exists(Path.Combine(appHostDir, "AppHost.cs")));
366Assert.True(File.Exists(Path.Combine(apiDir, $"{projectName}.ApiService.csproj")));
372var projectFile = Path.Combine(appHostDir, $"{projectName}.AppHost.csproj");
387output.WriteLine($"Writing AppHost.cs to: {Path.Combine(appHostDir, "AppHost.cs")}");
388File.WriteAllText(Path.Combine(appHostDir, "AppHost.cs"), appHostCode);
389File.WriteAllText(Path.Combine(apiDir, "Program.cs"), apiProgramCode);
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 (17)
34CreateRestoreProbePackage(Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed"));
35Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "empty-source"));
76var configPath = Path.Combine(workDir, "aspire.config.json");
84var integrationDirectory = Directory.CreateDirectory(Path.Combine(workDir, "MyIntegration"));
87File.WriteAllText(Path.Combine(integrationDirectory.FullName, "NuGet.Config"), """
96File.WriteAllText(Path.Combine(integrationDirectory.FullName, "MyIntegration.csproj"), """
156File.WriteAllText(Path.Combine(integrationDirectory.FullName, "MyIntegrationExtensions.cs"), """
197var packagePath = Path.Combine(sourceDirectory, "Custom.RestoreProbe.1.0.0.nupkg");
246var configPath = Path.Combine(workDir, "aspire.config.json");
252var integrationDir = Path.Combine(workDir, "MyIntegration");
255File.WriteAllText(Path.Combine(integrationDir, "MyIntegration.csproj"), $$"""
270var aspireHome = Path.Combine(
272var hivesDir = Path.Combine(aspireHome, "hives");
279var packagesDir = Path.Combine(hiveDir, "packages");
295File.WriteAllText(Path.Combine(workDir, "nuget.config"), nugetConfig);
298File.WriteAllText(Path.Combine(integrationDir, "MyIntegrationExtensions.cs"), """
331File.WriteAllText(Path.Combine(workDir, "apphost.mts"), """
RepositoryToolUpdateTests.cs (11)
42var repositoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "repository");
44var npmManifestPath = Path.Combine(repositoryPath, "package.json");
45var probeDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "package-manager-probes");
46var invocationLogPath = Path.Combine(workspace.WorkspaceRoot.FullName, "package-manager-invocations.log");
49Directory.CreateDirectory(Path.Combine(repositoryPath, ".git"));
108await File.WriteAllBytesAsync(Path.Combine(repositoryPath, name), bytes, cancellationToken);
131Path.Combine(probeDirectory, tool),
217Assert.Equal(bytes, await File.ReadAllBytesAsync(Path.Combine(repositoryPath, name), cancellationToken));
223Assert.False(File.Exists(Path.Combine(repositoryPath, "lifecycle-ran")));
224Assert.False(Directory.Exists(Path.Combine(repositoryPath, "node_modules")));
225Assert.False(File.Exists(Path.Combine(repositoryPath, "aspire.config.json")));
TypeScriptCodegenValidationTests.cs (11)
79var lockFilePath = Path.Combine(
88var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
128var filePath = Path.Combine(modulesDir, file);
141var aspireTs = File.ReadAllText(Path.Combine(modulesDir, "aspire.mts"));
196var aspireModulePath = Path.Combine(modulesDir, "aspire.mts");
213var codegenHashPath = Path.Combine(modulesDir, ".codegen-hash");
232var filePath = Path.Combine(modulesDir, file);
251var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
264var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
315var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
397var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "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"), $$"""
122File.WriteAllText(Path.Combine(extensionDirectory.FullName, "DeadlockExtensions.cs"), """
162File.WriteAllText(Path.Combine(appDirectory, "apphost.mts"), """
176var configPath = Path.Combine(appDirectory, "aspire.config.json");
188var configPath = Path.Combine(appDirectory, "aspire.config.json");
TypeScriptLegacyAppHostTests.cs (9)
107var mtsPath = Path.Combine(projectRoot, "apphost.mts");
122File.WriteAllText(Path.Combine(projectRoot, "apphost.ts"), """
134var configPath = Path.Combine(projectRoot, "aspire.config.json");
145File.WriteAllText(Path.Combine(projectRoot, "tsconfig.apphost.json"), """
171var legacyModulesDir = Path.Combine(projectRoot, ".modules");
190var filePath = Path.Combine(legacyModulesDir, expectedFile);
217var filePath = Path.Combine(legacyModulesDir, unexpectedFile);
229var aspireTs = File.ReadAllText(Path.Combine(legacyModulesDir, "aspire.ts"));
234$"File path: {Path.Combine(legacyModulesDir, "aspire.ts")}.");
TypeScriptMigrateAppHostTests.cs (11)
98var mtsPath = Path.Combine(projectRoot, "apphost.mts");
112File.WriteAllText(Path.Combine(projectRoot, "apphost.ts"), """
122var configPath = Path.Combine(projectRoot, "aspire.config.json");
130File.WriteAllText(Path.Combine(projectRoot, "tsconfig.apphost.json"), """
157var legacyAppHost = Path.Combine(projectRoot, "apphost.ts");
165var modernAppHost = Path.Combine(projectRoot, "apphost.mts");
181var legacyModulesDir = Path.Combine(projectRoot, ".modules");
198var filePath = Path.Combine(modernModulesDir, expectedFile);
206var aspireMts = File.ReadAllText(Path.Combine(modernModulesDir, "aspire.mts"));
211$"File path: {Path.Combine(modernModulesDir, "aspire.mts")}.");
215var tsconfig = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "tsconfig.apphost.json")))!.AsObject();
TypeScriptPolyglotTests.cs (25)
82var viteProjectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "viteapp");
98var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
121var appHostLockFilePath = Path.Combine(
128var viteLockFilePath = Path.Combine(
197var viteProjectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "viteapp");
208var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
227var appHostLockFilePath = Path.Combine(
234var guestLockFilePath = Path.Combine(
283var lockFilePath = Path.Combine(
352var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
360var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
361var restartCountPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".deno-watch-restart-count");
426Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"),
448var packageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "package.json")))!.AsObject();
454originalTsConfig = File.ReadAllText(Path.Combine(projectRoot, "tsconfig.json"));
456File.WriteAllText(Path.Combine(projectRoot, "package.json"), packageJson.ToJsonString(new JsonSerializerOptions { WriteIndented = true }));
479packageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(projectRoot, "package.json")))!.AsObject();
496Assert.Equal(originalTsConfig, File.ReadAllText(Path.Combine(projectRoot, "tsconfig.json")));
497Assert.False(File.Exists(Path.Combine(projectRoot, "tsconfig.apphost.json")));
498Assert.False(File.Exists(Path.Combine(projectRoot, "apphost.mts")));
500var appHostDirectory = Path.Combine(projectRoot, "aspire-apphost");
501var appHostPath = Path.Combine(appHostDirectory, "apphost.mts");
504var appHostPackageJson = JsonNode.Parse(File.ReadAllText(Path.Combine(appHostDirectory, "package.json")))!.AsObject();
516Assert.True(File.Exists(Path.Combine(appHostDirectory, "tsconfig.apphost.json")));
519var configPath = Path.Combine(projectRoot, "aspire.config.json");
TypeScriptPublishTests.cs (13)
51var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
123var artifactsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "artifacts");
129.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(chartPath, "values.yaml")), "yaml")
140var failureLog = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "callback-failure.log"));
186var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
271var artifactsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "artifacts");
272var composeContent = await File.ReadAllTextAsync(Path.Combine(artifactsPath, "docker-compose.yaml"));
362var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
437var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
478var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
511Path.Combine(s_jsPublishFixturesDir, fixtureName),
512Path.Combine(workspace.WorkspaceRoot.FullName, fixtureName));
518var 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 (3478)
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}\"}}");
Acquisition\InstallSourceDetectorTests.cs (19)
26File.WriteAllText(Path.Combine(binaryDirectory.FullName, InstallSidecarReader.SidecarFileName), $$"""{"source":"{{source}}"}""");
31var detector = CreateDetector(Path.Combine(binaryDirectory.FullName, "aspire.exe"), environment, new TestWindowsRegistryReader(true));
47File.WriteAllText(Path.Combine(workspace.Path, InstallSidecarReader.SidecarFileName), sidecar);
49var detector = CreateDetector(Path.Combine(workspace.Path, "aspire"), TestEnvironment.CreateLinux());
74var detector = CreateDetector(Path.Combine(workspace.Path, "dotnet"), environment);
91var detector = CreateDetector(Path.Combine(workspace.Path, "aspire"), environment);
102var processPath = Path.Combine(workspace.Path, "aspire.exe");
125var detector = CreateDetector(Path.Combine(workspace.Path, "aspire"), TestEnvironment.CreateLinux(), registry);
138var detector = CreateDetector(Path.Combine(workspace.Path, "aspire.exe"), TestEnvironment.CreateWindows(), registry);
161var processPath = Path.Combine(workspace.Path, relativePath.Replace('/', Path.DirectorySeparatorChar));
181[variable] = Path.Combine(workspace.Path, root) + Path.DirectorySeparatorChar
183var processPath = Path.Combine(workspace.Path, relativePath.Replace('/', Path.DirectorySeparatorChar));
203var installsRoot = variable == "MISE_DATA_DIR" ? Path.Combine(processRoot, "installs") : processRoot;
236File.WriteAllText(Path.Combine(directory.FullName, InstallSidecarReader.SidecarFileName), sidecar);
242var detector = CreateDetector(Path.Combine(directory.FullName, "aspire"), environment);
253var processPath = Path.Combine(workspace.Path, relativePath.Replace('/', Path.DirectorySeparatorChar));
265var processPath = Path.Combine(installDirectory.FullName, "aspire");
267File.WriteAllText(Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName), """{"source":"brew"}""");
268var linkPath = Path.Combine(workspace.Path, "aspire");
Agents\AgentConfigurationTests.cs (31)
32var path = Path.Combine(_context.Project.FullName, "settings.json");
55var path = Path.Combine(_context.Project.FullName, "settings.json");
81var path = Path.Combine(_context.Project.FullName, "settings.json");
108var path = Path.Combine(_context.Project.FullName, "settings.json");
133var directory = Path.Combine(_context.Project.FullName, "missing");
134var path = Path.Combine(directory, "settings.json");
151var path = Path.Combine(_context.Project.FullName, "settings.json");
173var path = Path.Combine(_context.Project.FullName, "settings.json");
242var directory = Path.Combine(_context.ClaudeManagedDirectory, "managed-settings.d");
243var fragment = Path.Combine(directory, "team.json");
278var directory = Path.Combine(_context.ClaudeManagedDirectory, "managed-settings.d");
285await File.WriteAllTextAsync(Path.Combine(directory, ".ignored.json"), "{malformed");
324var path = Path.Combine(_context.Project.FullName, "settings.json");
325var target = Path.Combine(_context.Project.FullName, "linked.json");
355var path = Path.Combine(_context.Project.FullName, "settings.json");
401var path = Path.Combine(_context.Project.FullName, "settings.json");
434var path = Path.Combine(_context.Project.FullName, "settings.json");
461var path = Path.Combine(_context.Project.FullName, "settings.json");
537Assert.Equal(Path.Combine(_context.CopilotDirectory, "settings.json"), Assert.Single(userResults).TargetPath);
539var user = await File.ReadAllTextAsync(Path.Combine(_context.CopilotDirectory, "settings.json")).DefaultTimeout();
541Assert.False(Directory.Exists(Path.Combine(_context.Project.FullName, ".vscode")));
549var userPath = Path.Combine(_context.ClaudeDirectory, "settings.json");
614: Path.Combine(_context.ClaudeManagedDirectory, "managed-settings.json");
649var user = Path.Combine(_context.ClaudeDirectory, "settings.json");
667var custom = Path.Combine(_context.Home.FullName, "claude-work");
669var state = Path.Combine(custom, ".claude.json");
676Assert.True(File.Exists(Path.Combine(custom, "settings.json")));
677Assert.False(File.Exists(Path.Combine(_context.Home.FullName, ".claude.json")));
714_context.SetVariable("COPILOT_HOME", Path.Combine(_context.ClaudeDirectory, suffix));
715var path = Path.Combine(_context.ClaudeDirectory, "settings.json");
719Path.Combine(_context.ClaudeManagedDirectory, "managed-settings.json"),
Agents\AgentPathTests.cs (6)
26: Path.Combine(_context.Home.FullName, relative.Replace('/', Path.DirectorySeparatorChar));
29Assert.Equal(Path.Combine(expected, ".claude.json"), ClaudeCodePaths.GetGlobalMcpConfigPath(_context.ExecutionContext, _context.Environment));
41var expected = Path.Combine(_context.Home.FullName, "custom-config");
44Assert.Equal(Path.Combine(expected, "settings.json"),
46Assert.Equal(Path.Combine(expected, "mcp-config.json"),
55Assert.Equal(Path.Combine(_context.Project.FullName, "~other-user"), AgentPath.Expand("~other-user", _context.ExecutionContext));
Agents\AspireSkillsBundleTests.cs (15)
47Assert.Contains(files, file => file.RelativePath == Path.Combine("references", "app-commands.md"));
48Assert.DoesNotContain(files, file => file.RelativePath == Path.Combine("evals", "evals.json"));
145var skillPath = Path.Combine(skillDirectory, "SKILL.md");
189await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), CreateSkillFileContent());
232await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), "{");
557var skillPath = Path.Combine(skillDirectory, "SKILL.md");
609var archivePath = Path.Combine(rootDirectory, "bundle.zip");
620new DirectoryInfo(Path.Combine(rootDirectory, "staged")),
638var skillPath = Path.Combine(skillDirectory, "SKILL.md");
663await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
684var skillPath = Path.Combine(skillDirectory, "SKILL.md");
842var fullPath = Path.Combine(skillDirectory, AspireSkillsBundleProvider.NormalizeRelativePath(relativePath));
862Sha512 = hashOverride ?? ComputeSha512(Path.Combine(skillDirectory, AspireSkillsBundleProvider.NormalizeRelativePath(file.Key)))
885await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), content);
908return File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
Agents\AspireSkillsInstallerTests.cs (53)
88var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
110var cacheLockPath = Path.Combine(cacheRoot, $".{AspireSkillsInstaller.Version}.lock");
232Assert.True(File.Exists(Path.Combine(
285Assert.False(File.Exists(Path.Combine(
348await File.ReadAllTextAsync(Path.Combine(
353await File.ReadAllTextAsync(Path.Combine(
410await File.ReadAllTextAsync(Path.Combine(
460Assert.False(File.Exists(Path.Combine(cachedBundleDirectory, "skill-manifest.json")));
461Assert.False(Directory.Exists(Path.Combine(cachedBundleDirectory, "skills")));
467await File.ReadAllTextAsync(Path.Combine(
490await File.WriteAllTextAsync(Path.Combine(cachedBundleDirectory, "skill-manifest.json"), "{");
523Directory.CreateDirectory(Path.Combine(cachedBundleDirectory, ".lastused"));
564Path.Combine(staleCacheDirectory, ".lastused"),
595var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
596var staleVersionDirectory = Path.Combine(cacheRoot, "9.9.9");
640var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
641var staleVersionDirectory = Path.Combine(cacheRoot, "9.9.9");
643var staleCacheDirectory = Path.Combine(staleVersionDirectory, staleArchiveSha512);
687var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
720var staleVersionLockPath = Path.Combine(cacheRoot, $".{staleVersion}.lock");
756var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
764var staleVersionLockPath = Path.Combine(cacheRoot, $".{staleVersion}.lock");
900var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
903Path.Combine(cacheRoot, $".{AspireSkillsInstaller.Version}.lock"),
947var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
954var staleDirectory = Directory.CreateDirectory(Path.Combine(cacheRoot, $"{prefix}stale")).FullName;
957recentDirectories.Add(Directory.CreateDirectory(Path.Combine(cacheRoot, $"{prefix}recent")).FullName);
1019var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "aspire-skills");
1426Assert.Equal(Path.Combine("references", "compatibility-and-validation.md"), compatibilityReference.RelativePath);
1431Assert.Equal(Path.Combine("references", "migration-patterns.md"), migrationPatternsReference.RelativePath);
1448var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1481var stageDirectory = new DirectoryInfo(Path.Combine(rootDirectory, ".stage-test"));
1482var targetDirectory = Path.Combine(rootDirectory, "cached");
1493Assert.True(File.Exists(Path.Combine(targetDirectory, "skill-manifest.json")));
1509var archivePath = Path.Combine(rootDirectory, "bundle.tgz");
1514var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1539var archivePath = Path.Combine(rootDirectory, "bundle.tgz");
1543var bundleDirectory = Path.Combine(rootDirectory, "bundle");
1568var bundleDirectory = new DirectoryInfo(Path.Combine(rootDirectory, "bundle"));
1642await File.ReadAllTextAsync(Path.Combine(
1647await File.ReadAllTextAsync(Path.Combine(
1809Assert.False(File.Exists(Path.Combine(
2047var skillPath = Path.Combine(skillDirectory, "SKILL.md");
2081await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), manifestJson);
2085await File.WriteAllTextAsync(Path.Combine(bundleDirectory, AspireSkillsInstaller.ArchiveSha512FileName), archiveSha512);
2091Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubArchiveSha256FileName),
2098Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubAttestationVerifiedFileName),
2106Path.Combine(cacheDirectory, ".lastused"),
2130var bundleDirectory = Path.Combine(rootDirectory, $"aspire-skills-v{AspireSkillsInstaller.Version}");
2135Path.Combine(bundleDirectory, AspireSkillsInstaller.GitHubAttestationVerifiedFileName),
2140await File.WriteAllTextAsync(Path.Combine(bundleDirectory, "skill-manifest.json"), "{");
2187return Path.Combine(
2316var archivePath = Path.Combine(bundleDirectory.FullName, $".test-embedded-{Guid.NewGuid():N}.tgz");
Agents\CopilotAppInstallationDetectorTests.cs (7)
19Path.Combine(appDirectory.FullName, "github.exe"),
26var executablePath = Path.Combine(appDirectory.FullName, "github.exe");
63Path.Combine(applicationsDirectory.FullName, "github-copilot.desktop"),
70var desktopEntryPath = Path.Combine(applicationsDirectory.FullName, "github-copilot.desktop");
113Path.Combine(dataHome.FullName, "applications"),
114Path.Combine(firstDataDirectory.FullName, "applications"),
115Path.Combine(secondDataDirectory.FullName, "applications"),
Agents\OpenCodeAgentClientTests.cs (26)
19var workingDirectory = _context.Project.CreateSubdirectory(Path.Combine("apps", "api"));
22var nestedConfig = Path.Combine(workingDirectory.FullName, "opencode.json");
28Assert.Equal(Path.Combine(_context.Project.FullName, "opencode.jsonc"), target);
46var lowerPath = Path.Combine(_context.Project.FullName, "opencode.json");
74var json = Path.Combine(_context.Project.FullName, "opencode.json");
104var json = Path.Combine(directory, "opencode.json");
125var json = Path.Combine(_context.Project.FullName, "opencode.json");
144var path = Path.Combine(_context.Project.FullName, "opencode.json");
156var path = Path.Combine(_context.Project.FullName, "opencode.json");
190var root = Path.Combine(_context.Project.FullName, "opencode.jsonc");
214var path = Path.Combine(_context.Project.FullName, "opencode.json");
240var path = Path.Combine(_context.Project.FullName, "opencode.json");
250await AgentConfigurationTestContext.WriteAsync(Path.Combine(_context.OpenCodeDirectory, "opencode.json"), inherited);
257Assert.Equal(inherited, await File.ReadAllTextAsync(Path.Combine(_context.OpenCodeDirectory, "opencode.json")));
265var path = Path.Combine(_context.Project.FullName, "opencode.json");
266var global = Path.Combine(_context.OpenCodeDirectory, "opencode.json");
291var path = Path.Combine(_context.Project.FullName, "opencode.json");
307var json = Path.Combine(directory, "opencode.json");
308var jsonc = Path.Combine(directory, "opencode.jsonc");
345: Path.Combine(_context.Home.FullName, "custom-opencode");
346_context.SetVariable("OPENCODE_CONFIG_DIR", relative ? Path.Combine("~", "custom-opencode") : customDirectory);
347var inherited = Path.Combine(_context.OpenCodeDirectory, "opencode.json");
355Assert.Equal(Path.Combine(customDirectory, "opencode.jsonc"), result.TargetPath);
369var customDirectory = Path.Combine(_context.Home.FullName, "custom-opencode");
372var other = Path.Combine(customDirectory, "opencode.jsonc");
373var normal = Path.Combine(_context.OpenCodeDirectory, "opencode.json");
Agents\PlaywrightCliInstallerTests.cs (59)
22var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
41await File.WriteAllTextAsync(Path.Combine(directory, "SKILL.md"), "existing skill");
42await File.WriteAllTextAsync(Path.Combine(directory, "stale.md"), "existing reference");
54Directory.CreateDirectory(Path.Combine(directory, "references"));
55File.WriteAllText(Path.Combine(directory, "SKILL.md"), "generated skill");
61File.WriteAllText(Path.Combine(generatedDirectory, "SKILL.md"), "unselected generated skill");
132var blockedPath = Path.Combine(root.FullName, "blocked");
135var destination = Path.Combine(root.FullName, "skills");
184new HashSet<string> { Path.Combine(root.FullName, "skills") }, CancellationToken.None);
218var skillFile = Path.Combine(skillDirectory, "SKILL.md");
227var destination = Path.Combine(root.FullName, "skills");
318var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}");
419var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
421var tarballPath = Path.Combine(tempDir, "package.tgz");
467var tarballPath = Path.Combine(tempDir, "package.tgz");
510var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
512var tarballPath = Path.Combine(tempDir, "package.tgz");
554var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
556var tarballPath = Path.Combine(tempDir, "package.tgz");
603var tempPath = Path.Combine(tempDir, "package.tgz");
695var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}");
697var tarballPath = Path.Combine(tempDir, "package.tgz");
849var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-mirror-test-{Guid.NewGuid():N}");
864File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill");
865Directory.CreateDirectory(Path.Combine(skillDir, "subdir"));
882Path.Combine(".claude", "skills"),
883Path.Combine(".agents", "skills")
910var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-sync-test-{Guid.NewGuid():N}");
911var sourceDir = Path.Combine(tempDir, "source");
912var targetDir = Path.Combine(tempDir, "target");
918File.WriteAllText(Path.Combine(sourceDir, "keep.md"), "keep");
922File.WriteAllText(Path.Combine(targetDir, "keep.md"), "old content");
923File.WriteAllText(Path.Combine(targetDir, "stale.md"), "should be removed");
924Directory.CreateDirectory(Path.Combine(targetDir, "stale-dir"));
930Assert.Equal("keep", File.ReadAllText(Path.Combine(targetDir, "keep.md")));
933Assert.False(File.Exists(Path.Combine(targetDir, "stale.md")));
934Assert.False(Directory.Exists(Path.Combine(targetDir, "stale-dir")));
948var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-cleanup-test-{Guid.NewGuid():N}");
963File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill");
980Path.Combine(".agents", "skills")
1002var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-preexist-test-{Guid.NewGuid():N}");
1010await File.WriteAllTextAsync(Path.Combine(preExistingDir, "SKILL.md"), "# User's existing skill");
1032Path.Combine(".agents", "skills")
1051var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-emptydir-test-{Guid.NewGuid():N}");
1066File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill");
1082Path.Combine(".agents", "skills")
1089Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude")));
1103var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
1117Path.Combine(".claude", "skills"));
1120Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude")));
1135var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
1149Path.Combine(".claude", "skills"));
1167var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
1183Assert.False(Directory.Exists(Path.Combine(tempDir, ".agents")));
1199var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}");
1215Path.Combine("a", "b"));
1222Assert.True(Directory.Exists(Path.Combine(tempDir, "a")));
1260PackResult = Path.Combine(outputDirectory, "package.tgz");
1321File.WriteAllText(Path.Combine(directory, "SKILL.md"), "# Playwright CLI Skill");
Agents\TelemetryHookConfiguratorTests.cs (18)
69var copilotHome = Path.Combine(workspace.WorkspaceRoot.FullName, "copilot-home-file");
102Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot")));
150var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
151var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
189var claude = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
190await File.WriteAllTextAsync(Path.Combine(claude.FullName, "settings.json"),
215var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
216var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
239var claude = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
244: Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
249["args"] = new JsonArray(Path.Combine(workspace.Path, assemblyName), "agent", "telemetry", "--hook")
262await File.WriteAllTextAsync(Path.Combine(claude.FullName, "settings.json"), settings.ToJsonString());
282var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
283var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
299var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude"));
300var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json");
328Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot")));
329Assert.False(Directory.Exists(Path.Combine(home.FullName, ".claude")));
Backchannel\AppHostConnectionResolverTests.cs (13)
33var configPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
58Assert.False(File.Exists(Path.Combine(projectFile.Directory!.FullName, AspireConfigFile.FileName)));
98string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")),
130string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")),
336var realProjectFile = new FileInfo(Path.Combine(realDirectory.FullName, "TestAppHost.csproj"));
340var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
342var projectFileViaSymlink = new FileInfo(Path.Combine(symlinkDirectory, "TestAppHost.csproj"));
380var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "TestAppHost.csproj"));
427Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
541Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
601var commonGitDirectory = Path.Combine(primaryCheckout.FullName, ".git");
611var projectFile = new FileInfo(Path.Combine(directory.FullName, fileName));
631var socketPath = Path.Combine(
Backchannel\AuxiliaryBackchannelMonitorTests.cs (34)
31CreateLiveOwnerSocketPath(homeDirectory), Path.Combine(homeDirectory.FullName, "MyApp.AppHost.csproj"));
75var appHostPath = Path.Combine(homeDirectory.FullName, "MyApp.AppHost.csproj");
123var actualPath = Path.Combine(directory.FullName, "CaseSensitive.AppHost.csproj");
150var uppercaseDirectoryPath = Path.Combine(
159var lowercaseAppHostPath = Path.Combine(lowercaseDirectory.FullName, "AppHost.csproj");
160var uppercaseAppHostPath = Path.Combine(uppercaseDirectory.FullName, "AppHost.csproj");
189var existingPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Existing.AppHost.csproj");
190var missingPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Missing.AppHost.csproj");
216var actualPath = Path.Combine(caseSensitiveDirectory.FullName, "CaseSensitive.AppHost.csproj");
217var caseVariant = Path.Combine(caseSensitiveDirectory.FullName, "casesensitive.apphost.csproj");
248var firstTarget = Path.Combine(workspace.WorkspaceRoot.FullName, "first.csproj");
249var secondTarget = Path.Combine(workspace.WorkspaceRoot.FullName, "second.csproj");
252var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "current.csproj");
289var appHostPath = Path.Combine(homeDirectory.FullName, "MyApp.AppHost.csproj");
391var compactPath = Path.Combine(compactDirectory, $"{BackchannelConstants.ComputeAppHostId("AppHost.cs")}a1b2C3d4.{int.MaxValue}");
392var legacyPath = Path.Combine(legacyDirectory, $"auxi.sock.abc123def4567890.{int.MaxValue}");
459var socketPath = Path.Combine(homeDirectory.FullName, "stale-socket");
497var realDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "real"));
498var symlinkDirectory = Path.Combine(tempRoot.FullName, "link");
502var appHostPathViaReal = Path.Combine(realDirectory.FullName, "apphost.cs");
506var appHostPathViaSymlink = Path.Combine(symlinkDirectory, "apphost.cs");
521var workingDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "wd")).FullName;
546Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
548TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
550var primaryAppHost = Path.Combine(primaryRoot, "AppHost.csproj");
551var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj");
571Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
577var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
593Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
595var adminDirectory = TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
598var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
756var appHostId = BackchannelConstants.ComputeAppHostId(Path.Combine(homeDirectory.FullName, "MyApp.AppHost.csproj"));
757var socketPath = Path.Combine(backchannelsDirectory, $"{appHostId}a1b2C3d4.{Environment.ProcessId}");
789logFilePath: Path.Combine(homeDirectory.FullName, "test.log"),
Backchannel\BackchannelConstantsTests.cs (21)
16var homeDirectory = Path.Combine(Path.GetTempPath(), "testuser");
252var socket1 = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
253var socket2 = Path.Combine(backchannelsDir, $"{appHostId}Z9y8X7w6.67890");
257var otherSocket = Path.Combine(backchannelsDir, "differentId1a1b2C3d4.99999");
279var oldFormatSocket = Path.Combine(legacyBackchannelsDir, $"auxi.sock.{hash}");
282var legacyPidSocket = Path.Combine(legacyBackchannelsDir, $"auxi.sock.{hash}.12345");
306var badSeparator = Path.Combine(backchannelsDir, $"{appHostId}AbCdEfGhX12345");
310var badPid = Path.Combine(backchannelsDir, $"{appHostId}AbCdEfGh.notapid");
329var otherSocket = Path.Combine(backchannelsDir, "differentId1a1b2C3d4.99999");
355var orphanedSocket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.{deadPid}");
356var liveSocket = Path.Combine(backchannelsDir, $"{appHostId}Z9y8X7w6.{currentPid}");
357var pidlessSocket = Path.Combine(backchannelsDir, appHostId);
386var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
389var projectFileViaSymlink = Path.Combine(symlinkDirectory, "TestAppHost.csproj");
409var socketPath = Path.Combine(backchannelsDirectory, $"{appHostId}A{index:D7}.{currentPid}");
438var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
441var realProjectPath = Path.Combine(realDirectory.FullName, "TestAppHost.csproj");
443var projectFileViaSymlink = Path.Combine(symlinkDirectory, "TestAppHost.csproj");
524var socket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
555var socket = Path.Combine(backchannelsDir, $"{appHostId}a1b2C3d4.12345");
585var legacySocket = Path.Combine(backchannelsDir, $"auxi.sock.{legacyHash}.a1b2c3d4e5f6.99999");
BundleServiceComputeDefaultExtractDirTests.cs (17)
32var prefixDir = Path.Combine(workspace.Path, "aspire");
33var binDir = Path.Combine(prefixDir, "bin");
36var binaryPath = Path.Combine(binDir, ExeName("aspire"));
38File.WriteAllText(Path.Combine(binDir, SidecarFileName), $"{{\"source\":\"{source}\"}}");
56var binDir = Path.Combine(prDir, "bin");
59var binaryPath = Path.Combine(binDir, ExeName("aspire"));
61File.WriteAllText(Path.Combine(binDir, SidecarFileName), "{\"source\":\"pr\"}");
79var binaryPath = Path.Combine(installDir, "aspire.exe");
81File.WriteAllText(Path.Combine(installDir, SidecarFileName), "{\"source\":\"winget\"}");
105var cellarBinary = Path.Combine(cellarDir, "aspire");
107File.WriteAllText(Path.Combine(cellarDir, SidecarFileName), "{\"source\":\"brew\"}");
109var brewBinDir = Path.Combine(workspace.Path, "bin");
111var symlinkPath = Path.Combine(brewBinDir, "aspire");
144var binaryPath = Path.Combine(ridDir, ExeName("aspire"));
146File.WriteAllText(Path.Combine(ridDir, SidecarFileName), "{\"source\":\"dotnet-tool\"}");
161var binDir = Path.Combine(prefixDir, "bin");
164var binaryPath = Path.Combine(binDir, ExeName("aspire"));
BundleServiceIntegrationTests.cs (49)
49var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
55var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
161var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
209var v1BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v1", "cli-v1");
210var v2BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v2", "cli-v2-longer");
223var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
264var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
268Directory.CreateDirectory(Path.Combine(versionsDir, "stale-aaaaaaaaaaaaaaaa"));
269Directory.CreateDirectory(Path.Combine(versionsDir, $"stale{BundleService.TempSuffixPrefix}deadbeef"));
270Directory.CreateDirectory(Path.Combine(versionsDir, $"stale{BundleService.BadSuffixPrefix}99999"));
305Assert.False(Directory.Exists(Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)));
314var destinationPath = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
315var lockedFilePath = Path.Combine(sourcePath, "locked.dll");
346var binDir = Path.Combine(layoutRoot, ".fake-bins");
354File.WriteAllText(Path.Combine(binDir, ".aspire-install.json"), "{\"source\":\"script\"}");
360var versionsDir = Path.Combine(layoutRoot, BundleService.VersionsDirectoryName);
377var expectedTrayPath = includeTray ? Path.Combine(v1VersionDir, TrayExecutablePath) : null;
401var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
402var staleVersionDir = Path.Combine(versionsDir, "stale-version");
416var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
417var staleVersionDir = Path.Combine(versionsDir, "stale-version");
418var leasesDir = Path.Combine(staleVersionDir, BundleVersionLease.LeasesDirectoryName);
420File.WriteAllText(Path.Combine(leasesDir, "orphan.lease"), "{}");
437var versionsDir = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
438var staleVersionDir = Path.Combine(versionsDir, "stale-version");
439var leasesDir = Path.Combine(staleVersionDir, BundleVersionLease.LeasesDirectoryName);
441File.WriteAllText(Path.Combine(leasesDir, "unknown.lease"), "{}");
497File.WriteAllText(Path.Combine(ridDir, ".aspire-install.json"), "{\"source\":\"dotnet-tool\"}");
505var bundleLink = Path.Combine(ridDir, BundleDiscovery.BundleDirectoryName);
571var bundleLink = Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName);
582Directory.Exists(Path.Combine(binaryDir, BundleDiscovery.BundleDirectoryName)),
585Directory.Exists(Path.Combine(Path.GetDirectoryName(binaryDir)!, BundleDiscovery.BundleDirectoryName)),
591var versionsDir = Path.Combine(aspireHome, BundleService.VersionsDirectoryName);
632Assert.True(Directory.Exists(Path.Combine(dest, BundleDiscovery.DcpDirectoryName)));
647var v1BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v1", "cli-v1");
648var v2BinaryPath = CreateFakeCliBinary(Path.Combine(layoutRoot, ".fake-bins"), "aspire-v2", "cli-v2-longer");
656var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
785var linkPath = Path.Combine(layoutRoot, dir);
805var path = Path.Combine(directory, name);
818var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
819var managedDir = Path.Combine(bundleDir, BundleDiscovery.ManagedDirectoryName);
820var dcpDir = Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName);
822var managedExe = Path.Combine(managedDir, managedExeName);
835Managed = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName),
836Dashboard = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DashboardDirectoryName),
837Dcp = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName),
844var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
849LayoutComponent.Dashboard => Path.Combine(bundleDir, BundleDiscovery.DashboardDirectoryName),
850LayoutComponent.Dcp => Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName),
BundleServiceTests.cs (23)
77var processPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
147var dashboardDir = Path.Combine(dir, BundleDiscovery.DashboardDirectoryName);
148var dashboardExe = Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
162File.WriteAllText(Path.Combine(frameworkDir, "blazor.web.js"), "blazor");
164File.WriteAllText(Path.Combine(dashboardDir, sqliteLibraryName), "sqlite");
205var frameworkDir = Path.Combine(wwwrootDir, "_framework");
206var blazorScript = Path.Combine(frameworkDir, "blazor.web.js");
235Directory.Delete(Path.Combine(dir, BundleDiscovery.DcpDirectoryName), recursive: true);
246File.Delete(BundleDiscovery.GetDcpExecutablePath(Path.Combine(dir, BundleDiscovery.DcpDirectoryName)));
283var versionsRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleService.VersionsDirectoryName);
287Directory.CreateDirectory(Path.Combine(versionsRoot, active));
288Directory.CreateDirectory(Path.Combine(versionsRoot, "stale-bbbbbbbbbbbbbbbb"));
289Directory.CreateDirectory(Path.Combine(versionsRoot, $"active{BundleService.TempSuffixPrefix}deadbeef"));
290Directory.CreateDirectory(Path.Combine(versionsRoot, $"active{BundleService.BadSuffixPrefix}99999"));
294Assert.True(Directory.Exists(Path.Combine(versionsRoot, active)));
311Directory.CreateDirectory(Path.Combine(dir, BundleDiscovery.BundleDirectoryName));
325var managedDir = Path.Combine(root, BundleDiscovery.ManagedDirectoryName);
328Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
331var dashboardDir = Path.Combine(root, BundleDiscovery.DashboardDirectoryName);
334Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
338File.WriteAllText(Path.Combine(frameworkDir, "blazor.web.js"), "blazor");
341File.WriteAllText(Path.Combine(dashboardDir, sqliteLibraryName), "sqlite");
343var dcpDir = Path.Combine(root, BundleDiscovery.DcpDirectoryName);
Caching\AppHostInfoDiskCacheTests.cs (30)
36var path = Path.Combine(workspace.WorkspaceRoot.FullName, name);
170var objDir = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "obj"));
171var assetsPath = Path.Combine(objDir.FullName, "project.assets.json");
189File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"), "<Project />");
199File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
289var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
296var commonProps = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Common.props");
353var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
364var sharedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "shared"));
365var sharedProps = Path.Combine(sharedDirectory.FullName, "Directory.Build.props");
390var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
398var sharedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "shared"));
399var sharedProps = Path.Combine(sharedDirectory.FullName, "Directory.Build.props");
423var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
448var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
477var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
484File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Common"), "");
485var commonProps = Path.Combine(workspace.WorkspaceRoot.FullName, "Aspire.Common.props");
557var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
562File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"), """
593var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyHost.csproj"));
600File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Repo.marker"), "");
601var customProps = Path.Combine(workspace.WorkspaceRoot.FullName, "Custom.props");
725projectDir = Directory.CreateDirectory(Path.Combine(projectDir, $"level-{i}")).FullName;
728var projectFile = new FileInfo(Path.Combine(projectDir, "Deep.AppHost.csproj"));
732File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"), "<Project />");
743var parentImport = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props");
746var repoRoot = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "worktree-root"));
748Path.Combine(repoRoot.FullName, ".git"),
752var projectFile = new FileInfo(Path.Combine(projectDir.FullName, "AppHost.csproj"));
Certificates\UnixCertificateManagerTests.cs (21)
212var missingProfileDirectory = Path.Combine(homeDirectory.FullName, "missing-profile");
247var missingProfileDirectory = Path.Combine(homeDirectory.FullName, "missing-profile");
360var certificatePath = Path.Combine(homeDirectory.FullName, "certificate with spaces.pem");
386var certificatePath = Path.Combine(homeDirectory.FullName, "certificate with spaces.pem");
407var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb"));
408var parentPidFile = Path.Combine(tempDirectory.FullName, "certutil-parent.pid");
409var childPidFile = Path.Combine(tempDirectory.FullName, "certutil-child.pid");
458var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb"));
499["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"),
501["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db")
507var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{certificate.Thumbprint}.pem");
534["PATH"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-tools"),
536["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-nss-db")
543File.WriteAllText(Path.Combine(corruptOpenSslDirectory.FullName, certificateFileName), "not a certificate");
544File.WriteAllText(Path.Combine(validOpenSslDirectory.FullName, certificateFileName), certificate.ExportCertificatePem());
569["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"),
570["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db"),
578var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{savedCertificate.Thumbprint}.pem");
604["PATH"] = Path.Combine(nssDbDirectory.FullName, "missing-certutil"),
631var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil"));
655var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil"));
CliBootstrapTests.cs (20)
153Assert.Equal(Path.Combine(aspireHome.FullName, "cache"), context.CacheDirectory.FullName);
157var cacheDirectory = Path.Combine(context.CacheDirectory.FullName, "tuf");
158foreach (var directory in new[] { cacheDirectory, Path.Combine(cacheDirectory, "targets") })
187Directory.CreateDirectory(Path.Combine(tufDirectory.FullName, "targets"));
259Assert.Equal(Path.Combine(aspireHome.FullName, "cache"), context.CacheDirectory.FullName);
260var cacheDirectory = Path.Combine(context.CacheDirectory.FullName, "tuf");
310File.WriteAllText(Path.Combine(aspireHome.FullName, AspireConfigFile.FileName), globalConfig);
345var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
350Assert.Equal(Path.Combine(installPrefix, "logs"), loggingOptions.LogsDirectory);
358var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
361var logsDirectory = Path.Combine(installPrefix, "logs");
362var logFilePath = Path.Combine(logsDirectory, "aspire.log");
379Assert.Equal(Path.Combine(installPrefix, "hives"), context.HivesDirectory.FullName);
380Assert.Equal(Path.Combine(installPrefix, "cache"), context.CacheDirectory.FullName);
381Assert.Equal(Path.Combine(installPrefix, "sdks"), context.SdksDirectory.FullName);
382Assert.Equal(Path.Combine(installPrefix, "packages"), context.PackagesDirectory?.FullName);
408logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"),
430logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"),
495var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
498File.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 (59)
398var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
400File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
471var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
473File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
552var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
554File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
651var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
655File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), $$"""
738var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.ts"));
740File.WriteAllText(Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), """
745File.WriteAllText(Path.Combine(invocationDirectory.FullName, "nuget.config"), """
750File.WriteAllText(Path.Combine(projectDirectory.FullName, "nuget.config"), """
799var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
872var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
874File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
1461var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
1463File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
2124File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
2150Assert.True(File.Exists(Path.Combine(dir.FullName, "NuGet.Config")));
2648var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, isTypeScript ? "apphost.ts" : "AppHost.csproj"));
2653File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), $$"""
2757var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
2759File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """
2943File.WriteAllText(Path.Combine(packagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty);
2944File.WriteAllText(Path.Combine(packagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty);
2960var parentConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
2994var config = XDocument.Load(Path.Combine(projectDirectory.FullName, "nuget.config"));
3008var higherPrecedenceConfigPath = Path.Combine(projectWithMappingDisabled.FullName, "nuget.config");
3030Path.Combine(projectWithoutInheritedMapping.FullName, "nuget.config"));
3048File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty);
3049File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty);
3086File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty);
3087File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty);
3089File.WriteAllText(Path.Combine(prPackagesDir.FullName, $"Aspire.Hosting.{staleVersion}.nupkg"), string.Empty);
3090File.WriteAllText(Path.Combine(prPackagesDir.FullName, $"Aspire.Hosting.Redis.{staleVersion}.nupkg"), string.Empty);
3115var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3119File.WriteAllText(Path.Combine(identityPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty);
3120File.WriteAllText(Path.Combine(identityPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty);
3195var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3256var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3315var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3370var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts"));
3374Path.Combine(sourceDirectory.FullName, "Aspire.Hosting.Redis.1.0.0.nupkg"),
3414var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3422Path.Combine(localSource.FullName, $"Aspire.Hosting.Redis.{packageVersion}.nupkg"),
3469Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
3479var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3533var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3581var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3629var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3677var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3729var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3780var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3838var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
3910var hivesDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "hives"));
3911var cacheDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "cache"));
3912var sdksDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "sdks"));
3913var logsDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "logs"));
3921Path.Combine(logsDirectory.FullName, "test.log"),
Commands\AgentInitClientSelectionTests.cs (24)
64["SKILL.md", Path.Combine("references", "app-commands.md")],
65Directory.EnumerateFiles(Path.Combine(expected, "aspire"), "*", SearchOption.AllDirectories)
66.Select(path => Path.GetRelativePath(Path.Combine(expected, "aspire"), path)).Order(StringComparer.Ordinal));
84var path = Path.Combine(directory, "SKILL.md");
124Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".claude")));
194Assert.False(Directory.Exists(Path.Combine(unselectedRoot.FullName, ".agents")));
234var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json");
352Assert.Equal(before.Append(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc")).Order(StringComparer.Ordinal),
588var path = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json");
606var configPath = Path.Combine(configDirectory.FullName, "mcp.json");
637var configPath = Path.Combine(configDirectory.FullName, "mcp.json");
666var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, configFileName);
694var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, expectedRelativePath.Replace('/', Path.DirectorySeparatorChar));
720await File.WriteAllTextAsync(Path.Combine(configDirectory.FullName, "opencode.json"), """{"model":"keep-json","mcp":{"other":{"command":["other"]}}}""");
724await File.WriteAllTextAsync(Path.Combine(configDirectory.FullName, "opencode.jsonc"), """{"model":"keep-jsonc","mcp":{"other":{"command":["other"]}}}""");
733var expectedPath = Path.Combine(configDirectory.FullName, expectedFileName);
770var path = Path.Combine(configDirectory, fileName);
846var jsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.json");
858var jsoncPath = Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc");
971var configPath = Path.Combine(configDirectory.FullName, "opencode.json");
998["OPENCODE_CONFIG"] = Path.Combine(openCode.FullName, "custom.json")
1308Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json")));
1323: Path.Combine(context.CopilotDirectory, "settings.json");
1396var logDirectory = Path.Combine(".aspire", "logs") + Path.DirectorySeparatorChar;
Commands\AgentInitCommandTests.cs (38)
100await File.WriteAllTextAsync(Path.Combine(context.Project.FullName, "apphost.cs"), string.Empty);
132Assert.False(File.Exists(Path.Combine(context.Project.FullName, ".mcp.json")));
210await File.WriteAllTextAsync(Path.Combine(context.Project.FullName, "apphost.cs"), string.Empty);
359var blockedSkillParentPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".agents");
422Path.Combine(".agents", "skills"),
423Path.Combine(".claude", "skills")
460Path.Combine("references", "compatibility-and-validation.md"),
461Path.Combine("references", "migration-patterns.md")
488await File.ReadAllTextAsync(Path.Combine(skillDirectory, file.RelativePath), TestContext.Current.CancellationToken).DefaultTimeout());
535var agentsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".agents");
621AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireSkillName);
622AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireDeploymentSkillName);
623AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireInitSkillName);
624AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireMonitoringSkillName);
625AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireOrchestrationSkillName);
626AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireProjectV2MigrationSkillName);
627AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireifySkillName);
659await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.cs"), string.Empty);
684AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), SkillDefinition.DotnetInspect.Name);
686Assert.True(File.Exists(Path.Combine(workspace.Path, ".mcp.json")));
759AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), CommonAgentApplicators.AspireifySkillName);
760AssertSkillFileExists(workspace.WorkspaceRoot, Path.Combine(".agents", "skills"), FakeAspireSkillsInstaller.AspireProjectV2MigrationSkillName);
796Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json")));
797var openCodeConfig = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc")));
815Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json")));
816Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc")));
832Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json")));
833var openCodeConfig = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc")));
882foreach (var relativeDirectory in new[] { Path.Combine(".agents", "skills"), Path.Combine(".claude", "skills") })
884var directory = Path.Combine(workspace.Path, relativeDirectory);
900await File.WriteAllTextAsync(Path.Combine(workspace.Path, appHostFileName), string.Empty);
947"local" => Path.Combine(Path.GetDirectoryName(project)!, "settings.local.json"),
977var bundleDirectory = new DirectoryInfo(Path.Combine(workspaceRoot.FullName, $".test-aspire-skills-bundle-{Guid.NewGuid():N}"));
985var skillPath = Path.Combine(skillDirectory, "SKILL.md");
1022var manifestPath = Path.Combine(bundleDirectory.FullName, "skill-manifest.json");
1133var expectedPath = Path.Combine(root.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar));
1237var path = Path.Combine(context.Project.FullName, "opencode.json");
Commands\AgentMcpCommandTests.cs (17)
163var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
577var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
617var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
640var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
784var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
788var unrelatedPath = Path.GetFullPath(Path.Combine("UnrelatedAppHost", "UnrelatedAppHost.csproj"));
907var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
980var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
1016var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
1028AppHostPath = Path.GetFullPath(Path.Combine("UnrelatedAppHost", "UnrelatedAppHost.csproj")),
1082var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
1109var appHostPath = Path.GetFullPath(Path.Combine("PinnedAppHost", "PinnedAppHost.csproj"));
1690var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "PinnedAppHost.csproj"));
1723var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "PinnedAppHost.csproj"));
1755var missingPath = Path.Combine(workspace.WorkspaceRoot.FullName, "MissingAppHost");
1784Path.Combine(appHostDirectory.FullName, "First.AppHost.csproj"),
1788Path.Combine(appHostDirectory.FullName, "Second.AppHost.csproj"),
Commands\AppHostLauncherTests.cs (10)
60var logsDirectory = Path.Combine(Path.GetTempPath(), "aspire-cli-tests");
1061var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1089var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1112var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1174var childLogFile = Path.Combine(workspace.WorkspaceRoot.FullName, "child.log");
1324var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1330var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
1332locatedAppHostFile = new FileInfo(Path.Combine(linkPath, "AppHost.csproj"));
1341Path.Combine(logsDirectory.FullName, "parent.log"),
1420var socketPath = Path.Combine(
Commands\CacheCommandTests.cs (14)
49File.WriteAllText(Path.Combine(restoreDir.FullName, "test.dll"), "fake");
63Assert.False(File.Exists(Path.Combine(restoreDir.FullName, "test.dll")));
72var cacheEntry = Path.Combine(appHostInfoCacheDir.FullName, "entry.json");
105await File.WriteAllTextAsync(Path.Combine(firstBuildCache.FullName, "Aspire.Hosting.dll"), "fake").DefaultTimeout();
106await File.WriteAllTextAsync(Path.Combine(secondBuildCache.FullName, "Aspire.Hosting.dll"), "fake").DefaultTimeout();
116Assert.False(Directory.Exists(Path.Combine(stagingCacheRoot.FullName, "deadbeef")));
117Assert.False(Directory.Exists(Path.Combine(stagingCacheRoot.FullName, "cafef00d")));
166var tempDir = new DirectoryInfo(Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}"));
171File.WriteAllText(Path.Combine(tempDir.FullName, "root.txt"), "root");
172File.WriteAllText(Path.Combine(subDir.FullName, "nested.txt"), "nested");
192var tempDir = new DirectoryInfo(Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}"));
196var keepFile = Path.Combine(tempDir.FullName, "keep.txt");
197var deleteFile = Path.Combine(tempDir.FullName, "delete.txt");
221var nonExistent = new DirectoryInfo(Path.Combine(Path.GetTempPath(), $"aspire-test-nonexistent-{Guid.NewGuid():N}"));
Commands\CompletionScriptTests.cs (17)
24var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.ps1");
66var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.ps1");
68await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.ps1"), """
98var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.bash");
100var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
151var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.bash");
152var capturedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "arguments.bin");
153var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
178Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "completion-executed")));
187var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "completion.bash");
188var capturedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "arguments.bin");
189var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
221var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.fish");
245var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.zsh");
269var completionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "_aspire");
270var binaryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
271var capturedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "arguments.bin");
Commands\ConfigSourceCommandTests.cs (48)
98var projectFile = new FileInfo(Path.Combine(workspace.Path, "apphost.cs"));
148Path.Combine(workspace.Path, AspireConfigFile.FileName), "docs.llmsTxtUrl", localUrl);
194Path.Combine(workspace.Path, AspireConfigFile.FileName), "docs.api.sitemapUrl", localUrl);
274var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
310var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
324var projectFile = new FileInfo(Path.Combine(workspace.Path, "apphost.cs"));
401var projectFile = new FileInfo(Path.Combine(project.FullName, "apphost.cs"));
404var rootPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
443Assert.False(File.Exists(Path.Combine(project.FullName, AspireConfigFile.FileName)));
455var localPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
465File.Move(Path.Combine(globalFile.Directory.FullName, AspireConfigFile.FileName), globalFile.FullName);
470$"update --config-source --apphost \"{Path.Combine(workspace.Path, requestedPath)}\" --yes --non-interactive");
487await File.WriteAllTextAsync(Path.Combine(project.FullName, "apphost.cs"), "#:sdk Aspire.AppHost.Sdk");
491var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
497var result = command.Parse($"update --config-source --apphost \"{Path.Combine(project.FullName, "apphost.cs")}\" --yes --non-interactive");
532var localPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
536await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.cs"), "#:sdk Aspire.AppHost.Sdk");
542File.Move(Path.Combine(globalFile.Directory.FullName, AspireConfigFile.FileName), globalFile.FullName);
545var appHostArgument = explicitAppHost ? $" --apphost \"{Path.Combine(workspace.Path, "apphost.cs")}\"" : "";
569var selectedFile = new FileInfo(Path.Combine(selected.FullName, "apphost.cs"));
577await File.WriteAllTextAsync(Path.Combine(selected.FullName, AspireConfigFile.FileName), "{}");
622var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
626var projectFile = new FileInfo(Path.Combine(selected.FullName, "apphost.cs"));
644Assert.False(File.Exists(Path.Combine(selected.FullName, AspireConfigFile.FileName)));
655var projectFile = new FileInfo(Path.Combine(selected.FullName, "apphost.cs"));
660Path.Combine(workspace.Path, AspireConfigFile.FileName), "appHost.path", "selected/apphost.cs");
687var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
693await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "apphost.cs"), "#:sdk Aspire.AppHost.Sdk");
703var selectedPath = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName);
756var missingProject = Path.Combine(workspace.Path, "missing.csproj");
809var output = Path.Combine(workspace.Path, "created-project");
813await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
830var configuration = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(output, AspireConfigFile.FileName)))!;
833Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName)));
846var configuration = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName)))!;
848Assert.True(File.Exists(Path.Combine(workspace.Path, "apphost.cs")));
861var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
890await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Test.sln"), "Fake solution file");
891var childPath = Path.Combine(workspace.Path, "Test.AppHost");
892var projectPath = Path.Combine(childPath, "Test.AppHost.csproj");
893var rootConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
915await File.WriteAllTextAsync(Path.Combine(childPath, AspireConfigFile.FileName), templateConfig);
919var configPath = Path.Combine(configDirectory.FullName, AspireConfigFile.FileName);
945File.WriteAllText(Path.Combine(outputPath, $"{name}.csproj"), "<Project />");
946File.WriteAllText(Path.Combine(outputPath, AspireConfigFile.FileName), templateConfig);
988Assert.Equal(appHostConfig, File.Exists(Path.Combine(childPath, AspireConfigFile.FileName)));
1027Assert.Equal(appHostConfig, File.Exists(Path.Combine(childPath, AspireConfigFile.FileName)));
1043var output = Path.Combine(workspace.Path, "created-project");
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 (88)
67var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
70var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectFileName));
110Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
117await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Test.sln"), "Fake solution file");
136Assert.True(Directory.Exists(Path.Combine(workspace.Path, "Test.AppHost")));
140Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName)));
153var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
186Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")));
208var appHostContent = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
223var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, solutionPath));
227var projectPath = Path.Combine(solutionFile.Directory.FullName, "Test.csproj");
230var otherSolutionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Other.slnx");
256Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
257Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")));
258var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)))!.AsObject();
297Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
298Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".gitignore")));
300var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
319LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"));
320LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json"));
342var runJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json");
369var aspireConfig = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
412File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), existingAspireConfig);
423var runJson = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")))!.AsObject();
462var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
487Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")));
511Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
528await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.mts"), "console.log('existing AppHost');");
613Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
615var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject();
628var existingAppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
631File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), """{ "type": "commonjs" }""");
646Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
647Assert.Equal("""{ "type": "commonjs" }""", File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json")));
656File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{}");
665File.WriteAllText(Path.Combine(scaffoldDirectory.FullName, context.Language.AppHostFileName!), string.Empty);
695Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts")));
784Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
806Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
828Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
836Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json")));
856var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
872var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
901var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
925var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
946var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
966var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1010File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
1019var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1096var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1162var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1211var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1281Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
1283var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1316Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")));
1318var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1353var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1377var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1426var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1470var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1585var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1692var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1771var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1859var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1862var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1920var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1949var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1967var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1971var appHostDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost"));
1973Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1994var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2012var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
2014Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
2031var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2050var solutionFile = new FileInfo(Path.Combine(solutionDir.FullName, "Test.sln"));
2080Assert.True(File.Exists(Path.Combine(solutionDir.FullName, "nuget.config")),
2082Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
2084AssertNuGetConfigHasChannelShape(Path.Combine(solutionDir.FullName, "nuget.config"), contextChannel);
2100var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
2112var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2161var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
2193var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2211var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
2256File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")),
2272var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.slnx"));
2302var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2390File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, appHostFileName), string.Empty);
2400File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, AspireConfigFile.FileName), config.ToJsonString());
Commands\NewCommandLocalTemplateTests.cs (83)
36await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
82await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), JsonSerializer.Serialize(new
208Assert.Equal(ReadOutput(Path.Combine(workspace.Path, "non-interactive-out")), ReadOutput(workspace));
250await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
376Assert.Equal(!useDatabase, Directory.Exists(Path.Combine(workspace.Path, "out")));
391await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
440await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
493Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
502await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
543await File.WriteAllTextAsync(Path.Combine(gitDirectory.FullName, "config"), "Original repository configuration");
550await File.WriteAllTextAsync(Path.Combine(nestedGitDirectory.FullName, "config"), "Nested repository configuration");
552await File.WriteAllTextAsync(Path.Combine(nestedWorktree.FullName, ".git"), "gitdir: ../../git-storage");
553await File.WriteAllTextAsync(Path.Combine(nestedWorktree.FullName, "content.txt"), "Keep worktree content");
557await File.WriteAllTextAsync(Path.Combine(github.FullName, "content.txt"), "Keep GitHub content");
558var originalSource = ReadOutput(Path.Combine(workspace.Path, "template"));
568Assert.Equal(originalSource, ReadOutput(Path.Combine(workspace.Path, "template")));
569Assert.Equal("Original repository configuration", await File.ReadAllTextAsync(Path.Combine(gitDirectory.FullName, "config")));
580var templatePath = Path.Combine(workspace.Path, templateDirectory);
582var config = workspace.CreateDirectory(Path.Combine(templateDirectory, ".template.config"));
583await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
588await File.WriteAllTextAsync(Path.Combine(templatePath, ".git"), "gitdir: ../git-storage");
592var git = workspace.CreateDirectory(Path.Combine(templateDirectory, ".git"));
593await File.WriteAllTextAsync(Path.Combine(git.FullName, "config"), "Original repository configuration");
596await File.WriteAllTextAsync(Path.Combine(nestedGit.FullName, "config"), "Nested repository configuration");
597await File.WriteAllTextAsync(Path.Combine(templatePath, "content.txt"), "Keep template content");
598await File.WriteAllTextAsync(Path.Combine(templatePath, ".gitignore"), "bin/");
599var github = workspace.CreateDirectory(Path.Combine(templateDirectory, ".github"));
600await File.WriteAllTextAsync(Path.Combine(github.FullName, "content.txt"), "Keep GitHub content");
605Assert.False(fileSystem.FileExists(Path.Combine(templatePath, ".git")));
606Assert.False(fileSystem.DirectoryExists(Path.Combine(templatePath, ".git")));
607Assert.False(fileSystem.FileExists(Path.Combine(nestedGit.FullName, "config")));
608Assert.Throws<FileNotFoundException>(() => fileSystem.ReadAllText(Path.Combine(nestedGit.FullName, "config")));
704await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$"""
820var outputPath = Path.Combine(workspace.Path, "out");
862var outputPath = Path.Combine(workspace.Path, "out");
948var outputPath = Path.Combine(workspace.Path, "out");
986foreach (var file in Directory.EnumerateFiles(Path.Combine(workspace.Path, "template"), "*", SearchOption.AllDirectories))
988var target = Path.Combine(destination.FullName, Path.GetRelativePath(Path.Combine(workspace.Path, "template"), file));
1012ReadOutput(Path.Combine(workspace.Path, "template")).Keys);
1017ReadOutput(Path.Combine(workspace.Path, "template")),
1018ReadOutput(Path.Combine(cachedTemplate, "repository")));
1040Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1056await File.WriteAllTextAsync(Path.Combine(conflictingDirectory.FullName, "keep.txt"), "Template content");
1147Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1194Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1217await File.WriteAllTextAsync(Path.Combine(workspace.Path, "template"), "not a directory");
1227Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1299Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1332Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1350Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1367["new", "--template-path", Path.Combine(workspace.Path, "template"), "--name", "Demo", "--output", "out", "--suppress-agent-init"])
1422Assert.True(Directory.Exists(Path.Combine(checkout, ".git")));
1466Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1494Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1504var linkPath = Path.Combine(workspace.Path, "template-link");
1517Directory.CreateDirectory(Path.Combine(destination.FullName, ".git"));
1519Directory.Move(linkPath, Path.Combine(destination.FullName, "template"));
1533Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1549var gitObject = Path.Combine(gitDirectory.FullName, "partial-object");
1564Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
1581Directory.CreateDirectory(Path.Combine(destination.FullName, ".git"));
1585await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "template")));
1593var cacheRoot = Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git");
1713Directory.CreateDirectory(Path.Combine(destination.FullName, ".git"));
1714await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "one")));
1715await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "two")));
1745var cacheRoot = Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git");
1771Directory.CreateDirectory(Path.Combine(destination.FullName, ".git"));
1772await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "template")));
1790Assert.True(Directory.Exists(Path.Combine(cached, ".git")));
1932await File.WriteAllTextAsync(Path.Combine(config.FullName, "aspirecli.host.json"),
1934await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$"""
2009await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), """
2019await File.WriteAllTextAsync(Path.Combine(config.FullName, "aspirecli.host.json"),
2021await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
2040ReadOutput(Path.Combine(workspace.Path, "out"));
2053await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$"""
2105await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), JsonSerializer.Serialize(new
2121await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$"""
2163await File.WriteAllTextAsync(Path.Combine(root.FullName, "TemplateApp.cs"), """
2176await File.WriteAllTextAsync(Path.Combine(root.FullName, "worker-only.txt"), "Worker content");
2177await File.WriteAllTextAsync(Path.Combine(root.FullName, "identity.txt"), name);
Commands\NewCommandLocalTemplateTests.HostConfiguration.cs (14)
35await File.WriteAllTextAsync(Path.Combine(config, "dotnetcli.host.json"), $$"""
41await File.WriteAllTextAsync(Path.Combine(config, "aspirecli.host.json"), aspireConfiguration == 1 ? "{}" : """
126await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
148await File.WriteAllTextAsync(Path.Combine(config.FullName, hostFile), """
202Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
223await File.WriteAllTextAsync(Path.Combine(config, "aspirecli.host.json"), contents);
224await File.WriteAllTextAsync(Path.Combine(config, "dotnetcli.host.json"), "{}");
234Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
341await File.WriteAllTextAsync(Path.Combine(config, "template.json"), """
349var hostFile = Path.Combine(config, "aspirecli.host.json");
358await File.WriteAllTextAsync(Path.Combine(config, "dotnetcli.host.json"),
371var output = Path.Combine(workspace.Path, "out");
372Assert.Equal(expectedCreate, File.Exists(Path.Combine(output, "nuget.config")));
437var output = Path.Combine(workspace.Path, "out");
Commands\NewCommandLocalTemplateTests.NuGetValues.cs (26)
90await File.WriteAllTextAsync(Path.Combine(workspace.Path, "NuGet.Config"), config);
103File.Copy(Path.Combine(feed.FullName, "Aspire.Hosting.Dotnet.13.6.1-preview.3.nupkg"),
104Path.Combine(embedded.FullName, "Aspire.Hosting.Dotnet.13.6.1-preview.3.nupkg"));
134var output = Path.Combine(workspace.Path, "out");
136[policy == "embedded" ? Path.Combine(output, "feed") : feed.FullName],
137NuGetTestHelper.GetEligiblePackageSources(policy == "nested" ? Path.Combine(output, "AppHost") : output, "Aspire.Hosting.Dotnet"));
138await Verify(await File.ReadAllTextAsync(Path.Combine(output, "versions.json"))).UseParameters(policy);
163Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
198Assert.Equal(existingOutput, Directory.Exists(Path.Combine(workspace.Path, "out")));
201Assert.Empty(Directory.GetFileSystemEntries(Path.Combine(workspace.Path, "out")));
230Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
258Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
286Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
346File.Move(Path.Combine(config, "aspirecli.host.json"), Path.Combine(config, "dotnetcli.host.json"));
347var definitionPath = Path.Combine(config, "template.json");
353await File.WriteAllTextAsync(Path.Combine(config, "aspirecli.host.json"), "{}");
389var hostPath = Path.Combine(config, "aspirecli.host.json");
394var templatePath = Path.Combine(config, "template.json");
407Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
434Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
452await File.WriteAllTextAsync(Path.Combine(output.FullName, "keep.txt"), "Concurrent user content", token);
476var path = Path.Combine(config, "template.json");
486path = Path.Combine(config, "aspirecli.host.json");
516await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """
528await File.WriteAllTextAsync(Path.Combine(config.FullName, "aspirecli.host.json"), $$"""
Commands\NewCommandTemplateConfigPersistenceTests.cs (9)
236outputDirectory => File.ReadAllText(Path.Combine(outputDirectory, AspireConfigFile.FileName)));
287File.WriteAllText(Path.Combine(outputPath, $"{name}.generated"), templateName);
326var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName);
331var appHostFile = Path.Combine(outputDirectory, "apphost.cs");
340var csharpNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config"));
363var dotNetNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config"));
450var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName);
561var installPrefix = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "custom-aspire-prefix"));
567File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{s_prVersion}.nupkg"), string.Empty);
Commands\NewCommandTests.cs (82)
149var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TemplateOut");
150var nugetConfigPath = Path.Combine(outputDirectory, "nuget.config");
555var config = AspireConfigFile.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "output"));
737var doc = XDocument.Load(Path.Combine(outputPath, "nuget.config"));
906File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1072File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1097File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), """
1135File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1163File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1247AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource);
1257var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "relative-feed");
1259File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1290AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource);
1302var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
1304File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1327File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, scaffoldFileName), "// test apphost");
1339AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
1350var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
1352File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
1363AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
1386Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "output"));
1399Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output")));
1431var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.org");
1434Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output")));
1454File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost");
1493File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;");
1529File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.py"), "# test apphost");
1649var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1650var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json");
1651var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json");
1683var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1684var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json");
1685var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json");
1758var outputRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
1760var aspireConfigPath = Path.Combine(outputRoot, "aspire.config.json");
1767var appHostRunJsonPath = Path.Combine(outputRoot, "apphost.run.json");
1892var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestApp");
1937await File.WriteAllTextAsync(Path.Combine(context.TargetDirectory.FullName, "aspire.config.json"), """
2031var modulesDir = Directory.CreateDirectory(Path.Combine(directory.FullName, LanguageInfo.GeneratedFolderName));
2032File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.mts"), "// generated sdk");
2117var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
2121File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
2156File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.ts"), "// generated sdk");
2169AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
2224AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride);
2234var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed");
2238File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty);
2333var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2358var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2455Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-starter"), capturedOutputPath);
2491var result = command.Parse($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None");
2533var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
2652Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2768Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2799var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2864workspaceRoot => Path.Combine(workspaceRoot, "source") + Path.DirectorySeparatorChar,
2869workspaceRoot => Path.Combine(workspaceRoot, projectName) + Path.DirectorySeparatorChar,
2870workspaceRoot => Path.Combine(workspaceRoot, projectName));
2896Path.Combine(workspace.WorkspaceRoot.FullName, "source");
2907File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
2923Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
2933File.WriteAllText(Path.Combine(selectedParent.FullName, "existing.txt"), "existing content");
2970File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
2985var expectedPath = Path.Combine(selectedParent.FullName, projectName);
2987Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
2997var collidingProject = Directory.CreateDirectory(Path.Combine(collidingParent.FullName, projectName));
2998File.WriteAllText(Path.Combine(collidingProject.FullName, "existing.txt"), "existing content");
3063Assert.Equal(Path.Combine(validParent.FullName, projectName), capturedOutputPath);
3123File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3138var expectedPath = Path.Combine(selectedParent.FullName, projectName);
3140Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
3192File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3208Assert.True(File.Exists(Path.Combine(selectedOutputPath.FullName, "apphost.ts")));
3246File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost");
3262Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts")));
3300var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
3354var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
3382var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
3412var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
3415Assert.False(File.Exists(Path.Combine(outputDirectory, ".mcp.json")));
3426File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content");
3475File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content");
Commands\RunCommandTests.cs (61)
65var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
205var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
206File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
254var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
255File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), $$"""
361var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
402var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
449var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
494var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
578var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
674var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
779var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
881var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
977var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1082var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1258await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
1261await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
1392Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
1561var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1634var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1635File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
1754var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1830var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1894var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
1956var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2016var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2084var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2167var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2273var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2336var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2397var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
2459var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
3136var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [run].log");
3260var appHostProjectPath = Path.Combine(appHostDirectory.FullName, "MyApp.AppHost.csproj");
3901var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3949var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3993var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4041var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4084var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4128var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4172var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4466var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4528var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4570var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4628var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4672var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4733Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
4771Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
4806var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4855var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4899var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
4955Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
4997var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
5054var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
5103var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
5105var relativeCapturePath = Path.Combine("Profile Output", "profile.zip");
5170var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
5198var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
5450var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
5491var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
5505var socketPath = Path.Combine(
Commands\SecretCommandTests.cs (11)
23var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
49var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
75var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
132var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
169var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
191var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
236var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
297var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
318var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
340Assert.Contains(Path.Combine(directory, $"{originalEnvironment}.json"), outputWriter.Logs);
354var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Commands\StartCommandTests.cs (11)
217var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
218File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """
269await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
272await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
300await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake");
303await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake");
331var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
384var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
651Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
668var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj"));
682var socketPath = Path.Combine(
Commands\StopCommandTests.cs (37)
190var connection = CreateConnection(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs"), 1);
230var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
264var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs");
303var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs");
377string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("Resolved.AppHost", "Resolved.AppHost.csproj")),
409var expectedPath1 = Path.Combine("App1", "AppHost.cs");
410var expectedPath2 = Path.Combine("App2", "AppHost.cs");
490Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
494Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
501var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj");
533var expectedPath = Path.Combine("AppHost", "AppHost.csproj");
545var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
569string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "AppHost.csproj")),
577var commonGitDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, ".git");
741var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
766Assert.Contains(interactionService.DisplayedMessages, message => message.Message == string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "AppHost.csproj")));
776var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
808var runningAppHostFile = new FileInfo(Path.Combine(runningAppHostDirectory.FullName, "Running.AppHost.csproj"));
811var discoveredAppHostFile = new FileInfo(Path.Combine(discoveredAppHostDirectory.FullName, "Discovered.AppHost.csproj"));
850Path.Combine("RunningAppHost", "Running.AppHost.csproj"));
860var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
892var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
927var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
967var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1007var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1048var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1088var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1127var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts"));
1163string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "apphost.ts")),
1173var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1210var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1255var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1293var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1331var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1399var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1622var homeDirectory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".home"));
1630var socketPath = Path.Combine(
Commands\TerminalTapePlayCommandTests.cs (21)
57await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, path), contents);
100await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
118await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
163await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
242await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"),
289await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
342await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
371await File.WriteAllTextAsync(Path.Combine(directory.FullName, "probe.tape"), "# Inspect the current screen.");
373["terminal", "tape", "play", "shell", "--tape-file", Path.Combine("tape files", "probe.tape")]);
392await File.WriteAllTextAsync(Path.Combine(directory.FullName, "play.tape"), """
403["terminal", "tape", "play", "shell", "--tape-file", Path.Combine("scripts", "play.tape")]);
423await File.WriteAllTextAsync(Path.Combine(directory.FullName, "play.tape"),
428["terminal", "tape", "play", "shell", "--tape-file", Path.Combine("scripts", "play.tape")]);
432path => Assert.Equal(Path.Combine(directory.FullName, "screen.txt"), path));
433var capture = await File.ReadAllTextAsync(Path.Combine(directory.FullName, "screen.txt"));
448var file = Path.Combine(workspace.WorkspaceRoot.FullName, "play.tape");
474await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
492await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
511await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
530await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "wait.tape"),
549await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "probe.tape"), "");
Commands\TrayCommandTests.cs (13)
39var sidecar = Path.Combine(Path.GetDirectoryName(cliPath)!, InstallSidecarReader.SidecarFileName);
67var packagedCli = Path.Combine(packageBin, "aspire");
69File.WriteAllText(Path.Combine(packageBin, InstallSidecarReader.SidecarFileName), """{"source":"script"}""");
84File.WriteAllText(Path.Combine(Path.GetDirectoryName(cliPath)!, InstallSidecarReader.SidecarFileName), "{");
98var installed = Path.Combine(workspace.WorkspaceRoot.FullName, "stable & installed aspire");
170Assert.Equal(action == "start" ? 1 : 0, Directory.Exists(Path.Combine(root, ".leases"))
171? Directory.GetFiles(Path.Combine(root, ".leases"), "*.lease").Length : 0);
247"dotnet" => Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet"),
248"missing" => Path.Combine(workspace.WorkspaceRoot.FullName, "missing-aspire"),
543File.WriteAllText(Path.Combine(binaryDirectory, InstallSidecarReader.SidecarFileName), """{"source":"script"}""");
544var cliPath = Path.Combine(binaryDirectory, "aspire");
569WindowsTrayTestPayload.Create(Path.Combine(bundle.Layout.LayoutPath!, "tray"),
643WindowsTrayTestPayload.Create(Path.Combine(root, "tray"),
Commands\UpdateCommandRepositoryToolsTests.cs (16)
31var appHost = new FileInfo(Path.Combine(directory.FullName, "AppHost.csproj"));
116var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
230var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
292var selectedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "selected"));
294var appHost = Path.Combine(selectedDirectory.FullName, "AppHost.csproj");
356var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
405var appHostDirectory = workspace.CreateDirectory(Path.Combine("src", "AppHost"));
406var appHost = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
414var packagesPath = Path.Combine(directory.FullName, "Directory.Packages.props");
426var configPath = Path.Combine(directory.FullName, "aspire.config.json");
434var nugetPath = Path.Combine(directory.FullName, "NuGet.config");
449var lockPath = Path.Combine(directory.FullName, "package-lock.json");
613Directory.CreateDirectory(Path.Combine(directory.FullName, ".git"));
614var config = Directory.CreateDirectory(Path.Combine(directory.FullName, ".config"));
615var dotnetManifest = Path.Combine(config.FullName, "dotnet-tools.json");
625var npmManifest = Path.Combine(directory.FullName, "package.json");
Commands\UpdateCommandTests.cs (98)
89var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
190var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
191var oldBackup1 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
192var oldBackup2 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.9876543210");
193var otherFile = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.something");
214var oldBackup = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
239FileDeleteHelper.TryCleanupOldItems(Path.Combine("C:", "NonExistent"), "aspire.exe");
311return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
379var appHost = new FileInfo(Path.Combine(workspace.Path, "apphost.ts"));
381var configPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
432var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
495var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
550var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
620return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
683var toolPath = Path.Combine(installDir.FullName, "custom tool path");
699return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
776return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
849return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
892return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
933return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1017return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1070Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.DetectedContext.AppHostFile.FullName);
1098Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.DetectedContext.AppHostFile.FullName);
1100Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), pendingMigration.AppliedContext.AppHostFile.FullName);
1175return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1315var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts");
1358UseOrFindAppHostProjectFileAsyncCallback = (_, _, _) => Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")))
1440var toolPath = Path.Combine(installDir.FullName, "custom tool path");
1523var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1549var processPath = Path.Combine(installDirectory.FullName, "aspire");
1553var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName);
1591var processPath = Path.Combine(installDirectory.FullName, "aspire");
1596var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName);
1648var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1689var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
1723return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1788return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1852return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1910return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
1987return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2036return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2092var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2111var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2113var globalSettingsPath = Path.Combine(globalDir, "settings.global.json");
2131var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2149var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2151File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "daily" }""");
2153var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2173var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2175File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2194var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2203return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2260Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")))
2313var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2314var projectConfigPath = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName);
2319updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2333Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2336var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2338File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2340var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2344updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2361Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2364var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2366Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2371updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2387Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2390var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
2392File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }""");
2394var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2396Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2401updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}",
2444Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2481return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2572var resolved = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2657return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
2699var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere"));
2700var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "AppHost.csproj"));
2703Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName),
2847Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
2881Path.Combine(workspace.Path, AspireConfigFile.FileName),
2907? Path.Combine(workspace.Path, AspireConfigFile.FileName)
2913$"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")} --channel {selectedChannel}",
2937await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{ "channel": "staging" }""");
2942workspace, $"update --apphost {Path.Combine(projectDirectory.FullName, fileName)}", projectDirectory, identityChannel,
3007return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(projectDirectory.FullName, appHostFileName)));
3146var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3191var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3236var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3269var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3302return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
3456var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
3478var executablePath = Path.Combine(contentDirectory.FullName, "aspire");
3496var tarPath = Path.Combine(archiveDirectory.FullName, "aspire.tar");
3499var archivePath = Path.Combine(archiveDirectory.FullName, "aspire.tar.gz");
3526var processPath = Path.Combine(toolPath, GetAspireExecutableName());
3552var processPath = Path.Combine(binaryDir, GetAspireExecutableName());
3554File.WriteAllText(Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName), """{"source":"nix"}""");
3622var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
Configuration\AspireConfigFileTests.cs (22)
27var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
47var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
73File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$"""
96var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
120var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
143var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
162var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
176var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
189var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
212var filePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
230Assert.True(File.Exists(Path.Combine(subDir, AspireConfigFile.FileName)));
246LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName));
262File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), "{}");
405var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
430Path.GetFullPath(Path.Combine(workspace.WorkspaceRoot.FullName, "DeadlockExtension/DeadlockExtension.csproj")),
439var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
472var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
518var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
538var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
566var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
587var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
736var configPath = Path.Combine(root, AspireConfigFile.FileName);
Configuration\ConfigSourceServiceGitTests.cs (9)
192var pidFile = Path.Combine(workspace.Path, "child.pid");
397Assert.False(File.Exists(Path.Combine(cache.FullName, path)));
547await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"custom":"preview"}""");
567await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"custom":"latest"}""");
592await File.WriteAllTextAsync(Path.Combine(workspace.Path, "unrelated.txt"), "Unrelated change");
600await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), "invalid JSON is not read during a version check");
641await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), "target.json");
704await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"custom":"updated"}""", token);
729var configPath = Path.Combine(workspace.Path, path.Replace('/', Path.DirectorySeparatorChar));
Configuration\ConfigSourceServiceTests.cs (46)
36var globalFile = new FileInfo(Path.Combine(global.FullName, "custom-global.json"));
37File.Move(Path.Combine(global.FullName, AspireConfigFile.FileName), globalFile.FullName);
39var localPath = Path.Combine(project.FullName, AspireConfigFile.FileName);
42var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
82Assert.False(File.Exists(Path.Combine(global.FullName, AspireConfigFile.FileName)));
101var globalFile = new FileInfo(Path.Combine(workspace.Path, AspireConfigFile.FileName));
136var globalFile = new FileInfo(Path.Combine(global.FullName, AspireConfigFile.FileName));
150var siblingPath = Path.Combine(sibling.FullName, AspireConfigFile.FileName);
155var path = Path.Combine(directory.FullName, AspireConfigFile.FileName);
218var path = Path.Combine(directory.FullName, AspireConfigFile.FileName);
236Assert.False(File.Exists(Path.Combine(gap.FullName, AspireConfigFile.FileName)));
251var globalFile = new FileInfo(Path.Combine(global.FullName, AspireConfigFile.FileName));
262var parentPath = Path.Combine(parent.FullName, AspireConfigFile.FileName);
263var rootPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
330var globalFile = new FileInfo(Path.Combine(global.FullName, AspireConfigFile.FileName));
499Assert.False(File.Exists(Path.Combine(other.FullName, AspireConfigFile.FileName)));
522var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
631var repository = System.IO.Path.Combine(workspace.Path, "local\nrepository");
701Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName)));
802Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName)));
810var path = Path.Combine(project.FullName, AspireConfigFile.FileName);
834var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
863var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
902var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
926var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
980var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1034var checkPath = Path.Combine(first.GetCacheDirectory(s_source), "check.json");
1111var checkPath = Path.Combine(first.GetCacheDirectory(s_source), "check.json");
1145await File.WriteAllTextAsync(Path.Combine(directory, "current"), "invalid pointer");
1146using var heldFile = File.Open(Path.Combine(snapshot, AspireConfigFile.FileName), FileMode.Open, FileAccess.ReadWrite, FileShare.None);
1225var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1227var pointer = Path.Combine(service.GetCacheDirectory(s_source), "current");
1257var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1324var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1330Directory.CreateDirectory(Path.Combine(service.GetCacheDirectory(s_source), "current"));
1347var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1369var snapshot = await File.ReadAllTextAsync(Path.Combine(cache, "current"));
1381var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1413var modernPath = Path.Combine(project.FullName, AspireConfigFile.FileName);
1472var stale = Directory.CreateDirectory(Path.Combine(cache, Guid.NewGuid().ToString("N")));
1473await File.WriteAllTextAsync(Path.Combine(stale.FullName, "stale.txt"), "obsolete snapshot");
1474File.SetAttributes(Path.Combine(stale.FullName, "stale.txt"), FileAttributes.ReadOnly);
1489var pointer = await File.ReadAllTextAsync(Path.Combine(next.GetCacheDirectory(s_source), "current"));
1490Assert.Equal(Path.Combine(cache, pointer), Assert.Single(Directory.GetDirectories(cache)));
1571Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName)));
1582Assert.StartsWith(Path.Combine(home.FullName, "configsources"), service.GetCacheDirectory(s_source), StringComparison.Ordinal);
Configuration\ConfigurationHelperTests.cs (35)
25var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
26var target = Path.Combine(workspace.Path, "shared.json");
51var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
77var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
98var targetPath = Path.Combine(shared.FullName, AspireConfigFile.FileName);
103targetDirectory = Path.Combine(workspace.Path, "linked-shared");
106var path = Path.Combine(project.FullName, AspireConfigFile.FileName);
107var linkTarget = Path.Combine(targetDirectory, AspireConfigFile.FileName);
131var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
147var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
148var otherPath = Path.Combine(workspace.Path, "other.json");
173var path = Path.Combine(workspace.Path, AspireConfigFile.FileName);
197var file = new FileInfo(Path.Combine(workspace.Path, AspireConfigFile.FileName));
216var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
220var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
320var globalSettingsFile = new FileInfo(Path.Combine(globalDirectory.FullName, AspireConfigFile.FileName));
331_ => Path.Combine(workspace.Path, AspireConfigFile.FileName)
403var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
528var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
550var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
565var settingsPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
579var globalSettingsFile = new FileInfo(Path.Combine(workspace.Path, "global-settings.json"));
600var settingsPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
621var globalSettingsFile = new FileInfo(Path.Combine(workspace.Path, "global-settings.json"));
834File.WriteAllText(Path.Combine(configRoot.FullName, AspireConfigFile.FileName), "{}");
853Path.Combine(workspace.WorkspaceRoot.FullName, AspireJsonConfiguration.SettingsFolder),
874var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
882var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
886var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
912var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
922var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
928var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
946var legacySettingsPath = Path.Combine(legacyDir.FullName, AspireJsonConfiguration.FileName);
950var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
959var migratedPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
Diagnostics\FileLoggerProviderTests.cs (8)
39var path = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
73var logsDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "logs");
76? new FileLoggerProvider(Path.Combine(logsDirectory, "test.log"), errorWriter)
97var path = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
129? new FileLoggerProvider(Path.Combine(logsDirectory, "test.log"), new TestStartupErrorWriter())
151var logsDirectory = Path.Combine(workspace.Path, "logs");
156var logPath = Path.Combine(parentDirectory, "test.log");
179var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test.log");
DotNet\DotNetAppHostNuGetConfigMergerSnapshotTests.cs (12)
32var path = Path.Combine(dir.FullName, "nuget.config");
71var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
78var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
134var 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('\\', '/');
253var configPath = Path.Combine(root.FullName, "nuget.config");
261var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
268var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
326var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
334var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (25)
26var path = Path.Combine(dir.FullName, "nuget.config");
48var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
69var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
113var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
152var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
196var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
236var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
347var document = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
387var document = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
427var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
477var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
546var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
610var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
666var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
749var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
799var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
840var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
870var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
920var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
942var originalContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "nuget.config")).DefaultTimeout();
963var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
985var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
1023var directory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "new-config"));
1040var directory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "new-config"));
1374XDocument.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")).ToString());
DotNet\DotNetCliRunnerTests.cs (101)
51return Path.Combine(dotnetRoot, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
71var validationTargets = Path.Combine(root.FullName, "LegacySdk.targets");
81var projectFile = new FileInfo(Path.Combine(root.FullName, fileBased ? "apphost.cs" : "AppHost.csproj"));
141var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "apphost.cs" : "AppHost.csproj"));
242var configFile = new FileInfo(Path.Combine(root.FullName, "NuGet.Config"));
254var childDirectory = Directory.CreateDirectory(Path.Combine(root.FullName, "child"));
255var childFile = new FileInfo(Path.Combine(childDirectory.FullName, "Child.csproj"));
256var childTargets = customChildTargets ? Path.Combine(childDirectory.FullName, "Custom;NuGet.targets") : string.Empty;
261<Import Project="{{MSBuildEscaping.Escape(Path.Combine(sdkDirectory, "NuGet.targets"))}}" />
276await File.WriteAllTextAsync(Path.Combine(childDirectory.FullName, "NuGet.Config"), $$"""
283var projectFile = new FileInfo(Path.Combine(root.FullName, fileBased ? "apphost.cs" : "Root.csproj"));
318Path.Combine(sdkDirectory, "NuGet.targets"), []);
368await File.ReadAllTextAsync(Path.Combine(childDirectory.FullName, "custom-targets-ran")));
375File.Delete(Path.Combine(childDirectory.FullName, "custom-targets-ran"));
382await File.ReadAllTextAsync(Path.Combine(childDirectory.FullName, "custom-targets-ran")));
426var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
475var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, appHostFileName));
514var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
548var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
550var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd"));
590var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
592var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd"));
631var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
659var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
691var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
725var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
727File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
738var cliPath = Path.Combine(cliDirectory.FullName, "aspire");
740File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
742var linkDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
743var linkPath = Path.Combine(linkDirectory.FullName, "aspire");
753var dotnetDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet"));
754var dotnetPath = Path.Combine(dotnetDirectory.FullName, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet");
764var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
765var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
767File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
768File.WriteAllText(Path.Combine(cliDirectory.FullName, ".aspire-install.json"), """{"source":"script"}""");
777var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
778var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
780File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty);
781Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "dcp"));
782Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "managed"));
795var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
801var targets = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "candidate;targets%('literal')@$?.targets"));
828var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
865var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
894var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
923var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
996var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1033var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1074var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1119var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1174var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1271var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1311var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1353var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1400var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1448[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1481var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1515[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1527var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1553[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1569var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1595[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock")
1611var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1664var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1731var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1797var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1870var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
1875var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj"));
1879var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj"));
1917var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1920var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj"));
1950var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1997var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2043var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2080var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2117var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2157var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2202var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2254var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2303var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2351var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2390var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, fileName));
2424var projectFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj"));
2457var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2495var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2538var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2580var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2620var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2659var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "RunPropertiesApp"));
2660var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "RunPropertiesApp.csproj"));
2671await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "Program.cs"), "Console.WriteLine(\"Hello\");");
2697Assert.Equal(Path.Combine(projectDirectory.FullName, "relative-working-directory"), properties.GetProperty("RunWorkingDirectory").GetString());
2705var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2926var packagePath = Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{packageVersion}.nupkg");
2996var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3034var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3072var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3112var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3151var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Git\GitWorktreeTests.cs (43)
17Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
29var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
48var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
51Path.Combine(fixtureRoot, commonGitDirectoryName));
120var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
124var caseVariantRoot = Path.Combine(fixtureRoot, "WORKTREE");
140var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "checkout")).FullName;
163Path.Combine(adminDirectory, "gitdir"),
186Path.Combine(worktreeRoot, ".git"),
200var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
204Path.Combine(adminDirectory, "gitdir"),
223var caseVariantGitFile = Path.Combine(worktreeRoot, ".GIT");
225Path.Combine(adminDirectory, "gitdir"),
241var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
245var aliasRoot = Path.Combine(fixtureRoot, "worktree-alias");
263Path.Combine(adminDirectory, "gitdir"),
264Path.Combine(aliasRoot, ".git") + Environment.NewLine);
282var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
291Assert.Null(GitWorktree.TryGetLinkedWorktreeRoot(Path.Combine(submoduleRoot, "AppHost.csproj")));
299var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
303Path.Combine(adminDirectory, "gitdir"),
315var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
317var otherWorktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "other-worktree")).FullName;
322Path.Combine(adminDirectory, "gitdir"),
333var worktreeRoot = Directory.CreateDirectory(Path.Combine(fixtureRoot, "worktree")).FullName;
345Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git"));
350var appHostPath = Path.Combine(submoduleRoot, "AppHost.csproj");
370Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
372TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
373var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj");
374var primaryAppHost = Path.Combine(primaryRoot, "AppHost.csproj");
387Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
389var adminDirectory = TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
392var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
404Directory.CreateDirectory(Path.Combine(primaryRoot, ".git"));
409var submoduleAppHost = Path.Combine(submoduleRoot, "AppHost.csproj");
446var repoBSubmoduleAppHost = Path.Combine(repoBSubmoduleRoot, "AppHost.csproj");
458TestGitWorktree.WriteLinkedWorktreeMetadata(worktreeRoot, Path.Combine(primaryRoot, ".git"));
468var workingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "plain")).FullName;
479var unmanagedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "outside")).FullName;
480var unmanagedAppHost = Path.Combine(unmanagedDirectory, "App.csproj");
493var root = Directory.CreateDirectory(Path.Combine(parent.FullName, name)).FullName;
494Directory.CreateDirectory(Path.Combine(root, ".git"));
HeldFileLeaseTests.cs (9)
44var orphanPath = Path.Combine(leaseDirectory, $"orphan{LeaseExtension}");
57var leaseDirectory = Path.Combine(workspace.Path, "missing");
67var leasePath = Path.Combine(leaseDirectory, $"orphan.unverified-lock{LeaseExtension}");
79var readyPath = Path.Combine(workspace.Path, "ready");
80var releasePath = Path.Combine(workspace.Path, "release");
119var orphanPath = Path.Combine(leaseDirectory, $"orphan{LeaseExtension}");
135var readyPath = Path.Combine(workspace.Path, "ready");
136var releasePath = Path.Combine(workspace.Path, "release");
178File.WriteAllText(Path.Combine(leaseDirectory, $"orphan{LeaseExtension}"), "{}");
Interaction\ExtensionInteractionServiceTests.cs (10)
35var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [extension].log");
68var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log");
108var cliLogFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log");
109var appHostLogFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cli.log");
158var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log");
221Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log"),
351var invalidPath = Path.Combine(workspace.WorkspaceRoot.FullName, "invalid");
352var validPath = Path.Combine(workspace.WorkspaceRoot.FullName, "valid");
393var invalidPath = Path.Combine(workspace.WorkspaceRoot.FullName, "invalid");
461var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [extension].log");
Layout\LayoutDiscoveryReparsePointTests.cs (37)
43var realBinary = Path.Combine(realLayoutRoot, "aspire");
48var linkPath = Path.Combine(linksDir, "aspire");
69var rawLayoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "custom-layout");
72var realBinaryDir = Path.Combine(workspace.WorkspaceRoot.FullName, "real-binary");
74var realBinary = Path.Combine(realBinaryDir, "aspire");
77var linkPath = Path.Combine(rawLayoutRoot, "aspire");
98var versionedManaged = Path.Combine(versionsDir, BundleDiscovery.ManagedDirectoryName);
99var versionedDashboard = Path.Combine(versionsDir, BundleDiscovery.DashboardDirectoryName);
100var versionedDcp = Path.Combine(versionsDir, BundleDiscovery.DcpDirectoryName);
105Path.Combine(versionedManaged, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
107var dashboardPath = Path.Combine(versionedDashboard, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
113var bundleLink = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
149var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
190var relativeLayoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "colocated");
191var binDir = Path.Combine(relativeLayoutRoot, "bin");
193var binaryPath = Path.Combine(binDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
231? Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)
234var managedDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.ManagedDirectoryName));
235Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DcpDirectoryName));
237Path.Combine(managedDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
239var dashboardDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DashboardDirectoryName));
241Path.Combine(dashboardDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
243var binaryPath = Path.Combine(layoutRoot, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
266? Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName)
269var managedDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.ManagedDirectoryName));
270var dcpDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DcpDirectoryName));
272Path.Combine(managedDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
278Path.Combine(managedDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
282var binaryPath = Path.Combine(layoutRoot, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
291var dashboardDir = Directory.CreateDirectory(Path.Combine(componentRoot, BundleDiscovery.DashboardDirectoryName));
294var dashboardPath = Path.Combine(dashboardDir.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
306var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName);
307var managedDir = Path.Combine(bundleDir, BundleDiscovery.ManagedDirectoryName);
308var dashboardDir = Path.Combine(bundleDir, BundleDiscovery.DashboardDirectoryName);
309var dcpDir = Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName);
314Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
317Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
Layout\TrayLayoutTests.cs (12)
25var components = bundleDirectory ? Path.Combine(root, "bundle") : root;
26Directory.CreateDirectory(Path.Combine(components, "managed"));
27Directory.CreateDirectory(Path.Combine(components, "dashboard"));
28Directory.CreateDirectory(Path.Combine(components, "dcp"));
31File.WriteAllText(BundleDiscovery.GetDcpExecutablePath(Path.Combine(components, "dcp")), "");
38var trayPath = Path.Combine(components, OperatingSystem.IsWindows()
73var source = Path.Combine(workspace.Path, "publish");
81writer.WriteEntry(Path.Combine(source, file), $"{rid}/tray/{file}");
85var extracted = Path.Combine(workspace.Path, "extracted");
89WindowsTrayPayload.Validate(Path.Combine(extracted, "tray"), rid);
91Directory.GetFiles(Path.Combine(extracted, "tray")).Select(Path.GetFileName).Order());
94Assert.Equal(File.ReadAllBytes(Path.Combine(source, file)), File.ReadAllBytes(Path.Combine(extracted, "tray", file)));
Mcp\SelectAppHostToolTests.cs (10)
28var appHostFile = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj"));
31var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
33var suppliedPath = Path.Combine("link", appHostFile.Name);
34var displayPath = Path.GetFullPath(Path.Combine(workspace.WorkspaceRoot.FullName, suppliedPath));
75var realAppHostPath = Path.Combine(realDirectory.FullName, "Symlinked.AppHost.csproj");
77var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
88var symlinkedAppHostPath = Path.Combine(symlinkDirectory, "Symlinked.AppHost.csproj");
111var actualAppHostPath = Path.Combine(directory.FullName, "CaseSensitive.AppHost.csproj");
150var firstAppHostPath = Path.Combine(firstDirectory.FullName, "First.AppHost.csproj");
151var secondAppHostPath = Path.Combine(secondDirectory.FullName, "Second.AppHost.csproj");
Migrations\TypeScriptAppHostMigrationTests.cs (29)
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"));
234LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(root.FullName, "aspire.config.json"));
241var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "external-apphost"));
244await CreateMigration(workspace).ApplyAsync(new MigrationContext(new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts"))), CancellationToken.None);
246Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, "apphost.ts")));
247Assert.False(Directory.Exists(Path.Combine(appHostDirectory.FullName, ".modules")));
248Assert.Equal(ExpectedModernAppHostContent, await File.ReadAllTextAsync(Path.Combine(appHostDirectory.FullName, "apphost.mts")));
290var migratedContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "apphost.mts"));
294Assert.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)
21var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
67Assert.StartsWith(Path.Combine(appHostDirectory.FullName, ".aspire") + Path.DirectorySeparatorChar, preview.EffectiveWorkingDirectory.FullName);
71Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "private-feed"), privateSource.Source);
103Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
144var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
163var globalPackagesFolder = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
178Assert.Equal(Path.Combine(Path.GetDirectoryName(manifestPath)!, "obj"), capturedOutputPath);
287var toolPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.dll");
307Path.Combine(AppContext.BaseDirectory, $"{typeof(BundleNuGetService).Assembly.GetName().Name}.dll"),
364var manifestPath = Path.Combine(GetRestoreDirectory(workspace, packageList), ManifestFileName);
388var manifestPath = Path.Combine(GetRestoreDirectory(workspace, packageList), ManifestFileName);
408var firstAppHost = workspace.CreateDirectory(Path.Combine("apps", "api"));
409var secondAppHost = workspace.CreateDirectory(Path.Combine("apps", "web"));
444var legacyLibsDirectory = Directory.CreateDirectory(Path.Combine(restoreDirectory, "libs"));
445var lockedFilePath = Path.Combine(legacyLibsDirectory.FullName, "Microsoft.Extensions.DependencyInjection.xml");
456Assert.Equal(Path.Combine(restoreDirectory, ManifestFileName), result);
NuGet\NuGetClientTests.cs (39)
33await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), """
54await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), $$"""
77await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"),
108var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
220Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
284Path.Combine(machineDirectory.FullName, "NuGet.Config"),
295Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
403Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"),
465var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
506var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
797var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
831var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName);
833Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName),
841Assert.False(Directory.Exists(Path.Combine(restoreDirectory.FullName, "libs")));
891var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
940var assets = new LockFileFormat().Read(Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName));
997var assets = new LockFileFormat().Read(Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName));
1044var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName);
1046Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName),
1097var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName);
1099Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName),
1171var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1235var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1296var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1411var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1431File.WriteAllText(Path.Combine(incompleteInstallPath, "partial.txt"), "incomplete");
1452Assert.True(File.Exists(Path.Combine(package.InstallPath, ".nupkg.metadata")));
1457Directory.Delete(Path.Combine(globalPackagesFolder, packageId.ToLowerInvariant()), recursive: true);
1466var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
1523Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
1545var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
1577var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
1632var originalPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
1647var overlayPath = Path.Combine(overlayDirectory.FullName, "NuGet.Config");
1666var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1686var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
1743var lockFile = new LockFileFormat().Read(Path.Combine(restoreDirectory, LockFileFormat.AssetsFileName));
1765var packagePath = Path.Combine(feedDirectory, $"{packageId}.{version}.nupkg");
1827var packageDirectory = Path.Combine(globalPackagesFolder, packageId.ToLowerInvariant());
NuGet\NuGetConfigurationQueryTests.cs (7)
32var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
110var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
165Path.Combine(directory.FullName, "NuGet.Config"),
208var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
238Path.Combine(nonCanonicalDirectory.FullName, "NuGet.Config"),
252Path.Combine(mappingThenClearDirectory.FullName, "NuGet.Config"),
264Path.Combine(clearThenMappingDirectory.FullName, "NuGet.Config"),
Packaging\PackageChannelTests.cs (37)
147Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"),
229File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
233File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
276File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
279File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
317File.WriteAllText(Path.Combine(channelPackagesDirectory.FullName, "Aspire.ProjectTemplates.13.4.0-preview.1.nupkg"), string.Empty);
321File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0-preview.2.nupkg"), string.Empty);
356File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0-preview.2.nupkg"), string.Empty);
383File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Redis.{pinnedVersion}.nupkg"), string.Empty);
384File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.PostgreSQL.{pinnedVersion}.nupkg"), string.Empty);
385File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"CommunityToolkit.Aspire.Hosting.NodeJS.{pinnedVersion}.nupkg"), string.Empty);
388File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.SqlServer.13.3.0.nupkg"), string.Empty);
391File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty);
398File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.AppHost.{pinnedVersion}.nupkg"), string.Empty);
399File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Sdk.{pinnedVersion}.nupkg"), string.Empty);
400File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Orchestration.linux-arm64.{pinnedVersion}.nupkg"), string.Empty);
401File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Testing.{pinnedVersion}.nupkg"), string.Empty);
402File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Msi.{pinnedVersion}.nupkg"), string.Empty);
403File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Integration.Analyzers.{pinnedVersion}.nupkg"), string.Empty);
406File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Dapr.{pinnedVersion}.nupkg"), string.Empty);
407File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.GitHub.Models.{pinnedVersion}.nupkg"), string.Empty);
408File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.NodeJs.{pinnedVersion}.nupkg"), string.Empty);
691File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.4.0.nupkg"), string.Empty);
692File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0-preview.1.nupkg"), string.Empty);
693File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.PostgreSQL.13.4.0-preview.1.nupkg"), string.Empty);
710File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.4.0.nupkg"), string.Empty);
711File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0-preview.1.nupkg"), string.Empty);
712File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.PostgreSQL.13.4.0.nupkg"), string.Empty);
729File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0.nupkg"), string.Empty);
730File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.6.0-preview.1.nupkg"), string.Empty);
731File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Azure.Kubernetes.13.6.0-pr.19404.gf51e8e1d.nupkg"), string.Empty);
760File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Dapr.13.4.0.nupkg"), string.Empty);
761File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Sql.13.4.0.nupkg"), string.Empty);
780File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Dapr.13.4.0.nupkg"), string.Empty);
781File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Sql.13.4.0.nupkg"), string.Empty);
1039var missingDirectory = Path.Combine(Path.GetTempPath(), $"aspire-missing-{Guid.NewGuid():N}");
1079CreatePackageWithTags(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 (7)
36AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
74AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
250AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
295AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
334AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
372AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"),
405Path.Combine(workspace.WorkspaceRoot.FullName, "test.log"),
ProfileCaptureServiceTests.cs (9)
117var managedPath = Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName));
122Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
153Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
156var dashboardPath = Path.Combine(dashboardDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
526var dashboardPath = Path.Combine(
541var missingPath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing");
551var logPath = Path.Combine(workspace.WorkspaceRoot.FullName, "profile-service.log");
738var path = Path.Combine(workspace.WorkspaceRoot.FullName, fileName);
749outputPath ?? Path.Combine(workspace.WorkspaceRoot.FullName, "profile.zip"),
Projects\AppHostCandidateFinderTests.cs (8)
169var searchRoot = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "obj"));
206var nugetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
316var nugetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
340var differentlyCasedNuGetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "NUGET-CACHE");
384var nugetCachePath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
542await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, ".gitignore"), "legacy/\n");
575var searchDirectory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "src"));
610var fullPath = Path.Combine(root.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar));
Projects\AppHostServerProjectTests.cs (22)
65var parentConfigPath = Path.Combine(_workspace.Path, "NuGet.Config");
81var repoConfigPath = Path.Combine(repoRoot.FullName, "NuGet.Config");
94await File.WriteAllTextAsync(Path.Combine(repoRoot.FullName, "Directory.Packages.props"), "<Project />");
95await File.WriteAllTextAsync(Path.Combine(appPath.FullName, "NuGet.Config"), """
181var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json");
202var programCsPath = Path.Combine(project.ProjectModelPath, "Program.cs");
224var programCs = Path.Combine(project.ProjectModelPath, "Program.cs");
247var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json");
302Path.Combine("src", "Aspire.Hosting.PostgreSQL"));
303var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "Aspire.Hosting.PostgreSQL.csproj");
337Path.Combine("src", "Aspire.Hosting.Redis"));
338var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "Aspire.Hosting.Redis.csproj");
410var expectedRoot = Path.Combine(CliPathHelper.GetAspireHomeDirectory(), "hosts");
411var expectedPath = Path.Combine(expectedRoot, pathDir);
471var aspireConfigPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
519var projectModelPath = Path.Combine(appPath, ".aspire_server");
550var projectFilePath = Path.Combine(project.ProjectModelPath, DotNetBasedAppHostServerProject.ProjectFileName);
575var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName);
593var projectModelPath = Path.Combine(appPath, ".aspire_server");
637var projectModelPath = Path.Combine(appPath, ".aspire_server");
665var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName);
683var projectModelPath = Path.Combine(appPath, ".aspire_server");
Projects\DotNetAppHostProjectTests.cs (89)
268File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
487Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]);
516var customDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "custom-dcp"));
518var customDashboardPath = Path.Combine(
569var inheritedDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dcp")).FullName;
571var inheritedDashboardPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dashboard");
632: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dcp");
635: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dashboard");
902var repoLocalTerminalHost = Path.Combine(_workspace.WorkspaceRoot.FullName, "repo-local-terminalhost");
962var customTerminalHost = Path.Combine(_workspace.WorkspaceRoot.FullName, "my-custom-terminal-host");
1030var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "run-cwd"));
1041Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1140Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1182"--log-file", Path.Combine(_workspace.WorkspaceRoot.FullName, "child.log"),
1230Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1296Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1386Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1428Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1472Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1519Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1564Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1684var targetPath = Path.Combine(outputDirectory.FullName, "AppHost.dll");
1768Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1835Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
1939File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "AppHost.run.json"), """
2004Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "My Project"));
2065Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2130Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2187Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties"));
2298Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]);
2482File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
2714var appHostSymlink = Path.Combine(appHostFile.DirectoryName!, "apphost-link.cs");
2743var targetAppHostFile = new FileInfo(Path.Combine(realDirectory.FullName, "apphost.cs"));
2747var selectedAppHostPath = Path.Combine(selectedDirectory.FullName, "apphost.cs");
2777var selectedAppHostFile = new FileInfo(Path.Combine(configuredAppHostFile.DirectoryName!, "AppHost.cs"));
2840File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """
2994var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs");
3015var socketPath = Path.Combine(
3025var targetPath = Path.Combine(outputDirectory.FullName, fileName);
3034var commandPath = Path.Combine(outputDirectory.FullName, fileName);
3135var appHost = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs"));
3151var appHost = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs"));
3164var appHost = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs"));
3493WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3585WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
3590WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.targets"), """
3779WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3814WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
3819WriteIsLikelyAppHostProject(Path.Combine("repo", "Custom.props"), """
3849WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
3884WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3916WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3956WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
3999WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4037WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4065WriteIsLikelyAppHostProject(Path.Combine("outer", "directory.build.props"), """
4089WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """
4120WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """
4182WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4206WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4265var projectFile = WriteIsLikelyAppHostProject(Path.Combine("proj", "MyApp.csproj"), """
4274WriteIsLikelyAppHostProject(Path.Combine("proj", "Directory.Build.props"), $"""
4279WriteIsLikelyAppHostProject(Path.Combine("external", "Directory.Build.props"), """
4355WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4373WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4391WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4412WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4434WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """
4485WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4523WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4556WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
4575WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """
4607WriteIsLikelyAppHostProject(Path.Combine("outer", "Repo.marker"), "<Project />");
4608WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """
4684var projectFile = new FileInfo(Path.Combine(repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
4702while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
4718Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, ".git"));
4720var path = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4755var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4772var projectPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName);
4786var bundleRoot = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, Guid.NewGuid().ToString()));
4787var dcpDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName));
4788var managedDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.ManagedDirectoryName));
4789var dashboardDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.DashboardDirectoryName));
4790var terminalHostDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.TerminalHostDirectoryName));
4793Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)),
4796Path.Combine(dashboardDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
4799Path.Combine(terminalHostDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.TerminalHostExecutableName)),
4856=> File.WriteAllText(Path.Combine(directory, "aspire.config.json"), content);
Projects\ExtensionGuestLauncherTests.cs (8)
32var command = Path.Combine(Path.GetTempPath(), "npx");
64new FileInfo(Path.Combine(root.FullName, "AppHost.java")),
100await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "npx"), ["tsx"], new DirectoryInfo("/tmp"), new Dictionary<string, string>(), afterLaunchAsync: null, options: null, CancellationToken.None);
115await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "npx"), [], new DirectoryInfo("/tmp"), new Dictionary<string, string>(), afterLaunchAsync: null, options: null, CancellationToken.None);
136await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "npx"), ["tsx"], new DirectoryInfo("/tmp"), envVars, afterLaunchAsync: null, options: null, CancellationToken.None);
150var (exitCode, output) = await launcher.LaunchAsync(Path.Combine(Path.GetTempPath(), "cmd"), [], new DirectoryInfo("/tmp"), new Dictionary<string, string>(), afterLaunchAsync: null, options: null, CancellationToken.None);
166var command = Path.Combine(Path.GetTempPath(), "python");
180var executable = Path.Combine(binDirectory.FullName, OperatingSystem.IsWindows() ? $"{command}.exe" : command);
Projects\FallbackProjectParserTests.cs (19)
24var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
46var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
62var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{extension}"));
92var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
114var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
139var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
164var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
189var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
215var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
254var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
281var referencedPath = Path.Combine(webDirectory.FullName, "Web.csproj");
284var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
306var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
330var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
360var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
383var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
407var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
430var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
452var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.txt");
Projects\GuestAppHostProjectTests.cs (90)
69var executable = Path.Combine(root.FullName, "server");
95await File.WriteAllTextAsync(Path.Combine(root.FullName, "apphost.mts"), "// test apphost");
123await File.WriteAllTextAsync(Path.Combine(root.FullName, "apphost.mts"), "// test apphost");
163var appHostFile = new FileInfo(Path.Combine(appDirectory.FullName, "apphost.mts"));
235hostRestoredBeforeBootstrap = File.Exists(Path.Combine(integrationDirectory.FullName, "installed.txt"));
243&& File.Exists(Path.Combine(appDirectory.FullName, "app-installed.txt"))
244&& File.Exists(Path.Combine(integrationDirectory.FullName, "installed.txt"));
299Assert.Equal(guestInstallExitCode == 0, File.Exists(Path.Combine(integrationDirectory.FullName, "installed.txt")));
353Assert.Equal(["install"], await File.ReadAllLinesAsync(Path.Combine(directory.FullName, "arguments.txt")));
381parentPid = await ProcessTestHelpers.WaitForProcessIdAsync(Path.Combine(directory.FullName, "parent.pid"), readinessCts.Token);
382childPid = await ProcessTestHelpers.WaitForProcessIdAsync(Path.Combine(directory.FullName, "child.pid"), readinessCts.Token);
408Directory.CreateDirectory(Path.Combine(outputPath, "aspire"));
417[Path.Combine("aspire", "Kept.java"), Path.Combine("aspire", "RemovedResource.java")],
425[Path.Combine("aspire", "Kept.java")],
437var handWritten = Path.Combine(outputPath, "HandWritten.java");
451var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "Generated.java");
467var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "Generated.java");
481var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "New.java");
492var filePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire_app.py");
534var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
554var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
740var settingsPath = Path.Combine(settingsDir.FullName, "settings.json");
800var launchSettingsPath = Path.Combine(propertiesDir.FullName, "launchSettings.json");
889var aspireConfigPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1070var legacyAppHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, LegacyTypeScriptAppHost.LegacyAppHostFileName);
1073Path.Combine(_workspace.WorkspaceRoot.FullName, LegacyTypeScriptAppHost.ModernAppHostFileName),
1093Assert.True(Directory.Exists(Path.Combine(
1096Assert.False(Directory.Exists(Path.Combine(
1118var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1126var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1183var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1191var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1194Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.mts"),
1196var installScriptPath = Path.Combine(_workspace.WorkspaceRoot.FullName, OperatingSystem.IsWindows() ? "install.cmd" : "install.sh");
1200var installMarkerPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "install.marker");
1210Command = OperatingSystem.IsWindows() ? Path.Combine(Environment.SystemDirectory, "cmd.exe") : "/bin/sh",
1225var manifestPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "package.json");
1229await File.WriteAllTextAsync(Path.Combine(_workspace.WorkspaceRoot.FullName, "package.after-install.json"), installedManifest);
1302var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1310var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1350var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1358var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1396var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1404var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1448var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1456var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1490var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1499var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1540var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1549var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1583var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1607var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.mts");
1629var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1638var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1696var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1704var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1753var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1762var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1813var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1822var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1870var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1879var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
1937var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1954var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
2053var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
2102var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
2193var appHostFile = new FileInfo(Path.Combine(root.FullName, "apphost.mts"));
2194var executable = Path.Combine(root.FullName, "server");
2250var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
2277var secretsFilePath = secretsFileName is null ? null : Path.Combine(_workspace.WorkspaceRoot.FullName, secretsFileName);
2312var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
2327new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "package.json")));
2364var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2372var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
2454var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2462var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts");
2550var socketPath = Path.Combine(
2581var logFilePath = Path.Combine(_workspace.WorkspaceRoot.FullName, $"test-guest-{Guid.NewGuid()}.log");
2657var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
2673Assert.False(Directory.Exists(Path.Combine(_workspace.WorkspaceRoot.FullName, "bundles")));
2679var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
2700var lowerCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "certificates");
2701var upperCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "CERTIFICATES");
2704var devCertificatePath = Path.Combine(lowerCaseDirectory, "aspire.pem");
2705var existingBundlePath = Path.Combine(upperCaseDirectory, "ASPIRE.PEM");
2754var existingBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "existing-ca-certs.pem");
2755var inheritedBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-ca-certs.pem");
2757var devCertificatePath = Path.Combine(devCertificateDirectory, "aspire-dev-cert.pem");
2829var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem");
Projects\GuestRuntimeTests.cs (29)
285var appHostFile = new FileInfo(Path.Combine(directory.FullName, "apphost.ts"));
605var appHostFile = new FileInfo(Path.Combine(root.FullName, "AppHost.java"));
777var scriptPath = Path.Combine(
893var appHostFile = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.ts"));
916var logFilePath = Path.Combine(Path.GetTempPath(), $"guest-output-test-{Guid.NewGuid()}.log");
1163var appHostFile = new FileInfo(Path.Combine(tempDir, "apphost.ts"));
1167var migrationFilePath = Path.Combine(tempDir, migrationFileName);
1189var migrationFilePath = Path.Combine(tempDir, migrationFileName);
1211var appHostFile = new FileInfo(Path.Combine(tempDir, "apphost.ts"));
1277var runtime = CreateRuntime(CreateUpToDateSpec(requiredOutputs: [Path.Combine("classes", "AppHost.class")]));
1296var input = Path.Combine(workspace.WorkspaceRoot.FullName, relativeInput.Replace('/', Path.DirectorySeparatorChar));
1317var classFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.class");
1345File.Delete(Path.Combine(workspace.WorkspaceRoot.FullName, relativeInput.Replace('/', Path.DirectorySeparatorChar)));
1360var pom = Path.Combine(workspace.WorkspaceRoot.FullName, "pom.xml");
1384File.WriteAllText(Path.Combine(dependencies, "guava-32.0.0.jar"), "");
1395File.Delete(Path.Combine(dependencies, "guava-32.0.0.jar"));
1396File.WriteAllText(Path.Combine(dependencies, "guava-33.0.0.jar"), "");
1398var runtime = CreateRuntime(CreateUpToDateSpec(extraInputs: [Path.Combine("target", "dependency")]));
1413var jar = Path.Combine(dependencies, "guava-32.0.0.jar");
1422var runtime = CreateRuntime(CreateUpToDateSpec(extraInputs: [Path.Combine("target", "dependency")]));
1458StampFile = Path.Combine("classes", ".aspire-compile-stamp")
1555File.WriteAllText(Path.Combine(unreadable, "Hidden.java"), "class Hidden { }");
1614StampFile = Path.Combine("classes", ".aspire-compile-stamp")
1622var appHostFile = new FileInfo(Path.Combine(root.FullName, "AppHost.java"));
1624File.WriteAllText(Path.Combine(root.FullName, "Helper.java"), "class Helper { }");
1628File.WriteAllText(Path.Combine(generated, "Generated.java"), "class Generated { }");
1632File.WriteAllText(Path.Combine(sources, "Service.java"), "class Service { }");
1634Directory.CreateDirectory(Path.Combine(root.FullName, "classes"));
1670var executable = Path.Combine(binDirectory.FullName, OperatingSystem.IsWindows() ? $"{command}.exe" : command);
Projects\JavaAppHostToolchainResolverTests.cs (72)
17var path = Path.Combine(directory, wrapperName);
85File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
96File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
105File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
106File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
115File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
139File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
149["-B", "-q", "dependency:copy-dependencies", $"-DoutputDirectory={Path.Combine("target", "aspire-deps")}", "-DincludeScope=runtime"],
162"-d", Path.Combine("target", "classes"),
172["-cp", $"{Path.Combine("target", "classes")}{Path.PathSeparator}{Path.Combine("target", "aspire-deps", "*")}", "AppHost"],
187File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
211Outputs = [Path.Combine(".java-build", "AppHost.class")],
213StampFile = Path.Combine(".java-build", ".aspire-compile-stamp")
232Assert.Contains(Path.Combine(outputDirectoryName, "aspire-deps"), inputs);
234? Path.Combine("target", "classes")
236Assert.Equal([Path.Combine(expectedClassesDirectory, "AppHost.class")], check.Outputs!);
244File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
282File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
316var wrapperPath = Path.Combine(workspace.Path, expectedWrapper);
353var rootWrapperPath = Path.Combine(workspace.Path, expectedWrapper);
356var moduleDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "apphost"));
357File.WriteAllText(Path.Combine(moduleDirectory.FullName, useMaven ? "pom.xml" : "build.gradle"), "");
363Assert.Equal(["/c", "call", Path.Combine("..", expectedWrapper)], invocation.PrefixArgs);
377var localRepository = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-maven-repository"));
387Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
411Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
418$"-DoutputDirectory={Path.Combine("target", "aspire-deps")}",
443var localRepository = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-maven-repository"));
453Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
481Path.Combine(workspace.Path, "pom.xml"),
485var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "standalone"));
486File.WriteAllText(Path.Combine(appHostDirectory.FullName, "pom.xml"), "<project />");
497$"-DoutputDirectory={Path.Combine("target", "aspire-deps")}",
505File.WriteAllText(Path.Combine(root, "pom.xml"), """
522var libraryDirectory = Directory.CreateDirectory(Path.Combine(root, "library"));
523File.WriteAllText(Path.Combine(libraryDirectory.FullName, "pom.xml"), """
537Path.Combine(librarySources.FullName, "Library.java"),
540var appHostProjectDirectory = Directory.CreateDirectory(Path.Combine(root, "apphost"));
541File.WriteAllText(Path.Combine(appHostProjectDirectory.FullName, "pom.xml"), """
563Path.Combine(appHostDirectory.FullName, "AppHost.java"),
572Path.Combine(wrapperSource, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
573Path.Combine(root, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"));
577Path.Combine(wrapperDirectory.FullName, "maven-wrapper.properties"));
584File.WriteAllText(Path.Combine(root, "pom.xml"), """
597var appHostProjectDirectory = Directory.CreateDirectory(Path.Combine(root, "apphost"));
598File.WriteAllText(Path.Combine(appHostProjectDirectory.FullName, "pom.xml"), """
609Path.Combine(appHostDirectory.FullName, "AppHost.java"),
618Path.Combine(wrapperSource, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"),
619Path.Combine(root, OperatingSystem.IsWindows() ? "mvnw.cmd" : "mvnw"));
623Path.Combine(wrapperDirectory.FullName, "maven-wrapper.properties"));
694File.WriteAllText(Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? windowsWrapperName : wrapperName), "");
696var innerCheckout = Directory.CreateDirectory(Path.Combine(workspace.Path, "inner"));
697Directory.CreateDirectory(Path.Combine(innerCheckout.FullName, ".git"));
698File.WriteAllText(Path.Combine(innerCheckout.FullName, useMaven ? "pom.xml" : "build.gradle"), "");
710File.WriteAllText(Path.Combine(directory, "pom.xml"), "");
714File.WriteAllText(Path.Combine(directory, "settings.gradle"), "");
722File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
741File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
757File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
761await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), "");
774File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
778Assert.False(Directory.Exists(Path.Combine(workspace.Path, "target")));
785File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
790await File.WriteAllTextAsync(Path.Combine(dependencyDirectory, "library-1.0.jar"), "");
807File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
824File.WriteAllText(Path.Combine(workspace.Path, buildFileName), "");
839File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
849File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />");
860Assert.Contains(Path.Combine(toProjectRoot, "pom.xml"), spec.InstallDependencies.Args);
865Assert.Contains($"-DoutputDirectory={Path.Combine("target", "aspire-deps")}", spec.InstallDependencies.Args);
891File.WriteAllText(Path.Combine(workspace.Path, "build.gradle"), "");
905Assert.Equal(scriptPath, Path.GetFullPath(Path.Combine(appHostDirectory.FullName, initScriptArgument)));
Projects\NativeAppHostServerProjectTests.cs (32)
27var enabled = Directory.CreateDirectory(Path.Combine(workspace.Path, "enabled"));
29var disabled = Directory.CreateDirectory(Path.Combine(workspace.Path, "disabled"));
30var executable = Path.Combine(workspace.Path, "server");
64var executable = Path.Combine(serverDirectory.FullName, "server");
65var contract = Path.Combine(serverDirectory.FullName, "ats-contract.json");
69var managed = Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName("aspire-managed"));
72var entryPoint = Path.Combine(providerDirectory.FullName, "host.mjs");
74await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "metadata.json"), "{}");
75await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "aspire.apphost-server.json"),
110Path.Combine(workspace.Path, "missing"), new TestProcessExecutionFactory(), NullLogger.Instance));
117var executable = Path.Combine(workspace.Path, "server");
129[IntegrationReference.FromProject("Aspire.Hosting.Redis", Path.Combine(workspace.Path, "Redis.csproj"))]));
140var executable = Path.Combine(workspace.Path, "server");
144? IntegrationReference.FromProject(name, Path.Combine(workspace.Path, "tooling.csproj"))
154var executable = Path.Combine(workspace.Path, "server");
209var executable = Path.Combine(workspace.Path, "server");
249var executable = Path.Combine(workspace.Path, "server");
301var executable = Path.Combine(workspace.Path, "server");
366var executable = Path.Combine(workspace.Path, "server");
425var executable = Path.Combine(workspace.Path, "server");
427var root = Directory.CreateDirectory(Path.Combine(workspace.Path, "provider"));
428var entryPoint = Path.Combine(root.FullName, "host.mjs");
430await File.WriteAllTextAsync(Path.Combine(root.FullName, "aspire.apphost-server.json"), new JsonObject
438await File.WriteAllTextAsync(Path.Combine(workspace.Path, "outside.json"), "{}");
452var executable = Path.Combine(workspace.Path, "server");
453var managedDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "managed"));
455await File.WriteAllTextAsync(Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName("aspire-managed")), "");
456await File.WriteAllTextAsync(Path.Combine(workspace.Path, "ats-contract.json"), "{}");
457var providerDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "provider"));
458var entryPoint = Path.Combine(providerDirectory.FullName, "host.mjs");
460await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "metadata.json"), "{}");
461await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "aspire.apphost-server.json"),
Projects\PrebuiltAppHostServerTests.cs (114)
38var path = Path.Combine(workspace.WorkspaceRoot.FullName, "IntegrationRestore.csproj");
55var path = Path.Combine(workspace.WorkspaceRoot.FullName, "IntegrationRestore.csproj");
68var path = Path.Combine(workspace.WorkspaceRoot.FullName, "IntegrationRestore.csproj");
138var projectPath = Path.Combine(projectDirectory.FullName, "PackageDowngrade.csproj");
153var nuGetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
232Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
434Path.Combine("/custom/output/path", "bin") + Path.DirectorySeparatorChar,
450var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "MyIntegration.csproj");
461var projectPath = Path.Combine(projectDirectory.FullName, "GeneratedClosure.csproj");
462var nuGetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
480Path.Combine(projectDirectory.FullName, "Directory.Build.props"),
483Path.Combine(restoreDirectory.FullName, "obj"),
510Assert.False(Directory.Exists(Path.Combine(projectDirectory.FullName, "obj")));
511Assert.False(Directory.Exists(Path.Combine(projectDirectory.FullName, "bin")));
514Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName));
519await File.ReadAllLinesAsync(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName)));
522await File.ReadAllLinesAsync(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureTargetsFileName)));
525await File.ReadAllLinesAsync(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ProjectRefAssemblyNamesFileName)));
555var projectIntegrationPath = Path.Combine(projectIntegrationDirectory.FullName, "ProjectIntegration.csproj");
646.Save(Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"));
661var generatedProjectPath = Path.Combine(generatedProjectDirectory.FullName, "IntegrationRestore.csproj");
669Path.Combine(generatedProjectDirectory.FullName, "Directory.Build.props"),
672Path.Combine(restoreDirectory.FullName, "obj"),
674Path.Combine(workspace.WorkspaceRoot.FullName, "packages")).ToString());
676Path.Combine(generatedProjectDirectory.FullName, "Directory.Packages.props"),
684var restoreConfig = XDocument.Load(Path.Combine(
745Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName));
747Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName));
777Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ClosureMetadataFileName), doc.Descendants(ns + "AspireClosureMetadataFile").FirstOrDefault()?.Value);
778Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ClosureSourcesFileName), doc.Descendants(ns + "AspireClosureSourcesFile").FirstOrDefault()?.Value);
779Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ClosureTargetsFileName), doc.Descendants(ns + "AspireClosureTargetsFile").FirstOrDefault()?.Value);
780Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ProjectRefAssemblyNamesFileName), doc.Descendants(ns + "AspireProjectRefAssemblyNamesFile").FirstOrDefault()?.Value);
1108var firstAppHost = workspace.CreateDirectory(Path.Combine("apps", "api"));
1109var secondAppHost = workspace.CreateDirectory(Path.Combine("apps", "web"));
1150var linkDirectoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "linked-apphost");
1166await File.WriteAllTextAsync(Path.Combine(lexicalWorkspace.FullName, AspireConfigFile.FileName), "{}");
1168var linkedAppHostPath = Path.Combine(lexicalWorkspace.FullName, "apphost");
1319var expectedCachePath = Path.Combine(
1377var expectedCachePath = Path.Combine(
1767var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
1789var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
1823var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
1872var expectedCachePath = Path.Combine(
1882var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
1911var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "integration-packages");
2006var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
2032var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
2075var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
2097var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
2119var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages");
2253new DirectoryInfo(Path.Combine(Path.GetTempPath(), "hives")),
2254new DirectoryInfo(Path.Combine(Path.GetTempPath(), "cache")),
2255new DirectoryInfo(Path.Combine(Path.GetTempPath(), "sdks")),
2256new DirectoryInfo(Path.Combine(Path.GetTempPath(), "logs")),
2385var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2419var appSettingsPath = Path.Combine(workingDirectory, "appsettings.json");
2498Path.Combine("aspire-pr-hive", "packages")).FullName;
2560Path.Combine("aspire-pr-hive", "packages")).FullName;
2592var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2641var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2691var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2741var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2788var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2830var missingPackageSource = Path.Combine(workspace.WorkspaceRoot.FullName, "this-hive-was-deleted");
2832var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2889var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2955var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3113var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3119var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
3258Path.Combine(workspace.WorkspaceRoot.FullName, AspireJsonConfiguration.SettingsFolder),
3305Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
3394Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
3455Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
3520var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
3570var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
3650var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
3727var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config");
3925var restoreDirectory = Path.Combine(workingDirectory, IntegrationClosureBuilder.IntegrationRestoreFolderName);
3927Path.Combine(restoreDirectory, PrebuiltAppHostServer.IntegrationProjectFileName));
3928var intermediateOutputPath = Path.Combine(restoreDirectory, "obj");
3929dependencyGraphSpecPath = Path.Combine(
4074var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
4330Assert.Equal(Path.Combine(layoutPath, "libs"), startInfo.Environment[KnownConfigNames.IntegrationLibsPath]);
4400var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories)
4401.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/'))
4409Path.Combine(workingDirectory, IntegrationPackageProbeManifest.FileName),
4432await Verify(await File.ReadAllTextAsync(Path.Combine(workingDirectory, "appsettings.json")), "json");
4555var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories)
4556.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/'))
4699var firstSourcePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
4700var secondSourcePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
4744var firstPackagePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
4745var secondPackagePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll");
4746var projectPath = Path.Combine(projectRoot.FullName, "MyIntegration.dll");
4793var sourcePath = Path.Combine(restoreDirectory.FullName, "MyIntegration.dll ");
4797Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName),
4800Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName),
4803Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureTargetsFileName),
4805var intermediateOutputPath = Path.Combine(restoreDirectory.FullName, "obj");
4810Path.Combine(intermediateOutputPath, IntegrationClosureBuilder.ProjectAssetsFileName),
4915File.WriteAllText(Path.Combine(terminalDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.TerminalHostExecutableName)), "native");
4917Path.Combine(
4966var sourcePath = Path.Combine(sourceRoot.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar));
4986File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName), metadataLines);
4987File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName), sourcePaths);
4988File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureTargetsFileName), targetPaths);
4989File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ProjectRefAssemblyNamesFileName), projectReferenceAssemblyNames);
5008var packagePath = Path.Combine(feedDirectory.FullName, $"{packageId}.{packageVersion}.nupkg");
5048var document = XDocument.Load(Path.Combine(restoreDirectory.FullName, "Directory.Build.props"));
5086Path.Combine(intermediateOutputPath, $"{generatedProjectFile.Name}.nuget.dgspec.json"),
5122File.WriteAllText(Path.Combine(objDirectory.FullName, "project.assets.json"), projectAssetsContent);
5218var dashboardPath = Path.Combine(
5287var props = XDocument.Load(Path.Combine(projectFilePath.DirectoryName!, "Directory.Build.props"));
5292return XDocument.Load(Path.Combine(policyDirectory, "NuGet.Config"));
Projects\ProjectLocatorTests.cs (220)
39var appHostFile = new FileInfo(Path.Combine(directory.FullName, "apphost.cs"));
71var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
75var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
78var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
102var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
106var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
109var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
131var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
135var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
138var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
164var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
168var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
171var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
197var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
201var firstAlternative = new FileInfo(Path.Combine(alternativesDirectory.FullName, "FirstAlternative.csproj"));
203var secondAlternative = new FileInfo(Path.Combine(alternativesDirectory.FullName, "SecondAlternative.csproj"));
206var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
230var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
234var alternativeAppHost = new FileInfo(Path.Combine(alternativeDirectory.FullName, "Alternative.csproj"));
237var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
259var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
262var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
283var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
286var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
308var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, $"AppHost{index}.csproj"));
313var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
363var configuredPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
365var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.csproj");
380var configuredPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
382var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.csproj");
398var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
402var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
405var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
429var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
433var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
436var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
465var firstAppHostProjectFile = new FileInfo(Path.Combine(firstAppHostDirectory.FullName, "FirstAppHost.csproj"));
469var secondAppHostProjectFile = new FileInfo(Path.Combine(secondAppHostDirectory.FullName, "SecondAppHost.csproj"));
472var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
514var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
536var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
557Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
568var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
572var decoyAppHost = new FileInfo(Path.Combine(decoyDirectory.FullName, "HealthyAppHost.csproj"));
575var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
577var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
607Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
618var outsideAppHost = new FileInfo(Path.Combine(outsideDirectory.FullName, "OutsideAppHost.csproj"));
622var configPath = Path.Combine(workingDirectory.FullName, AspireConfigFile.FileName);
656var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
688var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Missing.csproj"));
719var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebApp.csproj"));
748var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
752var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
756var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
781var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
785var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
812var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
816var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
839var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
844var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
880var staleProjectFile = new FileInfo(Path.Combine(staleProjectDirectory.FullName, "StaleProject.csproj"));
883var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
887var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
933var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
956var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
991var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
995var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj"));
998var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1029var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1033var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj"));
1036var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1066var guestAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
1069var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1103var configuredAppHostProjectFile = new FileInfo(Path.Combine(configuredAppHostDirectory.FullName, "ConfiguredAppHost.csproj"));
1106var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
1109var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1156var configuredAppHostProjectFile = new FileInfo(Path.Combine(configuredAppHostDirectory.FullName, "ConfiguredAppHost.csproj"));
1159var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
1162var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1208var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1212var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
1215var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1245var settingsAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SettingsAppHost.csproj"));
1251var configPath = Path.Combine(workingDirectory.FullName, AspireConfigFile.FileName);
1284var settingsAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.custom"));
1287var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1319var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
1323var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
1349var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
1352var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
1367var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1370var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
1414var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectFileExtension}"));
1432var onDiskProjectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
1465var onDiskProjectFile = new FileInfo(Path.Combine(realDirectory.FullName, "RealAppHost.csproj"));
1468var linkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "LinkedAppHost");
1471var linkedProjectFile = new FileInfo(Path.Combine(linkDirectory, onDiskProjectFile.Name));
1496var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1511var legacyAppHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
1512var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"));
1515await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), JsonSerializer.Serialize(new
1550var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
1570var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName));
1587var appHostFile = new FileInfo(Path.Combine(srcDirectory.FullName, "apphost.ts"));
1590var adjacentConfigPath = Path.Combine(srcDirectory.FullName, AspireConfigFile.FileName);
1635Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1654var appHost1File = new FileInfo(Path.Combine(appHost1Directory.FullName, "apphost.ts"));
1656var appHost1ConfigPath = Path.Combine(appHost1Directory.FullName, AspireConfigFile.FileName);
1666var appHost2File = new FileInfo(Path.Combine(appHost2Directory.FullName, "apphost.ts"));
1668var appHost2ConfigPath = Path.Combine(appHost2Directory.FullName, AspireConfigFile.FileName);
1705Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1724var appHostFile = new FileInfo(Path.Combine(srcDirectory.FullName, "apphost.ts"));
1759Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
1773var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "MyAppHost.csproj"));
1780var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
1781var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
1803var aspireConfigFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
1817var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1842var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
1868var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs"));
1878var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj"));
1883var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs"));
1923var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1943var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj"));
1948var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs"));
1984var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2011var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2035var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2056var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2059var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2082var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
2093var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj"));
2108var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt"));
2128var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2133var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
2206: Path.Combine(executionContext.WorkingDirectory.FullName, AspireConfigFile.FileName);
2320var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
2375var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "UnbuildableAppHost.csproj"));
2393Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)));
2405var first = new FileInfo(Path.Combine(firstProjectDirectory.FullName, "FirstAppHost.csproj"));
2408var second = new FileInfo(Path.Combine(secondProjectDirectory.FullName, "SecondAppHost.csproj"));
2445var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2450var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2487var healthyAppHost = new FileInfo(Path.Combine(healthyDirectory.FullName, "HealthyAppHost.csproj"));
2492var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2495var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2528var configuredAppHost = new FileInfo(Path.Combine(configuredDirectory.FullName, "ConfiguredAppHost.csproj"));
2533var firstAppHost = new FileInfo(Path.Combine(firstDirectory.FullName, "FirstAppHost.csproj"));
2536var secondAppHost = new FileInfo(Path.Combine(secondDirectory.FullName, "SecondAppHost.csproj"));
2539var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2573var unsupportedAppHost = new FileInfo(Path.Combine(unsupportedDirectory.FullName, "UnsupportedAppHost.csproj"));
2578var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2629var appHostFile = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj"));
2632var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
2647var brokenAppHost = new FileInfo(Path.Combine(brokenDirectory.FullName, "BrokenAppHost.csproj"));
2651var firstHealthy = new FileInfo(Path.Combine(firstHealthyDirectory.FullName, "FirstHealthyAppHost.csproj"));
2655var secondHealthy = new FileInfo(Path.Combine(secondHealthyDirectory.FullName, "SecondHealthyAppHost.csproj"));
2658var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
2697var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj"));
2699var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj"));
2734var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs"));
2762var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj"));
2801var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
2806var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.cs"));
2844var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
2848var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
2886var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
2909var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2930var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
2952var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
3012var cachedProject = new FileInfo(Path.Combine(nugetCacheDir, "Aspire.AppHost1.csproj"));
3077var customCacheDir = Path.Combine(workspace.WorkspaceRoot.FullName, "custom-nuget-cache");
3080var cachedProject = new FileInfo(Path.Combine(cachedProjectDir, "Aspire.AppHost1.csproj"));
3109var customCacheDir = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget-cache");
3114var siblingProject = new FileInfo(Path.Combine(siblingDir, "AppHost.csproj"));
3120var cachedProject = new FileInfo(Path.Combine(cachedProjectDir, "Aspire.AppHost1.csproj"));
3150var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyAppHost.csproj"));
3173var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3179var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3203var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "RealAppHost.csproj"));
3227await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "Not a real apphost");
3230await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "Not a real apphost");
3248var appHost1File = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
3251var appHost2File = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
3254var slowValidationFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SlowValidation.csproj"));
3307var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3311var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3315var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
3317var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
3340var appHost1File = new FileInfo(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"));
3344var appHost2File = new FileInfo(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"));
3348var aspireSettingsDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"));
3350var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json"));
3539var configuredAppHost = new FileInfo(Path.Combine(configuredDirectory.FullName, "ConfiguredAppHost.csproj"));
3543var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3703var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3707var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3741var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3770var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.unknown"));
3774var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3803var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
3807var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3851var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3886var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3917var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3944var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
3969var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
3994var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
4024var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
4051var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
4078var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json");
4116var realAppHost = new FileInfo(Path.Combine(realAppDirectory.FullName, "AppHost.csproj"));
4123var linkDirectory = Path.Combine(nodeModulesDir.FullName, "link");
4137var pathThroughLink = Path.Combine(linkDirectory, "AppHost.csproj");
4145var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
4188var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
4191var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "APPHOST.csproj");
4199var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
4226var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
Projects\ProjectUpdaterNuGetConfigurationTests.cs (38)
55var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config"));
82json["Properties"]![overriddenProperty] = Path.Combine(workspace.WorkspaceRoot.FullName, "custom-policy");
108Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*"));
150Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
151Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*"));
170projectFile.MoveTo(Path.Combine(workspace.CreateDirectory("AppHost").FullName, fileName));
172var configPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
249var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
364Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*"));
394Assert.False(File.Exists(Path.Combine(workspace.Path, "nuget.config")));
395Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*"));
423var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config"));
431var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
438var webProject = new FileInfo(Path.Combine(webDirectory.FullName, "Web.csproj"));
526var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config"));
534var projectFile = new FileInfo(Path.Combine(workspace.Path, "apphost.cs"));
544var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
626var file = new FileInfo(Path.Combine(workspace.Path, fileName));
656await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName),
703Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*"));
738var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config"));
818var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config"));
932await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName),
954var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1019projectFile.MoveTo(Path.Combine(workspace.CreateDirectory("AppHost").FullName, projectFile.Name));
1024var parentConfig = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config"));
1036var configFile = new FileInfo(Path.Combine(projectFile.DirectoryName!, "NuGet.Config"));
1054await File.WriteAllTextAsync(Path.Combine(projectFile.DirectoryName!, AspireConfigFile.FileName),
1177var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
1313Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*"));
1333project.MoveTo(Path.Combine(appHostDirectory.FullName, fileName));
1336var configPath = Path.Combine(
1345Assert.StartsWith(Path.Combine(appHostDirectory.FullName, ".aspire") + Path.DirectorySeparatorChar, directory.FullName);
1351? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "NuGet")
1358: [Path.Combine(globalConfigDirectory, "NuGet.Config")]);
1378Assert.StartsWith(Path.Combine(appHostDirectory.FullName, ".aspire") + Path.DirectorySeparatorChar,
1439var propsFile = new FileInfo(Path.Combine(workspace.Path, "Directory.Packages.props"));
1473var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config"));
Projects\ProjectUpdaterTests.cs (93)
33var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
68var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{extension}"));
71var importedFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props");
192var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "apphost.cs" : $"AppHost{extension}"));
207await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"),
217? await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"))
219var configFile = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
221var cpmFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props");
262document.WithProperty("DirectoryBuildPropsPath", Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"));
264Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props");
301Assert.Equal(importedContent, await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props")));
320var props = System.Xml.Linq.XDocument.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"));
348var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
399var appHostProject = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj"));
402var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
404var appHostProjectViaSymlink = new FileInfo(Path.Combine(symlinkDirectory, appHostProject.Name));
416var lowerCaseProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.csproj"));
418var upperCaseProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
435var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
438var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
441var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
545var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
548var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
551var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
564var aspireConfigFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"));
709var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
712var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
715var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
727var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json"));
816var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
819var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
822var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
832var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json"));
991var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1111var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj"));
1114var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj"));
1117var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj"));
1120var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj"));
1244var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
1247var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1249var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1380var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1382var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1483var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1485var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1605var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1607var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1716var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1795var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1872var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1873var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1972Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
1973Assert.False(File.Exists(Path.Combine(appHostProjectFile.DirectoryName!, "nuget.config")));
1987var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
2014Assert.StartsWith(Path.Combine(appHostProjectFile.DirectoryName!, ".aspire") + Path.DirectorySeparatorChar, workingDirectory.FullName);
2055Assert.True(File.Exists(Path.Combine(appHostProjectFile.DirectoryName!, "nuget.config")));
2061var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2221var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2223var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2334var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2336var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2458var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2460var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2572var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2574var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2683var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2777var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2779var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2879var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2959var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3041var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
3134var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
3228var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
3304var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
3386var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3472var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3550var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3628var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3761var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
3763var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
3888var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3921var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3953var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
3990var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
4026var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
4059var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
4096var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}");
4114var directoryPackagesPropsFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props");
4167var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "Issue15891.AppHost.csproj"));
4281var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
4358var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
4412var existingConfigFile = new FileInfo(Path.Combine(executionContext.WorkingDirectory.FullName, "nuget.config"));
4444var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
Projects\RepositoryToolUpdaterTests.cs (23)
26var workingDirectory = root.CreateSubdirectory(Path.Combine("src", "app"));
60var unrelatedPath = Path.Combine(child.CreateSubdirectory(".config").FullName, "dotnet-tools.json");
80var rootManifestPath = Path.Combine(child.CreateSubdirectory(".config").FullName, "dotnet-tools.json");
105var gitPath = Path.Combine(root.FullName, ".git");
142var unrelatedPath = Path.Combine(child.FullName, "package.json");
167var link = Path.Combine(root.FullName, directoryLink ? ".config" : "package.json");
169var alias = Path.Combine(workspace.WorkspaceRoot.FullName, "alias");
193var manifestPath = Path.Combine(configDirectory.FullName, "dotnet-tools.json");
212var unrelatedPath = Path.Combine(root.FullName, "package.json");
215var workingDirectory = root.CreateSubdirectory(Path.Combine("src", "app"));
216var localManifestPath = Path.Combine(workingDirectory.CreateSubdirectory(".config").FullName, "dotnet-tools.json");
253var manifestPath = Path.Combine(root.FullName, "package.json");
317var lockPath = Path.Combine(root.FullName, "package-lock.json");
385Assert.False(File.Exists(Path.Combine(root.FullName, "package-lock.json")));
386Assert.False(File.Exists(Path.Combine(root.FullName, "npm-shrinkwrap.json")));
461var lockPath = Path.Combine(root.FullName, "package-lock.json");
552var path = Path.Combine(root.FullName, isNpm ? "package.json" : "dotnet-tools.json");
576var lockPath = Path.Combine(root.FullName, "package-lock.json");
609var dotNetPath = Path.Combine(root.FullName, "dotnet-tools.json");
610var npmPath = Path.Combine(root.FullName, "package.json");
731var path = Path.Combine(directory.FullName, isNpm ? "package.json" : "dotnet-tools.json");
762var packageLockPath = Path.Combine(directory.FullName, "package-lock.json");
763var shrinkwrapPath = Path.Combine(directory.FullName, "npm-shrinkwrap.json");
Projects\TypeScriptAppHostToolchainResolverTests.cs (39)
18File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
29File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"deno@2.9.0\" }");
42var packageJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "package.json");
57File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
58File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "deno.lock"), "{ \"version\": \"5\" }");
70File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
71File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "deno.json"), "{}");
83File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
84File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "deno.jsonc"), "{ /* Deno configuration */ }");
96File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
97File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "pnpm-lock.yaml"), "lockfileVersion: '9.0'");
108var packageJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "package.json");
120File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"yarn@4.14.1\" }");
131File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
132var yarnLockPath = Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock");
146File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
147File.WriteAllText(Path.Combine(parentDirectory.FullName, "package.json"), "{ \"name\": \"workspace\" }");
148var yarnLockPath = Path.Combine(parentDirectory.FullName, "yarn.lock");
162File.WriteAllText(Path.Combine(parentDirectory.FullName, "package.json"), "{ \"name\": \"workspace\" }");
163File.WriteAllText(Path.Combine(parentDirectory.FullName, "yarn.lock"), string.Empty);
164File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
165File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package-lock.json"), "{}");
177File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
178File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package-lock.json"), "{}");
179File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock"), string.Empty);
191File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
192Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".yarn"));
203File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
214File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"name\": \"apphost\" }");
215File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock"), string.Empty);
234File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.12.1\" }");
235File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
248File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.12.1\" }");
249File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
254Assert.Equal($"packageManager 'bun@1.2.0' found in {Path.Combine(appHostDirectory.FullName, "package.json")}", resolution.Reason);
263File.WriteAllText(Path.Combine(appHostDirectory.Parent!.FullName, "package.json"), "{ \"packageManager\": \"yarn@4.14.1\" }");
264File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"name\": \"apphost\" }");
265File.WriteAllText(Path.Combine(appHostDirectory.FullName, "pnpm-lock.yaml"), "lockfileVersion: '9.0'");
277File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
Scaffolding\ScaffoldingServiceTests.cs (11)
36File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}");
41Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName),
74File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}");
156var appHostDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName));
157File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{ \"packageManager\": \"npm@10.0.0\" }");
158File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.0.0\" }");
228var scaffoldDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName));
251File.WriteAllText(Path.Combine(rootDirectory.FullName, ".gitignore"), "node_modules/\n");
252File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}");
253File.WriteAllText(Path.Combine(rootDirectory.FullName, "apphost.mts"), string.Empty);
290Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ".vscode"));
Secrets\SecretStoreResolverTests.cs (12)
24var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
54var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
103var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
142var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
189var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
361File.WriteAllText(Path.Combine(directory, "Production.json"), "{}");
362File.WriteAllText(Path.Combine(directory, "production.json"), "{}");
426var directory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "shared"));
431var path = Path.Combine(directory.FullName, "secrets.json");
463var path = Path.Combine(workspace.WorkspaceRoot.FullName, "secrets.json");
501var path = Path.Combine(directory, "secrets.json");
521var projectPath = Path.Combine(directory.FullName, "AppHost.csproj");
Telemetry\InternalMicrosoftDetectorTests.cs (14)
630await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
631await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
668await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
669await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
702await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
703await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
891var outputPath = Path.Combine(workspace.Path, "platform-sso-output.txt");
922Path.Combine(workspace.Path, "detector.json"),
944macPlatformSsoPath: Path.Combine(workspace.Path, "missing-app-sso"));
957var appSsoPath = Path.Combine(workspace.Path, "app-sso");
1095await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd"), string.Empty);
1096await File.WriteAllTextAsync(Path.Combine(workspace.Path, "dsregcmd.EXE"), string.Empty);
1126await File.WriteAllTextAsync(Path.Combine(workspace.Path, executable), string.Empty);
1157await File.WriteAllTextAsync(Path.Combine(workspace.Path, executable), string.Empty);
Telemetry\ReportedLogExportTests.cs (5)
65await File.WriteAllTextAsync(Path.Combine(directory, "envelopes.json"), JsonSerializer.Serialize(records));
70var envelopes = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "envelopes.json")))!.AsArray();
121var loggingOptions = new Program.CliLoggingOptions(LogLevel.Error, false, directory, Path.Combine(directory, "cli.log"));
144Path.Combine(directory, "storage"), builder =>
152Assert.Equal(Path.Combine(directory, "storage"), options.StorageDirectory);
Templating\DotNetTemplateFactoryTests.cs (17)
39var path = Path.Combine(dir.FullName, "nuget.config");
63var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
95var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
108var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
133var parentConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
139var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
152var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
175var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
189var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
202var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
206var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
219var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
228var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
229var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
240var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
249var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
250var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
Templating\JavaStarterScaffoldTests.cs (7)
62.EnumerateFiles(Path.Combine(outputDirectory, "api"), "*", SearchOption.AllDirectories)
96Assert.True(File.Exists(Path.Combine(outputDirectory, "AppHost.java")));
105Assert.True(File.Exists(Path.Combine(outputDirectory, ".project")));
106Assert.True(File.Exists(Path.Combine(outputDirectory, ".classpath")));
108Assert.Contains("<name>JavaStarterOut</name>", File.ReadAllText(Path.Combine(outputDirectory, ".project")));
110using var config = JsonDocument.Parse(File.ReadAllText(Path.Combine(outputDirectory, "aspire.config.json")));
151return new ScaffoldedTemplate(workspace, Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName));
Templating\OutputPathHelperTests.cs (6)
36File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
52File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
67File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
99var path = Path.Combine(workspace.WorkspaceRoot.FullName, "new-dir");
122File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
159File.WriteAllText(Path.Combine(dir.FullName, "file.txt"), "content");
Templating\TemplateEngineFactoryGitCheckoutTests.cs (11)
32var actual = await File.ReadAllBytesAsync(Path.Combine(destination, path));
44await File.WriteAllBytesAsync(Path.Combine(repository.FullName, "content"), [4, 5, 6]);
51Assert.Equal(content, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, commit), "content")));
60await File.WriteAllBytesAsync(Path.Combine(repository.FullName, "content"), [4, 5, 6]);
68Assert.Equal(new byte[] { 4, 5, 6 }, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, branchCommit), "content")));
70Assert.Equal(new byte[] { 1, 2, 3 }, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, tagCommit), "content")));
84new TemplateSource(".", Path.Combine(workspace.Path, "private-repository-secret-marker"), null), TestContext.Current.CancellationToken));
109Assert.Equal(new byte[] { 1, 2, 3 }, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, commit), "content")));
128return Path.Combine(cached, "repository");
136var file = Path.Combine(repository.FullName, path);
140await File.WriteAllTextAsync(Path.Combine(configuration.FullName, "template.json"),
Templating\TemplateNuGetConfigServiceTests.cs (33)
55Assert.Equal(builtInCreatesConfig, File.Exists(Path.Combine(builtInOutput.FullName, "nuget.config")));
56Assert.Equal(templateEngineCreatesConfig, File.Exists(Path.Combine(templateEngineOutput.FullName, "nuget.config")));
78var path = Path.Combine(output.FullName, fileName);
128var inheritedPath = Path.Combine(workspace.Path, "nuget.config");
129var nestedPath = Path.Combine(nested.FullName, "nuget.config");
139var generated = await File.ReadAllBytesAsync(Path.Combine(output.FullName, "nuget.config"));
142Assert.Equal(generated, await File.ReadAllBytesAsync(Path.Combine(output.FullName, "nuget.config")));
148await Verify(await File.ReadAllTextAsync(Path.Combine(output.FullName, "nuget.config")))
158Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"),
230var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config"));
244Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"),
254Path.Combine(outputDirectory.FullName, "nuget.config"),
271var projectConfigPath = Path.Combine(outputDirectory.FullName, "nuget.config");
272var parentConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
312Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")));
582Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"),
780File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
781File.WriteAllText(Path.Combine(prPackagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty);
854File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
855File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"), string.Empty);
896Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"),
933File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty);
934File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.99.0.0.nupkg"), string.Empty);
969File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.99.0.0.nupkg"), string.Empty);
1010File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty);
1011File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.7.0-dev.nupkg"), string.Empty);
1111File.WriteAllText(Path.Combine(packagesDir.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty);
1264var configPath = Path.Combine(outputDir.FullName, "nuget.config");
1303Assert.False(File.Exists(Path.Combine(outputDir.FullName, "nuget.config")));
1314Path.Combine(outputDir.FullName, "nuget.config"),
1344var configPath = Path.Combine(outputDir.FullName, "nuget.config");
1368Path.Combine(outputDir.FullName, "nuget.config"),
1397var configPath = Path.Combine(outputDir.FullName, "nuget.config");
tests\Shared\Processes\ProcessTestFixture.cs (4)
47while (!File.Exists(Path.Combine(repository.FullName, "Aspire.slnx")))
68var project = Path.Combine(_directory.FullName, "ProcessTestHost.csproj");
84await File.WriteAllTextAsync(Path.Combine(_directory.FullName, "Program.cs"), HostProgram);
86["restore", project, "--configfile", Path.Combine(repository.FullName, "NuGet.config"), "--verbosity", "quiet"]);
TestServices\FakePlaywrightServices.cs (10)
66_bundleDirectory = new DirectoryInfo(Path.Combine(executionContext.WorkingDirectory.FullName, ".fake-aspire-skills-bundle"));
100[(CommonAgentApplicators.AspireSkillName, Path.Combine("references", "app-commands.md"))] = "# App commands",
101[(CommonAgentApplicators.AspireSkillName, Path.Combine("evals", "evals.json"))] = "{}",
120[(CommonAgentApplicators.AspireDeploymentSkillName, Path.Combine("references", "preflight.md"))] = "# Preflight",
157[(AspireProjectV2MigrationSkillName, Path.Combine("references", "migration-patterns.md"))] = "# Migration patterns",
158[(AspireProjectV2MigrationSkillName, Path.Combine("references", "compatibility-and-validation.md"))] = "# Compatibility and validation",
159[(AspireProjectV2MigrationSkillName, Path.Combine("evals", "eval.yaml"))] = "stimuli: []"
190await File.WriteAllTextAsync(Path.Combine(_bundleDirectory.FullName, "skill-manifest.json"), manifestJson, cancellationToken);
223internal static string SkillBaseDirectory { get; } = Path.Combine(".claude", "skills");
232File.WriteAllText(Path.Combine(skillDirectory, "SKILL.md"), "# Playwright CLI Skill");
Utils\CliPathHelperTests.cs (12)
188var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
189var binDir = Path.Combine(installPrefix, "bin");
201var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test");
230var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "portable");
255Assert.Equal(Path.Combine("/home/user", ".aspire"), result);
291var target = Path.Combine(workspace.WorkspaceRoot.FullName, "target-aspire");
294var link = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire");
366var realPath = Path.Combine(workspace.WorkspaceRoot.FullName, "binary-under-test");
382var realPath = Path.Combine(workspace.WorkspaceRoot.FullName, "binary-under-test");
402var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "portable");
421var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
423File.WriteAllText(Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName), $$"""{"source":"{{source}}"}""");
Utils\DevCertsCheckTests.cs (28)
68var certUtilPath = Path.Combine(directory.FullName, CertificateHelpers.CertUtilCommand);
81? Path.Combine(directory.FullName, "openssl.cmd")
82: Path.Combine(directory.FullName, "openssl");
116File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificatePem);
117File.WriteAllText(Path.Combine(trustDirectory.FullName, hashEntryName), certificatePem);
343["PATH"] = Path.Combine(AppContext.BaseDirectory, Guid.NewGuid().ToString("N"))
406var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
450var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
501var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
556var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
557File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
606var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
607File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
665var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
666File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
722var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
723File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), certificate.ExportCertificatePem());
764var trustDirectory = Path.Combine(tempDirectory.FullName, "missing-trust");
808var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
852var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
854File.WriteAllText(Path.Combine(trustDirectory.FullName, corruptCertificateFileName), "not a certificate");
898var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
900File.WriteAllText(Path.Combine(trustDirectory.FullName, corruptCertificateFileName), "not a certificate");
944var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
946File.WriteAllText(Path.Combine(trustDirectory.FullName, "unrelated.pem"), "not a certificate");
988var trustDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "trust"));
989File.WriteAllText(Path.Combine(trustDirectory.FullName, GetOpenSslCertificateFileName(certificate)), staleCertificate.ExportCertificatePem());
1042["PATH"] = Path.Combine(AppContext.BaseDirectory, Guid.NewGuid().ToString("N"))
Utils\FileSystemHelperTests.cs (57)
16var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
19File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "content1");
20File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "content2");
21File.WriteAllText(Path.Combine(sourceDir.FullName, "file3.cs"), "using System;");
28Assert.True(File.Exists(Path.Combine(destDir, "file1.txt")));
29Assert.True(File.Exists(Path.Combine(destDir, "file2.txt")));
30Assert.True(File.Exists(Path.Combine(destDir, "file3.cs")));
32Assert.Equal("content1", File.ReadAllText(Path.Combine(destDir, "file1.txt")));
33Assert.Equal("content2", File.ReadAllText(Path.Combine(destDir, "file2.txt")));
34Assert.Equal("using System;", File.ReadAllText(Path.Combine(destDir, "file3.cs")));
43var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
49File.WriteAllText(Path.Combine(sourceDir.FullName, "root.txt"), "root content");
50File.WriteAllText(Path.Combine(subDir1.FullName, "level1.txt"), "level 1 content");
51File.WriteAllText(Path.Combine(subDir2.FullName, "level2.txt"), "level 2 content");
58Assert.True(File.Exists(Path.Combine(destDir, "root.txt")));
59Assert.True(Directory.Exists(Path.Combine(destDir, "subdir1")));
64Assert.Equal("root content", File.ReadAllText(Path.Combine(destDir, "root.txt")));
75var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "empty_destination");
91var nonExistentSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nonexistent");
92var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
104var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
128var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
153var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
156var binaryFilePath = Path.Combine(sourceDir.FullName, "binary.dat");
165var copiedFilePath = Path.Combine(destDir, "binary.dat");
178var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
185File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}");
195currentDest = Path.Combine(currentDest, $"level{i}");
197var filePath = Path.Combine(currentDest, $"file{i}.txt");
209var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
212File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "new content 1");
213File.WriteAllText(Path.Combine(sourceDir.FullName, "file2.txt"), "new content 2");
216File.WriteAllText(Path.Combine(subDir.FullName, "project.assets.json"), "new assets");
217File.WriteAllText(Path.Combine(subDir.FullName, "project.csproj.nuget.dgspec.json"), "new dgspec");
221File.WriteAllText(Path.Combine(destDir, "file1.txt"), "old content 1");
222File.WriteAllText(Path.Combine(destDir, "file2.txt"), "old content 2");
224var destSubDir = Directory.CreateDirectory(Path.Combine(destDir, "obj"));
225File.WriteAllText(Path.Combine(destSubDir.FullName, "project.assets.json"), "old assets");
226File.WriteAllText(Path.Combine(destSubDir.FullName, "project.csproj.nuget.dgspec.json"), "old dgspec");
232Assert.Equal("new content 1", File.ReadAllText(Path.Combine(destDir, "file1.txt")));
233Assert.Equal("new content 2", File.ReadAllText(Path.Combine(destDir, "file2.txt")));
244var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
247File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "new content");
251File.WriteAllText(Path.Combine(destDir, "file1.txt"), "old content");
284Assert.Equal(Path.Combine("folder1", "Project.csproj"), result[paths[0]]);
285Assert.Equal(Path.Combine("folder2", "Project.csproj"), result[paths[1]]);
299Assert.Equal(Path.Combine("folder1", "Project.csproj"), result[paths[0]]);
300Assert.Equal(Path.Combine("folder2", "Project.csproj"), result[paths[1]]);
325Assert.Equal(Path.Combine("MyApp", "AppHost.cs"), result[paths[0]]);
348Assert.Equal(Path.Combine("App1", "AppHost.cs"), result[paths[0]]);
362Assert.Equal(Path.Combine("App1", "AppHost.cs"), result[paths[0]]);
363Assert.Equal(Path.Combine("App2", "AppHost.cs"), result[paths[1]]);
393Assert.Equal(Path.Combine("App2", "AppHost.cs"), result[paths[1]]);
416Assert.Equal(Path.Combine("folder1", "Project.csproj"), result[paths[0]]);
417Assert.Equal(Path.Combine("folder2", "Project.csproj"), result[paths[1]]);
449Assert.Equal(Path.Combine("Folder", "Project.csproj"), result[paths[0]]);
450Assert.Equal(Path.Combine("folder", "Project.csproj"), result[paths[1]]);
Utils\LegacySettingsFileCheckTests.cs (16)
15var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
17await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
21var subDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "src"));
43Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
60var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
62await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
64Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
83Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName),
88var subDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "src"));
105var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
107await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
131var legacyDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire");
133await File.WriteAllTextAsync(Path.Combine(legacyDir, "settings.json"), "{}");
136var childDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "project"));
139Path.Combine(childDir.FullName, AspireConfigFile.FileName),
143var workingDir = new DirectoryInfo(Path.Combine(childDir.FullName, "src"));
Utils\PathNormalizerTests.cs (19)
21var file = new FileInfo(Path.Combine(subdir.FullName, "app.csproj"));
42var file = new FileInfo(Path.Combine(directory.FullName, "App.csproj"));
61var file = new FileInfo(Path.Combine(directory.FullName, "App.csproj"));
92var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "target.csproj"));
95var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "link.csproj");
117var file = new FileInfo(Path.Combine(nested.FullName, "app.csproj"));
120var linkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
138var missingTarget = Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj");
139var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "broken-link.csproj");
157var projectFile = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj"));
160var linkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link");
163var linkPath = Path.Combine(linkDirectory, projectFile.Name);
177var file = new FileInfo(Path.Combine(tempDirectory.FullName, "AppHost.csproj"));
205Assert.EndsWith(Path.Combine("Missing.AppHost", "Missing.AppHost.csproj"), resolved, StringComparison.Ordinal);
216var decomposedPath = Path.Combine(testRoot.FullName, decomposedName);
220var composedPath = Path.Combine(testRoot.FullName, composedName);
241var normalizationMatch = Path.Combine(testRoot.FullName, "Cafe\u0301");
247var candidate = Path.Combine(testRoot.FullName, "Caf\u00E9");
267var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "app.csproj"));
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 (37)
ServiceClient\DashboardRunStore.cs (17)
133DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName);
140CurrentWorkingDirectory = Path.Combine(_runsDirectory, runId);
141DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName);
149File.WriteAllText(Path.Combine(CurrentWorkingDirectory, _applicationMarkerFileName), string.Empty);
157_metadataPath = Path.Combine(CurrentWorkingDirectory, "run.json");
162CurrentWorkingDirectory = Path.Combine(resumesDirectory, _applicationMarkerFileName);
163DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName);
222!File.Exists(Path.Combine(directory, DatabaseFileName)))
326var metadataPath = Path.Combine(runDirectory, "run.json");
414if (!File.Exists(Path.Combine(directory, _applicationMarkerFileName)))
419var metadataPath = Path.Combine(directory, "run.json");
547var metadataPath = Path.Combine(runDirectory, "run.json");
607Path.Combine(runDirectory, metadata.DatabaseFileName),
616return Path.Combine(GetResumesDirectory(dataRoot), GetApplicationDirectoryName(applicationName));
619internal static string GetRunsDirectory(string? dataRoot) => Path.Combine(GetDataRoot(dataRoot), "runs");
621internal static string GetResumesDirectory(string? dataRoot) => Path.Combine(GetDataRoot(dataRoot), "resumes");
625? Path.Combine(AspireHomeDirectory.GetDefault(), "dashboard")
Aspire.Dashboard.Components.Tests (5)
Aspire.Dashboard.Playwright.Tests (9)
Aspire.Dashboard.Tests (80)
Model\DashboardDataSourceTests.cs (29)
40var expectedRunsDirectory = Path.Combine(workspace.Path, "runs");
42Assert.True(File.Exists(Path.Combine(runStore.CurrentWorkingDirectory, applicationDirectoryName)));
43Assert.False(Directory.Exists(Path.Combine(workspace.Path, applicationDirectoryName)));
55var expectedResumesDirectory = Path.Combine(workspace.Path, "resumes");
56Assert.Equal(Path.Combine(expectedResumesDirectory, applicationDirectoryName), runStore.CurrentWorkingDirectory);
57Assert.True(File.Exists(Path.Combine(expectedResumesDirectory, $"{applicationDirectoryName}.lock")));
142var metadataPath = Path.Combine(runStore.CurrentWorkingDirectory, "run.json");
176using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(runStore.CurrentWorkingDirectory, "run.json")));
199metadataPath = Path.Combine(historicalRunStore.CurrentWorkingDirectory, "run.json");
256using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(currentRunStore.CurrentWorkingDirectory, "run.json")));
284Assert.False(File.Exists(Path.Combine(runStore.CurrentWorkingDirectory, "run.json")));
403File.WriteAllText(Path.Combine(abandonedDirectory, "dashboard.db"), string.Empty);
426var abandonedLockPath = Path.Combine(temporaryRoot, $"aspire-dashboard-{Guid.NewGuid():N}.lock");
427var activeLockPath = Path.Combine(temporaryRoot, $"aspire-dashboard-{Guid.NewGuid():N}.lock");
428var unrelatedLockPath = Path.Combine(temporaryRoot, $"unrelated-{Guid.NewGuid():N}.lock");
507File.WriteAllText(Path.Combine(otherDirectory, "dashboard.db"), string.Empty);
651var databasePath = Path.Combine(workspace.Path, $"malformed-{Guid.NewGuid():N}.db");
758var metadataPath = Path.Combine(incompatibleRunDirectory, "run.json");
799var metadataPath = Path.Combine(futureRunDirectory, "run.json");
843var metadataPath = Path.Combine(incompatibleRunDirectory, "run.json");
954var abandonedLockPath = Path.Combine(runsDirectory, "abandoned.lock");
955var activeLockPath = Path.Combine(runsDirectory, "active.lock");
1041using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(pinnedRunDirectories[^1], "run.json")));
1216using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(Path.GetDirectoryName(historicalRun.DatabasePath)!, "run.json")));
1310var historicalDirectory = Path.Combine(workspace.Path, "historical");
1311var historicalDatabasePath = Path.Combine(historicalDirectory, DashboardRunStore.DatabaseFileName);
1316var malformedDirectory = Path.Combine(workspace.Path, "malformed");
1317var malformedDatabasePath = Path.Combine(malformedDirectory, DashboardRunStore.DatabaseFileName);
1376var 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);
40var databasePath = Path.Combine(_workspace.Path, "dashboard.db");
59using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
77using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
109using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
132using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
149using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
168using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
188using var database = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "dashboard.db"), pooling: false);
209using var observedDatabase = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "observed.db"), pooling: false);
210using var otherDatabase = new DashboardSqliteDatabase(Path.Combine(_workspace.Path, "other.db"), pooling: false);
TelemetryRepositoryTests\HistogramTests.cs (11)
98var databasePath = Path.Combine(workspace.Path, "dashboard.db");
251var databasePath = Path.Combine(workspace.Path, "dashboard.db");
339var databasePath = Path.Combine(workspace.Path, "dashboard.db");
418var databasePath = Path.Combine(workspace.Path, "dashboard.db");
648var databasePath = Path.Combine(workspace.Path, "dashboard.db");
696var databasePath = Path.Combine(workspace.Path, "dashboard.db");
772var databasePath = Path.Combine(workspace.Path, "dashboard.db");
1024var databasePath = Path.Combine(workspace.Path, "dashboard.db");
1226var databasePath = Path.Combine(workspace.Path, "dashboard.db");
1390var databasePath = Path.Combine(workspace.Path, "dashboard.db");
1523var databasePath = Path.Combine(workspace.Path, "dashboard.db");
Aspire.Deployment.EndToEnd.Tests (184)
AzureFunctionsDeploymentTests.cs (8)
80["Functions"] = File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "functions-url.txt"))
100var functions = Directory.CreateDirectory(Path.Combine(root, "functions")).FullName;
104File.WriteAllText(Path.Combine(functions, "package.json"), """
115File.WriteAllText(Path.Combine(functions, "tsconfig.json"), """
127File.WriteAllText(Path.Combine(functions, "host.json"), """
136File.WriteAllText(Path.Combine(functions, "index.ts"), """
178File.WriteAllText(Path.Combine(root, "apphost.mts"), """
197File.WriteAllText(Path.Combine(root, "verify-functions.py"), """
AzureSandboxesDeploymentTests.cs (19)
57var defaultUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-default-url.txt");
58var anonymousUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-anonymous-url.txt");
59var deployOutputFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-deploy-output.txt");
60var stateMarkerFile = Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet-state-marker");
247var firstDeployOutputFile = Path.Combine(workspace.WorkspaceRoot.FullName, "first-deploy-output.txt");
248var secondDeployOutputFile = Path.Combine(workspace.WorkspaceRoot.FullName, "second-deploy-output.txt");
249var firstUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "first-url.txt");
250var secondUrlFile = Path.Combine(workspace.WorkspaceRoot.FullName, "second-url.txt");
251var stateMarkerFile = Path.Combine(workspace.WorkspaceRoot.FullName, "state-marker");
418var siteDir = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "site"));
419File.WriteAllText(Path.Combine(siteDir.FullName, "Dockerfile"), """
424File.WriteAllText(Path.Combine(siteDir.FullName, "index.html"), $$"""
432File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"), """
464var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
465var appHostFilePath = Path.Combine(projectDir, "apphost.cs");
526var serviceDir = Path.Combine(projectDir, serviceName);
527var propertiesDir = Directory.CreateDirectory(Path.Combine(serviceDir, "Properties"));
573File.WriteAllText(Path.Combine(serviceDir, "Program.cs"), program);
574File.WriteAllText(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
FoundryHostedAgentDeploymentTests.cs (7)
462var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
463var hostedAgentDir = Path.Combine(projectDir, "DotNetHostedAgent");
464var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost");
475File.WriteAllText(Path.Combine(hostedAgentDir, "DotNetHostedAgent.csproj"), """
502File.WriteAllText(Path.Combine(hostedAgentDir, "Program.cs"), """
574File.WriteAllText(Path.Combine(hostedAgentDir, ".dockerignore"), """
593var 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 (37)
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";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (11)
32public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
33public static readonly string TestRootPath = Path.Combine(TempDir, "templates-testroot");
87string workloadsProjString = Path.Combine("tests", "workloads.proj");
99.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
122.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
144sdkForTemplatePath = Path.Combine(baseDir, sdkDirName);
163NuGetPackagesPath = UsesCustomDotNet ? Path.Combine(AppContext.BaseDirectory, $"nuget-cache-{Guid.NewGuid()}") : null;
183var runtimeRoot = Path.Combine(s_testRoot.Value, $"runtime-{Guid.NewGuid():N}");
198var destination = Path.Combine(runtimeRoot, directory);
223DotNet = Path.Combine(sdkForTemplatePath!, "dotnet");
236LogRootPath = Path.Combine(AppContext.BaseDirectory, "logs");
Aspire.Hosting (67)
Aspire.Hosting.Analyzers.Tests (1)
Aspire.Hosting.Azure (11)
Aspire.Hosting.Azure.EntraId.Tests (11)
Aspire.Hosting.Azure.Functions (7)
Aspire.Hosting.Azure.Kubernetes (1)
Aspire.Hosting.Azure.Kubernetes.Tests (4)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Tests (59)
AzureEnvironmentResourceTests.cs (18)
36var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
73var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
124var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep");
172var mainBicep = File.ReadAllText(Path.Combine(workspace.FullName, "main.bicep"));
201var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
246var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
262var outputPath = Path.Combine(workspace.Path, "exclude-main");
271Assert.False(File.Exists(Path.Combine(outputPath, "main.bicep")));
301var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep"));
316var outputPath = Path.Combine(workspace.Path, "write-main");
332var mainBicep = await File.ReadAllTextAsync(Path.Combine(outputPath, "main.bicep"));
355var outputPath = Path.Combine(workspace.Path, "provider");
362await Verify(await File.ReadAllTextAsync(Path.Combine(outputPath, "main.bicep")), "bicep");
418var mainBicepPath = Path.Combine(workspace.Path, "main.bicep");
449var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
476var bicepFilePath = Path.Combine(workspace, bicepFileName);
495var outputDir = Path.Combine(workspace, "output");
512var mainBicepPath = Path.Combine(outputDir, "main.bicep");
AzureFunctionsTests.cs (17)
512var dockerfilePath = Path.Combine(tempDir.Path, "funcapp.Dockerfile");
551var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "funcapp.Dockerfile"));
566File.WriteAllText(Path.Combine(appDirectory, "Dockerfile"), "FROM custom-functions-image\n");
574Assert.False(File.Exists(Path.Combine(tempDir.Path, "funcapp.Dockerfile")));
973var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj");
998var projectPath = Path.Combine(workspace.Path, "MyFunctions.csproj");
1020var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj");
1050var projectPath1 = Path.Combine(workspace.Path, "Functions1.csproj");
1051var projectPath2 = Path.Combine(workspace.Path, "Functions2.csproj");
1073var projectPath = Path.Combine(workspace.Path, "Functions.csproj");
1105var projectPath = Path.Combine(workspace.Path, "Functions.csproj");
1145var appDirectory = Path.Combine(rootDirectory, "functions");
1147Directory.CreateDirectory(Path.Combine(appDirectory, "src"));
1149File.WriteAllText(Path.Combine(appDirectory, "host.json"), "{}");
1150File.WriteAllText(Path.Combine(appDirectory, "package.json"), """
1158File.WriteAllText(Path.Combine(appDirectory, "local.settings.json"), "{}");
1162File.WriteAllText(Path.Combine(appDirectory, "package-lock.json"), "{}");
Aspire.Hosting.Blazor (6)
Aspire.Hosting.Blazor.Tests (45)
AddBlazorGatewayTests.cs (25)
36Path.Combine("Scripts", "Gateway.cs"),
169var clientDirectory = Path.Combine(directory.Path, "Client");
171await File.WriteAllTextAsync(Path.Combine(clientDirectory, "global.json"),
173File.Copy(Path.Combine(clientDirectory, "global.json"), Path.Combine(directory.Path, "global.json"));
176await File.WriteAllTextAsync(Path.Combine(directory.Path, "PrefixEndpoints.cs"),
189await File.WriteAllTextAsync(Path.Combine(directory.Path, "Dockerfile"), dockerfile);
208var clientDirectory = Path.Combine(directory.Path, "Client");
210await File.WriteAllTextAsync(Path.Combine(directory.Path, "Test.slnx"), "<Solution />");
218var client = publishBuilder.AddBlazorWasmApp("app", Path.Combine(clientDirectory, "Client.csproj"))
227var gatewayDirectory = Directory.CreateDirectory(Path.Combine(directory.Path, "Gateway")).FullName;
229await File.WriteAllTextAsync(Path.Combine(gatewayDirectory, "Gateway.cs"),
230restoreDirective + await File.ReadAllTextAsync(Path.Combine(gatewayBuild.ContextPath, "Gateway.cs")));
232gatewayContainer.Annotations.Add(new DockerfileBuildAnnotation(gatewayDirectory, Path.Combine(gatewayDirectory, "Dockerfile"), stage: null)
334Directory.CreateDirectory(Path.Combine(clientDirectory, "wwwroot"));
335await File.WriteAllTextAsync(Path.Combine(clientDirectory, "Client.csproj"),
347await File.WriteAllTextAsync(Path.Combine(clientDirectory, "Program.cs"),
381var projectPath = Path.Combine(directory.Path, "Client.csproj");
410var projectPath = Path.Combine(directory.Path, "Client.csproj");
428File.WriteAllText(Path.Combine(solutionRoot.FullName, "Test.slnx"), "<Solution />");
447var appHostDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "AppHost")).FullName;
449var projectDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "Client")).FullName;
468var appHostDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "AppHost")).FullName;
469File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.slnx"), "<Solution />");
470var projectDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "Client")).FullName;
EndpointsManifestTransformerTests.cs (11)
39var manifestPath = Path.Combine(_tempDir, "endpoints.json");
64var manifestPath = Path.Combine(_tempDir, "endpoints.json");
123var manifestPath = Path.Combine(_tempDir, "endpoints.json");
167var manifestPath = Path.Combine(_tempDir, "endpoints.json");
200var manifestPath = Path.Combine(_tempDir, "endpoints.json");
258var app1Path = Path.Combine(_tempDir, "app1.runtime.json");
259var app2Path = Path.Combine(_tempDir, "app2.runtime.json");
273var outputPath = Path.Combine(_tempDir, "merged.json");
322var app1Path = Path.Combine(_tempDir, "app1.runtime.json");
323var app2Path = Path.Combine(_tempDir, "app2.runtime.json");
337var outputPath = Path.Combine(_tempDir, "merged.json");
Aspire.Hosting.Browsers (9)
Aspire.Hosting.Browsers.Tests (43)
BrowserLogsSessionManagerTests.cs (26)
24var executablePath = Path.Combine(userDataDirectory, "browser");
63var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
103var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
138var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
172var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
258Path.Combine(userDataDirectory.FullName, "browser"),
288Path.Combine(userDataDirectory.FullName, "bröwser"),
318Path.Combine(userDataDirectory.FullName, "browser"),
351Path.Combine(userDataDirectory.FullName, "browser"),
381Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
394Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
395Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
397Path.Combine(userDataDirectory, "Local State"),
424Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
425Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
426Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 2"));
427Directory.CreateDirectory(Path.Combine(userDataDirectory, "System Profile"));
429Path.Combine(userDataDirectory, "Local State"),
479Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
480Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
481File.WriteAllText(Path.Combine(userDataDirectory, "Local State"), "{");
507Directory.CreateDirectory(Path.Combine(userDataDirectory, "Default"));
508Directory.CreateDirectory(Path.Combine(userDataDirectory, "Profile 1"));
510Path.Combine(userDataDirectory, "Local State"),
630Path.Combine(AppContext.BaseDirectory, "browser"),
631Path.Combine(AppContext.BaseDirectory, "user-data")),
Aspire.Hosting.CodeGeneration.Go (2)
Aspire.Hosting.CodeGeneration.Go.Tests (28)
AtsGoCodeGeneratorTests.cs (14)
75await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token);
77await File.WriteAllTextAsync(Path.Combine(directory.FullName, "terminal_test.go"), """
155await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token);
158await File.WriteAllTextAsync(Path.Combine(directory.FullName, "transport_test.go"), """
222: Path.Combine(directory.FullName, "socket");
309await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token);
312await File.WriteAllTextAsync(Path.Combine(directory.FullName, "transport_hardening_test.go"), """
687await File.WriteAllTextAsync(Path.Combine(directory.FullName, "decode_test.go"), """
1056await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token);
1059await File.WriteAllTextAsync(Path.Combine(directory.FullName, "runtime_test.go"), """
1563await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token);
1566await File.WriteAllTextAsync(Path.Combine(directory.FullName, "callback_test.go"), """
1735await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token);
1738await File.WriteAllTextAsync(Path.Combine(directory.FullName, "declared_interface_test.go"), """
GoScaffoldTests.cs (9)
47var starterRoot = Path.Combine(AppContext.BaseDirectory, "go-starter");
134File.WriteAllText(Path.Combine(workspace.Path, name), content);
149File.WriteAllText(Path.Combine(workspace.Path, "apphost.go"), "// marker");
161File.WriteAllText(Path.Combine(workspace.Path, "apphost.ts"), "// typescript");
162File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module apphost");
183WriteGoFile(workspace.Path, Path.Combine("scaffold", "apphost.go"), Scaffold(workspace)["apphost.go"]);
186var starterRoot = Path.Combine(AppContext.BaseDirectory, "go-starter");
192WriteGoFile(workspace.Path, Path.Combine("go-starter", Path.GetRelativePath(starterRoot, starterFile)), File.ReadAllText(starterFile));
234var path = Path.Combine(root, relativePath);
Aspire.Hosting.CodeGeneration.Java (3)
Aspire.Hosting.CodeGeneration.Java.Tests (11)
Aspire.Hosting.CodeGeneration.Python (3)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
Aspire.Hosting.CodeGeneration.Rust (2)
Aspire.Hosting.CodeGeneration.Rust.Tests (11)
RustLanguageSupportTests.cs (5)
42File.WriteAllText(Path.Combine(workspace.Path, "apphost.rs"), "// marker");
43File.WriteAllText(Path.Combine(workspace.Path, "Cargo.toml"), "[package]");
57File.WriteAllText(Path.Combine(workspace.Path, "apphost.ts"), "// typescript");
58File.WriteAllText(Path.Combine(workspace.Path, "Cargo.toml"), "[package]");
70File.WriteAllText(Path.Combine(workspace.Path, "apphost.rs"), "// marker");
Aspire.Hosting.CodeGeneration.TypeScript (5)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (8)
Aspire.Hosting.Containers.Tests (11)
Aspire.Hosting.DevTunnels.Tests (1)
Aspire.Hosting.Docker (9)
Aspire.Hosting.Docker.Tests (75)
DockerComposePublisherTests.cs (50)
100var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
101var envPath = Path.Combine(workspace.Path, ".env");
123var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml"));
161var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
162var envPath = Path.Combine(workspace.Path, ".env");
184var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml"));
185var environment = File.ReadAllText(Path.Combine(workspace.Path, ".env"));
209var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
238var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
289var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
291var envPath = Path.Combine(workspace.Path, ".env");
302var envFilePath = Path.Combine(workspace.Path, ".env");
333var envFilePath = Path.Combine(workspace.Path, ".env");
374var envFilePath = Path.Combine(workspace.Path, ".env");
407var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
433var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
465var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
496var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
524var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
558var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
582var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
610var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
640var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
669var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
701var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
726var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
750var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
777var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
806var envFilePath = Path.Combine(workspace.Path, ".env.Staging");
840var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
862var envFilePath = Path.Combine(workspace.Path, ".env.Production");
896var envFilePath = Path.Combine(workspace.Path, ".env.Staging");
929var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml"));
930var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
962var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
988var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production"));
1013var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1014var envPath = Path.Combine(workspace.Path, ".env");
1040var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1071var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1072var envPath = Path.Combine(workspace.Path, ".env");
1099var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1135var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1136var envPath = Path.Combine(workspace.Path, ".env");
1183var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1184var envPath = Path.Combine(workspace.Path, ".env");
1217var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1218var envPath = Path.Combine(workspace.Path, ".env");
1261var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
1295var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
EnvFileTests.cs (16)
16var envFilePath = Path.Combine(workspace.Path, ".env");
50var envFilePath = Path.Combine(workspace.Path, ".env");
70var envFilePath = Path.Combine(workspace.Path, ".env");
88var envFilePath = Path.Combine(workspace.Path, ".env");
108var envFilePath = Path.Combine(workspace.Path, ".env");
123var envFilePath = Path.Combine(workspace.Path, ".env");
145var envFilePath = Path.Combine(workspace.Path, ".env");
165var envFilePath = Path.Combine(workspace.Path, ".env");
185var envFilePath = Path.Combine(workspace.Path, ".env");
212var envFilePath = Path.Combine(workspace.Path, ".env");
228var envFilePath = Path.Combine(workspace.Path, ".env");
254var envFilePath = Path.Combine(workspace.Path, ".env");
280var envFilePath = Path.Combine(workspace.Path, ".env");
320var envFilePath = Path.Combine(workspace.Path, ".env");
345var envFilePath = Path.Combine(workspace.Path, ".env");
362var envFilePath = Path.Combine(workspace.Path, ".env");
Aspire.Hosting.Dotnet (21)
Aspire.Hosting.Dotnet.Tests (142)
DotnetProjectBuildArtifactManagerTests.cs (5)
56Directory.Delete(Path.Combine(buildDirectory, ".artifacts"), recursive: true);
174Path.Combine(buildDirectory, ".old.tmp"),
175Path.Combine(stateDirectory, ".old.tmp"),
179Path.Combine(buildDirectory, ".recent.tmp"),
180Path.Combine(stateDirectory, ".recent.tmp"),
DotnetProjectBuildCoordinatorTests.cs (90)
132var globalJsonPath = Path.Combine(workspace.Path, "global.json");
204var firstDotnetPath = Path.Combine(workspace.Path, "first-sdk");
205var secondDotnetPath = Path.Combine(workspace.Path, "second-sdk");
409var filePath = Path.Combine(workspace.Path, "worker.cs");
480var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "worker"));
481var filePath = Path.Combine(fileDirectory.FullName, "worker.cs");
570var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt");
571var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt");
636var appPath = Path.Combine(workspace.Path, "worker.cs");
637var sentinelPath = Path.Combine(workspace.Path, "worker-ran.txt");
753var customTargetsPath = Path.Combine(workspace.Path, "CustomNuGet.targets");
855Assert.True(File.Exists(Path.Combine(Path.GetDirectoryName(projectPath)!, "restore-ran.txt")));
864var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj");
936var feed = Directory.CreateDirectory(Path.Combine(projectRoot, "feed")).FullName;
942File.WriteAllText(Path.Combine(projectRoot, "nuget.config"), $$"""
950File.WriteAllText(Path.Combine(projectRoot, "Directory.Build.props"), """
962var versionsPath = Path.Combine(projectRoot, "Directory.Packages.props");
999var escapedDirectory = Path.Combine(projectRoot, "First's Project;100% (test)");
1001firstProject = Path.Combine(escapedDirectory, Path.GetFileName(firstProject));
1019File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt")));
1020Assert.True(File.Exists(Path.Combine(Path.GetDirectoryName(project)!, "packages.lock.json")));
1038File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt")));
1046File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt")));
1091var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj");
1558var appPath = Path.Combine(workspace.Path, "app.cs");
2018var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName;
2019var sdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime")).FullName;
2067var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-1")).FullName;
2068var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-2")).FullName;
2110var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName;
2111File.WriteAllText(Path.Combine(sourceRoot, "global.json"), "{}");
2114var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName;
2136Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName,
2140var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "foreign")).FullName;
2141File.WriteAllText(Path.Combine(foreignRoot, "global.json"), "{}");
2142var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(foreignRoot, "runtime")).FullName;
2221var filePath = Path.Combine(workspace.Path, "worker.cs");
2272File.WriteAllText(Path.Combine(Path.GetDirectoryName(firstPath)!, "global.json"), """
2296Assert.True(File.Exists(Path.Combine(firstBuild.WorkingDirectory, "global.json")));
2317var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "Physical"));
2319File.WriteAllText(Path.Combine(physicalRoot.FullName, "global.json"), """
2327var linkPath = Path.Combine(workspace.Path, "Alias");
2351Assert.True(File.Exists(Path.Combine(linkedBuild.WorkingDirectory, "global.json")));
2571File.WriteAllText(Path.Combine(Path.GetDirectoryName(firstPath)!, "global.json"), """
2629var linkDirectory = Path.Combine(workspace.Path, "ServiceAlias");
2640var aliasPath = Path.Combine(linkDirectory, Path.GetFileName(projectPath));
2713var escapedDirectory = Path.Combine(workspace.Path, "Api's Project 100% (test)");
2715apiProject = Path.Combine(escapedDirectory, Path.GetFileName(apiProject));
2716var apiSentinel = Path.Combine(workspace.Path, "api-ran.txt");
2717var workerSentinel = Path.Combine(workspace.Path, "worker-ran.txt");
2757var restoreCountPath = Path.Combine(Path.GetDirectoryName(project)!, "restore-count.txt");
2773File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """
2780var sentinels = Directory.CreateDirectory(Path.Combine(workspace.Path, "instances")).FullName;
2868var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt");
2869var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt");
2913var secondBuildMarker = Path.Combine(workspace.Path, "second-built.txt");
2919var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt");
2975File.WriteAllText(Path.Combine(Path.GetDirectoryName(validProject)!, "Program.cs"), """
2978var sentinelPath = Path.Combine(workspace.Path, "valid-ran.txt");
3078var sentinelPath = Path.Combine(workspace.Path, "environment-build-ran.txt");
3079File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """
3130var sentinelPath = Path.Combine(Path.GetDirectoryName(projectPath)!, "build-sentinel.txt");
3186var filePath = Path.Combine(workspace.Path, "worker.cs");
3419var filePath = Path.Combine(workspace.Path, "worker.cs");
3453var filePath = Path.Combine(workspace.Path, "worker.cs");
3519Path.Combine(workspace.Path, "missing-dotnet");
3555var fileApp = Path.Combine(workspace.Path, "worker.cs");
3556var sentinel = Path.Combine(workspace.Path, "worker-ran.txt");
3617var releaseBuild = Path.Combine(workspace.Path, "release-build");
3619var fileApp = Path.Combine(workspace.Path, "worker.cs");
3620var sentinel = Path.Combine(workspace.Path, "worker-ran.txt");
3730using var archive = ZipFile.Open(Path.Combine(feed, $"Aspire.RestoreTest.{version}.nupkg"), ZipArchiveMode.Create);
3758var directory = Directory.CreateDirectory(Path.Combine(root, directoryName));
3759var path = Path.Combine(directory.FullName, projectFileName);
3767Path.Combine(Path.GetDirectoryName(projectPath)!, "Properties"));
3768File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), $$"""
3803File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "SharedValue.cs"), """
3816var directory = Directory.CreateDirectory(Path.Combine(root, name));
3818var projectPath = Path.Combine(directory.FullName, $"{name}.csproj");
3837File.WriteAllText(Path.Combine(directory.FullName, "Program.cs"), """
3858File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """
3877File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "BuildGate.cs"), $$"""
3908File.WriteAllText(Path.Combine(projectDirectory, "Program.cs"), "System.Console.WriteLine(\"Started\");");
3925File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), "this does not compile");
3931var directory = Directory.CreateDirectory(Path.Combine(root, name));
3932var projectPath = Path.Combine(directory.FullName, $"{name}.csproj");
3939var directory = Directory.CreateDirectory(Path.Combine(root, name));
3940var appPath = Path.Combine(directory.FullName, $"{name}.cs");
3952Path.Combine(Path.GetDirectoryName(projectPath)!, "build-count.txt");
4077var responseFilePath = Path.Combine(directory, "build-properties.rsp");
DotnetProjectResourceTests.cs (38)
53var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
258await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Dockerfile"), "FROM scratch");
297var appPath = Path.Combine(workspace.Path, "app.cs");
304var archivePath = Path.Combine(workspace.Path, "app.tar.gz");
334var sentinelDockerfilePath = Path.Combine(workspace.Path, "Dockerfile.sentinel");
335await File.WriteAllTextAsync(Path.Combine(workspace.Path, "sentinel.txt"), marker, cancellation.Token);
382var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project"));
383var projectPath = Path.Combine(projectDirectory.FullName, "Project.csproj");
396Path.Combine(projectDirectory.FullName, "Program.cs"),
398var archivePath = Path.Combine(workspace.Path, "project.tar.gz");
425var projectPath = Path.Combine(workspace.Path, "Project.csproj");
432context.OutputPath = Path.Combine(workspace.Path, "project.tar");
451var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project"));
453var runtimeDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime"));
454File.WriteAllText(Path.Combine(projectDirectory.FullName, "Dockerfile"), "FROM scratch");
477var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
478var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
495var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "AmbiguousService"));
496File.WriteAllText(Path.Combine(projectDir.FullName, "First.csproj"), "<Project />");
497File.WriteAllText(Path.Combine(projectDir.FullName, "Second.csproj"), "<Project />");
562var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
563var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
566var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
567await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
608var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
665var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
666var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
669var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
670await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
735var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService"));
736var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj");
739var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties"));
740await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """
834var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
869var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
1057var appPath = Path.Combine(builder.AppHostDirectory, "service.cs");
1141var projectDirectory = Directory.CreateDirectory(Path.Combine(workspacePath, "MyService"));
1148var path = Path.Combine(directory, fileName);
Aspire.Hosting.EntityFrameworkCore (6)
Aspire.Hosting.EntityFrameworkCore.Tests (3)
Aspire.Hosting.Foundry.Tests (1)
Aspire.Hosting.Garnet.Tests (1)
Aspire.Hosting.Go (4)
Aspire.Hosting.Go.Tests (33)
AddGoAppTests.cs (27)
88File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
95var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
779File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.23\n");
780File.WriteAllText(Path.Combine(sourceDir.FullName, "main.go"), "package main\nfunc main() {}");
787var dockerfilePath = Path.Combine(outputDir.FullName, "api.Dockerfile");
807var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
819File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.22\n");
829var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
841File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
851var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
864File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch");
880File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.22\n");
888var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
902File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
910var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
922File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
930var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
978File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
995var dockerfile = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1012File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1035var dockerfile = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1080File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1087var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1154File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1161var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
1173File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n");
1181var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"));
GoVersionDetectorTests.cs (5)
22File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n\ngo 1.23\n");
33File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n\ngo 1.23.4\n");
44File.WriteAllText(Path.Combine(workspace.Path, "go.mod"),
57File.WriteAllText(Path.Combine(workspace.Path, "go.mod"),
69File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/m\n");
Aspire.Hosting.Java (33)
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)
91Path.Combine(builder.AppHostDirectory, appDirectory));
114if (File.Exists(Path.Combine(appDirectory, "Dockerfile")))
953Path.Combine(builder.Resource.WorkingDirectory, wrapperPath));
1241resolved = Path.GetFullPath(Path.Combine(builder.Resource.WorkingDirectory, authored));
1858var jarPath = Path.GetFullPath(Path.Combine(resource.WorkingDirectory, NormalizeJarPathForJava(jar.JarPath)));
1892JavaBuildTool.Maven => Path.Combine(resource.WorkingDirectory, "target"),
2012JavaBuildTool.Maven => TryReadMavenArtifactId(Path.Combine(resource.WorkingDirectory, "pom.xml")),
2079var settingsPath = Path.Combine(workingDirectory, fileName);
JavaVersionDetector.cs (6)
45DetectFromGradle(Path.Combine(appDirectory, "build.gradle")),
46DetectFromGradle(Path.Combine(appDirectory, "build.gradle.kts")),
47DetectFromPom(Path.Combine(appDirectory, "pom.xml"), buildArgs: null),
52Path.Combine(appDirectory, "pom.xml"),
54DetectFromGradle(Path.Combine(appDirectory, "build.gradle")),
55DetectFromGradle(Path.Combine(appDirectory, "build.gradle.kts")),
Aspire.Hosting.Java.Tests (129)
AddJavaAppPublishTests.cs (77)
52var destination = Path.Combine(workspace.Path, "app.jar");
232File.WriteAllText(Path.Combine(sourceDir.FullName, "build.gradle"), "");
404File.WriteAllText(Path.Combine(source, ".dockerignore"), "secrets/\n");
419File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
425Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
440File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
471File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
503var manifest = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "aspire-manifest.json"), TestContext.Current.CancellationToken);
520File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), $"""
541File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
569File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
592File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
616File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
687File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "plugins { id 'java' }");
697File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
722File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
906File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), script);
1018File.WriteAllText(Path.Combine(appDirectory.Path, fileName), script);
1028File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), """
1041File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1044File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "sourceCompatibility = '21'");
1060File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1063File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "sourceCompatibility = '21'");
1077File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1080File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "plugins { id 'java' }");
1092File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1115File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1137File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), """
1158File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), "<project>");
1190File.WriteAllText(Path.Combine(appDirectory.Path, fileName), "");
1207File.WriteAllText(Path.Combine(appDirectory.Path, "pom.xml"), "<project />");
1208File.WriteAllText(Path.Combine(appDirectory.Path, "build.gradle"), "");
1254File.WriteAllText(Path.Combine(sourceDir.FullName, "pom.xml"), "<project/>");
1379var wrapperDirectory = Path.Combine(source, "scripts");
1403File.Delete(Path.Combine(sourceDir.FullName, "mvnw"));
1429Directory.Delete(Path.Combine(sourceDir.FullName, supportDirectory), recursive: true);
1451Directory.CreateDirectory(Path.Combine(source, "scripts"));
1452WriteWrapper(Path.Combine(source, "scripts"), "custom-mvnw");
1456.WithWrapperPath(Path.Combine("scripts", "custom-mvnw")));
1468Directory.CreateDirectory(Path.Combine(source, "target"));
1471jarPath: Path.Combine("target", "worker.jar"));
1488Directory.CreateDirectory(Path.Combine(source, "target"));
1491jarPath: Path.Combine("target", "worker.jar"),
1504Directory.CreateDirectory(Path.Combine(source, "target"));
1507jarPath: Path.Combine("target", "worker.jar"));
1521jarPath: Path.Combine("target", "api.jar"));
1539Path.Combine(sourceDir.FullName, "App.java"),
1560builder.AddJavaApp("api", sourceDir.FullName, Path.Combine("target", "app.jar"), ["--greeting", "hello"]);
1569await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "aspire-manifest.json"), TestContext.Current.CancellationToken));
1579Path.Combine(outputDir.FullName, "api.Dockerfile"),
1580Path.Combine(sourceDir.FullName, "Dockerfile"));
1582Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"),
1583Path.Combine(sourceDir.FullName, ".dockerignore"));
1619Path.Combine(sourceDir.FullName, "pom.xml"),
1652Path.Combine(sourcePath.FullName, "App.java"),
1686Path.Combine(outputDir.FullName, "api.Dockerfile"),
1687Path.Combine(sourceDir.FullName, "Dockerfile"));
1689Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"),
1690Path.Combine(sourceDir.FullName, ".dockerignore"));
1822var stagingDirectory = Path.Combine(workspace.Path, "staged");
1863Assert.Equal("runner", File.ReadAllText(Path.Combine(stagingDirectory, "quarkus-run.jar")));
1868Assert.False(Directory.Exists(Path.Combine(stagingDirectory, "lib")));
2086Path.Combine(source, "pom.xml"),
2087File.ReadAllText(Path.Combine(source, "pom.xml")).Replace(
2132var nested = Directory.CreateDirectory(Path.Combine(sourceDir.FullName, "build tools"));
2138.WithWrapperPath(Path.Combine("build tools", "mvnw"));
2170File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")),
2196return await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
2419return await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
2443var ignorePath = Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore");
2454File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2471File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), """
2497File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2514File.WriteAllText(Path.Combine(sourceDirectory, "pom.xml"), $"""
2542File.WriteAllText(Path.Combine(sourceDirectory, "build.gradle"), contents);
2548File.WriteAllText(Path.Combine(sourceDirectory, wrapperName), "#!/bin/sh\nexit 0\n");
2566Path.Combine(supportDirectory, gradle ? "gradle-wrapper.properties" : "maven-wrapper.properties"),
AddJavaAppTests.cs (34)
46Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper), tempDir.Path, "spring-boot:run"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
59Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultGradleWrapper), tempDir.Path, "bootRun", "--no-daemon"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
320var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultGradleWrapper));
338var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper));
351File.WriteAllText(Path.Combine(repo.Path, "settings.gradle"), "include 'services:api'");
353File.WriteAllText(Path.Combine(module, "build.gradle"), "");
359var expectedWrapper = Path.GetFullPath(Path.Combine(repo.Path, JavaHostingExtensions.s_defaultGradleWrapper));
371File.WriteAllText(Path.Combine(repo.Path, "pom.xml"), "<project />");
373File.WriteAllText(Path.Combine(module, "pom.xml"), "<project />");
379var expectedWrapper = Path.GetFullPath(Path.Combine(repo.Path, JavaHostingExtensions.s_defaultMavenWrapper));
392File.WriteAllText(Path.Combine(module, JavaHostingExtensions.s_defaultGradleWrapper), "#!/bin/sh\n");
398var expectedWrapper = Path.GetFullPath(Path.Combine(module, JavaHostingExtensions.s_defaultGradleWrapper));
553var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, "scripts/custom-mvnw"));
571var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, "scripts/custom-gradlew"));
788.WithWrapperPath(Path.Combine("tools", "mvnw"));
815var wrapper = Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper);
1314var expectedWrapper = Path.GetFullPath(Path.Combine(tempDir.Path, "tools/mvn"));
1376var javaExecutable = Path.Combine(tempDir.Path, fileName);
1392var command = Path.Combine(tempDir.Path, fileName);
1404var command = Path.Combine("bin", OperatingSystem.IsWindows() ? "java.exe" : "java");
1418var javaExecutable = Path.Combine(tempDir.Path, OperatingSystem.IsWindows() ? "java.exe" : "java");
1445var javaExecutable = Path.Combine(tempDir.Path, OperatingSystem.IsWindows() ? "java.exe" : "java");
1470var wrapperCommand = Path.Combine(tempDir.Path, OperatingSystem.IsWindows() ? "cmd.exe" : "sh");
1526var jarPath = Path.Combine(directory, fileName);
1659Assert.Equal(Path.Combine(tempDir.Path, "no-main.jar"), Assert.Single(noMainClassConfiguration.ClassPaths!));
1663Assert.Equal(Path.Combine(tempDir.Path, "does-not-exist.jar"), Assert.Single(missingConfiguration.ClassPaths!));
1679Path.Combine(outputDirectory, "catalog-0.0.1-SNAPSHOT.jar"),
1689Path.Combine(tempDir.Path, tool == "maven" ? "pom.xml" : "settings.gradle"),
1797File.WriteAllText(Path.Combine(tempDir.Path, "pom.xml"), """
1827File.WriteAllText(Path.Combine(tempDir.Path, "settings.gradle"), "rootProject.name = 'orders'\n");
1861Path.Combine(tempDir.Path, "settings.gradle"),
1882File.WriteAllText(Path.Combine(tempDir.Path, "pom.xml"), """
1894Path.Combine("target", "worker-0.0.1-SNAPSHOT.jar"),
1898.AddJavaApp("worker", tempDir.Path, Path.Combine("target", "worker-0.0.1-SNAPSHOT.jar"))
AddSpringBootAppTests.cs (4)
26Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper), tempDir.Path, "spring-boot:run"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
43Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultGradleWrapper), tempDir.Path, "bootRun"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
119Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper),
321.WithOtelAgent(Path.Combine(Path.GetTempPath(), "opentelemetry-javaagent.jar"));
JavaBuildToolResolverTests.cs (9)
26Assert.Equal(Path.GetFullPath(Path.Combine(tempDir.Path, expectedWrapperName)), wrapperPath);
54Assert.Equal(Path.GetFullPath(Path.Combine(root.RootPath, "mvnw")), wrapperPath);
78Assert.Equal(Path.GetFullPath(Path.Combine(module, "mvnw")), wrapperPath);
105Assert.Equal(Path.GetFullPath(Path.Combine(root.RootPath, "mvnw")), wrapperPath);
120Path.Combine(root.RootPath, "mvnw"),
129Assert.Equal(Path.GetFullPath(Path.Combine(module, "mvnw")), wrapperPath);
143File.WriteAllText(Path.Combine(_root.FullName, "pom.xml"), "<project/>");
144File.WriteAllText(Path.Combine(_root.FullName, "mvnw"), "#!/bin/sh\n");
152File.WriteAllText(Path.Combine(module.FullName, "pom.xml"), "<project/>");
Aspire.Hosting.JavaScript (38)
JavaScriptHostingExtensions.cs (28)
184if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
272if (File.Exists(Path.Combine(appDirectory, "package.json")))
512if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
677if (File.Exists(Path.Combine(appDirectory, "package.json")))
886if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
1040if (File.Exists(Path.Combine(appDirectory, "package.json")) ||
1041File.Exists(Path.Combine(appDirectory, "deno.json")) ||
1042File.Exists(Path.Combine(appDirectory, "deno.jsonc")))
1174appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
1684if (File.Exists(Path.Combine(appDirectory, "Dockerfile")))
2014appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
2215appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory));
2393var hasBunLock = File.Exists(Path.Combine(workingDirectory, "bun.lock")) ||
2394File.Exists(Path.Combine(workingDirectory, "bun.lockb"));
2399if (File.Exists(Path.Combine(workingDirectory, "bun.lock")))
2403if (File.Exists(Path.Combine(workingDirectory, "bun.lockb")))
2484if (File.Exists(Path.Combine(workingDirectory, manifest)))
2547File.Exists(Path.Combine(resource.Resource.WorkingDirectory, "package-lock.json"))
2565var hasYarnLock = File.Exists(Path.Combine(workingDirectory, "yarn.lock"));
2566var hasYarnrc = File.Exists(Path.Combine(workingDirectory, ".yarnrc.yml"));
2567var hasYarnBerryDir = Directory.Exists(Path.Combine(workingDirectory, ".yarn"));
2644var hasPnpmLock = File.Exists(Path.Combine(workingDirectory, "pnpm-lock.yaml"));
2645var hasPnpmWorkspace = File.Exists(Path.Combine(workingDirectory, "pnpm-workspace.yaml"));
2699var packageJsonPath = Path.Combine(workingDirectory, "package.json");
3159var configPath = Path.Combine(appDirectory, configFileName);
3284var nvmrcPath = Path.Combine(workingDirectory, ".nvmrc");
3297var nodeVersionPath = Path.Combine(workingDirectory, ".node-version");
3310var toolVersionsPath = Path.Combine(workingDirectory, ".tool-versions");
Aspire.Hosting.JavaScript.Tests (306)
AddBunAppTests.cs (18)
34var appDir = Path.Combine(workspace.Path, "js");
39File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
46var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
62var appDir = Path.Combine(workspace.Path, "js");
64File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
73await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")));
82var appDir = Path.Combine(workspace.Path, "js");
84File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
93var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore");
99Assert.False(File.Exists(Path.Combine(appDir, ".dockerignore")), "Aspire should not write a .dockerignore into the user's source tree.");
113var appDir = Path.Combine(workspace.Path, "js");
115File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
121var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore");
127var userIgnorePath = Path.Combine(appDir, ".dockerignore");
143File.WriteAllText(Path.Combine(workspace.Path, "server.ts"), "console.log('hi');");
165File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
349File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
382File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
AddDenoAppTests.cs (132)
62var appDir = Path.Combine(workspace.Path, "js");
67File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
74var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
90var appDir = Path.Combine(workspace.Path, "js");
92File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
101var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
113var appDir = Path.Combine(workspace.Path, "js");
115File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
124var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore");
130Assert.False(File.Exists(Path.Combine(appDir, ".dockerignore")), "Aspire should not write a .dockerignore into the user's source tree.");
145var appDir = Path.Combine(workspace.Path, "js");
152var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
180var appDir = Path.Combine(workspace.Path, "js");
183File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
189var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
200var appDir = Path.Combine(workspace.Path, "js");
202File.WriteAllText(Path.Combine(appDir, "custom.lock"), "{}");
212var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
224var appDir = Path.Combine(workspace.Path, "js");
226File.WriteAllText(Path.Combine(appDir, "custom.lock"), "{}");
238await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")));
247var appDir = Path.Combine(workspace.Path, "js");
249File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
256var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
267var appDir = Path.Combine(workspace.Path, "js");
269File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
270File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
281var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
294var appDir = Path.Combine(workspace.Path, "js");
296File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"build":"deno run -A build.ts","start":"deno run -A main.ts"}}""");
305var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
320var appDir = Path.Combine(workspace.Path, "js");
323Path.Combine(appDir, "deno.json"),
336var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
351var appDir = Path.Combine(workspace.Path, "js");
371var appDir = Path.Combine(workspace.Path, "js");
391var appDir = Path.Combine(workspace.Path, "js");
393File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"importMap":"import_map.json","tasks":{"start":"deno run main.ts"}}""");
394File.WriteAllText(Path.Combine(appDir, "import_map.json"), """{"imports":{}}""");
401var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile"));
415var appDir = Path.Combine(workspace.Path, "js");
417File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"importMap":"import_map.json","tasks":{"start":"deno run main.ts"}}""");
418File.WriteAllText(Path.Combine(appDir, "import_map.json"), """{"imports":{}}""");
426var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile"));
440var appDir = Path.Combine(workspace.Path, "js");
446var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
458var appDir = Path.Combine(workspace.Path, "js");
465var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
477var appDir = Path.Combine(workspace.Path, "js");
486var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
504var appDir = Path.Combine(workspace.Path, "js");
523var appDir = Path.Combine(workspace.Path, "js");
525File.WriteAllText(Path.Combine(appDir, "Dockerfile"), "FROM denoland/deno:2.9.0");
532Assert.False(File.Exists(Path.Combine(workspace.Path, "js.Dockerfile")));
541var appDir = Path.Combine(workspace.Path, "js");
543File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
553var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
568var appDir = Path.Combine(workspace.Path, "js");
570File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
584var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
611var appDir = Path.Combine(workspace.Path, "js");
613File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
622var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
632var appDir = Path.Combine(workspace.Path, "js");
634File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);");
643var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
653var appDir = Path.Combine(workspace.Path, "js");
655File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"build prod":"deno run -A build.ts","start":"deno run -A main.ts"}}""");
664var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
675var appDir = Path.Combine(workspace.Path, "js");
677File.WriteAllText(Path.Combine(appDir, "package.json"), """{"scripts":{"build prod":"echo build","start":"node main.js"}}""");
687var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
697var appDir = Path.Combine(workspace.Path, "js");
699File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
708var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
726var appDir = Path.Combine(workspace.Path, "js");
728File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
746var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
757var appDir = Path.Combine(workspace.Path, "js");
759File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
767var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
861var appDir = Path.Combine(workspace.Path, "js");
863File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}""");
873var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
885var appDir = Path.Combine(workspace.Path, "js");
887File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
894var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
904var appDir = Path.Combine(workspace.Path, "js");
906File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}");
913var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
952var appDir = Path.Combine(workspace.Path, "js");
961var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
973var appDir = Path.Combine(workspace.Path, "js");
975File.WriteAllText(Path.Combine(appDir, "custom lock's.lock"), "{}");
984var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
996var appDir = Path.Combine(workspace.Path, "js");
1005var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1022var appDir = Path.Combine(workspace.Path, "js");
1030var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1040var appDir = Path.Combine(workspace.Path, "js");
1049var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1061var appDir = Path.Combine(workspace.Path, "js");
1070var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1082var appDir = Path.Combine(workspace.Path, "js");
1094var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1106var appDir = Path.Combine(workspace.Path, "js");
1124var appDir = Path.Combine(workspace.Path, "js");
1151var appDir = Path.Combine(workspace.Path, "js");
1180var appDir = Path.Combine(workspace.Path, "js");
1199var appDir = Path.Combine(workspace.Path, "js");
1228var appDir1 = Path.Combine(workspace.Path, "js1");
1229var appDir2 = Path.Combine(workspace.Path, "js2");
1243var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js2.Dockerfile"));
1253File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');");
1275File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
1302File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
1324File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');");
1578var appDir = Path.Combine(workspace.Path, "js");
1587var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1602var appDir = Path.Combine(workspace.Path, "js");
1612var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1629var appDir = Path.Combine(workspace.Path, "js");
1638var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1649var appDir = Path.Combine(workspace.Path, "js");
1657var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
1684var appDir = Path.Combine(workspace.Path, "js");
2348var appDir = Path.Combine(workspace.Path, "deno-app");
2350await File.WriteAllTextAsync(Path.Combine(appDir, "main.ts"), """
2359var dockerfilePath = Path.Combine(workspace.Path, "deno-app.Dockerfile");
2586File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
2604File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
2623File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
AddJavaScriptAppTests.cs (44)
26var appDir = Path.Combine(workspace.Path, "js");
35var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
48var appDir = Path.Combine(workspace.Path, "js");
58var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
68var appDir = Path.Combine(workspace.Path, "js");
78var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
88var appDir = Path.Combine(workspace.Path, "js");
98var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
111var appDir = Path.Combine(workspace.Path, "js");
116File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), string.Empty);
125var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
137var appDir = Path.Combine(workspace.Path, "js");
146var dockerfileLines = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
171var appDir = Path.Combine(workspace.Path, "js");
176File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), string.Empty);
186var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
349var appDir = Path.Combine(workspace.Path, "js");
352File.WriteAllText(Path.Combine(appDir, "pnpm-workspace.yaml"), "allowBuilds: {}\n");
360var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
380var appDir = Path.Combine(workspace.Path, "js");
383Path.Combine(appDir, "package.json"),
396var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
414var appDir = Path.Combine(workspace.Path, "js");
417Path.Combine(appDir, "package.json"),
431var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
446var appDir = Path.Combine(workspace.Path, "js");
449Path.Combine(appDir, "package.json"),
462var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
475var appDir = Path.Combine(workspace.Path, "js");
478Path.Combine(appDir, "package.json"),
491var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile"));
514var appDir = Path.Combine(workspace.Path, "js");
516var packageJsonPath = Path.Combine(appDir, "package.json");
541var appDir = Path.Combine(workspace.Path, "pnpm-app");
555await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson);
563var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile");
578var dockerfileInContext = Path.Combine(appDir, "Dockerfile");
636var appDir = Path.Combine(workspace.Path, "pnpm-app");
650await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson);
659var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile");
668var dockerfileInContext = Path.Combine(appDir, "Dockerfile");
714var appDir = Path.Combine(rootDirectory, "js");
724File.WriteAllText(Path.Combine(appDir, "Dockerfile"), dockerfile);
725File.WriteAllText(Path.Combine(appDir, "package.json"), """
AddNodeAppTests.cs (19)
99var appDir = Path.Combine(workspace.Path, "js");
104File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
105File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "{}");
112var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
167var appDir = Path.Combine(workspace.Path, "js");
169File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
181var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile");
214var appDir = Path.Combine(workspace.Path, "js");
216File.WriteAllText(Path.Combine(appDir, "package.json"), "{}");
227var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"));
236File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "{}");
263File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}");
337File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
338File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
363var nodeDockerfilePath = Path.Combine(outputDir.FullName, "nodeapp.Dockerfile");
394File.WriteAllText(Path.Combine(appDirectory, "package.json"), packageJsonContent);
395File.WriteAllText(Path.Combine(appDirectory, "app.js"), appContent);
420var nodeDockerfilePath = Path.Combine(outputDir.FullName, "nodeapp.Dockerfile");
560File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "console.log('hello');");
AddViteAppTests.cs (77)
26var viteDir = Path.Combine(workspace.Path, "vite");
30File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
61var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
87var viteDir = Path.Combine(workspace.Path, "vite");
89File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
97var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
113var viteDir = Path.Combine(workspace.Path, "vite");
115File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
117var apiDir = Path.Combine(workspace.Path, "api");
119File.WriteAllText(Path.Combine(apiDir, "package-lock.json"), "empty");
130var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
140var viteDir = Path.Combine(workspace.Path, "vite");
142File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
161var viteDir = Path.Combine(workspace.Path, "vite");
163File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty");
165var apiDir = Path.Combine(workspace.Path, "api");
167File.WriteAllText(Path.Combine(apiDir, "package-lock.json"), "empty");
191var appDir = Path.Combine(workspace.Path, "angular");
193File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "empty");
201var dockerfilePath = Path.Combine(workspace.Path, "angular.Dockerfile");
217var appDir = Path.Combine(workspace.Path, "vite");
219File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "empty");
227var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile");
240var nextDir = Path.Combine(workspace.Path, "nextjs");
242File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
249var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile");
261var nextDir = Path.Combine(workspace.Path, "nextjs");
263File.WriteAllText(Path.Combine(nextDir, "pnpm-lock.yaml"), "");
270var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile");
280var appDir = Path.Combine(workspace.Path, "nuxt");
282File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), "");
290var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile");
300var appDir = Path.Combine(workspace.Path, "nuxt");
302File.WriteAllText(Path.Combine(appDir, "bun.lock"), "");
310var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile");
320File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), "18.20.0");
328var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
340File.WriteAllText(Path.Combine(workspace.Path, ".node-version"), "v21.5.0");
348var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
365File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions);
373var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
391File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions);
399var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
417File.WriteAllText(Path.Combine(workspace.Path, "package.json"), packageJson);
425var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
442var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
458File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), versionString);
466var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
488var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile"));
546Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
549var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
594Assert.Contains(Path.Combine("node_modules", ".aspire"), newConfigPath);
607Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
610var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
711var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
754Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
757var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js");
809var repoRoot = Path.Combine(workspace.Path, "repo");
812Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules"));
815var viteConfigPath = Path.Combine(appDir, "vite.config.ts");
885var repoRoot = Path.Combine(workspace.Path, "repo");
890Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules"));
892var firstConfigPath = Path.Combine(firstAppDirectory, "vite.config.ts");
893var secondConfigPath = Path.Combine(secondAppDirectory, "vite.config.ts");
948var repoRoot = Path.Combine(workspace.Path, "repo");
953Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules"));
955var firstConfigPath = Path.Combine(firstAppDirectory, "vite.config.ts");
956var secondConfigPath = Path.Combine(secondAppDirectory, "vite.config.ts");
994Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules"));
997var viteConfigPath = Path.Combine(workspace.Path, configFileName);
1048var nextDir = Path.Combine(workspace.Path, "nextjs");
1050File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
1064var nextDir = Path.Combine(workspace.Path, "nextjs");
1066File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
1081var nextDir = Path.Combine(workspace.Path, "nextjs");
1083File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty");
1084File.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 (82)
KubernetesDeployTests.cs (32)
844var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml"));
875var chartYaml = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "Chart.yaml"));
938var outputPath = Path.Combine(workspace.Path, "env");
949await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml);
968var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
985var outputPath = Path.Combine(workspace.Path, "env");
988await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
997var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1005var outputPath = Path.Combine(workspace.Path, "env");
1008await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
1027var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1079var outputPath = Path.Combine(workspace.Path, "env");
1082await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), "parameters: {}\nsecrets: {}\nconfig: {}");
1103var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1236var outputPath = Path.Combine(workspace.Path, "env");
1247await File.WriteAllTextAsync(Path.Combine(outputPath, "values.yaml"), valuesYaml);
1272var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1286var outputPath = Path.Combine(workspace.Path, "env");
1296var deployValuesPath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1335var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1410var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1437var outputPath = Path.Combine(workspace.Path, "deploy");
1469var overridePath = Path.Combine(outputPath, HelmDeploymentEngine.GetDeployValuesFileName("myenv"));
1527var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1588var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1633var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1673var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"));
1674await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml")
1751var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1790var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1825var valuesPath = Path.Combine(workspace.Path, "values.yaml");
1861var valuesPath = Path.Combine(workspace.Path, "values.yaml");
KubernetesPublisherTests.cs (43)
62await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates/myapp/deployment.yaml")), "yaml")
119var filePath = Path.Combine(workspace.Path, expectedFile);
158var deploymentPath = Path.Combine(workspace.Path, "templates/service/deployment.yaml");
216var filePath = Path.Combine(workspace.Path, expectedFile);
260var manifestPath = Path.Combine(workspace.Path, "templates/myapp/scaler.yaml");
343var filePath = Path.Combine(workspace.Path, expectedFile);
397var filePath = Path.Combine(workspace.Path, expectedFile);
429var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile");
504var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
553var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
588var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
681var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml");
777var filePath = Path.Combine(workspace.Path, expectedFile);
831await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml")
851await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml");
878var publishedValues = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml"));
882.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml")
900await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml");
923await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml")
947await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml")
967await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml")
984await Verify(File.ReadAllText(Path.Combine(workspace.Path, "Chart.yaml")), "yaml")
985.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.Path, "values.yaml")), "yaml")
1021var filePath = Path.Combine(workspace.Path, expectedFile);
1065var filePath = Path.Combine(workspace.Path, expectedFile);
1091var servicePath = Path.Combine(workspace.Path, "templates/database/service.yaml");
1127var filePath = Path.Combine(workspace.Path, expectedFile);
1179var filePath = Path.Combine(workspace.Path, expectedFile);
1222var filePath = Path.Combine(workspace.Path, expectedFile);
1267var filePath = Path.Combine(workspace.Path, expectedFile);
1422var filePath = Path.Combine(workspace.Path, expectedFile);
1468var filePath = Path.Combine(workspace.Path, expectedFile);
1529var filePath = Path.Combine(workspace.Path, expectedFile);
1580var filePath = Path.Combine(workspace.Path, expectedFile);
1642var filePath = Path.Combine(workspace.Path, expectedFile);
1701var filePath = Path.Combine(workspace.Path, expectedFile);
1755var filePath = Path.Combine(workspace.Path, expectedFile);
1812var filePath = Path.Combine(workspace.Path, expectedFile);
1906var filePath = Path.Combine(workspace.Path, expectedFile);
1961var filePath = Path.Combine(workspace.Path, expectedFile);
2248var filePath = Path.Combine(workspace.Path, expectedFile);
2328var filePath = Path.Combine(workspace.Path, expectedFile);
2522var valuesPath = Path.Combine(workspace.Path, "values.yaml");
Aspire.Hosting.Maui (11)
Aspire.Hosting.Maui.Tests (65)
MauiPlatformExtensionsTests.cs (38)
97var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
120var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
140var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
159var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
188var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
236var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
255var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
279var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
308var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
334var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
357var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
380var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
403var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
431var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
456var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
485var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
510var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
537var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
564var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
631var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
661var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
685var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
708var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
746var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
799var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
864var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
903var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
956var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1022var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1059var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1076var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1098var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1129var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1156var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1186var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1268var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1304var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
1367var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiWithArgsTests.cs (11)
21var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
39var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
58var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
78var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
95var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
115var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
132var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
151var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
168var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
188var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
210var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
Aspire.Hosting.Milvus.Tests (1)
Aspire.Hosting.MongoDB.Tests (3)
Aspire.Hosting.MySql.Tests (3)
Aspire.Hosting.Native.CodeGeneration (15)
Program.cs (9)
51await File.WriteAllTextAsync(Path.Combine(output, "NativeClient.g.cs"),
182await File.WriteAllTextAsync(Path.Combine(output, "NativeDispatch.g.cs"), code.ToString()).ConfigureAwait(false);
203await File.WriteAllTextAsync(Path.Combine(output, "contract.json"), bundle).ConfigureAwait(false);
215await File.WriteAllTextAsync(Path.Combine(output, "languages.json"), new JsonArray(new JsonObject
224await File.WriteAllTextAsync(Path.Combine(output, name), projectedContent).ConfigureAwait(false);
231await File.WriteAllTextAsync(Path.Combine(output, "native-builder.mts"), await reader.ReadToEndAsync().ConfigureAwait(false)).ConfigureAwait(false);
238await File.WriteAllTextAsync(Path.Combine(output, "native-pipeline.mts"), await reader.ReadToEndAsync().ConfigureAwait(false)).ConfigureAwait(false);
240await File.WriteAllTextAsync(Path.Combine(output, "native-types.mts"),
249await File.WriteAllTextAsync(Path.Combine(output, "native-client.mts"), $$"""
Aspire.Hosting.Native.Core.Tests (42)
NativeComposeCSharpTests.cs (11)
32Assert.Equal(Path.Combine(root.FullName, "web"), build["context"]!.GetValue<string>());
137var requestPath = Path.Combine(root.FullName, "comparison.json");
175Directory.CreateDirectory(Path.Combine(root.FullName, "web"));
199Assert.True(File.Exists(Path.Combine(context.PublishingContext.OutputPath, "compose.yaml")));
206var document = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(context.OutputPath, "compose.yaml")))!;
212.Replace(JsonEncodedText.Encode(Path.Combine(root.FullName, "web")).ToString(), "/app/web")
227Directory.CreateDirectory(Path.Combine(root.FullName, "web"));
248var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(context.OutputPath, "deployment-state.json")))!;
282Directory.CreateDirectory(Path.Combine(root.FullName, "web"));
307Directory.CreateDirectory(Path.Combine(root.FullName, "web"));
534return (new(model, Path.Combine(root, "published"), root, "Comparison", TestContext.Current.CancellationToken), builder);
Aspire.Hosting.Native.Server (23)
Aspire.Hosting.Oracle.Tests (2)
Aspire.Hosting.PostgreSQL.Tests (5)
Aspire.Hosting.Python (15)
PythonAppResourceBuilderExtensions.cs (13)
432if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile")))
510if (File.Exists(Path.Combine(appDirectoryFullPath, "pyproject.toml")) ||
511File.Exists(Path.Combine(appDirectoryFullPath, "requirements.txt")))
530var uvLockPath = Path.Combine(resource.WorkingDirectory, "uv.lock");
639var requirementsTxtPath = Path.Combine(resource.WorkingDirectory, "requirements.txt");
679var pyprojectTomlPath = Path.Combine(resource.WorkingDirectory, "pyproject.toml");
774return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
782var venvPath = Path.Combine(currentDirectory, virtualEnvironmentPath);
812return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath);
1155if (File.Exists(Path.Combine(workingDirectory, "pyproject.toml")))
1160else if (File.Exists(Path.Combine(workingDirectory, "requirements.txt")))
1268var fullPath = Path.Combine(directory, commandWithExt);
1281var fullPath = Path.Combine(directory, command);
Aspire.Hosting.Python.Tests (119)
AddPythonAppTests.cs (112)
28var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
66var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
288var scriptPath = Path.Combine(projectDirectory, "main.py");
291var requirementsPath = Path.Combine(projectDirectory, "requirements.txt");
295var dockerFilePath = Path.Combine(projectDirectory, "Dockerfile");
418var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
531var appVenvPath = Path.Combine(appDir.FullName, ".venv");
544var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, appDir.FullName));
545var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv");
561var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
565var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
607var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
611var appVenvPath = Path.Combine(appDirPath, ".venv");
614var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
664var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, appDir.FullName));
665var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv");
681var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName);
685var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv");
689var customVenvPath = Path.Combine(appDirPath, "custom-venv");
741var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
991var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
1025var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
1059var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path));
1268File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1269File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1270File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1272var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
1291var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1294var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile");
1297var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile");
1334File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1336File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1338var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json");
1357var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1360var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile");
1363var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile");
1396var appDirectory = Path.Combine(workspace.Path, "myapp");
1398var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1440var appDirectory = Path.Combine(workspace.Path, "myapp");
1442var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1480var appDirectory = Path.Combine(workspace.Path, "myapp");
1482var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1515var appDirectory = Path.Combine(workspace.Path, "myapp");
1517var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1526Assert.Equal(Path.Combine(appDirectory, "main.py"), launchConfig.ProgramPath);
1536var appDirectory = Path.Combine(workspace.Path, "myapp");
1538var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1560var appDirectory = Path.Combine(workspace.Path, "myapp");
1562var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1584var appDirectory = Path.Combine(workspace.Path, "myapp");
1586var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1588var customWorkingDirectory = Path.Combine(workspace.Path, "custom");
1599Path.Combine(builder.AppHostDirectory, customWorkingDirectory));
1611var appDirectory = Path.Combine(workspace.Path, "myapp");
1613var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1615var customWorkingDirectory = Path.Combine(workspace.Path, "custom");
1625Path.Combine(builder.AppHostDirectory, customWorkingDirectory));
1627Assert.Equal(Path.Combine(expectedWorkingDirectory, "main.py"), launchConfig.ProgramPath);
1652var appDirectory = Path.Combine(workspace.Path, "myapp");
1654var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1685var appDirectory = Path.Combine(workspace.Path, "myapp");
1687var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv");
1794File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1795File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent);
1796File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1811var dockerfilePath = Path.Combine(outputDir.FullName, "custom-images-app.Dockerfile");
1841File.WriteAllText(Path.Combine(projectDirectory, "requirements.txt"), requirementsContent);
1842File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1853var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1891File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1892File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent);
1903var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1924File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1935var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1958File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent);
1959File.WriteAllText(Path.Combine(projectDirectory, ".python-version"), pythonVersionContent);
1972var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile");
1975var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile");
1978var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile");
2007var scriptPath = Path.Combine(workspace.Path, scriptName);
2011var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml");
2041var scriptPath = Path.Combine(workspace.Path, scriptName);
2045var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2076var scriptPath = Path.Combine(workspace.Path, scriptName);
2080var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml");
2082var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2106var scriptPath = Path.Combine(workspace.Path, scriptName);
2130var scriptPath = Path.Combine(workspace.Path, scriptName);
2153var scriptPath = Path.Combine(workspace.Path, scriptName);
2157var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2181var scriptPath = Path.Combine(workspace.Path, scriptName);
2185var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2210var scriptPath = Path.Combine(workspace.Path, "main.py");
2238var scriptPath = Path.Combine(workspace.Path, "main.py");
2242var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2281var scriptPath = Path.Combine(workspace.Path, "main.py");
2284var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2311var scriptPath = Path.Combine(workspace.Path, "main.py");
2314var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2345var scriptPath = Path.Combine(workspace.Path, "main.py");
2348var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2381var scriptPath = Path.Combine(workspace.Path, "main.py");
2384var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2411var scriptPath = Path.Combine(workspace.Path, "main.py");
2414var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2443var scriptPath = Path.Combine(workspace.Path, "main.py");
2446var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2475var scriptPath = Path.Combine(workspace.Path, "main.py");
2478var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
2511var scriptPath = Path.Combine(workspace.Path, "main.py");
2565var scriptPath = Path.Combine(workspace.Path, scriptName);
2568var requirementsPath = Path.Combine(workspace.Path, "requirements.txt");
Aspire.Hosting.Qdrant.Tests (1)
Aspire.Hosting.Radius (7)
Aspire.Hosting.Radius.Tests (16)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.RemoteHost (4)
Aspire.Hosting.RemoteHost.Tests (55)
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);
tests\Shared\Processes\ProcessTestFixture.cs (4)
47while (!File.Exists(Path.Combine(repository.FullName, "Aspire.slnx")))
68var project = Path.Combine(_directory.FullName, "ProcessTestHost.csproj");
84await File.WriteAllTextAsync(Path.Combine(_directory.FullName, "Program.cs"), HostProgram);
86["restore", project, "--configfile", Path.Combine(repository.FullName, "NuGet.config"), "--verbosity", "quiet"]);
TestServices\IntegrationHostProcessFixture.cs (13)
29while (!File.Exists(Path.Combine(repository.FullName, "Aspire.slnx")))
33var project = Path.Combine(_directory.FullName, "LifetimeTestHost.csproj");
49await File.WriteAllTextAsync(Path.Combine(_directory.FullName, "Program.cs"), HostProgram);
51["restore", project, $"--property:Configuration={BuildConfiguration}", "--configfile", Path.Combine(repository.FullName, "NuGet.config"), "--verbosity", "quiet"]);
62var script = Path.Combine(directory.FullName, "host.js");
64await File.WriteAllTextAsync(Path.Combine(directory.FullName, "appsettings.json"), JsonSerializer.Serialize(new
82await File.WriteAllTextAsync(Path.Combine(directory.FullName, "fail-startup"), "");
86await File.WriteAllTextAsync(Path.Combine(directory.FullName, "skip-registration"), "");
90await File.WriteAllTextAsync(Path.Combine(directory.FullName, "missing-command"), "");
94await File.WriteAllTextAsync(Path.Combine(directory.FullName, "stall-discovery"), "");
410while (!File.Exists(Path.Combine(Directory, name)))
416public int[] HostProcessIds => File.ReadAllLines(Path.Combine(Directory, "host-pids")).Select(int.Parse).ToArray();
447await File.WriteAllTextAsync(Path.Combine(Directory, "stop-server"), "");
Aspire.Hosting.Rust (14)
Aspire.Hosting.Rust.Tests (68)
AddRustAppPublishTests.cs (48)
38File.WriteAllText(Path.Combine(source, "rust-toolchain.toml"), """
416Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
471Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
495File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
501Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
513File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\n");
519Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
529var customDockerfile = Path.Combine(customContext.FullName, "Dockerfile.prod");
543Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
564Path.Combine(outputDir.FullName, "api.Dockerfile"),
589File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
592if (!File.Exists(Path.Combine(sourceDir.FullName, differentlyCasedPath)))
602var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
615var manifestDirectory = Directory.CreateDirectory(Path.Combine(sourceDir.FullName, decomposedDirectoryName));
617File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
619var composedManifestPath = Path.Combine(composedDirectoryName, "Cargo.toml");
620if (!File.Exists(Path.Combine(sourceDir.FullName, composedManifestPath)))
632var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
649var sourceDir = Directory.CreateDirectory(Path.Combine(restrictedAncestor.FullName, "source"));
653File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
677Path.Combine(outputDir.FullName, "api.Dockerfile"),
715var manifestDirectory = Directory.CreateDirectory(Path.Combine(source, @"crates\api"));
716File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
752var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
771File.WriteAllText(Path.Combine(manifestDirectory.FullName, "Cargo.toml"), "[package]\nname = \"api\"\n");
791var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
803File.WriteAllText(Path.Combine(outsideDir.FullName, "Cargo.toml"), "[package]\nname = \"outside\"\n");
804CreateDirectorySymbolicLinkOrSkip(Path.Combine(sourceDir.FullName, "linked"), outsideDir.FullName);
811Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
820var firstLink = Path.Combine(sourceDir.FullName, "linked");
821var secondLink = Path.Combine(sourceDir.FullName, "loop");
834Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile")));
861configureResource: app => app.WithCargoManifestPath(Path.Combine(Path.GetTempPath(), "Cargo.toml"))));
872File.WriteAllText(Path.Combine(source, "Cargo.lock"), "version = 4\n"));
881configureSource: source => File.WriteAllText(Path.Combine(source, "Cargo.lock"), "version = 4\n"),
925var first = await File.ReadAllTextAsync(Path.Combine(firstOutputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
926var second = await File.ReadAllTextAsync(Path.Combine(secondOutputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
943var first = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
944var second = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "worker.Dockerfile"), TestContext.Current.CancellationToken);
972var ignore = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore"), TestContext.Current.CancellationToken);
986File.WriteAllText(Path.Combine(sourceDir.FullName, ".dockerignore"), "*.md\n");
993Assert.False(File.Exists(Path.Combine(outputDir.FullName, "api.Dockerfile.dockerignore")));
1008File.WriteAllText(Path.Combine(relocatedDir.FullName, "Dockerfile"), "FROM scratch\n");
1029Assert.Equal(Path.Combine(relocatedDir.FullName, "Dockerfile"), dockerfile.DockerfilePath);
1051File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "Cargo.lock"), "version = 4\n");
1055File.WriteAllText(Path.Combine(sourceDir.FullName, "Cargo.lock"), "version = 4\n");
1064var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile"), TestContext.Current.CancellationToken);
1141return 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 (114)
AppHostSdkTargetsTests.cs (112)
137await File.WriteAllTextAsync(Path.Combine(workspace.Path, "AppHost.csproj"),
236var projectDirectory = Path.Combine(workspace.Path, "AppHost");
254await File.WriteAllTextAsync(Path.Combine(projectDirectory, "AppHost.csproj"),
326var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
350var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
389var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
419var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
445var nonExecutableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "non-executable"));
446var nonExecutableDnxPath = Path.Combine(nonExecutableDirectory.FullName, "dnx");
453var executableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "executable"));
474var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(project.ProjectDirectory, RelativeCliDirectory));
493var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
514var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
529var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@"));
547var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
554var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
572var appHostDirectory = Path.Combine(workspace.Path, "FileApp");
574var appHostFile = Path.Combine(appHostDirectory, "apphost.cs");
595var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
665var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli"));
666var captureFile = Path.Combine(workspace.Path, "aspire-args.txt");
702var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli"));
703var captureFile = Path.Combine(workspace.Path, "dnx-args.txt");
745var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native aspire"));
746var captureFile = Path.Combine(workspace.Path, "aspire-native-args.txt");
785var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@"));
786var captureFile = Path.Combine(workspace.Path, "aspire-args.txt");
822var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
823var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
838var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
845var aspireHome = Path.Combine(workspace.Path, "aspire-home");
871var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli"));
877var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, dnxDirectoryName));
882var aspireHome = Path.Combine(workspace.Path, aspireHomeDirectoryName);
927var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "cli"));
939["ASPIRE_HOME"] = Path.Combine(workspace.Path, "aspire-home"),
958var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "dnx"));
960var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "cli"));
964await File.WriteAllTextAsync(Path.Combine(cliDirectory.FullName, "setup-exit-code"), "42");
967var aspireHome = Path.Combine(workspace.Path, "aspire-home");
991var path = Path.Combine(directory, OperatingSystem.IsWindows() ? "Aspire.TerminalHost.exe" : "Aspire.TerminalHost");
1013File.Move(bundle.DashboardPath, Path.Combine(managedDir, Path.GetFileName(bundle.DashboardPath)));
1044var managedPath = Path.Combine(managedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed");
1050expectedDashboardPath = Path.Combine(managedDir, Path.GetFileName(bundle.DashboardPath));
1083Path.Combine(workspace.Path, "cli $HOME `aspire-test-command`"));
1085var aspireHome = Path.Combine(workspace.Path, "empty-aspire-home");
1107var selectedCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected-cli"));
1109var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli"));
1112var aspireHome = Path.Combine(workspace.Path, "aspire-home");
1138var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native%ASPIRE_TEST_LITERAL%"));
1140var aspireHome = Path.Combine(workspace.Path, "aspire-home");
1156Assert.False(Directory.Exists(Path.Combine(workspace.Path, "nativeexpanded")));
1164var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1167var aspireHome = Path.Combine(workspace.Path, "aspire-home");
1193var fakeCommandDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-command"));
1195var commandShimPath = Path.Combine(fakeCommandDirectory.FullName, "aspire.cmd");
1201var childPidPath = Path.Combine(workspace.Path, "child.pid");
1203var projectPath = Path.Combine(workspace.Path, "RunAspireCliCommand.proj");
1261var commandPath = Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "hang.cmd" : "hang");
1330var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1332var environmentAspireHome = Path.Combine(workspace.Path, "environment-aspire-home");
1333var propertyAspireHome = Path.Combine(workspace.Path, "property-aspire-home");
1347Assert.False(Directory.Exists(Path.Combine(propertyAspireHome, "bundle")));
1355var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1381var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1382var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1397var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1398var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1413var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1414var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1429var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1430var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1445var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli"));
1446var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1461var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path"));
1475var projectDirectory = Path.Combine(workspace.Path, "AppHost");
1481await File.WriteAllTextAsync(Path.Combine(projectDirectory, "AppHost.csproj"),
1521var projectDirectory = Path.Combine(workspace, "AppHost");
1525var appHostTargetsFile = Path.Combine(projectDirectory, "Aspire.Hosting.AppHost.targets");
1529var projectFile = Path.Combine(projectDirectory, "AppHost.csproj");
1561await File.WriteAllTextAsync(Path.Combine(projectDirectory, "Program.cs"), """
1636var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1652var aspirePath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1691File.WriteAllText(Path.Combine(bundle.DcpDirectory, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), "");
1701var bundleRoot = Path.Combine(layoutRoot, "bundle");
1702var dcpDirectory = Path.Combine(bundleRoot, "dcp");
1703var dashboardDirectory = Path.Combine(bundleRoot, "dashboard");
1704var dashboardPath = Path.Combine(dashboardDirectory, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
1710var aspirePath = Path.Combine(fakeCliDirectory, $"aspire{extension}");
1746var dnxPath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "dnx.cmd" : "dnx");
1751await File.WriteAllTextAsync(Path.Combine(fakeSdkDirectory.FullName, "dotnet.dll"), "");
1804await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "setup-exit-code"), exitCode.ToString(CultureInfo.InvariantCulture));
1812await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "fail-version"), "");
1826var aspirePath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
1837File.Copy(sourcePath, Path.Combine(destinationDirectory, Path.GetFileName(sourcePath)), overwrite: true);
1840return Path.Combine(destinationDirectory, Path.GetFileName(fakeCommandHostPath));
1845var captureFile = Path.Combine(workingDirectory, $"{command}-shadow-invoked.txt");
1849Path.Combine(workingDirectory, $"{command}.cmd"),
1864await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$"""
1876var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1892await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$"""
1905var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1926await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1939var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1956await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
1973var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
1994await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """
2010var aspirePath = Path.Combine(fakeCliDirectory, "aspire");
2112=> OperatingSystem.IsWindows() ? Path.Combine(Path.GetDirectoryName(dnxPath)!, "dotnet.exe") : dnxPath;
2238return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName)));
2347while (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 (15)
ResolveAspireCliBundle.cs (13)
217if (TryResolveBundleRoot(Path.Combine(fullPath, BundleDirectoryName), out resolution))
229var dcpDir = Path.Combine(bundleRoot, "dcp");
230var dcpPath = Path.Combine(dcpDir, IsWindows() ? "dcp.exe" : "dcp");
231var managedDir = Path.Combine(bundleRoot, "managed");
232var managedPath = Path.Combine(managedDir, IsWindows() ? "aspire-managed.exe" : "aspire-managed");
238var dashboardDir = Path.Combine(bundleRoot, "dashboard");
239var dashboardPath = Path.Combine(dashboardDir, IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
250dashboardPath = Path.Combine(managedDir, IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
258var terminalHostDir = Path.Combine(bundleRoot, "terminalhost");
259var terminalHostPath = Path.Combine(terminalHostDir, IsWindows() ? "Aspire.TerminalHost.exe" : "Aspire.TerminalHost");
376var versionsRoot = Path.Combine(layoutPath, VersionsDirectoryName);
472var sidecarPath = Path.Combine(cliDirectory, InstallSidecarFileName);
499? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspire")
Aspire.Hosting.Testing (1)
Aspire.Hosting.Testing.Tests (6)
Aspire.Hosting.Tests (456)
ApplicationModel\Docker\DockerfileBuildAnnotationTests.cs (14)
71var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
101var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
137var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
177var dockerfilePath = Path.Combine(Path.GetTempPath(), $"Dockerfile.{Guid.NewGuid()}");
220var dockerfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "Dockerfile");
221var differentCasingDockerfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "DOCKERFILE");
240var contextPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app");
241var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "out");
245var dockerfilePath = Path.Combine(outputPath, "Dockerfile");
259await File.WriteAllTextAsync(Path.Combine(contextPath, ".dockerignore"), "secrets\n");
270var contextPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app");
271var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "out");
275var dockerfilePath = Path.Combine(outputPath, "Dockerfile");
277await File.WriteAllTextAsync(Path.Combine(contextPath, ".dockerignore"), "secrets\n");
Dashboard\DashboardEventHandlersTests.cs (12)
600var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
601var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
689var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard.exe");
690var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
691var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
758var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard");
759var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
760var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
827var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll");
828var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json");
892var dashboardExecutable = Path.Combine(tempDir.FullName, executableName);
921var dashboardDll = Path.Combine(tempDirectory.FullName, "Aspire.Dashboard.dll");
Dcp\DcpCliArgsTests.cs (11)
93var explicitDcpPath = Path.Combine("explicit", "dcp");
94var explicitDashboardPath = Path.Combine("explicit", "dashboard");
96builder.Configuration[BundleDiscovery.DcpPathEnvVar] = Path.Combine("bundle", "dcp");
97builder.Configuration[BundleDiscovery.DashboardPathEnvVar] = Path.Combine("bundle", "dashboard");
104Assert.Equal(Path.Combine("explicit", "ext"), dcpOptions.ExtensionsPath);
112var bundleDcpPath = Path.Combine("bundle", "dcp");
113var bundleDashboardPath = Path.Combine("bundle", "dashboard");
123Assert.Equal(Path.Combine(bundleDcpPath, "ext"), dcpOptions.ExtensionsPath);
131var bundleDcpPath = Path.Combine("bundle", "dcp");
132var bundleDashboardPath = Path.Combine("bundle", "dashboard");
142Assert.Equal(Path.Combine(bundleDcpPath, "ext"), dcpOptions.ExtensionsPath);
Dcp\DcpHostNotificationTests.cs (11)
548var terminalHostPath = Path.Combine(directory.FullName, "aspire-managed.exe");
550File.WriteAllText(Path.Combine(directory.FullName, "conpty.dll"), "");
551Directory.CreateDirectory(Path.Combine(directory.FullName, architectureDirectory));
578var terminalHostPath = Path.Combine(directory.FullName, "aspire-managed.exe");
581Directory.CreateDirectory(Path.Combine(nativeDirectory, nativeHostDirectory));
582File.WriteAllText(Path.Combine(nativeDirectory, "conpty.dll"), "");
608var terminalHostPath = Path.Combine(directory.FullName, "aspire-managed.exe");
612File.WriteAllText(Path.Combine(directory.FullName, "conpty.dll"), "");
618Directory.CreateDirectory(Path.Combine(directory.FullName, architectureDirectory));
910var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test");
1058var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test");
DistributedApplicationBuilderTests.cs (39)
123Path.Combine(projectDirectory, "appsettings.json"),
139Path.Combine(projectDirectory, "appsettings.PolyglotTest.json"),
152AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts")
169Path.Combine(projectDirectory, "appsettings.json"),
183AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts")
211Assert.Equal(Path.Combine(projectDirectory, "aspire-output"), outputService.GetOutputDirectory());
234Assert.Equal(Path.Combine(Environment.CurrentDirectory, "aspire-output"), outputService.GetOutputDirectory());
524var unrelatedFile = Path.Combine(tempDirectory.FullName, "unrelated.json");
548var secretsFile = Path.Combine(tempDirectory.FullName, "Production.json");
637var path = Path.Combine(directory.FullName, "state.json");
690var legacyPath = Path.Combine(directory.FullName, "legacy.json");
691var aspirePath = Path.Combine(directory.FullName, "Development.json");
740var secretsFile = Path.Combine(tempDirectory.FullName, "Production.json");
771var secretsFile = Path.Combine(tempDirectory.FullName, "Production.json");
966var appHostPath = Path.Combine(projectDirectory.FullName, "apphost.ts");
979AppHostFilePath = Path.Combine(projectDirectory.FullName, "AppHost.ts"),
1015var appHostPath = Path.Combine(realDirectory.FullName, "apphost.ts");
1018var symlinkDirectory = Path.Combine(projectDirectory.FullName, "link");
1020var appHostPathViaSymlink = Path.Combine(symlinkDirectory, "apphost.ts");
1056var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
1068AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
1116AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
1141AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
1151var currentDirectory = Path.Combine(deploymentsDirectory, currentSha);
1152var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha);
1153var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
1154var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
1200AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
1210var currentDirectory = Path.Combine(deploymentsDirectory, currentSha);
1211var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha);
1212var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
1213var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
1264AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
1274var currentDirectory = Path.Combine(deploymentsDirectory, currentSha);
1275var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha);
1276var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
1277var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json");
1326AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"),
1336var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
MSBuildTests.cs (98)
28var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
31File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
60File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
85var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
88File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
116File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
127var appHostMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "_AppHost.ProjectMetadata.g.cs"));
128var appMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "App.ProjectMetadata.g.cs"));
156File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
170File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
186var libraryDirectory = Path.Combine(basePath, name);
189File.WriteAllText(Path.Combine(libraryDirectory, $"{name}.csproj"),
201File.WriteAllText(Path.Combine(libraryDirectory, "Class1.cs"),
213var appDirectory = Path.Combine(basePath, name);
216File.WriteAllText(Path.Combine(appDirectory, $"{name}.csproj"),
227File.WriteAllText(Path.Combine(appDirectory, "Program.cs"),
332var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Plain.AppHost.csproj");
384var layoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "layout");
408var layoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "layout");
456var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin"));
458var bundle = CreateFakeCliBundle(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home"));
480var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
481var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
494var bundleRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName);
495var expectedDcpDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "dcp"));
496var expectedDashboardDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName));
499Assert.Equal(Path.Combine(expectedDashboardDir, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"), resolvedPaths[2]);
500Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName)));
509var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
510var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
528Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName)));
529Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName)));
538var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
539var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
568var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
569var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
598var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home");
600var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, literalSegment));
618var bundleRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName);
619Assert.Equal(EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DcpDirectoryName)), resolvedPaths[0]);
620Assert.Equal(EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName)), resolvedPaths[1]);
632var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, literalSegment));
645["ASPIRE_HOME"] = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"),
660var bundle = CreateFakeCliBundle(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home"));
696File.WriteAllText(Path.Combine(nativeCliDirectory.FullName, ".aspire-install.json"), """{"source":"dotnet-tool"}""");
720var repoDcpDir = EnsureTrailingSeparator(Path.Combine(workspace.WorkspaceRoot.FullName, "repo-dcp"));
721var repoDashboardDir = EnsureTrailingSeparator(Path.Combine(workspace.WorkspaceRoot.FullName, "repo-dashboard"));
739Assert.Contains(Path.Combine(repoDashboardDir, "Aspire.Dashboard"), resolvedPaths[2]);
748var missingBundlePath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing-bundle");
786var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli"));
787var dnxPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "dnx.exe" : "dnx");
792File.Copy(Path.Combine(Environment.SystemDirectory, "where.exe"), dnxPath);
804["ASPIRE_HOME"] = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"),
823var missingCliPath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing-aspire");
845var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
847File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.fsproj"),
905var appHostDirectory = Path.Combine(basePath, "AppHost");
908File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
946File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
963File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
973File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
988return CreateFakeCliBundleAtLayoutRoot(Path.Combine(basePath, "layout"));
993return CreateFakeCliBundleRoot(layoutRoot, Path.Combine(layoutRoot, "bundle"));
1003var dcpDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "dcp"));
1004var managedDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "managed"));
1005var dashboardDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName));
1010File.WriteAllText(Path.Combine(dcpDir, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), "");
1011var managedPath = Path.Combine(managedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed");
1013var dashboardPath = Path.Combine(dashboardDir, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard");
1021var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire");
1028var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1066var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1092var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire");
1147return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName)));
1162var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1165File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1194File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
1221var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1224File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1253File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
1274var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1277File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1294File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1323var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1326File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1343File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1372var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1399var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1445var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages");
1455var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension");
1457var nuGetConfigPath = Path.Combine(projectDirectory, "NuGet.config");
1501File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"),
1524File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"),
1551File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"),
1563File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"),
1588var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost");
1591File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"),
1619File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"),
PathLookupHelperTests.cs (50)
13var binPath = Path.Combine(workspace.WorkspaceRoot.FullName, "bin");
17var executablePath = Path.Combine(binPath, executableName);
47var firstBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "first-bin");
48var secondBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "second-bin");
52var nonExecutablePath = Path.Combine(firstBinPath, "mycommand");
56var executablePath = Path.Combine(secondBinPath, "mycommand");
74var binPath = Path.Combine(workspace.WorkspaceRoot.FullName, "bin");
76File.WriteAllText(Path.Combine(binPath, "mycommand"), string.Empty);
94var binPath = Path.Combine(workspace.WorkspaceRoot.FullName, "bin");
96File.WriteAllText(Path.Combine(binPath, "mycommand.exe"), string.Empty);
111Path.Combine("/usr/bin", "mycommand")
118Assert.Equal(Path.Combine("/usr/bin", "mycommand"), result);
166Path.Combine("/first/path", "mycommand"),
167Path.Combine("/second/path", "mycommand")
174Assert.Equal(Path.Combine("/first/path", "mycommand"), result);
180var firstPath = Path.Combine("/first/path", "mycommand");
181var secondPath = Path.Combine("/second/path", "mycommand");
212var firstBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "first-bin");
213var secondBinPath = Path.Combine(workspace.WorkspaceRoot.FullName, "second-bin");
217var nonExecutablePath = Path.Combine(firstBinPath, "mycommand");
221var executablePath = Path.Combine(secondBinPath, "mycommand");
264var path = string.Join(';', Path.Combine("first", "bin"), Path.Combine("second", "bin"));
275var dir = Path.Combine("testdir", "bin");
276var expectedPath = Path.Combine(dir, "mycommand");
293var dir = Path.Combine("testdir", "bin");
294var expectedPath = Path.Combine(dir, "code.CMD");
312var dir = Path.Combine("testdir", "bin");
313var exePath = Path.Combine(dir, "code.EXE");
314var cmdPath = Path.Combine(dir, "code.CMD");
336var dir = Path.Combine("testdir", "bin");
337var exactPath = Path.Combine(dir, "code");
338var cmdPath = Path.Combine(dir, "code.CMD");
357var dir = Path.Combine("testdir", "bin");
358var exactPath = Path.Combine(dir, "mytool");
376var dir = Path.Combine("testdir", "bin");
377var expectedPath = Path.Combine(dir, "code.CMD");
395var dir = Path.Combine("testdir", "bin");
410var dir = Path.Combine("testdir", "bin");
411var cmdPath = Path.Combine(dir, "code.CMD");
433Path.Combine(dir, "code.cmd")
450Path.Combine(dir, "code.cmd")
467var dir1 = Path.Combine("first", "bin");
468var dir2 = Path.Combine("second", "bin");
469var dir1CmdPath = Path.Combine(dir1, "code.CMD");
470var dir2ExePath = Path.Combine(dir2, "code.EXE");
489var dir1 = Path.Combine("first", "bin");
490var dir2 = Path.Combine("second", "bin");
491var dir1ExactPath = Path.Combine(dir1, "mytool");
492var dir2ExePath = Path.Combine(dir2, "mytool.EXE");
Publishing\ContainerImageArchiveRewriterTests.cs (22)
20var sourceArchive = Path.Combine(workspace.Path, "source.tar");
21var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
105var sourceArchive = Path.Combine(workspace.Path, "source.tar");
106var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
181var sourceArchive = Path.Combine(workspace.Path, "source.tar");
182var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
217var sourceArchive = Path.Combine(workspace.Path, "source.tar");
218var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
290var sourceArchive = Path.Combine(workspace.Path, "source.tar");
291var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
311var sourceArchive = Path.Combine(workspace.Path, "source.tar");
312var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
333var sourceArchive = Path.Combine(workspace.Path, "source.tar");
334var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
357var sourceArchive = Path.Combine(workspace.Path, "source.tar");
358var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
390var sourceArchive = Path.Combine(workspace.Path, "source.tar");
391var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
412var sourceArchive = Path.Combine(workspace.Path, "source.tar");
413var destinationArchive = Path.Combine(workspace.Path, "destination.tar");
436var sourceArchive = Path.Combine(workspace.Path, "source.tar");
437var compressedArchive = Path.Combine(workspace.Path, "custom-extension.archive");
Publishing\DotnetProgramArchiveTests.cs (12)
40var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
76var firstArchive = Path.Combine(firstWorkspace.WorkspaceRoot.FullName, "program.tar");
77var secondArchive = Path.Combine(secondWorkspace.WorkspaceRoot.FullName, "program.tar");
135var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"));
181var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"));
219var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz");
261var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
284var blockedDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output");
289Path.Combine(blockedDirectory, "program.tar.gz"));
317var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"));
347var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, path);
381return builder.AddProject("program", Path.Combine(workspacePath, "program.csproj"), static options => options.ExcludeLaunchProfile = true)
Publishing\PodmanSaveArgumentsTests.cs (6)
24OutputPath = Path.Combine("out", "archives"),
41OutputPath = Path.Combine("out", "archives"),
58OutputPath = Path.Combine("out", "archives")
72var outputPath = Path.Combine("out", "archives");
95var outputPath = Path.Combine("out", "archives");
147Assert.Contains($"--output \"{Path.Combine("out", "container-abc123.tar")}\"", arguments, StringComparison.Ordinal);
Publishing\ResourceContainerImageManagerTests.cs (28)
58var appPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs");
64var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar.gz");
307var tempOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NewFolder"); // tests that the folder is created if it doesn't exist
688.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj")))
719.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj")))
752.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj")))
799.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj")))
809context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
837var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj");
850context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar");
891var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz");
893var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj");
980var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz");
983.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj")))
1031.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs")))
1036context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar");
1072var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj");
1078context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar");
1112var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj");
1173var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj");
1208var probePath = Path.Combine(workspace.WorkspaceRoot.FullName, "properties.proj");
1256var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.csproj");
1257var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archive;100%.tar");
1283var probePath = Path.Combine(workspace.WorkspaceRoot.FullName, "properties.proj");
1552var tempSecretFile = System.IO.Path.Combine(workspace.WorkspaceRoot.FullName, ".npmrc");
1937ctx.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archives");
2061ctx.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archives");
2128var dockerfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "Dockerfile");
Schema\SchemaTests.cs (9)
59var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
61var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
71var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
73var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
89var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName());
91var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
122var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile");
218var relativePath = Path.Combine("Schema", "aspire-8.0.json");
231var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: Path.Combine(manifestDir, "not-used.json"), step: "publish-json-manifest");
Terminals\Hex1bPtySocketTests.cs (16)
32var directory = Path.Combine(root.FullName, "custom");
63var directory = Path.Combine(root.FullName, "custom");
79EnvironmentVariables = { [Hex1bPtySocketHelper.SocketDirectoryEnvironmentVariable] = Path.Combine(root.FullName, "child") }
92Assert.Empty(Directory.EnumerateFileSystemEntries(Path.Combine(directory, "proxy")));
117Directory.CreateDirectory(Path.Combine(root.FullName, ".aspire"));
152var directory = Directory.CreateDirectory(Path.Combine(root.FullName, "custom"));
210var directory = Path.Combine(root.FullName, new string('a', 108));
243_ = new UnixDomainSocketEndPoint(Path.Combine(directory, $"hex1bpty-{new string('0', 32)}.socket"));
262EnvironmentVariables = { [Hex1bPtySocketHelper.SocketDirectoryEnvironmentVariable] = Path.Combine(root.FullName, "child") },
275var laterDirectory = Path.Combine(root.FullName, "later");
277Assert.Empty(Directory.EnumerateFileSystemEntries(Path.Combine(directory, "proxy")));
282var sockets = Directory.GetFiles(Path.Combine(directory, "proxy"), "*.socket");
285Assert.False(Directory.Exists(Path.Combine(root.FullName, "child")));
304Assert.Empty(Directory.EnumerateFileSystemEntries(Path.Combine(directory, "proxy")));
305Assert.Equal(Path.Combine(root.FullName, "later"), Environment.GetEnvironmentVariable(Hex1bPtySocketHelper.SocketDirectoryEnvironmentVariable));
321directory.MoveTo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), directory.Name));
Utils\SocketPermissionHelperTests.cs (27)
25var directory = Path.Combine(root.FullName, "custom");
31var socketPath = Path.Combine(directory, "s.sock");
71var socketPath = Path.Combine(directory, "occupied");
96var directory = Path.Combine(root.FullName, "custom");
138var directory = SocketPermissionHelper.CreateDirectory(Path.Combine(root.FullName, "custom"), repairExisting: false);
164Directory.CreateDirectory(Path.Combine(root.FullName, ".aspire"));
169Assert.ThrowsAny<IOException>(() => SocketPermissionHelper.Bind(socket, Path.Combine(directory, "s.sock")));
191var target = Directory.CreateDirectory(Path.Combine(root.FullName, "target"));
192Directory.CreateDirectory(Path.Combine(target.FullName, "home"));
193var link = Path.Combine(root.FullName, "homes");
195var profile = Path.Combine(link, "home");
225var target = Directory.CreateDirectory(Path.Combine(root.FullName, "target"));
227var link = Path.Combine(root.FullName, "base");
274var home = Directory.CreateDirectory(Path.Combine(root.FullName, "home"));
275var profile = Path.Combine(root.FullName, "profile");
277var target = Path.Combine(root.FullName, "target");
280var link = Path.Combine(profile, linkedSuffix);
310var target = Path.Combine(root.FullName, "target");
315var profile = Path.Combine(root.FullName, "profile");
346var target = Path.Combine(root.FullName, "target");
349Directory.CreateDirectory(Path.Combine(root.FullName, ".aspire"));
391var socketPath = Path.Combine(directory, "s.sock");
451Assert.Equal(Path.Combine(root.FullName, "custom"), directory.FullName);
468var directory = Path.Combine(root.FullName, dcpLayout ? "aspire-dcp-test" : ".aspire/pty");
499var target = Directory.CreateDirectory(Path.Combine(root.FullName, "target"));
500var directory = Path.Combine(target.FullName, "pty");
503Directory.CreateSymbolicLink(Path.Combine(root.FullName, ".aspire"), target.FullName);
WithTerminalTests.cs (17)
21private string _terminalDirectory => Path.Combine(_terminalRoot, "terminals");
587var orphanMetadataPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.MetadataSuffix}");
588var orphanProducerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
589var orphanConsumerPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ConsumerSockPurpose}.sock");
590var orphanControlPath = Path.Combine(trmnlDirectory, $"{orphanId}.{TerminalHostPaths.ControlSockPurpose}.sock");
642var liveMetadataPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.MetadataSuffix}");
643var liveProducerPath = Path.Combine(trmnlDirectory, $"{liveId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
693var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}");
694var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
725var metadataPath = Path.Combine(trmnlDirectory, $"{fileReplicaId}.{TerminalHostPaths.MetadataSuffix}");
731var sentinelPath = Path.Combine(trmnlDirectory, maliciousPrefix + "-sentinel.tmp");
860var metadataPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.MetadataSuffix}");
861var producerPath = Path.Combine(trmnlDirectory, $"{invalidReplicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
890var metadataPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.MetadataSuffix}");
891var producerPath = Path.Combine(trmnlDirectory, $"{replicaId}.{TerminalHostPaths.ProducerSockPurpose}.sock");
1073var publishDirectory = Path.Combine(_terminalDirectory, "publish");
1468var directory = Path.Combine(_terminalRoot, "custom");
Aspire.Hosting.TestUtilities (11)
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (2)
Aspire.Managed.Tests (34)
AppHostServerV2CodeGenerationTests.cs (16)
16var output = Path.Combine(workspace.Path, "generated");
38var core = Path.Combine(workspace.Path, "core.json");
39var request = Path.Combine(workspace.Path, "request.json");
40var output = Path.Combine(workspace.Path, "generated");
59var core = Path.Combine(workspace.Path, "core.json");
60var metadata = Path.Combine(workspace.Path, "metadata.json");
61var source = Path.Combine(workspace.Path, "provider.mts");
62var request = Path.Combine(workspace.Path, "request.json");
63var output = Path.Combine(workspace.Path, "generated");
105var core = Path.Combine(workspace.Path, "core.json");
106var metadata = Path.Combine(workspace.Path, "metadata.json");
107var source = Path.Combine(workspace.Path, "provider.mts");
108var request = Path.Combine(workspace.Path, "request.json");
109var output = Path.Combine(workspace.Path, "generated");
137Assert.Equal(File.ReadAllText(source), File.ReadAllText(Path.Combine(output, sdkFile)));
138await Verify(await File.ReadAllTextAsync(Path.Combine(output, "aspire.mts")), extension: "ts")
TerminalHostSignalTests.cs (16)
25var socketDirectory = new DirectoryInfo(Path.Combine(root.FullName, "terminals"));
26var producerPath = Path.Combine(socketDirectory.FullName, "p.sock");
27var consumerPath = Path.Combine(socketDirectory.FullName, "h.sock");
28var controlPath = Path.Combine(socketDirectory.FullName, "c.sock");
177var socketDirectory = new DirectoryInfo(Path.Combine(root.FullName, "terminals"));
178var parentProducerPath = Path.Combine(socketDirectory.FullName, "pp.sock");
179var parentConsumerPath = Path.Combine(socketDirectory.FullName, "ph.sock");
180var parentControlPath = Path.Combine(socketDirectory.FullName, "pc.sock");
182var producerPath = Path.Combine(socketDirectory.FullName, "p.sock");
183var consumerPath = Path.Combine(socketDirectory.FullName, "h.sock");
184var controlPath = Path.Combine(socketDirectory.FullName, "c.sock");
291var managed = Directory.CreateDirectory(Path.Combine(root, "managed"));
292var terminal = Directory.CreateDirectory(Path.Combine(root, "terminalhost"));
298var target = Path.Combine(directory, Path.GetRelativePath(output, file));
306var managedAssembly = Path.Combine(managed.FullName, "aspire-managed.dll");
313startInfo.ArgumentList.Add(Path.Combine(output, Path.GetFileName(hostAssemblyPath)));
Aspire.Playground.Tests (3)
Aspire.Templates.Tests (47)
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";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (11)
32public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
33public static readonly string TestRootPath = Path.Combine(TempDir, "templates-testroot");
87string workloadsProjString = Path.Combine("tests", "workloads.proj");
99.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
122.Select(path => Path.Combine(path, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "dotnet.exe" : "dotnet"))
144sdkForTemplatePath = Path.Combine(baseDir, sdkDirName);
163NuGetPackagesPath = UsesCustomDotNet ? Path.Combine(AppContext.BaseDirectory, $"nuget-cache-{Guid.NewGuid()}") : null;
183var runtimeRoot = Path.Combine(s_testRoot.Value, $"runtime-{Guid.NewGuid():N}");
198var destination = Path.Combine(runtimeRoot, directory);
223DotNet = Path.Combine(sdkForTemplatePath!, "dotnet");
236LogRootPath = Path.Combine(AppContext.BaseDirectory, "logs");
Aspire.TerminalHost (12)
Aspire.TerminalHost.Tests (10)
TerminalHostAppTests.cs (8)
43var dcpDir = Path.Combine(workspace.Path, "terminals");
48var producer = Path.Combine(dcpDir, "p.sock");
49var consumer = Path.Combine(hostDir, "r.sock");
50var control = Path.Combine(ctrlDir, "c.sock");
765Directory.CreateDirectory(Path.Combine(workspace.Path, ".aspire"));
771Path.Combine(parentFile, "consumer.sock"),
1320Directory.CreateDirectory(Path.Combine(workspace.Path, ".aspire"));
1325Path.Combine(parentFile, "producer.sock"), CancellationToken.None));
Aspire.TestTools (2)
Aspire.TestUtilities (1)
Aspire.Tray.Tests (101)
TrayConfigurationTests.cs (6)
138File.WriteAllText(Path.Combine(Path.GetDirectoryName(binary)!, ".aspire-install.json"),
142TrayConfiguration.GetSettingsPath(binary, Path.Combine(root, "configured"), Path.Combine(root, "user")));
144TrayConfiguration.GetSavedStatePath(binary, Path.Combine(root, "configured"), Path.Combine(root, "user")));
159TrayConfiguration.GetSavedStatePath(binary, Path.Combine(user, "custom-home"), user));
WindowsTrayLogTests.cs (11)
31Assert.Equal("first\nsecond\n", File.ReadAllText(Path.Combine(path, "aspire-tray.log")));
48link = Path.Combine(link, components[i]);
54targetLogDirectory = Path.Combine(targetLogDirectory, components[i]);
57var sentinel = Path.Combine(targetLogDirectory, "aspire-tray.log");
59var result = await TestNativeCommand.RunAsync(Path.Combine(Environment.SystemDirectory, "cmd.exe"),
64Assert.Throws<IOException>(() => WindowsTrayLog.OpenLog(Path.Combine(root, Path.Combine(components))));
81File.CreateSymbolicLink(Path.Combine(path, "aspire-tray.log"), target);
95var result = await TestNativeCommand.RunAsync(Path.Combine(Environment.SystemDirectory, "cmd.exe"),
96"/d", "/c", "mklink", "/H", Path.Combine(path, "aspire-tray.log"), target);
142var log = Path.Combine(path, "aspire-tray.log");
145Assert.Throws<IOException>(() => File.Move(log, Path.Combine(path, "old.log")));
Binding.UDS.IntegrationTests (2)
blazor-devserver (1)
CodeStyleConfigFileGenerator (3)
ConfigurationSchemaGenerator.Tests (2)
CreateLayout (31)
Program.cs (27)
190var destination = Path.Combine(_outputPath, "tray");
196File.Copy(Path.Combine(_windowsTrayPath, name), Path.Combine(destination, name), overwrite: true);
214var path = Path.Combine(_trayAppPath, relativePath);
247var managedDir = Path.Combine(_outputPath, "managed");
255var managedExePath = Path.Combine(managedPublishPath, managedExeName);
261File.Copy(managedExePath, Path.Combine(managedDir, managedExeName), overwrite: true);
272var path = Path.Combine(publishPath, file);
279CopyDirectory(publishPath, Path.Combine(_outputPath, "terminalhost"), excludeSymbols: true);
288File.Copy(Path.Combine(publishPath, file), destination, overwrite: true);
299var source = Path.Combine(publishPath, "Aspire.Hosting.Native.Server" + extension);
300foreach (var requiredFile in new[] { source, Path.Combine(publishPath, "ats-contract.json") })
307var destination = Path.Combine(_outputPath, "apphost-server");
310File.Move(Path.Combine(destination, Path.GetFileName(source)),
311Path.Combine(destination, "aspire-apphost-server" + extension), overwrite: true);
329var dashboardExePath = Path.Combine(dashboardPublishPath, dashboardExeName);
335var wwwrootPath = Path.Combine(dashboardPublishPath, "wwwroot");
350var sqliteLibraryPath = Path.Combine(dashboardPublishPath, sqliteLibraryName);
358var dashboardDir = Path.Combine(_outputPath, "dashboard");
378var dcpDir = Path.Combine(_outputPath, "dcp");
390var archivePath = Path.Combine(Path.GetDirectoryName(_outputPath)!, archiveName + ".tar.gz");
514var dcpPackagePath = Path.Combine(nugetPackages, dcpPackageName);
527var toolsPath = Path.Combine(latestVersion.Path, "tools");
538var oldPackagePath = Path.Combine(nugetPackages, oldPackageName);
548var toolsPath = Path.Combine(latestVersion, "tools");
571var destFile = Path.Combine(destination, Path.GetFileName(file));
588var destDir = Path.Combine(destination, Path.GetFileName(dir));
crossgen2 (2)
Crossgen2Tasks (2)
csc (8)
CSharpSyntaxGenerator (4)
csi (1)
datacollector (3)
datacollector.arm64 (3)
dotnet (6)
dotnet-aot (44)
parent\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (8)
102string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, dotnetDir), "default.json");
129var workloadSetVersionFilePath = Path.Combine(advertisedPath, Constants.workloadSetVersionFileName);
222File.WriteAllText(Path.Combine(adManifestPath, "AdvertisedManifestFeatureBand.txt"), band.ToString());
235File.WriteAllText(Path.Combine(adManifestPath, Constants.workloadSetVersionFileName), workloadSetVersion);
297var manifestPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "WorkloadManifest.json");
307var adManifestFeatureBandPath = Path.Combine(GetAdvertisingManifestPath(_sdkFeatureBand, manifestId), "AdvertisedManifestFeatureBand.txt");
369private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}");
373internal static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}");
dotnet-dev-certs (8)
dotnet-format (6)
dotnet-getdocument (5)
dotnet-illink-cache (2)
dotnet-Microsoft.XmlSerializer.Generator (1)
dotnet-openapi (2)
dotnet-razorpagegenerator (1)
dotnet-suggest (7)
dotnet-svcutil-lib (38)
Shared\MSBuildProj.cs (9)
67public string FullPath { get { return Path.Combine(DirectoryPath, FileName); } }
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName;
338fullPath = Path.Combine(fullPath, binReference);
340else if (Directory.Exists(Path.Combine(msbuildProj.DirectoryPath, fullPath)))
427string filePath = Path.Combine(dirPath, DirBuildProps);
563new XAttribute("Include", Path.Combine(basePath, $"{framework}\\**")),
881outputPath = Path.Combine(this.DirectoryPath, outputPath.Trim(new char[] { '\"' }));
885Path.Combine(outputPath, $"{Path.GetFileNameWithoutExtension(this.FileName)}.deps.json") :
919dependency = ProjectDependency.FromAssembly(Path.Combine(outputPath, assetPath));
dotnet-svcutil-lib.Tests (68)
E2ETests.cs (9)
20this_TestGroupBaselinesDir = Path.Combine(g_BaselinesDir, this_TestCaseName);
21this_TestGroupOutputDir = Path.Combine(g_TestResultsDir, this_TestCaseName);
22this_TestGroupBootstrapDir = Path.Combine(g_TestBootstrapDir, this_TestCaseName);
92Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
214var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
228var typeReuseProjectsPath = Path.Combine(g_TestCasesDir, "TypeReuse");
250Directory.CreateDirectory(Path.Combine(this_TestCaseBootstrapDir, "SvcutilBootstrapper"));
252var uri = PathHelper.GetRelativePath(Path.Combine(this_TestGroupOutputDir, "TypeReuseSvc.wsdl"), new DirectoryInfo(this_TestCaseOutputDir));
374File.Copy(f, Path.Combine(this_TestCaseProject.DirectoryPath, Path.GetFileName(f)));
GlobalToolTests.cs (20)
135Directory.CreateDirectory(Path.Combine(this_TestCaseOutputDir, "SvcutilBootstrapper"));
158File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.cs"), Path.Combine(this_TestCaseOutputDir, "FullFramework.cs"), true);
159File.Copy(Path.Combine(g_TestCasesDir, "FullFramework", "FullFramework.csproj"), Path.Combine(this_TestCaseOutputDir, "FullFramework.csproj"), true);
162var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
179this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
181this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
182this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
183this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
186File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, "Program.cs"), Path.Combine(this_TestCaseOutputDir, "Program.cs"), true);
187File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, $"{testCaseName}.csproj"), Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), true);
188this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None);
194var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
207this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testClientFolder);
210this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName);
211this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{this_TestCaseName}.log");
212this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testClientFolder);
215FileUtil.CopyDirectory(Path.Combine(g_TestCasesDir, this_TestCaseName), this_TestGroupOutputDir, true);
216this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None);
224var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference");
246var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json");
TestInit.cs (26)
60File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
61File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
93var filePath = Path.Combine(this_TestGroupProjDir, this_TestGroupProjectName);
111var projectPath = Path.Combine(outputDir, $"{projectName}.csproj");
112var programPath = Path.Combine(outputDir, $"{projectName}.cs");
144g_TestResultsDir = Path.Combine(g_TestOutputDir, "TestResults");
145g_TestBootstrapDir = Path.Combine(g_TestOutputDir, "TestBootstrap");
146g_TestCasesDir = Path.Combine(vsTestsRoot, "TestCases");
147g_BaselinesDir = Path.Combine(vsTestsRoot, "Baselines");
173File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.props"), "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" />");
174File.WriteAllText(Path.Combine(g_TestOutputDir, "Directory.Build.targets"), "<Project></Project>");
210var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
234var projectPath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj");
242this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName);
247this_TestCaseBootstrapDir = Path.Combine(this_TestGroupBootstrapDir, testCaseName);
250this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log");
266this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testCaseName);
267var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
268if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
353var linuxBaselinePath = Path.Combine(this_TestCaseBaselinesDir, "Linux");
354if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && File.Exists(Path.Combine(linuxBaselinePath, Path.GetFileName(this_TestCaseLogFile))))
428var expected = Path.Combine(baselineDir, relativePath);
446var globalScriptPath = Path.Combine(g_TestOutputDir, @"TestScripts\deleteAll.cmd");
537if (!Directory.Exists(Path.Combine(vstestDir, "TestCases")))
606File.WriteAllText(Path.Combine(directory, "global.json"), globalConfig);
624File.WriteAllText(Path.Combine(g_TestOutputDir, "nuget.config"), nugetConfigText.Replace("$svcutilTestFeed$", g_SvcutilNugetFeed));
dotnet-svcutil.xmlserializer (1)
dotnet-user-jwts (13)
dotnet-user-secrets (6)
dotnet-watch (7)
DotnetTool.AppHost (1)
GenerateAnalyzerNuspec (17)
Program.cs (17)
147string assemblyPathForNuspec = Path.Combine(assemblyFolder, assembly);
158var resourceAssemblyFullPath = Path.Combine(directory, resourceAssemblyName);
163string targetForNuspec = Path.Combine(target, directoryName);
174var fileWithPath = Path.IsPathRooted(file) ? file : Path.Combine(projectDir, file);
180readmeFile = Path.IsPathRooted(readmeFile) ? readmeFile : Path.GetFullPath(Path.Combine(projectDir, readmeFile));
194result.AppendLine(FileElement(fileWithPath, Path.Combine("lib", tfm)));
216var fileWithPath = Path.Combine(folderPath, file);
217var targetPath = tfms.Length > 1 ? Path.Combine(folder, tfm) : folder;
224result.AppendLine(FileElement(Path.Combine(assetsDir, "Install.ps1"), "tools"));
225result.AppendLine(FileElement(Path.Combine(assetsDir, "Uninstall.ps1"), "tools"));
234result.AppendLine(FileElement(Path.Combine(rulesetsDir, ruleset), "rulesets"));
246result.AppendLine(FileElement(Path.Combine(directory, editorconfig), $"editorconfig\\{directoryName}"));
257result.AppendLine(FileElement(Path.Combine(globalAnalyzerConfigsDir, globalconfig), $"buildTransitive\\config"));
268var fileWithPath = Path.Combine(analyzerDocumentationFileDir, analyzerDocumentationFileName);
277var fileWithPath = Path.Combine(analyzerSarifFileDir, analyzerSarifFileName);
286var fileWithPath = Path.Combine(analyzerConfigurationFileDir, analyzerConfigurationFileName);
293result.AppendLine(FileElement(Path.Combine(assetsDir, "ThirdPartyNotices.txt"), ""));
GenerateDocumentationAndConfigFiles (17)
Program.cs (12)
433var fileWithPath = Path.Combine(directory.FullName, args.PropsFileName);
442fileWithPath = Path.Combine(directory.FullName, args.PropsFileToDisableNetAnalyzersInNuGetPackageName);
544var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerDocumentationFileName);
640var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerSarifFileName);
734Validate(Path.Combine(directory.FullName, args.AnalyzerSarifFileName), stringWriter.ToString(), fileNamesWithValidationFailures);
776var fileWithPath = Path.Combine(directory.FullName, "RulesMissingDocumentation.md");
1081return Path.Combine(assemblyDir, assembly);
1112var rulesetFilePath = Path.Combine(directory.FullName, rulesetFileName);
1176var directory = Directory.CreateDirectory(Path.Combine(analyzerEditorconfigsDir, editorconfigFolder));
1177var editorconfigFilePath = Path.Combine(directory.FullName, ".editorconfig");
1400var configFilePath = Path.Combine(directory.FullName, fileName.ToLowerInvariant());
1612var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
GenerateTemplateManifest (20)
Program.cs (8)
27var packagePath = Path.Combine(Path.GetDirectoryName(lockPath)!, "package.json");
77if (!File.Exists(Path.Combine(Path.GetDirectoryName(packagePath)!, "package-lock.json")))
84File.WriteAllText(Path.Combine(restoreDirectory, "Directory.Build.props"), "<Project />");
85File.WriteAllText(Path.Combine(restoreDirectory, "Directory.Build.targets"), "<Project />");
86File.WriteAllText(Path.Combine(restoreDirectory, "Directory.Packages.props"), "<Project />");
139var privateCache = Path.Combine(restoreDirectory, "packages");
143var packagePath = Path.GetFullPath(Path.Combine(privateCache, package.ToLowerInvariant().Replace('/', Path.DirectorySeparatorChar)));
174var restoreConfigPath = Path.Combine(restoreDirectory, "nuget.config");
TemplateRestorePlan.cs (12)
26var snapshot = Path.Combine(workDirectory, "template-inputs");
33var destination = Path.Combine(snapshot, relativeRoot);
34Directory.CreateDirectory(Path.Combine(destination, ".template.config"));
45var output = Path.Combine(snapshot, relative);
47File.Copy(Path.Combine(processedDirectory, relative), output, overwrite: true);
49File.Copy(Path.Combine(processedDirectory, Path.GetRelativePath(sourceDirectory, configPath)),
57settingsLocation: Path.Combine(workDirectory, "template-hive"));
72var configPath = Path.Combine(snapshot, template.ConfigPlace.TrimStart('/', '\\').Replace('/', Path.DirectorySeparatorChar));
199var referencedPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(path)!, relative));
298var projectDirectory = Path.Combine(directory, project.Name);
300new XDocument(root).Save(Path.Combine(projectDirectory, $"{project.Name}.csproj"));
302var solutionPath = Path.Combine(directory, "TemplateDependencies.slnx");
GetDocument.Insider (1)
ilasm (4)
ilc (2)
ILCompiler.Compiler (1)
ILCompiler.Diagnostics (3)
ILCompiler.ReadyToRun (7)
illink (11)
ILLink.Tasks (14)
ILLinkCache.cs (12)
79: Path.Combine(localAppData, "illink");
87return Path.Combine(cacheHome, "illink");
123string destination = Path.Combine(outputDirectory, relativePath);
180stagingDirectory = Path.Combine(parentDirectory, inputHash + "." + Guid.NewGuid().ToString("N") + ".tmp");
183using (var manifest = new BinaryWriter(File.Create(Path.Combine(stagingDirectory, "manifest"))))
191File.Copy(Path.Combine(outputDirectory, relativePath), cachedFile);
198ILLinkCacheEntry.WriteLastUsed(Path.Combine(stagingDirectory, ILLinkCacheEntry.LastUsedFileName));
233ILLinkCacheEntry.WriteLastUsed(Path.Combine(entryDirectory, ILLinkCacheEntry.LastUsedFileName));
280string relativePath = Path.Combine(relativeDirectory, Path.GetFileName(path));
290using var manifest = new BinaryReader(File.OpenRead(Path.Combine(entryDirectory, "manifest")));
300string outputsDirectory = Path.Combine(entryDirectory, "outputs");
310string cachedFile = Path.Combine(outputsDirectory, relativePath);
Infrastructure.Common (2)
Infrastructure.Tests (980)
BuildWarningPolicyTests.cs (12)
21var script = Path.Combine(workspace.Path, "evaluate.ps1");
22var resultPath = Path.Combine(workspace.Path, "evaluation_results.json");
101File.Copy(Path.Combine(RepoRoot.Path, file), Path.Combine(root, file));
105await File.WriteAllTextAsync(Path.Combine(root, "Directory.Build.props"), scenario == "invalid-policy" || clean ? "<Project>" : """
124await File.WriteAllTextAsync(Path.Combine(common, "tools.ps1"), """
136await File.WriteAllTextAsync(Path.Combine(common, "tools.sh"), """
149await File.WriteAllTextAsync(Path.Combine(common, "build.ps1"), """
169var commonBash = Path.Combine(common, "build.sh");
272var harness = Path.Combine(root, "run.ps1");
282var report = Path.Combine(root, "report.txt");
283var bootstrap = Path.Combine(root, "bootstrap.txt");
CreateFailingTestIssue\CreateFailingTestIssueToolTests.cs (23)
72var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
84Path.Combine(fixtureDirectory, "search-issue.json"),
89Path.Combine(fixtureDirectory, "create-issue.json"),
123Path.Combine(fixtureDirectory, "search-issue.json"),
133File.WriteAllText(Path.Combine(fixtureDirectory, "add-issue-comment.json"), "{}");
153var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
164Path.Combine(fixtureDirectory, "search-issue.json"),
174File.WriteAllText(Path.Combine(fixtureDirectory, "reopen-issue.json"), "{}");
175File.WriteAllText(Path.Combine(fixtureDirectory, "add-issue-comment.json"), "{}");
195var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
206Path.Combine(fixtureDirectory, "search-issue.json"),
211Path.Combine(fixtureDirectory, "create-issue.json"),
237var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
248Path.Combine(fixtureDirectory, "search-issue.json"),
258Path.Combine(fixtureDirectory, "create-issue.json"),
285var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
431var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
530var diagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
560var queuedDiagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
586var failedDiagnosticsLog = File.ReadAllText(Path.Combine(fixtureDirectory, "diagnostics.log"));
691var fixtureDirectory = Path.Combine(_workspace.Path, Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture));
832var fixtureDirectory = Path.Combine(_workspace.Path, Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture));
988return Path.Combine(fixtureDirectory, $"{fileName}{extension}");
CreateLayout\CreateLayoutTests.cs (40)
19var symbolDirectory = Path.Combine(source, "Aspire.Hosting.Native.Server.dSYM");
21File.WriteAllText(Path.Combine(source, "Aspire.Hosting.Native.Server" + extension), "server");
22File.WriteAllText(Path.Combine(source, "ats-contract.json"), "contract");
23File.WriteAllText(Path.Combine(source, "sidecar.json"), "sidecar");
24File.WriteAllText(Path.Combine(source, "Aspire.Hosting.Native.Server.pdb"), "symbols");
25File.WriteAllText(Path.Combine(symbolDirectory, "symbols"), "symbols");
26var output = Path.Combine(workspace.Path, "layout");
32var destination = Path.Combine(output, "apphost-server");
35Assert.Equal("server", File.ReadAllText(Path.Combine(destination, "aspire-apphost-server" + extension)));
36Assert.Equal("contract", File.ReadAllText(Path.Combine(destination, "ats-contract.json")));
37Assert.Equal("sidecar", File.ReadAllText(Path.Combine(destination, "sidecar.json")));
50File.WriteAllText(Path.Combine(source, "Aspire.Hosting.Native.Server"), "server");
53File.WriteAllText(Path.Combine(source, "ats-contract.json"), contract);
55var output = Path.Combine(workspace.Path, "layout");
61Assert.False(Directory.Exists(Path.Combine(output, "apphost-server")));
79var path = Path.Combine(publish, file);
83File.WriteAllText(Path.Combine(publish, "Aspire.TerminalHost.pdb"), "symbols");
84using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, rid, "Debug", "1.0", false, null, null);
90File.Delete(Path.Combine(publish, files[^1]));
104var path = Path.Combine(workspace.Path, file);
112File.WriteAllText(Path.Combine(workspace.Path, files[^1]), string.Empty);
125using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "win-x64", configuration, "1.0.0", verbose: false, trayAppPath: null, windowsTrayPath: null);
146using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "win-x64", "Debug", "1.0.0", verbose: false, trayAppPath: null, windowsTrayPath: null);
158var outputPath = Path.Combine(workspace.Path, "layout");
204var filePath = Path.Combine(publishPath, relativePath);
209var outputPath = Path.Combine(workspace.Path, "layout");
214var dashboardPath = Path.Combine(outputPath, "dashboard");
220Assert.Equal(File.ReadAllBytes(Path.Combine(publishPath, relativePath)), File.ReadAllBytes(Path.Combine(dashboardPath, relativePath)));
229var wwwrootPath = Path.Combine(publishPath, "wwwroot");
231var outputPath = Path.Combine(workspace.Path, "layout");
237Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard")));
257var outputPath = Path.Combine(workspace.Path, "layout");
263Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard")));
277var sqliteLibraryPath = Path.Combine(publishPath, sqliteLibraryName);
287var outputPath = Path.Combine(workspace.Path, "layout");
293Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard")));
302File.WriteAllText(Path.Combine(publishPath, executableName), "executable");
303File.WriteAllText(Path.Combine(publishPath, sqliteLibraryName), "sqlite");
304File.WriteAllText(Path.Combine(frameworkPath, "blazor.web.js"), "static asset");
ExtractTestPartitions\ExtractTestPartitionsTests.cs (21)
31var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
37var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
56var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
62var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
77var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
83var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
101var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
104var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
119var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
126var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
144var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
151var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
167var nonExistentPath = Path.Combine(_workspace.Path, "DoesNotExist.dll");
168var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
193var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
213var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
218var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
235var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
242var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
260var assemblyPath = Path.Combine(_workspace.Path, "TestAssembly.dll");
267var outputFile = Path.Combine(_workspace.Path, "partitions.txt");
GenerateTestSummary\GenerateTestSummaryToolTests.cs (20)
31var trxPath = Path.Combine(_workspace.Path, "sample.trx");
53var trxPath = Path.Combine(_workspace.Path, "mixed.trx");
60var jsonPath = Path.Combine(_workspace.Path, "failed.json");
81var trxPath = Path.Combine(_workspace.Path, "aborted.trx");
87var jsonPath = Path.Combine(_workspace.Path, "failed.json");
104var trxPath = Path.Combine(_workspace.Path, "allpass.trx");
110var jsonPath = Path.Combine(_workspace.Path, "failed.json");
133var trxDir = Path.Combine(_workspace.Path, "corrupt");
135await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<");
137var jsonPath = Path.Combine(_workspace.Path, "failed.json");
160var trxDir = Path.Combine(_workspace.Path, "partial");
163Path.Combine(trxDir, "clean.trx"),
165await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<");
167var jsonPath = Path.Combine(_workspace.Path, "failed.json");
187var trxDir = Path.Combine(_workspace.Path, "partial-with-failure");
190Path.Combine(trxDir, "failed.trx"),
192await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<");
194var jsonPath = Path.Combine(_workspace.Path, "failed.json");
216var trxPath = Path.Combine(_workspace.Path, "timestamped.trx");
225var jsonPath = Path.Combine(_workspace.Path, "failed.json");
Hex1bNativePublishingTests.cs (27)
99$"-p:ArtifactsLogDir={Path.Combine(_workspace.Path, "logs")}"]);
187var artifacts = Path.Combine(_workspace.Path, "artifacts");
195WriteFile(Path.Combine(publish, file), file);
207WriteFile(Path.Combine(serverPublish, file), file);
216WriteFile(Path.Combine(terminalPublish, file), file);
232WriteFile(Path.Combine(dashboardPublish, file), file);
246var packages = Path.Combine(_workspace.Path, "packages");
248var layout = Path.Combine(_workspace.Path, "layout");
259var tray = Path.Combine(_workspace.Path, "windows-tray");
286var managed = Path.Combine(layout, "managed");
291Assert.True(File.ReadAllBytes(Path.Combine(publish, file)).SequenceEqual(File.ReadAllBytes(Path.Combine(managed, file))), file);
295Assert.Equal(File.ReadAllBytes(Path.Combine(terminalPublish, file)), File.ReadAllBytes(Path.Combine(managed, file)));
298var terminal = Path.Combine(layout, "terminalhost");
303Assert.Equal(File.ReadAllBytes(Path.Combine(terminalPublish, file)), File.ReadAllBytes(Path.Combine(terminal, file)));
306var server = Path.Combine(layout, "apphost-server");
312Assert.Equal(File.ReadAllBytes(Path.Combine(serverPublish, file)), File.ReadAllBytes(Path.Combine(server, bundledFile)));
315var dashboard = Path.Combine(layout, "dashboard");
320Assert.True(File.ReadAllBytes(Path.Combine(dashboardPublish, file)).SequenceEqual(File.ReadAllBytes(Path.Combine(dashboard, file))), file);
331var layout = Path.Combine(_workspace.Path, "layout");
332var marker = Path.Combine(layout, "existing.txt");
343"--output", layout, "--artifacts", Path.Combine(_workspace.Path, "missing-artifacts"), "--rid", rid, "--configuration", "Release"]);
422var projectPath = Path.Combine(_workspace.Path, "Publish.proj");
Pipelines\NpmCliPackageTests.cs (23)
61var testScriptPath = Path.Combine(_workspace.Path, $"{Path.GetRandomFileName()}.js");
101var testScriptPath = Path.Combine(_workspace.Path, $"{Path.GetRandomFileName()}.js");
130var packageJson = ReadJsonObject(Path.Combine(package.PointerPackageRoot, "package.json"));
151var readme = await File.ReadAllTextAsync(Path.Combine(package.PointerPackageRoot, "README.md"));
203var packageJson = ReadJsonObject(Path.Combine(package.RidPackageRoot, "package.json"));
223var readme = await File.ReadAllTextAsync(Path.Combine(package.RidPackageRoot, "README.md"));
238=> File.ReadAllTextAsync(Path.Combine(_repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
242var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName());
243var nodeModulesRoot = Path.Combine(testRoot, "node_modules");
245var pointerBinRoot = Path.Combine(pointerPackageRoot, "bin");
250Path.Combine(pointerBinRoot, "aspire.js"));
253Path.Combine(pointerPackageRoot, "package.json"),
267await File.WriteAllTextAsync(Path.Combine(pointerBinRoot, "aspire-package-map.json"), packageMap.ToJsonString());
274var ridBinRoot = Path.Combine(ridPackageRoot, "bin");
278Path.Combine(ridPackageRoot, "package.json"),
286await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire"), "native binary stub");
287await File.WriteAllTextAsync(Path.Combine(ridBinRoot, "aspire.exe"), "native binary stub");
307var testRoot = Path.Combine(_workspace.Path, Path.GetRandomFileName());
308var stagingRoot = Path.Combine(testRoot, "staging");
309var outputPath = Path.Combine(testRoot, "output");
310var nativeBinaryPath = Path.Combine(testRoot, "native-aspire-stub");
331Path.Combine(stagingRoot, "rid"),
332Path.Combine(stagingRoot, "pointer"));
Pipelines\TrayBundleTests.cs (41)
53File.Delete(Path.Combine(source, missingFile));
54using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "osx-arm64", "Debug", "test", false, source, null);
58Assert.Contains(Path.Combine(source, missingFile), error.Message);
68File.SetUnixFileMode(Path.Combine(source, "Contents/MacOS/aspire-tray"), UnixFileMode.UserRead);
69using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "osx-arm64", "Debug", "test", false, source, null);
83var layout = Path.Combine(workspace.Path, "osx-arm64");
95Assert.Equal(File.ReadAllBytes(Path.Combine(source, file)), File.ReadAllBytes(Path.Combine(destination, file)));
96Assert.Equal(File.GetUnixFileMode(Path.Combine(source, file)), File.GetUnixFileMode(Path.Combine(destination, file)));
114Assert.Equal(File.GetUnixFileMode(Path.Combine(source, relativePath)), entry.Mode);
117Assert.Equal(File.ReadAllBytes(Path.Combine(source, relativePath)), content.ToArray());
167var pipeline = File.ReadAllText(Path.Combine(RepoRoot.Path, "eng/pipelines/templates/build_sign_native.yml"));
186var scriptPath = Path.Combine(workspace.Path, "prepare-signing.ps1");
211var file = Path.Combine(Path.GetDirectoryName(source)!, entry.FullName);
245Path.Combine(RepoRoot.Path, "eng/github-ci/test-trigger-map.yml"),
279var source = Path.Combine(workspace.Path, "publish with spaces");
281File.WriteAllText(Path.Combine(source, "smoke.stdout.log"), "not runtime content");
282var layout = Path.Combine(workspace.Path, rid);
301Assert.Equal(File.ReadAllBytes(Path.Combine(source, Path.GetFileName(entry.Name))), content.ToArray());
316var source = Path.Combine(workspace.Path, "publish");
320File.Delete(Path.Combine(source, "Aspire.ico"));
324File.Delete(Path.Combine(source, "aspire-tray.exe"));
328File.Copy(typeof(TrayBundleTests).Assembly.Location, Path.Combine(source, "aspire-tray.exe"), overwrite: true);
330using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path,
359var pipeline = File.ReadAllText(Path.Combine(RepoRoot.Path, "eng/pipelines/templates/build_sign_native.yml"));
369var workflow = File.ReadAllText(Path.Combine(RepoRoot.Path, ".github/workflows/build-cli-native-archives.yml"));
407var publish = File.ReadAllText(Path.Combine(RepoRoot.Path, "src/Aspire.Tray/Windows/publish.ps1"));
428var source = Path.Combine(workspace.Path, "source");
430File.Copy(Path.Combine(RepoRoot.Path, "src/Shared/Aspire.ico"), Path.Combine(source, "Aspire.ico"), overwrite: true);
431var layout = Path.Combine(workspace.Path, rid);
434var tray = Path.Combine(layout, "tray");
439File.Copy(Path.Combine(source, "Aspire.ico"), Path.Combine(tray, "Aspire.ico"), overwrite: true);
442File.Delete(Path.Combine(tray, "Aspire.ico"));
445File.WriteAllText(Path.Combine(tray, "Aspire.ico"), "wrong icon");
448File.WriteAllText(Path.Combine(tray, "smoke.log"), "unexpected runtime content");
451File.Copy(typeof(TrayBundleTests).Assembly.Location, Path.Combine(tray, "aspire-tray.exe"), overwrite: true);
455using var command = new PowerShellCommand(Path.Combine(RepoRoot.Path, "tools/CreateLayout/verify-windows-tray-payload.ps1"), output)
467private static XDocument LoadProject(string path) => XDocument.Load(Path.Combine(RepoRoot.Path, path));
PowerShellScripts\BuildTestMatrixTests.cs (72)
33var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
37Path.Combine(artifactsDir, "MyProject.tests-metadata.json"),
42var outputFile = Path.Combine(_workspace.Path, "matrix.json");
62var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
66Path.Combine(artifactsDir, "NonGating.tests-metadata.json"),
71var outputFile = Path.Combine(_workspace.Path, "matrix.json");
85var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
89Path.Combine(artifactsDir, "ProjectA.tests-metadata.json"),
94Path.Combine(artifactsDir, "ProjectB.tests-metadata.json"),
98var outputFile = Path.Combine(_workspace.Path, "matrix.json");
117var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
121Path.Combine(artifactsDir, "SplitProject.tests-metadata.json"),
127Path.Combine(artifactsDir, "SplitProject.tests-partitions.json"),
130var outputFile = Path.Combine(_workspace.Path, "matrix.json");
158var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
162Path.Combine(artifactsDir, "ClassSplitProject.tests-metadata.json"),
168Path.Combine(artifactsDir, "ClassSplitProject.tests-partitions.json"),
171var outputFile = Path.Combine(_workspace.Path, "matrix.json");
194var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
199Path.Combine(artifactsDir, "NoTimeouts.tests-metadata.json"),
203var outputFile = Path.Combine(_workspace.Path, "matrix.json");
221var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
225Path.Combine(artifactsDir, "CustomTimeouts.tests-metadata.json"),
230var outputFile = Path.Combine(_workspace.Path, "matrix.json");
248var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
252Path.Combine(artifactsDir, "NeedsNugets.tests-metadata.json"),
258Path.Combine(artifactsDir, "NoNugets.tests-metadata.json"),
263var outputFile = Path.Combine(_workspace.Path, "matrix.json");
282var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
286Path.Combine(artifactsDir, "FilterTest.tests-metadata.json"),
291Path.Combine(artifactsDir, "FilterTest.tests-partitions.json"),
294var outputFile = Path.Combine(_workspace.Path, "matrix.json");
312var emptyArtifactsDir = Path.Combine(_workspace.Path, "empty-artifacts");
315var outputFile = Path.Combine(_workspace.Path, "matrix.json");
332var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
336Path.Combine(artifactsDir, "SplitProject.tests-metadata.json"),
344Path.Combine(artifactsDir, "SplitProject.tests-partitions.json"),
347var outputFile = Path.Combine(_workspace.Path, "matrix.json");
373var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
377Path.Combine(artifactsDir, "SdkProject.tests-metadata.json"),
382var outputFile = Path.Combine(_workspace.Path, "matrix.json");
400var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
404Path.Combine(artifactsDir, "LinuxOnly.tests-metadata.json"),
409var outputFile = Path.Combine(_workspace.Path, "matrix.json");
428var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
432Path.Combine(artifactsDir, "OsRestrictedSplit.tests-metadata.json"),
439Path.Combine(artifactsDir, "OsRestrictedSplit.tests-partitions.json"),
442var outputFile = Path.Combine(_workspace.Path, "matrix.json");
465var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
469Path.Combine(artifactsDir, "CustomRunner.tests-metadata.json"),
474var outputFile = Path.Combine(_workspace.Path, "matrix.json");
494var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
498Path.Combine(artifactsDir, "NoRunner.tests-metadata.json"),
502var outputFile = Path.Combine(_workspace.Path, "matrix.json");
520var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
524Path.Combine(artifactsDir, "SplitRunner.tests-metadata.json"),
531Path.Combine(artifactsDir, "SplitRunner.tests-partitions.json"),
534var outputFile = Path.Combine(_workspace.Path, "matrix.json");
556var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
560Path.Combine(artifactsDir, "ClassRunner.tests-metadata.json"),
571Path.Combine(artifactsDir, "ClassRunner.tests-partitions.json"),
574var outputFile = Path.Combine(_workspace.Path, "matrix.json");
599var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
603Path.Combine(artifactsDir, "DefaultProps.tests-metadata.json"),
607var outputFile = Path.Combine(_workspace.Path, "matrix.json");
634var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
650Path.Combine(artifactsDir, "PartialProps.tests-metadata.json"),
653var outputFile = Path.Combine(_workspace.Path, "matrix.json");
721var artifactsDir = Path.Combine(_workspace.Path, "artifacts");
725Path.Combine(artifactsDir, "SplitProps.tests-metadata.json"),
732Path.Combine(artifactsDir, "SplitProps.tests-partitions.json"),
735var 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\VerifyNonBlockingTestResultsTests.cs (9)
64File.WriteAllText(Path.Combine(testResultsPath, artifactName), "");
97var exitCodePath = Path.Combine(_workspace.Path, "missing-exit-code.txt");
174File.WriteAllText(Path.Combine(testResultsPath, "malformed.trx"), "<TestRun>");
188Path.Combine(testResultsPath, "incomplete.trx"),
209Path.Combine(testResultsPath, "invalid-count.trx"),
230Path.Combine(testResultsPath, "missing-executed-count.trx"),
254Path.Combine(testResultsPath, "invalid-executed-count.trx"),
272var exitCodePath = Path.Combine(testResultsPath, "test-exit-code.txt");
279Path.Combine(testResultsPath, "results.trx"),
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");
ResourceGeneratorMetadataTests.cs (20)
26var source = XDocument.Load(Path.Combine(RepoRoot.Path, "Directory.Build.targets"));
27var configuration = XDocument.Load(Path.Combine(projectDirectory, $"{projectName}.csproj"));
28var neutralResources = Directory.GetFiles(Path.Combine(projectDirectory, resourceDirectory), "*.resx")
32.Select(name => Path.Combine(resourceDirectory, name!))
37Path.Combine(resourceDirectory, "NewResource.fr.resx"),
38Path.Combine(resourceDirectory, "NewResource.zh-Hans.resx"),
39Path.Combine(resourceDirectory, "WithoutDesigner.resx"),
40Path.Combine("Other", "Unrelated.resx"),
45var settingsDesignerPath = Path.Combine(resourceDirectory, "Settings.Designer.cs");
48Path.Combine(resourceDirectory, "Unrelated.cs"),
49Path.Combine(resourceDirectory, "Unrelated.Designer.cs"),
51Path.Combine("Other", "Unrelated.Designer.cs"),
57Directory.CreateDirectory(Path.Combine(workspace.Path, resourceDirectory));
58foreach (var path in neutralResources.Concat(designers).Append(Path.Combine(resourceDirectory, "WithoutDesigner.resx"))
59.Append(settingsDesignerPath).Append(Path.Combine(resourceDirectory, "Settings.settings")))
61await File.WriteAllTextAsync(Path.Combine(workspace.Path, path), string.Empty);
82linkedResource.Add(new XElement("Link", Path.Combine(resourceDirectory, "Linked.resx")));
84var projectPath = Path.Combine(workspace.Path, "Resources.proj");
86var script = Path.Combine(workspace.Path, "evaluate.ps1");
119Assert.Equal(Path.Combine(resourceDirectory, "Linked.resx"), resources[^1].GetProperty("Link").GetString());
TemplateManifest\TemplateManifestCommandTests.cs (7)
61arguments[0] = Path.Combine(workspace.Path, "missing");
64arguments[1] = Path.Combine(workspace.Path, "missing");
67arguments[3] = Path.Combine(workspace.Path, "missing.config");
106var config = Path.Combine(workspace.Path, "nuget.config");
110source, processed, Path.Combine(workspace.Path, "cgmanifest.json"), config,
111Path.Combine(workspace.Path, "package feed"), Path.Combine(workspace.Path, "restore directory")
TemplateManifest\TemplateManifestGenerationTests.cs (6)
21var feed = customFeed ? Path.Combine(root, "custom feed") : Path.Combine(root, "artifacts", "packages", configuration, "Shipping");
25var report = Path.Combine(root, "invocations.txt");
80.WithEnvironmentVariable("TEMPLATE_CG_REPORT", Path.Combine(root, "invocations.txt"))
95using var archive = ZipFile.Open(Path.Combine(directory, $"Aspire.ProjectTemplates.{version}.nupkg"), ZipArchiveMode.Create);
108File.WriteAllText(Path.Combine(root, "dotnet.cmd"), """
116var path = Path.Combine(root, "dotnet.sh");
TestTriggerMap\GraphAffectedProjectsTests.cs (9)
318var changedFilesPath = System.IO.Path.Combine(_workspace.Path, "changed.txt");
320return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: null, to: null, changedFilesPath: changedFilesPath).AffectedProjects;
325var changedFilesPath = System.IO.Path.Combine(_workspace.Path, "changed.txt");
327return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: null, to: null, changedFilesPath: changedFilesPath);
334System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"),
348var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
440var newFull = System.IO.Path.Combine(_workspace.Path, newRelativePath.Replace('/', System.IO.Path.DirectorySeparatorChar));
445return GraphAffectedProjects.Compute(_workspace.Path, System.IO.Path.Combine(_workspace.Path, "Aspire.slnx"), from: baseSha, to: "HEAD", changedFilesPath: null).AffectedProjects;
450var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
TestTriggerMap\SelectTestsCliTests.cs (41)
101Assert.Contains("## SelectTests", File.ReadAllText(Path.Combine(repoRoot, "summary")));
169File.WriteAllText(Path.Combine(dir.FullName, "map.yml"), Map);
173var propsPath = Path.Combine(dir.FullName, "BeforeBuildProps.props");
222var commentPath = Path.Combine(repoRoot, "comment.md");
274var commentPath = Path.Combine(repoRoot, "comment.md");
330var commentPath = Path.Combine(repoRoot, "comment.md");
371var commentPath = Path.Combine(repoRoot, "comment.md");
402var commentPath = Path.Combine(repoRoot, "comment.md");
448var commentPath = Path.Combine(repoRoot, "comment.md");
464var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
501var commentPath = Path.Combine(repoRoot, "comment.md");
526var solution = File.ReadAllText(Path.Combine(RepoRoot.Path, "Aspire.slnx"));
534var project = File.ReadAllText(Path.Combine(RepoRoot.Path, projectPath));
577var commentPath = Path.Combine(repoRoot, "comment.md");
620var jsonPath = Path.Combine(repoRoot, "selection.json");
662var jsonPath = Path.Combine(temporaryRoot, "selection.json");
701var missing = Path.Combine(repoRoot, "does-not-exist.txt");
1088var missing = Path.Combine(repoRoot, "does-not-exist.txt");
1095var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
1133var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1171var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1197var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
1220var commentPath = Path.Combine(repoRoot, "comment.md");
1221var jsonPath = Path.Combine(repoRoot, "selection.json");
1234var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
1275var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1316var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1354var propsPath = Path.Combine(repoRoot, "BeforeBuildProps.props");
1370var changed = Path.Combine(repoRoot, "changed.txt");
1475File.WriteAllText(Path.Combine(repoRoot, "skip-patterns.txt"), "# docs\n**.md\n");
1481var summary = File.ReadAllText(Path.Combine(repoRoot, "summary"));
1489File.WriteAllText(Path.Combine(repoRoot, "skip-patterns.txt"), ".github/workflows/**\n");
1512MapPath: Path.Combine(repoRoot, "map.yml"),
1513SlnxPath: slnxPath ?? Path.Combine(repoRoot, "Aspire.slnx"),
1526var changed = Path.Combine(repoRoot, "changed.txt");
1542File.WriteAllText(Path.Combine(dir.FullName, "Aspire.slnx"), slnx);
1543File.WriteAllText(Path.Combine(dir.FullName, "map.yml"), map);
1546body(dir.FullName, Path.Combine(dir.FullName, "BeforeBuildProps.props"), output));
1580var outputPath = Path.Combine(dir, "output");
1582Environment.SetEnvironmentVariable("GITHUB_STEP_SUMMARY", Path.Combine(dir, "summary"));
1625var fullPath = Path.Combine(repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar));
TestTriggerMap\SelectTestsLayer1IntegrationTests.cs (24)
39var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
45MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
46SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
79var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
85MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
86SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
134var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
139MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
140SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
170var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
174var commentPath = System.IO.Path.Combine(fixture.Path, "comment.md");
175var jsonPath = System.IO.Path.Combine(fixture.Path, "selection.json");
184MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
185SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
197var summary = File.ReadAllText(System.IO.Path.Combine(fixture.Path, "summary"));
233var propsPath = System.IO.Path.Combine(fixture.Path, "BeforeBuildProps.props");
237var commentPath = System.IO.Path.Combine(fixture.Path, "comment.md");
238var jsonPath = System.IO.Path.Combine(fixture.Path, "selection.json");
247MapPath: System.IO.Path.Combine(fixture.Path, "map.yml"),
248SlnxPath: System.IO.Path.Combine(fixture.Path, "Aspire.slnx"),
381var changed = System.IO.Path.Combine(_workspace.Path, "changed.txt");
412var outputPath = System.IO.Path.Combine(_workspace.Path, "output");
414Environment.SetEnvironmentVariable("GITHUB_STEP_SUMMARY", System.IO.Path.Combine(_workspace.Path, "summary"));
445var fullPath = System.IO.Path.Combine(_workspace.Path, relativePath.Replace('\\', System.IO.Path.DirectorySeparatorChar));
TypeScriptApiCompat\TypeScriptApiCompatTests.cs (14)
126var baselineRoot = Path.Combine(workspace.Path, "baseline");
127var currentRoot = Path.Combine(workspace.Path, "current");
197var suppressionPath = Path.Combine(workspace.Path, "Pkg.tscompat.suppression.txt");
240var currentSuppressions = ApiCompatSuppressionLoader.Load(Path.Combine(workspace.Path, "current"));
241var baselineSuppressions = ApiCompatSuppressionLoader.Load(Path.Combine(workspace.Path, "baseline"));
253var baselineRoot = Path.Combine(workspace.Path, "baseline");
254var currentRoot = Path.Combine(workspace.Path, "current");
255var reportPath = Path.Combine(workspace.Path, "report.md");
289var baselineRoot = Path.Combine(workspace.Path, "baseline");
290var currentRoot = Path.Combine(workspace.Path, "current");
291var reportPath = Path.Combine(workspace.Path, "report.md");
292var excludedPackagesPath = Path.Combine(workspace.Path, "excluded-packages.txt");
293var suppressionPath = Path.Combine(workspace.Path, "Excluded.tscompat.suppression.txt");
330File.WriteAllText(Path.Combine(apiDirectory, $"{packageName}.ats.txt"), content);
WorkflowScripts\AnalyzeCiFailureWorkflowTests.cs (348)
35var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
71var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
85var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
106var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
123var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
142Path.Combine(priorCausesDirectory, "nuget-timeout.json"),
145var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
164Path.Combine(priorCausesDirectory, "flaky-failure.json"),
167var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
188var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
220var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
247var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
279var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
298var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
331var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
366var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
394var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
415var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
436var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
455var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
475var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
495var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
518var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
537var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
560var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
592var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
625var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
661var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
680var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
701var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
750var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
785var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
832var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
862var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
882var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
941var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
957var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
980var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1011var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1047var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1074var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1097Path.Combine(priorCausesDirectory, "nuget-timeout.json"),
1107var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1126var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1146var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1171var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1213var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
1214var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
1221Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
1240var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
1241var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
1271Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
1286var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
1287var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
1329Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
1485var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1536var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1559var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1578var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1606var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1627var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
1640var causePath = Path.Combine(_workspace.Path, "main-build-break.json");
1641var runContextPath = Path.Combine(_workspace.Path, "run-context.json");
1642var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json");
1643var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json");
1644var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
1645var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
1646var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
1658Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
1723var causePath = Path.Combine(_workspace.Path, "main-build-break.json");
1724var runContextPath = Path.Combine(_workspace.Path, "run-context.json");
1725var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json");
1726var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json");
1727var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
1728var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
1729var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
1743Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
1803var causePath = Path.Combine(_workspace.Path, "flaky-failure.json");
1804var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
1805var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
1821Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
1848var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
1854var outputDirectory = Path.Combine(_workspace.Path, "extracted");
1857Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
1870var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
1876var outputDirectory = Path.Combine(_workspace.Path, "extracted");
1879Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
1901var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
1906var outputDirectory = Path.Combine(_workspace.Path, "extracted");
1909Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
1921var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
1926var outputDirectory = Path.Combine(_workspace.Path, "extracted");
1929Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
1941var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
1946var outputDirectory = Path.Combine(_workspace.Path, "extracted");
1950Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
1973var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
1985var outputDirectory = Path.Combine(_workspace.Path, "extracted");
1988Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2000var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
2005var outputDirectory = Path.Combine(_workspace.Path, "extracted");
2008Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2020var archivePath = Path.Combine(_workspace.Path, "test-results.zip");
2029var outputDirectory = Path.Combine(_workspace.Path, "extracted");
2032Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2044var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2058var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2073Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2094var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2115var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2129Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2154var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2156var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2168Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2185var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2197var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2209Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2230var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2258var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2280Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2305var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2307var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2321Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2341var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2343var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2357Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2377var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2379var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2393Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2413var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json");
2427var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2446Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2466var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2468Path.Combine(testResultsDirectory.FullName, "00001.trx"),
2485var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2491var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2494Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2515var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2517Path.Combine(testResultsDirectory.FullName, "00001.json"),
2528var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2532var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2535Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2557var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2559Path.Combine(testResultsDirectory.FullName, "00001.json"),
2570var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2574var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2577Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2595var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2597Path.Combine(testResultsDirectory.FullName, "00001.json"),
2614var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2618var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2621Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2639var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2641var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2645var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2648Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2666var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2668Path.Combine(testResultsDirectory.FullName, "00001.json"),
2671var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2675var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2678Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2700var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2702Path.Combine(testResultsDirectory.FullName, "00001.trx"),
2711Path.Combine(testResultsDirectory.FullName, "00002.trx"),
2713var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2717var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2720Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2741var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2743Path.Combine(testResultsDirectory.FullName, "00001.trx"),
2745var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2749var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2752Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2773var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2774await File.WriteAllTextAsync(Path.Combine(testResultsDirectory.FullName, "results.xml"), "<TestRun />");
2775var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2779var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2782Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2803var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results"));
2805Path.Combine(testResultsDirectory.FullName, "00001.trx"),
2813var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json");
2817var outputPath = Path.Combine(_workspace.Path, "test-failures.json");
2820Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2852var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json");
2853var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json");
2858Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2895Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2923Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2945Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
2960var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log");
2971var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json");
2972var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json");
2975Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3014Path.Combine(_workspace.Path, "last-success.json"));
3017using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json")));
3020Assert.Contains("per_page=100", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")), StringComparison.Ordinal);
3022await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
3048var outputPath = Path.Combine(_workspace.Path, "last-success.json");
3083var outputPath = Path.Combine(_workspace.Path, "last-success.json");
3090await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
3118var outputPath = Path.Combine(_workspace.Path, "last-success.json");
3126await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
3148Path.Combine(_workspace.Path, "last-success.json"));
3166Path.Combine(_workspace.Path, "last-success.json"));
3193Path.Combine(_workspace.Path, "last-success.json"));
3196using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json")));
3198Assert.True(int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count"))) >= 2);
3200(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")))
3227Path.Combine(_workspace.Path, "last-success.json"));
3230using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json")));
3232Assert.Equal(2, int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count"))));
3235(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")))
3248Path.Combine(_workspace.Path, "last-success.json"));
3261var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3262var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3282var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3283var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3326var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3327var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3375var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3376var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3387var ghCalls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"));
3435var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3436var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3447await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")),
3476var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3477var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3520var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3521var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3560var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json");
3561var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
3603var outputPath = Path.Combine(_workspace.Path, "persisted-main.json");
3661var outputPath = Path.Combine(_workspace.Path, $"persisted-{historyState}.json");
3702var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json");
3755var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json");
3787var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json");
3806var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
3808Path.Combine(failureDataDirectory, "run-context.json"),
3810var causeFile = Path.Combine(_workspace.Path, "cause.json");
3816Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3832var newCausePath = Path.Combine(_workspace.Path, "new-cause.json");
3833var existingCausePath = Path.Combine(_workspace.Path, "existing-cause.json");
3834var outputPath = Path.Combine(_workspace.Path, "merged-cause.json");
3843Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3860var causePath = Path.Combine(_workspace.Path, "prior-cause.json");
3877Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3896var metadataPath = Path.Combine(_workspace.Path, "metadata.json");
3910Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3928var diagnosticsPath = Path.Combine(_workspace.Path, "diagnostics.json");
3937Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
3951var logPath = Path.Combine(_workspace.Path, "job.log");
3957Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4004var inputPath = Path.Combine(_workspace.Path, "job.log");
4005var outputPath = Path.Combine(_workspace.Path, "sanitized.log");
4009Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4020var inputPath = Path.Combine(_workspace.Path, "job.log");
4021var outputPath = Path.Combine(_workspace.Path, "sanitized.log");
4027Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4040var causePath = Path.Combine(_workspace.Path, "cause.json");
4041var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
4042var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
4048Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
4106var analysisPath = Path.Combine(_workspace.Path, "analysis.json");
4107var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
4135Path.Combine(RepoRoot.Path, CommentScriptRelativePath),
4165var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
4166var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
4189Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4209var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
4210var canonicalBodyPath = Path.Combine(_workspace.Path, "canonical-body.md");
4211var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
4282Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4330var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
4331var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
4348Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4383var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
4384var outputPath = Path.Combine(_workspace.Path, "updated-body.md");
4405Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4422var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md");
4423var firstOutputPath = Path.Combine(_workspace.Path, "first-output.md");
4424var secondOutputPath = Path.Combine(_workspace.Path, "second-output.md");
4445Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4454Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4488var causePath = Path.Combine(_workspace.Path, "cause.json");
4489var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
4490var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
4496Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
4526var causePath = Path.Combine(_workspace.Path, "cause.json");
4527var runContextPath = Path.Combine(_workspace.Path, "run-context.json");
4528var lastSuccessfulPath = Path.Combine(_workspace.Path, "last-successful.json");
4529var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge.json");
4530var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json");
4531var bodyPath = Path.Combine(_workspace.Path, "issue-body.md");
4532var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json");
4548Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
4575var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json");
4576var buildCausePath = Path.Combine(_workspace.Path, "build-cause.json");
4577var testCausePath = Path.Combine(_workspace.Path, "test-cause.json");
4578var multiJobCausePath = Path.Combine(_workspace.Path, "multi-job-cause.json");
4589var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
4591Path.Combine(failureDataDirectory, "run-context.json"),
4595Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4598Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4601Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4604Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4607Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4639var buildBodyPath = Path.Combine(_workspace.Path, "build-body.md");
4640var buildMetadataPath = Path.Combine(_workspace.Path, "build-metadata.json");
4641var testBodyPath = Path.Combine(_workspace.Path, "test-body.md");
4642var testMetadataPath = Path.Combine(_workspace.Path, "test-metadata.json");
4644Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
4660Path.Combine(RepoRoot.Path, IssueScriptRelativePath),
4703var scriptPath = Path.Combine(RepoRoot.Path, ValidationScriptRelativePath);
4714process.StartInfo.Environment["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ci-analysis-output");
4733var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4734var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
4744Path.Combine(RepoRoot.Path, HistoryScriptRelativePath),
4749["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"),
4750["GH_CALL_COUNT_FILE"] = Path.Combine(_workspace.Path, "gh-call-count"),
4756var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName;
4757var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
4767Path.Combine(RepoRoot.Path, CandidatesScriptRelativePath),
4772["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"),
4778var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, $"fake-bin-{Guid.NewGuid():N}")).FullName;
4779var fakeGhPath = Path.Combine(fakeBinDirectory, "gh");
4815var analysisDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName;
4816var failureDataDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-failure-data")).FullName;
4817await File.WriteAllTextAsync(Path.Combine(analysisDirectory, "analysis-result.json"), analysis);
4818await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run-context.json"), runContext);
4819await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run.json"), run);
4820await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "failed-jobs.json"), trustedFailedJobs);
4821await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "triggering-merge-pr.json"), triggeringMerge);
4822await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "last-successful-main-run.json"), lastSuccessfulRun);
4823await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "candidate-merges.json"), candidateMerges);
4824await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "candidate-merge-history-status.json"), candidateHistoryStatus);
4825await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "pr-metadata.json"), prMetadata);
4842Path.Combine(RepoRoot.Path, PersistenceScriptRelativePath),
4846["CI_FAILURE_DATA_DIR"] = Path.Combine(_workspace.Path, "ci-failure-data"),
4904var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output");
4905var failureDataDirectory = Path.Combine(_workspace.Path, "ci-failure-data");
4909await File.WriteAllTextAsync(Path.Combine(analysisDirectory, "analysis-result.json"), analysis);
4910await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run-context.json"), runContext);
4911await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "failed-jobs.json"), trustedFailedJobs);
4913Path.Combine(failureDataDirectory, "run.json"),
4916Path.Combine(failureDataDirectory, "test-evidence.json"),
4950Path.Combine(failureDataDirectory, "test-failures.json"),
4974await File.WriteAllTextAsync(Path.Combine(causesDirectory, fileName), cause);
4980var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
4991var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
WorkflowScripts\AutoSecWorkflowTests.cs (6)
4223["nugetConfigText"] = File.ReadAllText(Path.Combine(RepoRoot.Path, "NuGet.config")),
4332["nugetConfigText"] = File.ReadAllText(Path.Combine(RepoRoot.Path, "NuGet.config")),
4574ReadWorkflow(Path.Combine("auto-sec", "collect-prs.js")), StringComparison.Ordinal);
4576ReadWorkflow(Path.Combine("auto-sec", "collect.sh")), StringComparison.Ordinal);
4792var requestPath = Path.Combine(workspace.Path, "request.json");
4793var resultPath = Path.Combine(workspace.Path, "result.json");
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (5)
257var scriptPath = Path.Combine(RepoRoot.Path, ScriptRelativePath);
350await WriteWorkspaceFileAsync(_workspace.Path, Path.Combine("docs", "late-main.md"), "non-extension main change");
383Path.Combine("extension", "package.json"),
393=> await WriteWorkspaceFileAsync(workingDirectory, Path.Combine("extension", "CHANGELOG.md"), content);
397var fullPath = Path.Combine(workingDirectory, relativePath);
WorkflowScripts\FilterNonBlockingTestArtifactsTests.cs (13)
22var allLogsPath = Path.Combine(workspace.Path, "all-logs");
27File.WriteAllText(Path.Combine(advisoryResultsPath, "ignore-test-failures.marker"), "Dashboard Playwright");
28File.WriteAllText(Path.Combine(advisoryResultsPath, "advisory.trx"), "advisory failure");
29File.WriteAllText(Path.Combine(gatingResultsPath, "gating.trx"), "gating failure");
54var allLogsPath = Path.Combine(workspace.Path, "all-logs");
59File.WriteAllText(Path.Combine(advisoryResultsPath, "ignore-test-failures.marker"), "Dashboard Playwright");
60var markerPath = Path.Combine(unexpectedResultsPath, "ignore-test-failures.marker");
80var allLogsPath = Path.Combine(workspace.Path, "all-logs");
85File.WriteAllText(Path.Combine(advisoryResultsPath, "ignore-test-failures.marker"), "Dashboard Playwright");
86var markerPath = Path.Combine(misplacedResultsPath, "ignore-test-failures.marker");
106var allLogsPath = Path.Combine(workspace.Path, "all-logs");
111File.WriteAllText(Path.Combine(advisoryResultsPath, "ignore-test-failures.marker"), "Dashboard Playwright");
112var markerPath = Path.Combine(nestedResultsPath, "ignore-test-failures.marker");
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 (86)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (8)
762? Path.Combine(GetOrInitializeX64Clr2Path(toolName, basePath64), toolName)
763: Path.Combine(GetOrInitializeX32Clr2Path(toolName, basePath), toolName);
768return Path.Combine(s_pathToX64Clr4 ??= basePath64, toolName);
773return Path.Combine(s_pathToArm64Clr4 ??= basePathArm64, toolName);
776return Path.Combine(s_pathToX32Clr4 ??= basePath, toolName);
888string fullPath = Path.Combine(envPath, toolName);
1276string appHostPath = Path.Combine(msbuildAssemblyPath, Constants.MSBuildExecutableName);
1279: (Path.Combine(msbuildAssemblyPath, Constants.MSBuildAssemblyName), false);
Evaluation\Evaluator.cs (5)
1338string projectFullPath = Path.Combine(projectDirectory, projectFile);
2003ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(sdkResult.Path, project),
2016ExpandAndLoadImportsFromUnescapedImportExpression(directoryOfImportingFile, importElement, Path.Combine(additionalPath, project),
2053string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(sdkResult.Path, 5), Constants.DotnetProcessName);
2269importFileUnescaped = Path.Combine(directoryOfImportingFile, importFileUnescaped);
Microsoft.Build.Framework (101)
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));
469string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt");
713return NormalizePath(Path.Combine(directory, file));
870return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString())))
970string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec));
1048var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath));
1513return paths.Aggregate(root, Path.Combine);
1686string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
Utilities\FileMatcher.cs (9)
621longPath = Path.Combine(longPath, parts[i]);
2244fixedDirectoryPart = Path.Combine(projectDirectoryUnescaped, fixedDirectoryPart);
2618fixedDirectoryPart = Path.Combine(projectRoot, fixedDirectoryPart);
2821includeBaseDirectory = Path.Combine(projectDirectory, includeBaseDirectory);
2822excludeBaseDirectory = Path.Combine(projectDirectory, excludeBaseDirectory);
2931: Path.Combine(projectDirectory, includeBaseDirectory.ToString());
2934: Path.Combine(projectDirectory, excludeBaseDirectory.ToString());
3268: Path.Combine(parentRelativeDirectory, directoryName);
3507Path.Combine(_enumerationRoot, relativeDirectory.ToString()),
Utilities\FrameworkLocationHelper.cs (17)
425? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
435? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
445? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV30)
455? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV35)
465? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV40)
475? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV45)
485? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV11)
495? Path.Combine(NativeMethods.FrameworkBasePath, dotNetFrameworkVersionFolderPrefixV20)
576Path.Combine(FallbackDotNetFrameworkSdkInstallPath, "bin");
816var frameworkPath = Path.Combine(NativeMethods.FrameworkBasePath, prefix ?? string.Empty);
826return Path.Combine(complusInstallRoot, complusVersion);
967? Path.Combine(programFiles32, "Reference Assemblies\\Microsoft\\Framework")
968: Path.Combine(NativeMethods.FrameworkBasePath, "xbuild-frameworks");
1125string programFilesReferenceAssemblyDirectory = Path.Combine(programFilesReferenceAssemblyLocation, versionPrefix);
1448(!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, Constants.MSBuildExecutableName)) &&
1449!FileSystems.Default.FileExists(Path.Combine(generatedPathToDotNetFramework, "Microsoft.Build.dll"))))
1481frameworkPath = Path.Combine(frameworkPath, this.Version.ToString());
Utilities\ToolLocationHelper_FrameworkPaths.cs (10)
315pathToSdk = Path.Combine(pathToSdk, "x64");
319pathToSdk = Path.Combine(pathToSdk, "ia64");
328string filePath = Path.Combine(pathToSdk, fileName);
437pathToSdk = Path.Combine(pathToSdk, "bin");
478pathToSdk = Path.Combine(pathToSdk, "x86");
482pathToSdk = Path.Combine(pathToSdk, "x64");
491string filePath = Path.Combine(pathToSdk, fileName);
557toolPath = Path.Combine(toolPath, fileName);
588return pathToFx == null ? null : Path.Combine(pathToFx, fileName);
596public static string GetPathToSystemFile(string fileName) => Path.Combine(PathToSystem, fileName);
Microsoft.Build.NuGetSdkResolver (5)
Microsoft.Build.Tasks.CodeAnalysis (12)
Microsoft.Build.Tasks.Core (106)
AssemblyDependency\ReferenceTable.cs (7)
976companionFile = Path.Combine(Path.GetDirectoryName(baseName), implementationFile);
1020string satelliteAssembly = Path.Combine(subDirectory, satelliteFilename);
1024reference.AddSatelliteFile(Path.Combine(cultureName, satelliteFilename));
1043string serializationAssemblyPath = Path.Combine(reference.DirectoryName, serializationAssemblyFilename);
2828AddRelatedItem(serializationAssemblyItems, relatedItemBase, Path.Combine(reference.DirectoryName, serializationAssemblyFile));
2834AddRelatedItem(scatterItems, relatedItemBase, Path.Combine(reference.DirectoryName, scatterFile));
2847AddRelatedItem(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 (8)
Microsoft.CodeAnalysis (26)
Microsoft.CodeAnalysis.Analyzers (5)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BuildClient.Package (7)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Microsoft.CodeAnalysis.Features (13)
Microsoft.CodeAnalysis.NetAnalyzers (1)
Microsoft.CodeAnalysis.Razor.DotNetFormat (5)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.Scripting (12)
Microsoft.CodeAnalysis.Workspaces (20)
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (3)
Microsoft.Data.Analysis.Tests (2)
Microsoft.Diagnostics.NETCore.Client (2)
Microsoft.DiaSymReader (1)
Microsoft.DotNet.ApiCompat.Task (3)
Microsoft.DotNet.ApiSymbolExtensions (3)
Microsoft.DotNet.Arcade.Sdk (6)
Microsoft.DotNet.Build.Tasks.Installers (30)
src\CreateWixBuildWixpack.cs (20)
124AbsolutePath destPathAbsolute = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, Path.GetFileName(projectPath)));
157OutputFile = Path.Combine(OutputFolder, $"{_installerFilename}{_packageExtension}");
195AbsolutePath destinationDir = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, randomDirName));
219var tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
300_defineConstantsDictionary["TargetPath"] = Path.Combine("%outputfolder%", Path.GetFileName(targetPath));
304InstallerFile = Path.Combine("%outputfolder%", Path.GetFileName(InstallerFile));
312PdbFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(PdbFile.ItemSpec));
318BindTrackingFile.ItemSpec = Path.Combine("%outputfolder%", Path.GetFileName(BindTrackingFile.ItemSpec));
452AbsolutePath responseFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, "create.rsp"));
467AbsolutePath commandFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(wixpackWorkingDir, "create.cmd"));
541var copiedXmlPath = Path.Combine(WixpackWorkingDir, Path.GetFileName(xmlPath));
622var filePath = Path.Combine(dir, Path.GetFileName(source));
1042AbsolutePath destDir = TaskEnvironment.GetAbsolutePath(Path.Combine(WixpackWorkingDir, fileId));
1050AbsolutePath destPath = TaskEnvironment.GetAbsolutePath(Path.Combine(destDir, Path.GetFileName(source)));
1069Extensions[i] = new TaskItem(Path.Combine(filename, filename));
1113LocalizationFiles[i] = new TaskItem(Path.Combine(filename, filename));
1123Path.Combine(_wixprojDir, source) :
1124Path.Combine(relativeRoot, source);
1137AbsolutePath destinationFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(destDir, Path.GetFileName(file)));
1144AbsolutePath destinationSubdirectoryPath = TaskEnvironment.GetAbsolutePath(Path.Combine(destDir, Path.GetFileName(dir)));
src\CreateWixCommandPackageDropBase.cs (8)
74OutputFile = Path.Combine(OutputFolder, $"{Path.GetFileName(InstallerFile)}{_packageExtension}");
90AbsolutePath commandFilename = TaskEnvironment.GetAbsolutePath(Path.Combine(packageDropDir, $"create.cmd"));
153AbsolutePath newWixSrcFilePath = TaskEnvironment.GetAbsolutePath(Path.Combine(packageDropDir, Path.GetFileName(wixSrcFile.ItemSpec)));
185AbsolutePath destinationPath = TaskEnvironment.GetAbsolutePath(Path.Combine(packageDropDir, Path.GetFileName(locItem.ItemSpec)));
301AbsolutePath possiblePath = TaskEnvironment.GetAbsolutePath(Path.Combine(additionalBasePath.ItemSpec, oldPath));
319newRelativePath = Path.Combine(id, Path.GetFileName(oldPath));
334AbsolutePath newFolder = TaskEnvironment.GetAbsolutePath(Path.Combine(outputPath, id));
340File.Copy(TaskEnvironment.GetAbsolutePath(oldPath), TaskEnvironment.GetAbsolutePath(Path.Combine(outputPath, newRelativePath)), true);
Microsoft.DotNet.Build.Tasks.Packaging (4)
Microsoft.DotNet.Build.Tasks.VisualStudio (6)
Microsoft.DotNet.Build.Tasks.Workloads (14)
Microsoft.DotNet.Cli.CoreUtils (1)
Microsoft.DotNet.Cli.Definitions (5)
Microsoft.DotNet.Cli.InternalMicrosoft (2)
Microsoft.DotNet.Cli.Utils (10)
Microsoft.DotNet.CMake.Sdk (5)
Microsoft.DotNet.Configurer (10)
Microsoft.DotNet.GenFacades (3)
Microsoft.DotNet.HotReload.Watch (12)
Microsoft.DotNet.InternalAbstractions (3)
Microsoft.DotNet.MacOsPkg.Core (4)
Microsoft.DotNet.NativeWrapper (2)
Microsoft.DotNet.NuGetRepack.Tasks (5)
Microsoft.DotNet.ProjectTools (6)
Microsoft.DotNet.SdkResolver (1)
Microsoft.DotNet.SharedFramework.Sdk (3)
Microsoft.DotNet.SourceBuild.Tasks (3)
Microsoft.DotNet.TemplateLocator (18)
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (14)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
668string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.DotNet.XliffTasks (15)
Tasks\TransformTemplates.cs (8)
77? Path.Combine(TranslatedOutputDirectory, $"{templateName}.default.1033")
78: Path.Combine(TranslatedOutputDirectory, $"{templateName}.{language}");
80string cultureSpecificTemplateFile = Path.Combine(localizedTemplateDirectory, Path.GetFileName(template.ItemSpec));
86string projectFileFullPath = Path.Combine(templateDirectory, projectNode.Attribute("File").Value);
87File.Copy(TaskEnvironment.GetAbsolutePath(projectFileFullPath), TaskEnvironment.GetAbsolutePath(Path.Combine(localizedTemplateDirectory, Path.GetFileName(projectNode.Attribute("File").Value))), overwrite: true);
93string templateItemFullPath = Path.Combine(templateDirectory, templateItem.Value);
94string templateItemDestinationPath = Path.Combine(localizedTemplateDirectory, templateItem.Value);
116File.Copy(TaskEnvironment.GetAbsolutePath(Path.Combine(TranslatedOutputDirectory, localizedFileName)), templateItemDestinationAbsolutePath, overwrite: true);
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.Abstractions.Tests (33)
Contents\DataContentTests.cs (25)
327string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.json");
354string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.bin");
381string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.unknownextension");
407string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.png");
470string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.bin");
497string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
527string tempDir = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
529string expectedPath = Path.Combine(tempDir, "myfile.json");
556string tempDir = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}");
585string tempPath = Path.Combine(Path.GetTempPath(), $"test_{Guid.NewGuid()}.txt");
613string expectedAbsolute = Path.Combine(cwdBefore, filename);
671string expectedAbsolute = Path.Combine(cwdBefore, content.Name!);
721string tempDir = Path.Combine(Path.GetTempPath(), $"test_subdir_{Guid.NewGuid()}");
722string subDir = Path.Combine(tempDir, "subdir");
727string filePath = Path.Combine(subDir, "nested.html");
754string tempDir = Path.Combine(Path.GetTempPath(), $"test_dir_noname_{Guid.NewGuid()}");
781string tempPath = Path.Combine(Path.GetTempPath(), $"test_cancel_{Guid.NewGuid()}.txt");
812string tempPath = Path.Combine(Path.GetTempPath(), $"test_save_cancel_{Guid.NewGuid()}.bin");
852string tempDir = Path.Combine(Path.GetTempPath(), $"test_dir_name_{Guid.NewGuid()}");
854string expectedPath = Path.Combine(tempDir, content.Name);
880string tempDir = Path.Combine(Path.GetTempPath(), $"test_nonexist_{Guid.NewGuid()}");
882string filePath = Path.Combine(tempDir, "newfile");
909string tempPath = Path.Combine(Path.GetTempPath(), $"test_large_{Guid.NewGuid()}.bin");
938string tempPath = Path.Combine(Path.GetTempPath(), $"test_save_large_{Guid.NewGuid()}.bin");
961string tempPath = Path.Combine(Path.GetTempPath(), $"test_existing_{Guid.NewGuid()}.bin");
Files\HostedFileClientExtensionsTests.cs (8)
63var tempFile = Path.Combine(Path.GetTempPath(), $"test-{Guid.NewGuid()}.txt");
123var tempFile = Path.Combine(Path.GetTempPath(), $"download-{Guid.NewGuid()}.bin");
150var tempDir = Path.Combine(Path.GetTempPath(), $"dldir-{Guid.NewGuid()}");
162Assert.Equal(Path.Combine(tempDir, "result.bin"), savedPath);
175var tempDir = Path.Combine(Path.GetTempPath(), $"dldir2-{Guid.NewGuid()}");
187Assert.Equal(Path.Combine(tempDir, "file-id-fallback"), savedPath);
210string expectedAbsolute = Path.Combine(cwdBefore, fileName);
232var tempFile = Path.Combine(Path.GetTempPath(), $"existing-{Guid.NewGuid()}.bin");
Microsoft.Extensions.AI.Evaluation.Console (3)
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (14)
DiskBased\PathValidationTests.cs (14)
112string root = Path.Combine(Path.GetTempPath(), "testroot");
123string root = Path.Combine(Path.GetTempPath(), "testroot");
134string root = Path.Combine(Path.GetTempPath(), "testroot") + Path.DirectorySeparatorChar;
135string child = Path.Combine(root, "file.txt");
149string root = Path.Combine(Path.GetTempPath(), "testroot");
169string root = Path.Combine(Path.GetTempPath(), "testroot");
180string root = Path.Combine(Path.GetTempPath(), "testroot");
190string root = Path.Combine(Path.GetTempPath(), "testroot");
337string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting");
348string longChild = Path.Combine(longRoot, "file.txt");
385string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting");
397string child = Path.Combine(shortRoot, "file.txt");
398File.WriteAllText(Path.Combine(longRoot, "file.txt"), string.Empty);
431string root = Path.Combine(Path.GetTempPath(), "TestRoot");
Microsoft.Extensions.AI.OpenAI.Tests (2)
Microsoft.Extensions.AI.Templates.Tests (12)
Microsoft.Extensions.DataIngestion.MarkItDown (1)
Microsoft.Extensions.DataIngestion.Tests (5)
Microsoft.Extensions.DependencyModel (7)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Microsoft.Extensions.DotNetDeltaApplier (1)
Microsoft.Extensions.FileProviders.Physical (6)
Microsoft.Extensions.FileSystemGlobbing (6)
Microsoft.Extensions.Hosting (1)
Microsoft.Extensions.Http.Resilience.Tests (2)
Microsoft.Extensions.Logging.AzureAppServices (2)
Microsoft.Extensions.ML.Tests (4)
Microsoft.Extensions.ServiceDiscovery.Dns (3)
Microsoft.Gen.BuildMetadata (1)
Microsoft.Gen.BuildMetadata.Unit.Tests (2)
Microsoft.Gen.ComplianceReports (2)
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
Microsoft.Gen.ContextualOptions (1)
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Logging.Unit.Tests (7)
Microsoft.Gen.MetadataExtractor (4)
Microsoft.Gen.MetadataExtractor.Unit.Tests (7)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.Metrics.Unit.Tests (2)
Microsoft.Gen.MetricsReports (2)
Microsoft.Gen.MetricsReports.Unit.Tests (7)
Microsoft.Maui (1)
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Resizetizer (32)
Microsoft.ML.AutoML (3)
Microsoft.ML.AutoML.Samples (2)
Microsoft.ML.AutoML.Tests (16)
ColumnInferenceTests.cs (8)
80var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithEmptyColumn.txt"), DefaultColumnNames.Label, groupColumns: false);
88var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "BinaryDatasetWithBoolColumn.txt"), DefaultColumnNames.Label);
107var filePath = Path.Combine("TestData", "DatasetWithoutHeader.txt");
135var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "NameColumnIsOnlyFeatureDataset.txt"), DefaultColumnNames.Label);
152.InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
172var result = new MLContext(1).Auto().InferColumns(Path.Combine("TestData", "DatasetWithDefaultColumnNames.txt"),
203var dataset = Path.Combine("TestData", "DatasetWithNewlineBetweenQuotes.txt");
244var 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)
4600TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS1.csv")), "sep=, col=Features:R4:1 header=+",
4629TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "real_1.csv")), "sep=, col=Features:R4:1 header=+",
4653TestEntryPointPipelineRoutine(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS2.csv")), "sep=, col=Features:R4:1 header=+",
Microsoft.ML.Data (3)
Microsoft.ML.DnnImageFeaturizer.AlexNet (1)
Microsoft.ML.DnnImageFeaturizer.ResNet101 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet18 (1)
Microsoft.ML.DnnImageFeaturizer.ResNet50 (1)
Microsoft.ML.Ensemble (2)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Maml (2)
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.PerformanceTests (11)
Microsoft.ML.Predictor.Tests (9)
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(
752var varDir = Path.Combine(modelLocation, "variables");
1438if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName))
1439&& File.Exists(Path.Combine(workspacePath, validationSetBottleneckCachedValuesFileName)))
1454string workspacePath = Path.Combine(TensorFlowScenariosTestsFixture.parentWorkspacePath, finalImagesFolderName + "_" + (int)arch);
1739Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.TrainSetBottleneckCachedValuesFileName)));
1740Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.ValidationSetBottleneckCachedValuesFileName)));
1839string fullImagesetFolderPath = Path.Combine(
1947UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1949if (!Directory.Exists(Path.Combine(imagesDownloadFolder, filenameAlias)))
1950Directory.Move(Path.Combine(imagesDownloadFolder, Path.GetFileNameWithoutExtension(fileName)), Path.Combine(imagesDownloadFolder, "FPTSUT"));
1960UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
1972string relativeFilePath = Path.Combine(destDir, destFileName);
1988if (File.Exists(Path.Combine(destFolder, flag)))
1992File.Create(Path.Combine(destFolder, flag));
2015string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.ML.TestFramework (9)
Microsoft.ML.TestFrameworkCommon (6)
Microsoft.ML.Tests (17)
CalibratedModelParametersTests.cs (3)
232ModelSaveContext.SaveModel(writer, embeddedCalibrator, Path.Combine("Predictor", "Calibrator"));
242Env, out var subModel, reader, Path.Combine("Predictor", "Predictor"));
245Env, out var calibrator, reader, Path.Combine("Predictor", "Calibrator"));
Microsoft.ML.TimeSeries.Tests (4)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (35)
BpeTests.cs (9)
366using Stream vocabStream = File.OpenRead(Path.Combine(@"Gpt-2", "vocab.json"));
367using Stream mergesStream = File.OpenRead(Path.Combine(@"Gpt-2", "merges.txt"));
380string vocabFile = Path.Combine(@"Gpt-2", "vocab.json");
381string mergesFile = Path.Combine(@"Gpt-2", "merges.txt");
546using Stream vocabStream = File.OpenRead(Path.Combine(@"Gpt-2", "vocab.json"));
547using Stream mergesStream = File.OpenRead(Path.Combine(@"Gpt-2", "merges.txt"));
894BpeOptions options = new BpeOptions(Path.Combine(@"Gpt-2", "vocab.json"), Path.Combine(@"Gpt-2", "merges.txt"))
951using Stream jsonModelStream = File.OpenRead(Path.Combine(@"DeepSeek", "tokenizer-DeepSeek-R1.json"));
Microsoft.ML.TorchSharp (6)
Microsoft.ML.Transforms (2)
Microsoft.ML.Vision (18)
DnnRetrainTransform.cs (9)
118var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(DnnRetrainTransformer) + "_" + Guid.NewGuid()));
130string fullFilePath = Path.Combine(tempDirPath, relativeFile);
409var path = Path.Combine(modelDir, DefaultModelFileNames.TmpMlnetModel);
416var variablesPath = Path.Combine(modelDir, DefaultModelFileNames.VariablesFolder);
420File.Copy(f, Path.Combine(archivePath, Path.GetFileName(f)));
439var destination = Path.Combine(variablesPath, DefaultModelFileNames.Data);
446var destination = Path.Combine(variablesPath, DefaultModelFileNames.Index);
533_modelLocation = Path.IsPathRooted(modelLocation) ? modelLocation : Path.Combine(Directory.GetCurrentDirectory(), modelLocation);
705Path.Combine(_modelLocation, DefaultModelFileNames.Graph),
ImageClassificationTrainer.cs (9)
537_resourcePath = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, "MLNET");
570_checkpointPath = Path.Combine(_options.WorkspacePath, _options.FinalModelPrefix +
572_sizeFile = Path.Combine(_options.WorkspacePath, "TrainingSetSize.txt");
668string trainSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
671string validationSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath,
856Path.Combine(_options.WorkspacePath, _options.ValidationSetBottleneckCachedValuesFileName),
954trainWriter = tf.summary.FileWriter(Path.Combine(_options.WorkspacePath, "train"),
1149var evalGraph = LoadMetaGraph(Path.Combine(_resourcePath, ModelFileName[_options.Arch]));
1313var modelFilePath = Path.Combine(_resourcePath, modelFileName);
Microsoft.NET.Build.Containers (5)
Microsoft.NET.Build.Extensions.Tasks (1)
Microsoft.NET.Build.Tasks (62)
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (14)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
668string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.NET.HostModel (1)
Microsoft.NET.ProjectData (19)
Microsoft.NET.ProjectData.Tasks (14)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (4)
Microsoft.NET.Sdk.Publish.Tasks (24)
Microsoft.NET.Sdk.Razor.Tasks (6)
Microsoft.NET.Sdk.StaticWebAssets.Tasks (13)
Microsoft.NET.Sdk.WorkloadManifestReader (18)
SdkDirectoryWorkloadManifestProvider.cs (14)
92string? userManifestsRoot = userProfileDir is null ? null : Path.Combine(userProfileDir, "sdk-manifests");
93string dotnetManifestRoot = Path.Combine(_sdkRootPath, "sdk-manifests");
205_installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
302var installStateFilePath = Path.Combine(WorkloadInstallType.GetInstallStateFolder(_sdkVersionBand, _sdkOrUserLocalPath), "default.json");
344var workloadManifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
372var manifestVersionBandDirectory = Path.Combine(_manifestRoots[0], versionBandString);
387var manifestVersionBandDirectory = Path.Combine(manifestRoot, versionBandString);
488.Where(dir => File.Exists(Path.Combine(dir, "WorkloadManifest.json")))
500else if (File.Exists(Path.Combine(manifestDirectory, "WorkloadManifest.json")))
502var manifestPath = Path.Combine(manifestDirectory, "WorkloadManifest.json");
559if (File.Exists(Path.Combine(specifiedManifestDirectory, "WorkloadManifest.json")))
607var featureBandDirectory = Path.Combine(manifestRoot, workloadSetFeatureBand.Value.ToString());
634var workloadSetsRoot = Path.Combine(featureBandDirectory, WorkloadSetsFolderName);
668string globalJsonPath = Path.Combine(directory, "global.json");
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (9)
Microsoft.TemplateEngine.Cli (10)
Microsoft.TemplateEngine.Core (3)
Microsoft.TemplateEngine.Edge (16)
Microsoft.TemplateEngine.IDE (1)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (4)
Microsoft.TemplateEngine.Utils (14)
InMemoryFileSystem.cs (10)
53dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
77dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
86targetFile = new FileSystemFile(parts[parts.Length - 1], Path.Combine(currentDir.FullPath, parts[parts.Length - 1]));
451dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
507dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
565dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
597dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
628dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
659dir = new FileSystemDirectory(parts[i], Path.Combine(currentDir.FullPath, parts[i]));
701path = Path.Combine(GetCurrentDirectory(), path);
Microsoft.TemplateSearch.Common (2)
Microsoft.TestPlatform.CoreUtilities (7)
Microsoft.TestPlatform.CrossPlatEngine (13)
Microsoft.TestPlatform.Extensions.BlameDataCollector (10)
Microsoft.TestPlatform.PlatformAbstractions (5)
Microsoft.TestPlatform.TestHostRuntimeProvider (15)
Microsoft.TestPlatform.Utilities (2)
Microsoft.VisualStudio.TestPlatform.Client (1)
Microsoft.VisualStudio.TestPlatform.Common (9)
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (3)
Microsoft.VisualStudio.TestPlatform.Extensions.TestIds.TestLogger (4)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (17)
Microsoft.VisualStudio.TestPlatform.ObjectModel (4)
Microsoft.Web.XmlTransform (1)
Mono.Cecil (2)
MSBuild (15)
MSBuild.Coordinator (1)
NativeIntegrations.DockerCompose (8)
DockerComposeEnvironment.cs (8)
191await File.WriteAllTextAsync(Path.Combine(context.OutputPath, "compose.yaml"), ComposeJson.Json(plan.Compose), context.CancellationToken).ConfigureAwait(false);
192await File.WriteAllTextAsync(Path.Combine(context.OutputPath, "deployment-inputs.json"), ComposeJson.Json(plan.Inputs), context.CancellationToken).ConfigureAwait(false);
193await File.WriteAllTextAsync(Path.Combine(context.OutputPath, "prerequisites.txt"), string.Join('\n',
205Path.Combine(context.OutputPath, "compose.yaml"), "down").ToJsonString(),
214var composePath = Path.Combine(context.OutputPath, "compose.yaml");
215foreach (var (path, expected) in new[] { (composePath, plan.Compose), (Path.Combine(context.OutputPath, "deployment-inputs.json"), plan.Inputs) })
248await File.WriteAllTextAsync(Path.Combine(context.OutputPath, "deployment-state.json"), ComposeJson.Json(state), context.CancellationToken).ConfigureAwait(false);
280context with { OutputPath = Path.Combine(context.OutputPath, ServiceName(Name)) } : context;
NativeIntegrations.DockerCompose.AppHost.Sample (2)
NuGet.Build.Tasks (11)
NuGet.Build.Tasks.Console (5)
NuGet.Build.Tasks.Pack (15)
NuGet.CommandLine.XPlat (3)
NuGet.Commands (28)
NuGet.Common (27)
NuGet.Configuration (15)
Settings\Settings.cs (10)
592var defaultSettingsFilePath = Path.Combine(userSettingsDir, DefaultSettingsFileName);
624Path.Combine(rootDirectory, configFileName));
638? Path.Combine(rootDirectory, "TestingGlobalPath")
644return Path.Combine(userSettingsDirectory, ConfigurationConstants.Config);
728var fullPath = Path.Combine(root ?? string.Empty, settingsPath);
784var rawPath = Path.Combine(originDirectoryPath, ResolvePath(Path.GetDirectoryName(originFilePath)!, path));
818return Path.Combine(Path.GetPathRoot(configDirectory)!, value.Substring(1));
820return Path.Combine(configDirectory, value);
831settingsPath = Path.Combine(settingsRoot, settingsPath);
880var file = Path.Combine(directory, nugetConfigCasing);
NuGet.PackageManagement (27)
NuGet.Packaging (31)
NuGet.ProjectModel (6)
NuGet.Protocol (20)
Pipelines.Library (2)
PresentationBuildTasks (4)
PresentationCore (4)
PresentationFramework (2)
PresentationUI (2)
ProjectResourceExtensions.AppHost (1)
RepoTasks (14)
Roslyn.Diagnostics.Analyzers (5)
rzc (18)
sdk-tasks (19)
SelectTests (4)
Stress.ApiService (2)
Stress.AppHost (12)
CommandResources.cs (12)
500var processCommandScriptsDirectory = Path.Combine(builder.AppHostDirectory, "process-command-scripts");
501var processCommandStdinScriptPath = Path.Combine(processCommandScriptsDirectory, "stdin.js");
502var processCommandEnvironmentScriptPath = Path.Combine(processCommandScriptsDirectory, "environment.js");
503var processCommandWorkingDirectoryScriptPath = Path.Combine(processCommandScriptsDirectory, "working-directory.js");
504var processCommandStderrFailureScriptPath = Path.Combine(processCommandScriptsDirectory, "stderr-failure.js");
505var processCommandOutputLimitScriptPath = Path.Combine(processCommandScriptsDirectory, "output-limit.js");
506var processCommandBackupRestoreScriptPath = Path.Combine(processCommandScriptsDirectory, "backup-restore.js");
507var processCommandContainerExecScriptPath = Path.Combine(processCommandScriptsDirectory, "container-exec.js");
508var processCommandSampleBackupPath = Path.Combine(processCommandScriptsDirectory, "sample-backup.dump");
510var processCommandCSharpArgumentsAndStdinAppPath = Path.Combine(processCommandFileAppsDirectory, "arguments-and-stdin.cs");
511var processCommandCSharpWorkingDirectoryFailureAppPath = Path.Combine(processCommandFileAppsDirectory, "working-directory-failure.cs");
512var processCommandIssueToolAppPath = Path.Combine(processCommandFileAppsDirectory, "issue-tool.cs");
SuperFileCheck (3)
System.CodeDom (1)
System.ComponentModel.Composition (1)
System.Configuration.ConfigurationManager (12)
System.Diagnostics.EventLog (4)
System.Diagnostics.PerformanceCounter (1)
System.Diagnostics.Process (1)
System.Diagnostics.TextWriterTraceListener (1)
System.Formats.Tar (4)
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 (20)
System.Private.Xml (3)
System.Reflection.MetadataLoadContext (1)
testhost (3)
testhost.arm64 (3)
testhost.x86 (3)
vbc (7)
VBCSCompiler (24)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (16)
152var cachedAssemblyPath = Path.Combine(entryDir, AssemblyFileName);
205return !File.Exists(Path.Combine(entryDir, cachedFileName));
215copyAndUpdateTimestamp(Path.Combine(entryDir, cachedFileName), targetPath, outputTimestampUtc);
242var dllCacheDir = Path.Combine(_cachePath, dllName);
268var keyPath = Path.Combine(entryPath, dllName + ".key");
302var dllCacheDir = Path.Combine(_cachePath, dllName);
322stagingDir = Path.Combine(dllCacheDir, hashKey + "." + Guid.NewGuid().ToString("N") + ".tmp");
325File.Copy(outputFiles.AssemblyPath, Path.Combine(stagingDir, AssemblyFileName), overwrite: false);
327tryCopyOptional(outputFiles.PdbPath, Path.Combine(stagingDir, PdbFileName));
328tryCopyOptional(outputFiles.RefAssemblyPath, Path.Combine(stagingDir, RefAssemblyFileName));
329tryCopyOptional(outputFiles.XmlDocPath, Path.Combine(stagingDir, XmlDocFileName));
331File.WriteAllText(Path.Combine(stagingDir, dllName + ".key"), deterministicKey, Encoding.UTF8);
332File.WriteAllText(Path.Combine(stagingDir, CreatedFileName), DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture));
459var path = Path.Combine(entryDir, LastUsedFileName);
555var lastUsedPath = Path.Combine(entryDir, LastUsedFileName);
583var createdPath = Path.Combine(entryDir, CreatedFileName);
vbi (1)
vstest.console (8)
vstest.console.arm64 (8)
Yarp.AppHost (1)