12757 references to Combine
AnalyzeCiFailure (38)
AnalysisCommands.cs (1)
238resolved = Path.Combine(resolved, part);
AnalysisDiagnostics.cs (2)
44_progressFile = Path.Combine(directory, "progress.log"); 211await File.WriteAllTextAsync(Path.Combine(directory, "summary.json"), text);
AnalysisInvocation.cs (4)
17internal string DiagnosticsDirectory => Path.Combine(RootDirectory, "diagnostics"); 21Scratch = new AnalysisScratchWorkspace(Path.Combine(RootDirectory, "scratch")); 22Evidence = new EvidencePaths(Path.Combine(RootDirectory, "evidence")); 23Replay = new EvidencePaths(Path.Combine(RootDirectory, "replay"));
AnalysisPublisher.cs (3)
264var bodyPath = Path.Combine(_requestDirectory, $"{cause.Id}.issue-body.md"); 521var file = Path.Combine(_requestDirectory, "analysis-comment.md"); 522var request = Path.Combine(_requestDirectory, "analysis-comment-request.json");
AnalysisScratch.cs (4)
22internal string HistoryCheckout => Path.Combine(RootDirectory, "history-checkout"); 23internal string Archives => Path.Combine(RootDirectory, "archives"); 24internal string Results => Path.Combine(RootDirectory, "extracted-results"); 25internal string Requests => Path.Combine(RootDirectory, "requests");
CauseHistoryStore.cs (4)
76=> Directory.Exists(Path.Combine(directory, "causes")) 77? Directory.EnumerateFiles(Path.Combine(directory, "causes"), "*.json") : []; 81Directory.CreateDirectory(Path.Combine(directory, "runs")); 82Directory.CreateDirectory(Path.Combine(directory, "causes"));
EvidencePackageStore.cs (3)
15TransientJson.ReadUtf8<AnalysisProposal>(File.ReadAllBytes(Path.Combine(analysisDirectory, "proposal.json"))), 26var path = Path.Combine(paths.RootDirectory, name); 32var path = Path.Combine(paths.RootDirectory, name);
EvidencePreparation.cs (3)
177.Concat(Directory.Exists(Path.Combine(paths.RootDirectory, "diagnostics")) 178? Directory.GetFiles(Path.Combine(paths.RootDirectory, "diagnostics")) : []); 322await File.WriteAllTextAsync(Path.Combine(invocation.Evidence.RootDirectory, "limited-analysis.md"), report, ct);
Models\EvidencePaths.cs (5)
13public string Bundle { get; } = Path.Combine(rootDirectory, "evidence.json"); 14public string Outcome { get; } = Path.Combine(rootDirectory, "collection-outcome.json"); 28public string Summary { get; } = Path.Combine(rootDirectory, "analysis-summary.md"); 30public string Manifest { get; } = Path.Combine(rootDirectory, "manifest.json"); 34public string PriorCause(string fileName) => Path.Combine(PriorCausesDirectory, fileName); internal static bool IsDiagnosisContextJson(string name)
RecoveryCaptureWriter.cs (3)
26await File.WriteAllTextAsync(Path.Combine(directory, "collection-outcome.json"), TransientJson.Write(progress.CreateOutcome(status))); 117Path.Combine(directory, "manifest.json"), 154var path = Path.Combine(directory, name);
TestFailureReader.cs (1)
65var directory = Path.Combine(resultsDirectory, artifactId.ToString(System.Globalization.CultureInfo.InvariantCulture));
TestResultArchiveExtractor.cs (2)
70var staging = Path.Combine(parent, "." + Path.GetFileName(outputDirectory) + "-" + Guid.NewGuid().ToString("N")); 110var destination = Path.Combine(staging, $"{++index:D5}.{(format == "trx" ? "trx" : "json")}");
tools\Aspire.TestTools\ProcessRunner.cs (1)
24fileName = searchPath.Split(Path.PathSeparator).Select(path => Path.Combine(path, searchName))
WorkflowRunEvidenceCollector.cs (2)
718var zipPath = Path.Combine(zipDirectory, artifactId + ".zip"); 746Path.Combine(_scratch.Results, artifactId),
AnalyzeCiFailure.TestHost (5)
tests\AnalyzeCiFailure.Tests\TestServices\GitHubFixtureHandler.cs (5)
26Path.Combine(workingDirectory, "http-calls.log"), 42Path.Combine(workingDirectory, "http-requests.jsonl"), 60if (File.Exists(Path.Combine(workingDirectory, "existing-main-label"))) 247var directory = Directory.CreateDirectory(Path.Combine(workingDirectory, "http-fixture-requests")); 248var file = Path.Combine(directory.FullName, $"{++_sequence}.request");
AnalyzeCiFailure.Tests (859)
AnalyzeCiFailureAlternateWorkflowTests.cs (19)
298Assert.Single(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))); 311await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 336var responses = Directory.CreateDirectory(Path.Combine(_workspace.Path, "responses")).FullName; 337var zip = Path.Combine(responses, "alternate.zip"); 365Path.Combine(responses, "run.json"), 375Path.Combine(responses, "jobs.json"), 384Path.Combine(responses, "artifacts.json"), 407var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "artifacts.json")))!; 411var secondZip = Path.Combine(responses, "secondary.zip"); 438var finalZip = Path.Combine(responses, "final.zip"); 450await File.WriteAllTextAsync(Path.Combine(responses, "artifacts.json"), pages.ToJsonString()); 454var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "artifacts.json")))!; 456await File.WriteAllTextAsync(Path.Combine(responses, "artifacts.json"), pages.ToJsonString()); 465var jobs = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!; 473await File.WriteAllTextAsync(Path.Combine(responses, "jobs.json"), jobs.ToJsonString()); 476var secondaryZip = Path.Combine(responses, "secondary.zip"); 481var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "artifacts.json")))!; 490await File.WriteAllTextAsync(Path.Combine(responses, "artifacts.json"), pages.ToJsonString()); 520Assert.Equal(0, (await RunProcessAsync("git", ["--no-pager", "remote", "add", "origin", Path.Combine(_workspace.Path, "remote.git")])).ExitCode);
AnalyzeCiFailureArtifactSelectionTests.cs (2)
195var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 196var jobsPath = Path.Combine(_workspace.Path, "jobs.json");
AnalyzeCiFailureBestEffortTests.cs (8)
48var root = Path.Combine(_workspace.Path, "partial-results"); 49var directory = Directory.CreateDirectory(Path.Combine(root, "10")).FullName; 50await File.WriteAllTextAsync(Path.Combine(directory, "00001.trx"), FrameworkResult("Tests.First", "first", "first")); 51await File.WriteAllTextAsync(Path.Combine(directory, "00002.trx"), "malformed"); 52await File.WriteAllTextAsync(Path.Combine(directory, "00003.trx"), FrameworkResult("Tests.Last", "last", "last")); 77var archivePath = Path.Combine(_workspace.Path, "failed-expansion.zip"); 87Path.Combine(_workspace.Path, "first"), 95Path.Combine(_workspace.Path, "second"),
AnalyzeCiFailureBootstrapTests.cs (11)
16var seed = Directory.CreateDirectory(Path.Combine(_workspace.Path, "seed")).FullName; 25var target = Path.Combine(seed, relative); 27File.Copy(Path.Combine(RepoRoot.Path, relative), target); 41var hostile = Directory.CreateDirectory(Path.Combine(_workspace.Path, "hostile")).FullName; 43Path.Combine(hostile, "Directory.Build.props"), 46Path.Combine(hostile, "Directory.Build.targets"), 49Path.Combine(hostile, "Directory.Packages.props"), 51var checkout = Path.Combine(hostile, "checkout"); 80await File.WriteAllTextAsync(Path.Combine(results, "00001.trx"), "<TestRun><Results/></TestRun>"); 96"replay", "--evidence-dir", Path.Combine(checkout, "ci-failure-analysis/evidence"), "--working-dir", checkout], 102await File.ReadAllTextAsync(Path.Combine(replayDirectory, "analysis-summary.md")),
AnalyzeCiFailureBranchHistoryTests.cs (1)
46Path.Combine(_workspace.Path, "history-branch-calls.log"))),
AnalyzeCiFailureCohesionTests.cs (5)
20var output = Path.Combine(_workspace.Path, "workflow-output"); 39Assert.True(File.Exists(Path.Combine(invocation.RecoveryDirectory("collection"), "manifest.json"))); 46var input = new EvidencePaths(Path.Combine(_workspace.Path, "input")); 135var summary = Path.Combine(_workspace.Path, "summary.md"); 162Assert.Equal(bytes, await File.ReadAllBytesAsync(Path.Combine(EvidenceDirectory, "limited-analysis.md")));
AnalyzeCiFailureCollectionTests.cs (88)
24var evidence = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json")))!; 28Assert.Contains("analysis_ready=false", await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output"))); 42Assert.Contains("analysis_ready=false", await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output"))); 43var evidence = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json")))!; 55var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 57var json = await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json")); 78Path.Combine(EvidenceDirectory, "collection-outcome.json")))!; 80Assert.False(File.Exists(Path.Combine(EvidenceDirectory, "evidence.json"))); 115Path.Combine(EvidenceDirectory, "collection-outcome.json")))!; 119var pathOutputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "invocation-paths")); 137var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 148await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "require-final-outputs"), ""); 153var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 171var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 178await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))); 183Path.Combine(EvidenceDirectory, "evidence.json")))!; 198Path.Combine(directory, "collection-outcome.json"), 200await File.WriteAllTextAsync(Path.Combine(directory, "analysis-summary.md"), "Previous run"); 201await File.WriteAllTextAsync(Path.Combine(directory, "evidence.json"), """{"test_evidence":{"state":"unavailable"}}"""); 208Path.Combine(EvidenceDirectory, "collection-outcome.json")))!; 210var pathOutputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 228Path.Combine(_workspace.Path, "workflow-output"), 232await Verifier.Verify(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "workflow-output")), "txt") 250Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 264Assert.True(File.Exists(Path.Combine(EvidenceDirectory, "evidence.json"))); 265Assert.False(File.Exists(Path.Combine(_workspace.Path, "workflow-output"))); 272var outputDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "output-is-directory")).FullName; 283Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 302Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 311await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-outcome-write"), ""); 335var paths = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 359var job = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray())!; 369Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>()); 370var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!; 373Assert.True(File.Exists(Path.Combine(data, "analysis-summary.md"))); 374var annotations = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/annotations-77.json")))!.AsArray(); 379Assert.Contains("Failed to fetch complete logs for job 77", await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/job-77.log")), StringComparison.Ordinal); 396Assert.False(File.Exists(Path.Combine(EvidenceDirectory, "evidence.json"))); 397Assert.False(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json")))!["has_work"]!.GetValue<bool>()); 406var jobs = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "diagnostics/failed-jobs.json")))!.AsArray(); 409Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json")))!["has_work"]!.GetValue<bool>()); 420var job = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray())!; 423Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>()); 424Assert.Equal("not-applicable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["state"]!.GetValue<string>()); 425Assert.Empty(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["failures"]!.AsArray()); 436var job = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray())!; 439Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>()); 440Assert.Equal("not-applicable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["state"]!.GetValue<string>()); 441Assert.Empty(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!["failures"]!.AsArray()); 452var bundle = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!; 462var jobs = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json")))!.AsArray(); 464var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 469Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "collection-outcome.json")))!["has_work"]!.GetValue<bool>()); 470Assert.Contains("Error: token=[REDACTED]", await File.ReadAllTextAsync(Path.Combine(data, "diagnostics/job-77.log")), StringComparison.Ordinal); 486Assert.True(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json")))!["has_work"]!.GetValue<bool>()); 510var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!; 513Assert.True(File.Exists(Path.Combine(data, "analysis-summary.md"))); 526var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!["test_evidence"]!; 548Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 560await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))); 573var bundle = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json")))!; 585var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 597var log = await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "diagnostics/job-77.log")); 614var bundle = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json")))!; 618var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 631var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray(); 648var responses = Directory.CreateDirectory(Path.Combine(_workspace.Path, "responses")).FullName; 673await File.WriteAllTextAsync(Path.Combine(responses, "run.json"), run.ToJsonString()); 675Path.Combine(responses, "jobs.json"), 682var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!; 698await File.WriteAllTextAsync(Path.Combine(responses, "jobs.json"), pages.ToJsonString()); 702var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!; 740await File.WriteAllTextAsync(Path.Combine(responses, "jobs.json"), pages.ToJsonString()); 744var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!.AsArray(); 753await File.WriteAllTextAsync(Path.Combine(responses, "jobs.json"), pages.ToJsonString()); 757await File.WriteAllTextAsync(Path.Combine(responses, "jobs.json"), """[{"jobs":[null,5]}]"""); 759var zip = Path.Combine(responses, "results.zip"); 828var otherZip = Path.Combine(responses, "other.zip"); 839var pages = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(responses, "jobs.json")))!; 852await File.WriteAllTextAsync(Path.Combine(responses, "jobs.json"), pages.ToJsonString()); 855Path.Combine(responses, "artifacts.json"), 936Path.Combine(_workspace.Path, scenario == "history-transport" ? "missing.git" : "remote.git")])).ExitCode); 942Path.Combine(causes, "keyless-infra.json"), 945Path.Combine(causes, "opaque-test.json"), 950await File.WriteAllBytesAsync(Path.Combine(causes, name), HistoricalAttachmentBytes(scenario == "stored-history-utf16")); 984["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "workflow-output"), 985["INVOCATION_PATHS"] = useWorkflowAdapter ? Path.Combine(_workspace.Path, "workflow-output") : Path.Combine(_workspace.Path, "invocation-paths"),
AnalyzeCiFailureCSharpRerunTests.cs (7)
87var analysis = Directory.CreateDirectory(Path.Combine(_workspace.Path, "proposal")).FullName; 88await File.WriteAllTextAsync(Path.Combine(data, "evidence.json"), TransientJson.Write(evidence)); 89await File.WriteAllTextAsync(Path.Combine(analysis, "proposal.json"), TransientJson.Write(proposal)); 92Path.Combine(analysis, "accepted.json"), 100var output = Path.Combine(_workspace.Path, "agent-output.json"); 159var calls = File.Exists(Path.Combine(_workspace.Path, "rerun-calls.log")) 160? await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "rerun-calls.log")) : [];
AnalyzeCiFailureDiagnosticsTests.cs (19)
22var outcome = TransientJson.Read<AnalysisOutcome>(File.ReadAllText(Path.Combine(EvidenceDirectory, "collection-outcome.json"))); 34Assert.True(File.Exists(Path.Combine(RecoveryDirectory("collection"), "manifest.json"))); 51Assert.False(File.Exists(Path.Combine(EvidenceDirectory, "evidence.json"))); 54File.ReadAllLines(Path.Combine(_workspace.Path, "workflow-output"))); 75File.Delete(Path.Combine(_workspace.Path, "first-issue-published")); 79"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")], 94var recovery = JsonNode.Parse(File.ReadAllText(Path.Combine(RecoveryDirectory("publication"), "manifest.json")))!; 100Assert.False(Directory.Exists(Path.Combine(_invocationDirectory!, "scratch"))); 108Directory.CreateDirectory(Path.Combine(invocation.RootDirectory, "recovery")); 131var input = Directory.CreateDirectory(Path.Combine(_workspace.Path, "invalid-replay")).FullName; 132await File.WriteAllTextAsync(Path.Combine(input, "evidence.json"), "{}"); 136Assert.Equal("{}", File.ReadAllText(Path.Combine(input, "evidence.json"))); 137var manifest = JsonNode.Parse(File.ReadAllText(Path.Combine(RecoveryDirectory("replay"), "manifest.json")))!; 145Directory.CreateDirectory(Path.Combine(_workspace.Path, "eng")); 194var text = File.ReadAllText(Path.Combine(invocation.DiagnosticsDirectory, "summary.json")); 217var text = File.ReadAllText(Path.Combine(invocation.DiagnosticsDirectory, "summary.json")); 231await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "comment-response"), response); 252var output = Directory.CreateDirectory(Path.Combine(_workspace.Path, "not-an-output-file")).FullName; 261var summary = JsonNode.Parse(File.ReadAllText(Path.Combine(invocation.DiagnosticsDirectory, "summary.json")))!;
AnalyzeCiFailureEvidenceTests.cs (22)
53var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 54var file = Path.Combine(directory, "analysis-result.json"); 122var file = Path.Combine(_workspace.Path, "typed-test-failures.json"); 144var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 145var proposalPath = Path.Combine(directory, "proposal.json"); 150var output = Path.Combine(_workspace.Path, "accepted.json"); 226await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, "diagnostics/pr-metadata.json"), "not JSON"); 239await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, "diagnostics/pr-metadata.json"), "not JSON"); 241Path.Combine(_workspace.Path, "issue-details.json"), 268var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 269var summaryPath = Path.Combine(analysisDirectory, "analysis-result.json"); 283await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, name), "not JSON"); 291await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 306await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "invalidate-evidence-on-lookup"), ""); 319["issue"] = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), 320["comment"] = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 346var output = Path.Combine(_workspace.Path, "summary.json"); 373var capture = Path.Combine(EvidenceDirectory, "diagnostics/run.json"); 375var output = Path.Combine(_workspace.Path, "summary.json"); 387var file = Path.Combine(_workspace.Path, "jobs.json"); 410var output = Path.Combine(_workspace.Path, "summary.json"); 432var output = Path.Combine(_workspace.Path, "summary.json");
AnalyzeCiFailureFixtures.cs (7)
79var root = Path.Combine(workingDirectory, "ci-failure-analysis/evidence"); 80var output = Path.Combine(workingDirectory, "ci-analysis-output"); 83var path = Path.Combine( 91var report = CiFailureJson.Read(Path.Combine(output, "analysis-result.json"))!; 121var prior = Directory.Exists(Path.Combine(root, "history/causes")) 122? Directory.GetFiles(Path.Combine(root, "history/causes"), "*.json").ToImmutableDictionary( 183var causesDirectory = Path.Combine(output, "causes");
AnalyzeCiFailureGitTests.cs (20)
17var bin = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-git")).FullName; 18var started = Path.Combine(_workspace.Path, "head-started"); 19var released = Path.Combine(_workspace.Path, "head-released"); 21Path.Combine(bin, "git"), 44var commit = store.CommitAndPushAsync("123", [Path.Combine(_workspace.Path, "causes/test.json")]); 64await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "git-operations"))); 72var directory = Path.Combine(_workspace.Path, "memory checkout"); 77Assert.Equal("second", await File.ReadAllTextAsync(Path.Combine(directory, "stored-history.json"))); 87var directory = Path.Combine(_workspace.Path, "memory checkout"); 101Assert.Equal("second", await File.ReadAllTextAsync(Path.Combine(directory, "stored-history.json"))); 126var directory = Path.Combine(_workspace.Path, "memory checkout"); 151await File.WriteAllTextAsync(Path.Combine(directory, "--cause.json"), "history"); 152await File.WriteAllTextAsync(Path.Combine(directory, "operator-notes.txt"), "unstaged notes"); 170Assert.Equal("unstaged notes", await File.ReadAllTextAsync(Path.Combine(directory, "operator-notes.txt"))); 179var fakeBin = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName; 181Path.Combine(fakeBin, "git"), 206var directory = Path.Combine(_workspace.Path, "history-checkout"); 207var notes = Path.Combine(_workspace.Path, "operator-notes.txt"); 220var remoteDirectory = Path.Combine(_workspace.Path, "remote repository.git"); 237await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "stored-history.json"), contents);
AnalyzeCiFailureIdentifierPrecisionTests.cs (1)
29var outputPath = Path.Combine(_workspace.Path, "last-success.json");
AnalyzeCiFailureInvocationTests.cs (27)
19var evidence = Directory.CreateDirectory(Path.Combine(_workspace.Path, "saved-evidence")).FullName; 20var proposal = Directory.CreateDirectory(Path.Combine(_workspace.Path, "saved-proposal")).FullName; 21var alias = Path.Combine(_workspace.Path, "evidence-alias"); 24var checkout = Path.Combine(historyThroughLink ? alias : evidence, "history-checkout"); 49var outputs = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "workflow-output")); 55Assert.True(File.Exists(Path.Combine(evidence, "collection-outcome.json"))); 56Assert.True(File.Exists(Path.Combine(diagnostics, "summary.json"))); 57Assert.False(Directory.Exists(Path.Combine(workspace, "scratch"))); 58Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "ci-failure-data"))); 61Assert.True(File.Exists(Path.Combine(evidence, "evidence.json"))); 62Assert.True(File.Exists(Path.Combine(evidence, "analysis-summary.md"))); 65Assert.Equal(recoveryExpected, File.Exists(Path.Combine(recovery, "manifest.json"))); 153await File.WriteAllTextAsync(Path.Combine(firstRoot, "operator-note.txt"), "keep"); 161Assert.Equal("keep", await File.ReadAllTextAsync(Path.Combine(firstRoot, "operator-note.txt"))); 163Assert.False(Directory.Exists(Path.Combine(firstRoot, "scratch"))); 164Assert.False(Directory.Exists(Path.Combine(secondRoot, "scratch"))); 173var saved = Directory.CreateDirectory(Path.Combine(_workspace.Path, "earlier-replay")).FullName; 175await File.WriteAllTextAsync(Path.Combine(saved, "evidence.json"), original); 176var linkedInput = Path.Combine(_workspace.Path, "linked-evidence"); 183Assert.Equal(original, await File.ReadAllTextAsync(Path.Combine(saved, "evidence.json"))); 184Assert.Equal(!invalid, File.Exists(Path.Combine(output, "analysis-summary.md"))); 195await File.WriteAllTextAsync(Path.Combine(invocation.Scratch.Requests, "request.json"), "discard"); 208var output = Path.Combine(_workspace.Path, "workflow-output"); 211await File.WriteAllTextAsync(Path.Combine(invocation.Scratch.Results, "failed.trx"), "current report"); 234var evidence = Directory.CreateDirectory(Path.Combine(_workspace.Path, "input-evidence")).FullName; 235var proposal = Directory.CreateDirectory(Path.Combine(_workspace.Path, "input-proposal")).FullName; 239"--history-dir", Path.Combine(input == "evidence" ? evidence : proposal, "history-checkout")]);
AnalyzeCiFailureMigrationTests.cs (47)
74var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(root, "collection-outcome.json"))); 78Assert.False(File.Exists(Path.Combine(root, "evidence.json"))); 95"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 112var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root, "history/cause-index.json")))!.AsArray(); 122var bundle = TransientJson.Read<EvidenceBundle>(await File.ReadAllTextAsync(Path.Combine(root, "evidence.json"))); 129var regeneratedIndex = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root, "history/cause-index.json")))!.AsArray(); 196Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(root, name))!); 197await File.WriteAllTextAsync(Path.Combine(root, name), "previous invocation"); 201Assert.All(stale, name => Assert.Equal("previous invocation", File.ReadAllText(Path.Combine(root, name)))); 203var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json"))); 216var bundle = TransientJson.Read<EvidenceBundle>(await File.ReadAllTextAsync(Path.Combine(root, "evidence.json"))); 219var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(root, "collection-outcome.json"))); 242var file = Path.Combine(_workspace.Path, "job-123.log"); 326Path.Combine(_workspace.Path, "issue.json"), 336var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 351Path.Combine(_workspace.Path, "issue.json"), 362await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 404Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 417await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-issue-create-once"), ""); 418await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "seed-unselected-malformed"), ""); 435await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, "evidence.json"), TransientJson.Write(evidence)); 455Assert.True(File.Exists(Path.Combine(_workspace.Path, "pr-comment.md"))); 467var agent = Path.Combine(_workspace.Path, "ci-analysis-output"); 468await File.WriteAllTextAsync(Path.Combine(agent, "evidence.json"), "not trusted evidence"); 469await File.WriteAllTextAsync(Path.Combine(agent, "ci-validation-result.json"), """{"verdict":"transient-infra"}"""); 476Path.Combine(EvidenceDirectory, "evidence.json"), 481await File.WriteAllTextAsync(Path.Combine(agent, "proposal.json"), rejectedText); 484Assert.Equal(rejectedText, await File.ReadAllTextAsync(Path.Combine(agent, "proposal.json"))); 492var agent = Path.Combine(_workspace.Path, "ci-analysis-output"); 493var inside = Path.Combine(agent, "planted-result.json"); 507var transferred = Directory.CreateDirectory(Path.Combine(_workspace.Path, "transferred")).FullName; 508var data = Directory.CreateDirectory(Path.Combine(transferred, "ci-failure-analysis/evidence")).FullName; 512Directory.CreateDirectory(Path.GetDirectoryName(Path.Combine(data, name))!); 513File.Copy(Path.Combine(source, name), Path.Combine(data, name)); 515var evidence = TransientJson.Read<EvidenceBundle>(await File.ReadAllTextAsync(Path.Combine(data, "evidence.json"))); 533var agent = Directory.CreateDirectory(Path.Combine(_workspace.Path, "agent-artifact")).FullName; 534await File.WriteAllTextAsync(Path.Combine(agent, "proposal.json"), TransientJson.Write(proposal)); 537var remote = Path.Combine(transferred, "remote.git"); 538var memory = Path.Combine(transferred, "history-checkout"); 576Assert.False(Directory.Exists(Path.Combine(data, "test-results"))); 619var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(root, "collection-outcome.json"))); 685var outcome = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(root, "collection-outcome.json")))!; 690var bundle = TransientJson.Read<EvidenceBundle>(await File.ReadAllTextAsync(Path.Combine(root, "evidence.json"))); 694Assert.True(File.Exists(Path.Combine(root, "analysis-summary.md"))); 695Assert.False(File.Exists(Path.Combine(root, "run-context.json"))); 696Assert.False(File.Exists(Path.Combine(root, "test-failures.json")));
AnalyzeCiFailureOccurrenceTests.cs (7)
150var path = Path.Combine(_workspace.Path, "issue-body.md"); 166var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 175Path.Combine(_workspace.Path, "issue.json"), 185Path.Combine(EvidenceDirectory, "diagnostics/failed-jobs.json"), 187var trustedPath = Path.Combine(EvidenceDirectory, "test-failures.json"); 207Path.Combine(EvidenceDirectory, "run-context.json"), 209var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh");
AnalyzeCiFailureOverflowTests.cs (14)
42var record = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo/runs/123.json")))!; 50var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 64await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-overflow-comment-once"), ""); 67var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 72var issuePath = Path.Combine(_workspace.Path, "issue.json"); 76var pagesPath = Path.Combine(_workspace.Path, "overflow-comments.json"); 95Assert.Contains("Operator issue notes.", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), StringComparison.Ordinal); 112var path = Path.Combine(_workspace.Path, "issue.json"); 136var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 151await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, "diagnostics/failed-jobs.json"), """[{"id":456,"name":"Replacement job"}]"""); 152var path = Path.Combine(_workspace.Path, "ci-analysis-output/analysis-result.json"); 156foreach (var file in Directory.GetFiles(Path.Combine(_workspace.Path, "ci-analysis-output/causes"), "*.json")) 162var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 167var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md"));
AnalyzeCiFailurePathsTests.cs (2)
17var workingDirectory = Path.Combine(_workspace.Path, "working directory"); 18var root = Path.Combine(workingDirectory, "ci-failure-analysis/evidence");
AnalyzeCiFailurePreparationTests.cs (75)
25await File.WriteAllTextAsync(Path.Combine(directory, "00001.trx"), "<TestRun><Results/></TestRun>"); 35Path.Combine(directory, "00001.trx"), 105Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo"))); 109var resultFile = Path.Combine(results, "00001.trx"); 164Assert.Equal("unavailable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(paths.RootDirectory, "test-evidence.json")))!["state"]!.GetValue<string>()); 165Assert.False(File.Exists(Path.Combine(paths.RootDirectory, "test-failures.json"))); 189Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo"))); 199await File.WriteAllTextAsync(Path.Combine(results, "00001.trx"), "<TestRun><Results/></TestRun>"); 218var state = AnalyzeCiFailure.CiFailureJson.ReadContract<AnalyzeCiFailureFixtures.TestEvidenceState>(Path.Combine(paths.RootDirectory, "test-evidence.json"))?.State 240failures = AnalyzeCiFailure.TestFailureReader.ConsolidateFailures(AnalyzeCiFailure.TestFailureReader.Read(Path.Combine(paths.RootDirectory, "test-results"), jobs, artifacts)); 246AnalyzeCiFailure.CiFailureJson.WriteContract(Path.Combine(paths.RootDirectory, "test-failures.json"), projection); 251File.Delete(Path.Combine(paths.RootDirectory, "test-failures.json")); 255AnalyzeCiFailure.CiFailureJson.WriteContract(Path.Combine(paths.RootDirectory, "test-evidence.json"), new AnalyzeCiFailureFixtures.TestEvidenceState(state)); 276Path.Combine(data, "diagnostics/selected-test-result-artifacts.json"), 290Path.Combine(EvidenceDirectory, "diagnostics/failed-jobs.json"), 294File.Copy(file, Path.Combine(selected, Path.GetFileName(file))); 297var prepared = Path.Combine(EvidenceDirectory, "test-failures.json"); 310await File.WriteAllTextAsync(Path.Combine(results, "00001.trx"), "<TestRun><Results/></TestRun>"); 312var prior = Directory.CreateDirectory(Path.Combine(data, "history/causes")).FullName; 322Path.Combine(prior, id + ".json"), 336var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray(); 342var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, item["file"]!.GetValue<string>())))!; 357await File.WriteAllTextAsync(Path.Combine(results, "00001.trx"), "<TestRun><Results/></TestRun>"); 359var prior = Directory.CreateDirectory(Path.Combine(data, "history/causes")).FullName; 361Path.Combine(prior, "stored-cause.json"), 367var entry = Assert.Single(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray())!; 379Path.Combine(results, "00001.trx"), 382await File.WriteAllTextAsync(Path.Combine(data, "diagnostics/job-123.log"), "Download failed: HTTP 503 from package feed"); 383var prior = Directory.CreateDirectory(Path.Combine(data, "history/causes")).FullName; 387Path.Combine(prior, $"cause-{i:D3}.json"), 400await File.WriteAllTextAsync(Path.Combine(prior, "z-late.json"), lateCause); 402Path.Combine(prior, "z-keyless.json"), 405Path.Combine(prior, "z-opaque.json"), 408Path.Combine(prior, "z-other-mechanism.json"), 414var index = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "history/cause-index.json")))!.AsArray(); 416Assert.True(new FileInfo(Path.Combine(data, "history/cause-index.json")).Length > 65536); 420Assert.Equal(lateCause, await File.ReadAllTextAsync(Path.Combine(data, late["file"]!.GetValue<string>()))); 426var summary = await File.ReadAllTextAsync(Path.Combine(data, "analysis-summary.md")); 441Path.Combine(directory, "00001.trx"), 458Path.Combine(unselected, "00001.trx"), 464var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!; 481Path.Combine(directory, "00001.trx"), 483var secret = Path.Combine(_workspace.Path, "external.xml"); 488Path.Combine(directory, "00002.trx"), 500File.Delete(Path.Combine(directory, "00001.trx")); 507Assert.False(File.Exists(Path.Combine(data, "test-failures.json"))); 508Assert.Equal("unavailable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(data, "test-evidence.json")))!["state"]!.GetValue<string>()); 509Assert.Contains("Some required test evidence is unavailable", await File.ReadAllTextAsync(Path.Combine(data, "analysis-summary.md")), StringComparison.Ordinal); 522await File.WriteAllTextAsync(Path.Combine(directory, "00001.trx"), trx); 523await File.WriteAllTextAsync(Path.Combine(directory, "00002.trx"), trx); 529var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!.AsArray(); 559var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 674Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo"))); 687var jobsPath = Path.Combine(data, "diagnostics/failed-jobs.json"); 692var trustedPath = Path.Combine(data, "test-failures.json"); 696var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 697var analysisPath = Path.Combine(directory, "analysis-result.json"); 735await File.WriteAllTextAsync(Path.Combine(directory, "00001.trx"), trx); 737await File.WriteAllTextAsync(Path.Combine(second, "00001.trx"), trx); 739Path.Combine(EvidenceDirectory, "diagnostics/failed-jobs.json"), 742Path.Combine(EvidenceDirectory, "diagnostics/selected-test-result-artifacts.json"), 748var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!.AsArray(); 766await File.WriteAllTextAsync(Path.Combine(directory, "00001.trx"), $"<TestRun><Results>{FrameworkTrx("same-execution", "first")}</Results></TestRun>"); 769await File.WriteAllTextAsync(Path.Combine(directory, "00002.trx"), $"<TestRun><Results>{second}</Results></TestRun>"); 775Assert.Equal("unavailable", JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-evidence.json")))!["state"]!.GetValue<string>()); 776Assert.False(File.Exists(Path.Combine(EvidenceDirectory, "test-failures.json"))); 791await File.WriteAllTextAsync(Path.Combine(directory, "00001.trx"), $"<TestRun><Results>{first}</Results></TestRun>"); 792await File.WriteAllTextAsync(Path.Combine(directory, "00002.trx"), $"<TestRun><Results>{second}</Results></TestRun>"); 795await File.WriteAllTextAsync(Path.Combine(directory, "00003.trx"), $"<TestRun><Results>{first}{second}</Results></TestRun>"); 799var failures = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json")))!.AsArray(); 800var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 801var summaryPath = Path.Combine(analysisDirectory, "analysis-result.json"); 833Path.Combine(directory, "00001.json"), 839var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 840var summaryPath = Path.Combine(analysisDirectory, "analysis-result.json");
AnalyzeCiFailureProgressTests.cs (8)
21var path = Path.Combine(invocation.DiagnosticsDirectory, "progress.log"); 32Assert.False(File.Exists(Path.Combine(invocation.DiagnosticsDirectory, "summary.json"))); 54await File.ReadAllTextAsync(Path.Combine(Path.GetDirectoryName(DiagnosticSummary)!, "progress.log"))); 62var path = Path.Combine(invocation.DiagnosticsDirectory, "progress.log"); 72var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(invocation.DiagnosticsDirectory, "summary.json")))!; 92var path = Path.Combine(invocation.DiagnosticsDirectory, "progress.log"); 97var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(invocation.DiagnosticsDirectory, "summary.json")))!; 118var text = await File.ReadAllTextAsync(Path.Combine(Path.GetDirectoryName(DiagnosticSummary)!, "progress.log"));
AnalyzeCiFailurePublicationTests.cs (103)
23await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "existing-main-label"), ""); 50await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "issue.json"), "[null,5]"); 56var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 71var memoryDirectory = Path.Combine(_workspace.Path, "memory-repo"); 76Path.Combine(_workspace.Path, "analysis"), 118var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 119var path = Path.Combine(directory, "analysis-result.json"); 153await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, "test-failures.json"), collected.ToJsonString()); 218await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "issue-details.json"), issue.ToJsonString()); 221await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "issue-lookup-failure"), ""); 245var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 268Path.Combine(_workspace.Path, "comments.json"), 273await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "close-after-lookup"), ""); 293var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 307var request = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "published-comment-request.json")))!; 315await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 332await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 359var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 361Assert.False(File.Exists(Path.Combine(_workspace.Path, "issue-body.md"))); 382Path.Combine(_workspace.Path, "issue-details.json"), 397Assert.Contains("new operator note.", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), StringComparison.Ordinal); 398var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 415Path.Combine(data, "run-context.json"), 417await File.WriteAllTextAsync(Path.Combine(data, "test-failures.json"), "[]"); 418await File.WriteAllTextAsync(Path.Combine(data, "diagnostics/last-successful-main-run.json"), """{"id":100,"head_sha":"last-successful-sha","created_at":""}"""); 419var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 420var summaryPath = Path.Combine(analysis, "analysis-result.json"); 459var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 477var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 503Path.Combine(data, "diagnostics/failed-jobs.json"), 505var trustedPath = Path.Combine(data, "test-failures.json"); 510var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 511var summaryPath = Path.Combine(analysis, "analysis-result.json"); 526var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 535var path = Path.Combine(EvidenceDirectory, "test-failures.json"); 564var dataPath = Path.Combine(EvidenceDirectory, "test-failures.json"); 587Assert.InRange(System.Text.Encoding.UTF8.GetByteCount(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md"))), 1, 65000); 635var updated = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 666Assert.False(File.Exists(Path.Combine(_workspace.Path, "issue-body.md"))); 667var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 674var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue.json")))!; 687var data = Path.Combine(EvidenceDirectory, "test-failures.json"); 694var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 695var summaryPath = Path.Combine(analysis, "analysis-result.json"); 734var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 735var summaryPath = Path.Combine(analysis, "analysis-result.json"); 737var trustedPath = Path.Combine(data, "test-failures.json"); 744Path.Combine(data, "diagnostics/failed-jobs.json"), 768var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 774Path.Combine(_workspace.Path, "issue.json"), 782foreach (var file in new[] { Path.Combine(data, "run-context.json"), Path.Combine(data, "diagnostics/run.json"), summaryPath }) 792var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 797var updated = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 824Assert.False(File.Exists(Path.Combine(_workspace.Path, "issue-body.md"))); 825var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 827var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue.json")))!; 838var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 847Path.Combine(_workspace.Path, "issue.json"), 856var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 891await File.WriteAllTextAsync(Path.Combine(causes, "debugger-timeout.json"), history.ToJsonString()); 893if (File.Exists(Path.Combine(_workspace.Path, "seed-unselected-malformed"))) 896await File.WriteAllTextAsync(Path.Combine(causes, "unselected.json"), "not JSON"); 901Path.Combine(_workspace.Path, "issue.json"), 1015"--evidence-dir", EvidenceDirectory, "--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output"), 1016"--history-dir", Path.Combine(_workspace.Path, "memory-repo"), "--repo", "microsoft/aspire", 1026var checkout = Path.Combine(_workspace.Path, "memory-repo"); 1027var remote = Path.Combine(_workspace.Path, "remote.git"); 1041var files = new[] { "causes", "runs" }.SelectMany(name => Directory.Exists(Path.Combine(checkout, name)) 1042? Directory.GetFiles(Path.Combine(checkout, name), "*.json") : []).ToArray(); 1094var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1100var summaryPath = Path.Combine(analysisDirectory, "analysis-result.json"); 1104await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-second-issue"), ""); 1111Assert.True(File.Exists(Path.Combine(recovery, "manifest.json"))); 1113await File.ReadAllTextAsync(Path.Combine(recovery, "collection-outcome.json"))); 1134Assert.False(File.Exists(Path.Combine(analysisDirectory, $"{id}.issue-body.md"))); 1136Assert.False(File.Exists(Path.Combine(_workspace.Path, "pr-comment.md"))); 1148Path.Combine(EvidenceDirectory, "test-failures.json"), 1152await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, name), "{}"); 1154await File.WriteAllTextAsync(Path.Combine(EvidenceDirectory, "diagnostics/candidate-merges.json"), "[]"); 1206var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1217var summaryPath = Path.Combine(directory, "analysis-result.json"); 1224var evidencePath = Path.Combine(EvidenceDirectory, "test-failures.json"); 1240var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1244var path = Path.Combine(directory, "analysis-result.json"); 1268var evidencePath = Path.Combine(EvidenceDirectory, "test-failures.json"); 1292var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1293var summaryPath = Path.Combine(directory, "analysis-result.json"); 1306await File.WriteAllTextAsync(Path.Combine(data, "diagnostics/failed-jobs.json"), """[{"id":123,"name":"Tests"},{"id":456,"name":"Tests"}]"""); 1307var evidencePath = Path.Combine(data, "test-failures.json"); 1323var prior = Directory.CreateDirectory(Path.Combine(EvidenceDirectory, "history/causes")).FullName; 1325Path.Combine(prior, "debugger-timeout.json"), 1353var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1354var summaryPath = Path.Combine(directory, "analysis-result.json"); 1362var evidencePath = Path.Combine(EvidenceDirectory, "test-failures.json"); 1403Path.Combine(storedDirectory, "debugger-timeout.json"), 1431["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "obsolete-analysis-directory"), 1437"--history-dir", Path.Combine(_workspace.Path, "memory-repo"), "--repo", "microsoft/aspire", 1447await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 1449var storedPath = Path.Combine(storedDirectory, "debugger-timeout.json"); 1461var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 1464Path.Combine(_workspace.Path, "issue.json"), 1481Assert.Contains("Operator notes: keep this.", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), StringComparison.Ordinal);
AnalyzeCiFailureStorageTests.cs (26)
47var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(recovery, "collection-outcome.json"))); 50Assert.False(File.Exists(Path.Combine(EvidenceDirectory, "evidence.json"))); 51using var manifest = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(recovery, "manifest.json"))); 67using var rejected = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(recovery, "rejected-or-degraded-evidence.json"))); 69Assert.True(File.Exists(Path.Combine(recovery, "manifest.json"))); 82await File.WriteAllTextAsync(Path.Combine(scratch.Results, $"{i:D5}.trx"), "malformed"); 88using var manifest = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(directory, "manifest.json"))); 91Assert.Equal(1024, Directory.GetFiles(Path.Combine(directory, "extracted-results")).Length); 101var report = Assert.Single(Directory.GetFiles(Path.Combine(recovery, "extracted-results"), "*.trx", SearchOption.AllDirectories)); 103var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(recovery, "collection-outcome.json"))); 115var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(recovery, "collection-outcome.json"))); 139await File.WriteAllTextAsync(Path.Combine(scratch.Results, "failed.trx"), "<error>token=private-value</error>"); 140await File.WriteAllTextAsync(Path.Combine(scratch.Results, "oversized.trx"), new string('x', AnalysisDiagnostics.MaximumFileBytes + 1)); 157using var manifest = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(directory, "manifest.json"))); 161Assert.Equal("<error>token=private-value</error>", await File.ReadAllTextAsync(Path.Combine(scratch.Results, "failed.trx"))); 171await File.WriteAllTextAsync(Path.Combine(paths.RootDirectory, "unexpected.json"), "not JSON"); 181entry => Assert.True(File.Exists(Path.Combine(output.RootDirectory, entry.GetProperty("file").GetString()!)))); 182Assert.False(File.Exists(Path.Combine(output.RootDirectory, "unexpected.json"))); 193var target = collection ? Path.Combine(_workspace.Path, "saved-evidence") : paths.RootDirectory; 194Directory.CreateDirectory(Path.Combine(target, "history")); 196Path.Combine(target, "evidence.json"), 198await File.WriteAllTextAsync(Path.Combine(target, "analysis-summary.md"), "original summary"); 199await File.WriteAllTextAsync(Path.Combine(target, "collection-outcome.json"), "original outcome"); 227Assert.All(before, pair => Assert.Equal(pair.Value, File.ReadAllText(Path.Combine(target, pair.Key)))); 249Assert.All(before, pair => Assert.Equal(pair.Value, File.ReadAllText(Path.Combine(paths.RootDirectory, pair.Key!)))); 251Assert.True(File.Exists(Path.Combine(ReplayDirectory, "collection-outcome.json")));
AnalyzeCiFailureWorkflowCommandsTests.cs (15)
24var report = await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "limited-analysis.md")); 25Assert.Equal(report, await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "step-summary"))); 32var summary = Path.Combine(_workspace.Path, "step-summary"); 39var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 43var report = await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "limited-analysis.md")); 74var summary = Directory.CreateDirectory(Path.Combine(_workspace.Path, "step-summary")).FullName; 81var outcome = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "collection-outcome.json"))); 88var path = Path.Combine(_workspace.Path, "workflow-output"); 119var output = Path.Combine(_workspace.Path, "workflow-output"); 129var recovery = TransientJson.Read<AnalysisOutcome>(await File.ReadAllTextAsync(Path.Combine( 139var output = Path.Combine(_workspace.Path, "workflow-output"); 205["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "workflow-output"), 213Assert.False(File.Exists(Path.Combine(_workspace.Path, "workflow-output"))); 221var output = Path.Combine(_workspace.Path, "agent-output.json"); 240var output = Path.Combine(_workspace.Path, "agent-output.json");
AnalyzeCiFailureWorkflowTests.cs (314)
27private string RecoveryDirectory(string stage) => Path.Combine(_invocationDirectory ?? Path.Combine(_workspace.Path, "ci-failure-analysis"), "recovery", stage); 58var path = Path.Combine(EvidenceDirectory, file); 114var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 152var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 173var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 191var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 333Assert.True(File.Exists(Path.Combine(ReplayDirectory, "analysis-summary.md"))); 357Assert.True(File.Exists(Path.Combine(EvidenceDirectory, "collection-outcome.json"))); 363await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "arguments.rsp"), "collect"); 389new Dictionary<string, string> { ["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ambient-analysis") }); 406new Dictionary<string, string> { ["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ambient-analysis") }); 436var workingDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "working directory")).FullName; 437Directory.CreateDirectory(Path.Combine(workingDirectory, "ci-failure-analysis")); 438Directory.Move(EvidenceDirectory, Path.Combine(workingDirectory, "ci-failure-analysis/evidence")); 439var analysisDirectory = Path.Combine(workingDirectory, "downloaded proposal"); 440Directory.Move(Path.Combine(_workspace.Path, "ci-analysis-output"), analysisDirectory); 441var ambientDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ambient-analysis")).FullName; 442var ambientFile = Path.Combine(ambientDirectory, "analysis-result.json"); 458var path = Path.Combine(_workspace.Path, "not-a-directory"); 506var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 521var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 535var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 550var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 570var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 618var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 684var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 701Path.Combine(EvidenceDirectory, "history/causes")).FullName; 703Path.Combine(priorCausesDirectory, "nuget-timeout.json"), 729Path.Combine(EvidenceDirectory, "history/causes")).FullName; 731Path.Combine(priorCausesDirectory, "flaky-failure.json"), 734var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 739await File.ReadAllTextAsync(Path.Combine(priorCausesDirectory, "flaky-failure.json"))); 754var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 786var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 813var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 845Path.Combine(EvidenceDirectory, "test-failures.json"), 848var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 864Path.Combine(EvidenceDirectory, "test-failures.json"), 867var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 896Path.Combine(EvidenceDirectory, "test-failures.json"), 899var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 926Path.Combine(EvidenceDirectory, "test-failures.json"), 934var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 961var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 982var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1003var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1019Path.Combine(EvidenceDirectory, "test-failures.json"), 1022var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1042var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1062var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1082Path.Combine(EvidenceDirectory, "test-failures.json"), 1085var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1101Path.Combine(EvidenceDirectory, "test-failures.json"), 1104var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1124Path.Combine(EvidenceDirectory, "test-failures.json"), 1127var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1159var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1189"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 1220var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1238File.Delete(Path.Combine(EvidenceDirectory, "evidence.json")); 1241"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 1259Path.Combine(EvidenceDirectory, "diagnostics/run.json"), 1262var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1448var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1477var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1497var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1556var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1572var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1637var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1672var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1718Path.Combine(EvidenceDirectory, "history/causes")).FullName; 1721Path.Combine(priorCausesDirectory, "nuget-timeout.json"), 1731var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1750var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1770var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1836var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 1837var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 1861var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 1862var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 1905var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 1906var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 2102var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2153var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2176var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2195var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2223var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2244var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2257var causePath = Path.Combine(_workspace.Path, "main-build-break.json"); 2258var runContextPath = Path.Combine(_workspace.Path, "run-context.json"); 2259var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json"); 2260var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json"); 2261var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 2262var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 2263var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 2338var causePath = Path.Combine(_workspace.Path, "main-build-break.json"); 2339var runContextPath = Path.Combine(_workspace.Path, "run-context.json"); 2340var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json"); 2341var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json"); 2342var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 2343var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 2344var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 2416var causePath = Path.Combine(_workspace.Path, "flaky-failure.json"); 2417var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 2418var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 2459var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2465var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2479var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2485var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2506var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2511var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2524var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2529var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2542var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2547var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2570var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2582var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2595var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2600var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2613var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2622var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2635var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2649var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2681var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2702var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2737var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2739var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2764var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2776var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2805var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2833var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2876var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2878var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2908var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2910var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2940var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2942var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2972var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2986var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3021var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3023Path.Combine(testResultsDirectory.FullName, "00001.trx"), 3040var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3046var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3062var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3064Path.Combine(testResultsDirectory.FullName, "00001.json"), 3075var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3079var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3091var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3093Path.Combine(testResultsDirectory.FullName, "00001.json"), 3104var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3108var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3120var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3122Path.Combine(testResultsDirectory.FullName, "00001.json"), 3139var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3143var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3156var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3158var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3162var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3174var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3176Path.Combine(testResultsDirectory.FullName, "00001.json"), 3179var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3183var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3199var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3201Path.Combine(testResultsDirectory.FullName, "00001.trx"), 3210Path.Combine(testResultsDirectory.FullName, "00002.trx"), 3212var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3216var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3236var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3238Path.Combine(testResultsDirectory.FullName, "00001.trx"), 3240var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3244var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3264var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3265await File.WriteAllTextAsync(Path.Combine(testResultsDirectory.FullName, "results.xml"), "<TestRun />"); 3266var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3270var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3290var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3292Path.Combine(testResultsDirectory.FullName, "00001.trx"), 3300var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3304var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3335var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json"); 3336var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json"); 3418var responses = Path.Combine(_workspace.Path, "comments.json"); 3452var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log"); 3463var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json"); 3464var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json"); 3505Path.Combine(_workspace.Path, "last-success.json")); 3508using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json"))); 3511Assert.Contains("per_page=100", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")), StringComparison.Ordinal); 3513await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3539var outputPath = Path.Combine(_workspace.Path, "last-success.json"); 3574var outputPath = Path.Combine(_workspace.Path, "last-success.json"); 3581await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3609var outputPath = Path.Combine(_workspace.Path, "last-success.json"); 3617await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3639Path.Combine(_workspace.Path, "last-success.json")); 3657Path.Combine(_workspace.Path, "last-success.json")); 3684Path.Combine(_workspace.Path, "last-success.json")); 3687using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json"))); 3689Assert.True(int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count"))) >= 2); 3691(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))) 3718Path.Combine(_workspace.Path, "last-success.json")); 3721using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json"))); 3723Assert.Equal(2, int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count")))); 3726(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))) 3739Path.Combine(_workspace.Path, "last-success.json")); 3752var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3753var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3773var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3774var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3817var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3818var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3866var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3867var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3878var ghCalls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 3926var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3927var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3938await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3967var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3968var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4011var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 4012var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4051var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 4052var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4094var outputPath = Path.Combine(_workspace.Path, "persisted-main.json"); 4152var outputPath = Path.Combine(_workspace.Path, $"persisted-{historyState}.json"); 4193var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json"); 4246var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json"); 4278var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json"); 4321var causePath = Path.Combine(_workspace.Path, "prior-cause.json"); 4338var priorDirectory = Directory.CreateDirectory(Path.Combine(EvidenceDirectory, "history/causes")).FullName; 4339File.Move(causePath, Path.Combine(priorDirectory, "same-id.json")); 4343var index = await File.ReadAllTextAsync(Path.Combine(EvidenceDirectory, "history/cause-index.json")); 4359var metadataPath = Path.Combine(_workspace.Path, "metadata.json"); 4389var diagnosticsPath = Path.Combine(_workspace.Path, "diagnostics.json"); 4410var logPath = Path.Combine(_workspace.Path, "job.log"); 4461var inputPath = Path.Combine(_workspace.Path, "job.log"); 4462var outputPath = Path.Combine(_workspace.Path, "sanitized.log"); 4475var inputPath = Path.Combine(_workspace.Path, "job.log"); 4476var outputPath = Path.Combine(_workspace.Path, "sanitized.log"); 4493var causePath = Path.Combine(_workspace.Path, "cause.json"); 4494var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 4495var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 4557var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 4558var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 4614var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4615var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4656var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4657var canonicalBodyPath = Path.Combine(_workspace.Path, "canonical-body.md"); 4658var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4775var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4776var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4824var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4825var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4859var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4860var firstOutputPath = Path.Combine(_workspace.Path, "first-output.md"); 4861var secondOutputPath = Path.Combine(_workspace.Path, "second-output.md"); 4917var causePath = Path.Combine(_workspace.Path, "cause.json"); 4918var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 4919var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 4953var causePath = Path.Combine(_workspace.Path, "cause.json"); 4954var runContextPath = Path.Combine(_workspace.Path, "run-context.json"); 4955var lastSuccessfulPath = Path.Combine(_workspace.Path, "last-successful.json"); 4956var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge.json"); 4957var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4958var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 4959var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 5000var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 5001var buildCausePath = Path.Combine(_workspace.Path, "build-cause.json"); 5002var testCausePath = Path.Combine(_workspace.Path, "test-cause.json"); 5003var multiJobCausePath = Path.Combine(_workspace.Path, "multi-job-cause.json"); 5016Path.Combine(failureDataDirectory, "run-context.json"), 5043var buildBodyPath = Path.Combine(_workspace.Path, "build-body.md"); 5044var buildMetadataPath = Path.Combine(_workspace.Path, "build-metadata.json"); 5045var testBodyPath = Path.Combine(_workspace.Path, "test-body.md"); 5046var testMetadataPath = Path.Combine(_workspace.Path, "test-metadata.json"); 5113"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 5132var analysis = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName; 5133await File.WriteAllTextAsync(Path.Combine(data, "evidence.json"), evidence); 5134await File.WriteAllTextAsync(Path.Combine(analysis, "proposal.json"), proposal); 5144var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName; 5145var fakeGhPath = Path.Combine(fakeBinDirectory, "gh"); 5151["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"), 5152["GH_CALL_COUNT_FILE"] = Path.Combine(_workspace.Path, "gh-call-count"), 5166var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName; 5167var fakeGhPath = Path.Combine(fakeBinDirectory, "gh"); 5173["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"), 5188var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, $"fake-bin-{Guid.NewGuid():N}")).FullName; 5189var fakeGhPath = Path.Combine(fakeBinDirectory, "gh"); 5217var analysisDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName; 5219Directory.CreateDirectory(Path.Combine(failureDataDirectory, "diagnostics")); 5220Directory.CreateDirectory(Path.Combine(failureDataDirectory, "history")); 5221await File.WriteAllTextAsync(Path.Combine(analysisDirectory, "analysis-result.json"), analysis); 5222await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run-context.json"), runContext); 5223await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/run.json"), run); 5224await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/failed-jobs.json"), trustedFailedJobs); 5225await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/triggering-merge-pr.json"), triggeringMerge); 5226await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/last-successful-main-run.json"), lastSuccessfulRun); 5227await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/candidate-merges.json"), candidateMerges); 5228await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/candidate-merge-history-status.json"), candidateHistoryStatus); 5229await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/pr-metadata.json"), prMetadata); 5238var context = AnalyzeCiFailure.CiFailureJson.ReadContract<AnalyzeCiFailure.RunContext>(Path.Combine(paths.RootDirectory, "run-context.json"))!; 5258=> new((await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "http-requests.jsonl"))) 5291process.StartInfo.Environment["GITHUB_STEP_SUMMARY"] = Path.Combine(_workspace.Path, "step-summary"); 5354var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 5358Directory.CreateDirectory(Path.Combine(failureDataDirectory, "diagnostics")); 5359Directory.CreateDirectory(Path.Combine(failureDataDirectory, "history")); 5361await File.WriteAllTextAsync(Path.Combine(analysisDirectory, "analysis-result.json"), analysis); 5362await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "run-context.json"), runContext); 5363await File.WriteAllTextAsync(Path.Combine(failureDataDirectory, "diagnostics/failed-jobs.json"), trustedFailedJobs); 5365Path.Combine(failureDataDirectory, "diagnostics/run.json"), 5368Path.Combine(failureDataDirectory, "test-evidence.json"), 5402Path.Combine(failureDataDirectory, "test-failures.json"), 5426await File.WriteAllTextAsync(Path.Combine(causesDirectory, fileName), cause); 5432var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 5443var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
GitHubApiClientTests.cs (3)
728var path = Path.Combine(directory.FullName, "artifact.zip"); 751var path = Path.Combine(directory.FullName, "artifact.zip"); 773var path = Path.Combine(directory.FullName, "artifact.zip");
tests\Infrastructure.Tests\Shared\RepoRoot.cs (1)
27if (File.Exists(System.IO.Path.Combine(directory.FullName, "Aspire.slnx")))
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
TestServices\GitHubFixtureHandler.cs (5)
26Path.Combine(workingDirectory, "http-calls.log"), 42Path.Combine(workingDirectory, "http-requests.jsonl"), 60if (File.Exists(Path.Combine(workingDirectory, "existing-main-label"))) 247var directory = Directory.CreateDirectory(Path.Combine(workingDirectory, "http-fixture-requests")); 248var file = Path.Combine(directory.FullName, $"{++_sequence}.request");
aspire (502)
Acquisition\InstallationCandidateSources.cs (5)
59var releaseDir = Path.Combine(context.AspireHome, "bin"); 60var releaseBinary = Path.Combine(releaseDir, context.AspireBinaryName); 85var dogfoodRoot = Path.Combine(context.AspireHome, InstallationDiscoveryLayout.DogfoodDirectoryName); 92var binDir = Path.Combine(prDir, "bin"); 93var binary = Path.Combine(binDir, context.AspireBinaryName);
Acquisition\InstallSidecarReader.cs (1)
51var sidecarPath = Path.Combine(binaryDir, SidecarFileName);
Acquisition\InstallSidecarWriter.cs (1)
29var sidecarPath = Path.Combine(binaryDirectory, InstallSidecarReader.SidecarFileName);
Acquisition\WingetFirstRunProbe.cs (2)
41var sidecarPath = Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName); 63var tempPath = Path.Combine(binaryDir, $"{InstallSidecarReader.SidecarFileName}.{Guid.NewGuid():N}.tmp");
Agents\AgentConfiguration.cs (1)
159Path.Combine(Path.GetDirectoryName(path)!, $".{Path.GetFileName(path)}.aspire.lock"),
Agents\AgentEnvironmentScanContext.cs (1)
29var path = Path.Combine(currentDirectory.FullName, directoryName);
Agents\AgentPath.cs (4)
11public static string UniversalSkillsDirectory { get; } = Path.Combine(".agents", "skills"); 17return Path.Combine(GetOverride("ProgramFiles", context, environment) ?? 18Path.Combine(Path.GetPathRoot(context.HomeDirectory.FullName)!, "Program Files"), productName); 96return Path.IsPathFullyQualified(path) ? path : Path.Combine(executionContext.WorkingDirectory.FullName, path);
Agents\AspireSkills\LocalAspireSkills.cs (6)
31(Path.Combine(".claude", "skills"), [ClaudeCodeAgentClient.ClientId]), 32(Path.Combine(".github", "skills"), [CopilotAgentClient.ClientId]), 33(Path.Combine(".opencode", "skill"), [OpenCodeAgentClient.ClientId]) 49(Path: Path.Combine(root.FullName, location.Directory), Scope: AgentConfigurationScope.Project, location.Owners))) 50.Append((Path: Path.Combine(homeDirectory.FullName, AgentPath.UniversalSkillsDirectory), Scope: AgentConfigurationScope.Global, Owners: s_universalSkillOwners)); 62var path = Path.GetFullPath(Path.Combine(skillsDirectory, name));
Agents\ClaudeCode\ClaudeCodeAgentClient.cs (10)
59=> Path.Combine(scope is AgentConfigurationScope.Project 60? Path.Combine(workspaceRoot.FullName, ClaudeCodePaths.ConfigDirectoryName) 67AgentConfiguration.EnumerateJsonFiles(Path.Combine(ManagedSettingsDirectory, "managed-settings.d"))), sources); 72? Path.Combine(workspaceRoot.FullName, ClaudeCodePaths.ConfigDirectoryName) 75return Path.Combine(directory, "settings.json"); 83edit.GetJsonFilesForEdit(Path.Combine(ManagedSettingsDirectory, "managed-settings.d"))), 87=> scope is AgentConfigurationScope.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json") 115var settingsPath = Path.Combine(claudeDirectory, "settings.json"); 304yield return Path.Combine(ClaudeCodePaths.GetConfigDirectory(context, environment), "settings.json"); 310yield return Path.Combine(ManagedSettingsDirectory, "managed-settings.json");
Agents\ClaudeCode\ClaudeCodePaths.cs (2)
12?? Path.Combine(executionContext.HomeDirectory.FullName, ConfigDirectoryName); 20return Path.Combine(directory, ".claude.json");
Agents\Copilot\CopilotAgentClient.cs (14)
48=> Path.Combine(scope is AgentConfigurationScope.Project ? workspaceRoot.FullName : context.HomeDirectory.FullName, 60return Path.Combine(directory, "settings.json"); 70=> scope is AgentConfigurationScope.Project ? Path.Combine(workspaceRoot.FullName, ".mcp.json") 71: Path.Combine(GetSettingsDirectory(), "mcp-config.json"); 80foreach (var path in new[] { Path.Combine(".vscode", "mcp.json"), Path.Combine(".github", "copilot", "mcp.json") }) 82yield return (Path.Combine(workspaceRoot.FullName, path), false); 102: AgentPath.GetOverride("XDG_CONFIG_HOME", context, environment) ?? Path.Combine(home, ".config"); 106yield return Path.Combine(userDirectory, "mcp.json"); 108var profilesDirectory = new DirectoryInfo(Path.Combine(userDirectory, "profiles")); 113yield return Path.Combine(profile.FullName, "mcp.json"); 147var hooksDirectory = Path.Combine(GetSettingsDirectory(), "hooks"); 149var filePath = Path.Combine(hooksDirectory, "aspire-telemetry.json"); 187yield return Path.Combine(GetSettingsDirectory(), "settings.json"); 197yield return Path.Combine(AgentPath.GetManagedSettingsDirectory(context, environment, "GitHubCopilot", "github-copilot"),
Agents\Copilot\CopilotAppInstallationDetector.cs (4)
108applicationsDirectories.Add(Path.Combine(dataHome, LinuxApplicationsDirectoryName)); 123applicationsDirectories.Add(Path.Combine(dataDirectory, LinuxApplicationsDirectoryName)); 138Path.Combine(executionContext.HomeDirectory.FullName, "Applications"), 148var candidate = Path.Combine(directory, fileName);
Agents\Copilot\CopilotPaths.cs (1)
25: Path.Combine(homeDirectory.FullName, DefaultCopilotDirectoryName);
Agents\Hooks\AgentTelemetryHook.cs (1)
37args = [Path.Combine(AppContext.BaseDirectory, "aspire.dll"), .. args];
Agents\Hooks\TelemetryHookInstaller.cs (3)
42var hooksDirectory = Path.Combine(_executionContext.AspireHomeDirectory.FullName, HooksDirectoryName); 45var shellPath = Path.Combine(hooksDirectory, ShellResourceName); 46var powerShellPath = Path.Combine(hooksDirectory, PowerShellResourceName);
Agents\OpenCode\OpenCodeAgentClient.cs (1)
48=> Path.Combine(scope is AgentConfigurationScope.Project ? workspaceRoot.FullName : context.HomeDirectory.FullName,
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");
Agents\Playwright\PlaywrightCliInstaller.cs (4)
343Path.Combine(".github", "skills"), 344Path.Combine(".opencode", "skill") 470var targetFile = Path.Combine(targetDir, relativePath); 487var sourceFile = Path.Combine(sourceDir, relativePath);
Agents\Playwright\PlaywrightCliRunner.cs (1)
117var playwrightDir = Path.Combine(workingDirectory, ".playwright");
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);
Caching\DiskCache.cs (2)
24_cacheDirectory = new DirectoryInfo(Path.Combine(executionContext.CacheDirectory.FullName, "nuget-search")); 97var fullPath = Path.Combine(_cacheDirectory.FullName, fileName);
Certificates\CertificateCacheWriter.cs (1)
20var temporaryPath = Path.Combine(
Certificates\CertificateGeneration\MacOSCertificateManager.cs (4)
351ExportCertificate(certificate, Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.pfx"), includePrivateKey: true, null, CertificateKeyExportFormat.Pfx); 399Path.Combine(s_macOSUserHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx"); 427ExportCertificate(diskCert, Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.pfx"), includePrivateKey: true, null, CertificateKeyExportFormat.Pfx); 437var keyPath = Path.Combine(s_aspireDevCertsCacheDirectory, $"{aspireLookup}.key");
Certificates\CertificateGeneration\UnixCertificateManager.cs (7)
134var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem"); 271var certPath = Path.Combine(certDir, nickname) + ".pem"; 390? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..]) 434Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName); 500var certPath = Path.Combine(certDir, nickname) + ".pem"; 955var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}"); 1223: System.IO.Path.Combine(homeDirectory, ".config");
Certificates\CertificateHelpers.cs (1)
69var openSslCertsDir = Path.Combine(openSslDir, "certs");
Certificates\CertificateService.cs (1)
60internal string DevCertDirectory => Path.Combine(
Certificates\NativeCertificateToolRunner.cs (1)
247var outputPath = Path.Combine(outputDirectory, $"aspire-dev-cert-{hash}.pem");
CliExecutionContext.cs (1)
184? Path.Combine(homeDirectory.FullName, ".aspire")
Commands\AddCommand.cs (2)
396var nugetConfigPath = Path.Combine(projectDir.FullName, "nuget.config"); 667Path.Combine(projectDirectory.FullName, "nuget.config"));
Commands\AgentInitCommand.cs (2)
975var fullSkillDirectoryPath = Path.Combine(skillBaseDirectory, skill.Name); 981var fullPath = Path.Combine(fullSkillDirectoryPath, "SKILL.md");
Commands\AppHostLauncher.cs (1)
1034return Path.Combine(logsDirectory, fileName);
Commands\InitCommand.cs (5)
330=> new(Path.Combine(solutionFile.Directory!.FullName, $"{Path.GetFileNameWithoutExtension(solutionFile.Name)}.AppHost")); 355var appHostPath = Path.Combine(workingDirectory.FullName, "apphost.cs"); 559.FirstOrDefault(pattern => File.Exists(Path.Combine(workingDirectory.FullName, pattern))); 605var configPath = Path.Combine(directory.FullName, AspireConfigFile.FileName); 865var path = Path.Combine(directory.FullName, fileName);
Commands\RenderCommand.cs (1)
450var filePath = Path.Combine(tempDirectory.FullName, "safe file link sample.txt");
Commands\Sdk\SdkDumpCommand.cs (1)
361var outputPath = Path.Combine(outputDirectory.FullName, $"{integration.Name}.ats.txt");
Commands\Sdk\SdkGenerateCommand.cs (1)
173var filePath = Path.GetFullPath(Path.Combine(outputDir.FullName, fileName));
Commands\TrayLifecycleService.cs (3)
81if (!string.Equals(trayPath, Path.Combine(bundleRoot, WindowsTrayPayload.ExecutablePath), StringComparison.OrdinalIgnoreCase)) 90if (!string.Equals(trayPath, Path.Combine(bundleRoot, LinuxTrayPayload.ExecutablePath), StringComparison.Ordinal)) 157var source = InstallSidecarReader.ReadSourceField(Path.Combine(directory, InstallSidecarReader.SidecarFileName));
Commands\UpdateCommand.cs (3)
198var sidecarPath = Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName); 964var targetExePath = Path.Combine(installDir, exeName); 982var newExePath = Path.Combine(tempExtractDir, exeName);
Configuration\AspireConfigFile.cs (8)
201var filePath = Path.Combine(directory, FileName); 229var filePath = Path.Combine(directory, FileName); 258var profiles = ReadApphostRunProfiles(Path.Combine(directory, "apphost.run.json")); 268var legacySettingsDir = Path.Combine(directory, AspireJsonConfiguration.SettingsFolder); 270Path.Combine(legacySettingsDir, migratedPath)); 444Path.GetFullPath(Path.Combine(configDirectory, entry.Path!))), 448Path.GetFullPath(Path.Combine(configDirectory, entry.Path!))), 461return File.Exists(Path.Combine(directory, FileName));
Configuration\AspireJsonConfiguration.cs (3)
153var folderPath = Path.Combine(directory, SettingsFolder); 156var filePath = Path.Combine(folderPath, FileName); 234var absolutePath = Path.GetFullPath(Path.Combine(settingsDirectory, trimmedValue));
Configuration\ConfigSourceService.cs (13)
296var path = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName); 311await ApplySourceAsync(source, Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), cancellationToken); 323?? Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName); 691using var cacheLock = await FileLock.AcquireAsync(Path.Combine(cacheDirectory, "cache.lock"), cancellationToken); 692var pointer = Path.Combine(cacheDirectory, "current"); 694var snapshotDirectory = Path.Combine(cacheDirectory, snapshotName); 695var temporaryPointer = Path.Combine(cacheDirectory, $"{snapshotName}.tmp"); 714await File.WriteAllTextAsync(Path.Combine(snapshotDirectory, AspireConfigFile.FileName), configuration.ToJsonString(), cancellationToken); 715await File.WriteAllTextAsync(Path.Combine(snapshotDirectory, "metadata.json"), 778using var cacheLock = await FileLock.AcquireAsync(Path.Combine(cacheDirectory, "cache.lock"), cancellationToken); 779var path = Path.Combine(cacheDirectory, "check.json"); 939var repositoryDirectory = new GitRepositoryLocation(new DirectoryInfo(Path.Combine(directory, "repository.git")), IsBare: true); 972return ConfigurationHelper.WriteSettingsFileAtomicallyAsync(Path.Combine(directory, "check.json"), json, cancellationToken);
Configuration\ConfigurationService.cs (4)
132var newSettingsPath = Path.Combine(searchDirectory.FullName, AspireConfigFile.FileName); 153var defaultPath = Path.Combine(executionContext.WorkingDirectory.FullName, AspireConfigFile.FileName); 167var aspireConfigPath = Path.Combine(legacySettingsRootDirectory.FullName, AspireConfigFile.FileName); 404var configFilePath = Path.Combine(searchDirectory.FullName, AspireConfigFile.FileName);
Diagnostics\FileLoggerProvider.cs (1)
56return Path.Combine(logsDirectory, name);
Documentation\FileBackedDocumentContentCache.cs (4)
22private readonly DirectoryInfo _diskCacheDirectory = new(Path.Combine(executionContext.CacheDirectory.FullName, subdirectory)); 252private string GetTextFilePath(string key) => Path.Combine(_diskCacheDirectory.FullName, $"{SanitizeFileName(key)}.txt"); 254private string GetETagFilePath(string key) => Path.Combine(_diskCacheDirectory.FullName, $"{SanitizeFileName(key)}.etag.txt"); 256private string GetJsonFilePath(string key) => Path.Combine(_diskCacheDirectory.FullName, $"{SanitizeFileName(key)}.json");
DotNet\DotNetAppHostNuGetConfigMerger.cs (2)
69targetFile ??= new FileInfo(Path.Combine(targetDirectory.FullName, "nuget.config")); 384var globalNuGetFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget");
DotNet\DotNetAppHostRestorePreview.cs (1)
124preview._targetsFile = new FileInfo(Path.Combine(
DotNet\DotNetCliRunner.cs (8)
394: Path.GetFullPath(Path.Combine(workingDirectory.FullName, binlogDirectory)); 398var binlogPath = Path.Combine(fullBinlogDirectory, CreateBinlogFileName(dotnetCommand, projectFile, workingDirectory)); 534var dotnetExecutablePath = Path.Combine( 717var cliAssemblyPath = Path.Combine(cliDirectory, "aspire.dll"); 732return File.Exists(Path.Combine(cliDirectory, ".aspire-install.json")); 737return HasBundleRoot(cliDirectory) || HasBundleRoot(Path.Combine(cliDirectory, "bundle")); 1464: Path.Combine(workingDirectory.FullName, configPath); 1791: Path.Combine(solutionFile.Directory!.FullName, line);
DotNet\DotNetRestoreConfiguration.cs (1)
82var defaultTargets = Path.Combine(GetProperty(properties, "MSBuildToolsPath"), "NuGet.targets");
Git\GitCommandRunner.cs (1)
236? $"!'{Path.Combine(Environment.SystemDirectory, "cmd.exe").Replace("\\", "/", StringComparison.Ordinal).Replace("'", "'\\''", StringComparison.Ordinal)}' /d /c set PATH"
Git\GitRepository.cs (1)
112var absolutePath = Path.GetFullPath(Path.Combine(rootFullName, relativePath));
Git\GitWorktree.cs (6)
61var gitPath = Path.Combine(current, GitDirectoryName); 146var gitPath = Path.Combine(current, GitDirectoryName); 221Path.Combine(canonicalAdminDirectory, GitDirFileName), 238Path.Combine(current.FullName, GitDirFileName), 331: Path.GetFullPath(Path.Combine(relativeTo, value)); 373var candidate = Path.Combine(current, segment);
Layout\LayoutConfiguration.cs (5)
83return relativePath is not null ? Path.Combine(LayoutPath, relativePath) : null; 102return directory is null ? null : Path.Combine(directory, 118return Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)); 133return Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)); 143return directory is null ? null : Path.Combine(directory, BundleDiscovery.GetExecutableFileName(BundleDiscovery.TerminalHostExecutableName));
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() 342return File.Exists(Path.Combine(layoutPath, relativePath)) ? relativePath : null;
Mcp\Tools\SelectAppHostTool.cs (1)
69: Path.Combine(executionContext.WorkingDirectory.FullName, appHostPath));
Migrations\TypeScriptAppHostMigration.cs (6)
101var modernAppHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, LegacyTypeScriptAppHost.ModernAppHostFileName)); 182var legacyModulesDir = Path.Combine(appHostDirectory.FullName, LanguageInfo.LegacyGeneratedFolderName); 192var configPath = Path.Combine(configDirectory.FullName, AspireConfigFile.FileName); 232var tsConfigPath = Path.Combine(appHostDirectory.FullName, TsConfigFileName); 280var packageJsonPath = Path.Combine(appHostDirectory.FullName, PackageJsonFileName); 325var configPath = Path.Combine(appHostDirectory.FullName, configFileName);
Npm\NpmRunner.cs (1)
121var tarballPath = Path.Combine(outputDirectory, filename);
NuGet\BundleNuGetService.cs (10)
147var restoreDirectory = Path.Combine( 150var objectDirectory = Path.Combine(restoreDirectory, "obj"); 151var manifestPath = Path.Combine(restoreDirectory, IntegrationPackageProbeManifest.FileName); 152var lockPath = Path.Combine(restoreDirectory, "restore.lock"); 194Path.Combine(objectDirectory, LockFileFormat.AssetsFileName), 360new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire")), 385? DirectoryHelper.CreateWithOwnerOnlyPermissions(Path.Combine( 445new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire")), 613var assemblyPath = Path.Combine(AppContext.BaseDirectory, $"{typeof(BundleNuGetService).Assembly.GetName().Name}.dll"); 697return Path.Combine(integrationCacheDirectory.FullName, "package-restore");
NuGet\NuGetClient.cs (4)
315var projectPath = Path.Combine(outputPath, "project.json"); 394var graphPath = Path.Combine(outputPath, "RuntimeIdentifierGraph.json"); 1517Path.Combine(rootDirectory.FullName, "trustedroots")); 1547using var fileStream = File.Create(Path.Combine(destinationDirectory, resourceName));
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));
NuGet\TemporaryNuGetConfigFile.cs (3)
46directory = new DirectoryInfo(Path.Combine( 59var file = new FileInfo(Path.Combine( 96var configFile = new FileInfo(Path.Combine(directory.FullName, "NuGet.Config"));
Packaging\PackagingService.cs (1)
163prPackageChannels.Add(CreateLocalHiveChannel(prHive.Name, new DirectoryInfo(Path.Combine(prHive.FullName, "packages"))));
Profiling\ProfileCaptureOptions.cs (3)
71outputPath = Path.Combine(workingDirectory.FullName, CreateDefaultOutputFileName(timeProvider, sessionId)); 77outputPath = Path.Combine(workingDirectory.FullName, outputPath); 85outputPath = Path.Combine(outputPath, CreateDefaultOutputFileName(timeProvider, sessionId));
Profiling\ProfileCaptureService.cs (1)
190var managedExecutable = Path.Combine(managedPath, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName));
Program.cs (8)
137var logsDirectory = Path.Combine(GetUsersAspirePath(processPath), "logs"); 173var newPath = Path.Combine(usersAspirePath, Configuration.AspireConfigFile.FileName); 178var legacyPath = Path.Combine(usersAspirePath, "globalsettings.json"); 607: new FileSystemTufCache(Path.Combine(executionContext.CacheDirectory.FullName, "tuf")); 790var hivesDirectory = Path.Combine(homeDirectory, "hives"); 797var sdksPath = Path.Combine(homeDirectory, "sdks"); 877var cacheDirectoryPath = Path.Combine(homeDirectory, "cache"); 884var packagesDirectoryPath = Path.Combine(homeDirectory, "packages");
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\AppHostServerProject.cs (1)
118projectModelPath: temporary ? Path.Combine(appPath, "server") : null,
Projects\DotNetAppHostProject.cs (6)
297var filePath = Path.Combine(current.FullName, fileName); 725var filePath = Path.Combine(current.FullName, fileName); 904fullPath = Path.GetFullPath(Path.Combine(containingDirectory, normalized)); 2079=> Path.IsPathFullyQualified(path) ? path : Path.GetFullPath(Path.Combine(baseDirectory.FullName, path)); 2206var runJsonPath = Path.Combine(directory, $"{Path.GetFileNameWithoutExtension(projectFile.Name)}.run.json"); 2418Path.GetFullPath(Path.Combine(directoryName, config.AppHost.Path)));
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); 336var repoDirectoryPackagesProps = Path.Combine(_repoRoot, "Directory.Packages.props"); 348var projectFileName = Path.Combine(_projectModelPath, ProjectFileName); 416if (!File.Exists(Path.Combine(_projectModelPath, fileName))) 436var objPath = Path.Combine(_projectModelPath, "obj"); 458File.WriteAllText(Path.Combine(_projectModelPath, fileName), content); 461projectDocument.Save(Path.Combine(_projectModelPath, ProjectFileName)); 467var staleNugetConfig = Path.Combine(_projectModelPath, "nuget.config"); 498var projectFile = new FileInfo(Path.Combine(_projectModelPath, ProjectFileName)); 557var assemblyPath = Path.Combine(BuildPath, ProjectDllName); 700var globalNuGetPath = Path.Combine(userProfile, ".nuget");
Projects\GuestAppHostProject.cs (10)
176return new FileInfo(Path.Combine(directory.FullName, appHostFileName)); 1136var exitCodePath = Path.Combine(resultDirectory.FullName, "exit-code"); 1307var apphostRunPath = Path.Combine(directory.FullName, "apphost.run.json"); 2139var outputPath = Path.Combine(appPath, LanguageInfo.GeneratedFolderName); 2147outputPath = Path.Combine(appPath, LanguageInfo.LegacyGeneratedFolderName); 2163var filePath = Path.Combine(outputPath, fileName); 2405var manifestPath = Path.Combine(outputPath, GeneratedManifestFileName); 2453var fullPath = Path.GetFullPath(Path.Combine(outputPath, recordedRelativePath)); 2478var hashPath = Path.Combine(generatedPath, ".codegen-hash"); 2748var bundlePath = Path.Combine(bundleDirectory, $"{cacheFilePrefix}-{bundleHash}.pem");
Projects\GuestRuntime.cs (4)
330return new FileInfo(Path.Combine(directory.FullName, resolved)); 352var path = Path.IsPathRooted(output) ? output : Path.Combine(directory.FullName, output); 369var path = Path.IsPathRooted(trimmed) ? trimmed : Path.Combine(directory.FullName, trimmed); 637var filePath = Path.Combine(directory.FullName, fileName);
Projects\ILanguageDiscovery.cs (1)
81internal static string GeneratedFolderName { get; } = Path.Combine(".aspire", "modules");
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\IntegrationRestorePlan.cs (1)
426FileInfo? restoreOverlayFile = new(Path.Combine(policyDirectory.FullName, "NuGet.Config"));
Projects\JavaAppHostToolchainResolver.cs (24)
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)), 352relativeWrapperPath = Path.Combine(".", relativeWrapperPath); 444var scriptPath = Path.Combine(resolution.ProjectDirectory.FullName, GradleInitScriptPath); 503var dependencyDirectory = Path.Combine( 542return projectPath is null ? path : Path.Combine(projectPath, path); 559JavaAppHostToolchain.Maven => ["-f", Path.Combine(projectPath, MavenPomFileName)], 584"-f", Path.Combine(reactorPath, MavenPomFileName), 610var document = XDocument.Load(Path.Combine(aggregatorDirectory.FullName, MavenPomFileName)); 626var moduleDirectory = new DirectoryInfo(Path.GetFullPath(Path.Combine(aggregatorDirectory.FullName, modulePath))); 628|| (File.Exists(Path.Combine(moduleDirectory.FullName, MavenPomFileName)) 650JavaAppHostToolchain.Maven => Path.Combine("target", "classes"), 660JavaAppHostToolchain.Maven => Path.Combine("target", DependencyDirectoryName), 661JavaAppHostToolchain.Gradle => Path.Combine("build", DependencyDirectoryName), 792Path.Combine("gradle", "libs.versions.toml") 816"-classpath", Path.Combine(dependencyDirectory, "*"), 864.Select(output => Path.Combine(classesDirectory, Path.GetFileName(output))) 867StampFile = Path.Combine(classesDirectory, Path.GetFileName(baseCompile.UpToDateCheck.StampFile)) 877var classPath = string.Join(Path.PathSeparator, [classesDirectory, Path.Combine(dependencyDirectory, "*")]);
Projects\LegacyTypeScriptAppHost.cs (2)
41return File.Exists(Path.Combine(appPath, LegacyAppHostFileName)) && 42!File.Exists(Path.Combine(appPath, ModernAppHostFileName));
Projects\NativeAppHostServerProject.cs (5)
97var descriptorPath = Path.Combine(root, "aspire.apphost-server.json"); 118var contract = Path.Combine(Path.GetDirectoryName(_executable)!, "ats-contract.json"); 124var generatedSdkDirectory = Path.Combine(_directory.FullName, $"sdk-{++_preparationCount}"); 125var requestPath = Path.Combine(_directory.FullName, "codegen-request.json"); 165await File.WriteAllTextAsync(Path.Combine(generatedSdkDirectory, "providers.json"),
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); 477var dependencyGraphSpecPath = Path.Combine( 587var restoreDir = Path.Combine(_workingDirectory, "integration-restore"); 598var intermediateOutputPath = Path.Combine(restoreDir, "obj"); 616var projectFilePath = Path.Combine(restoreDir, IntegrationProjectFileName); 628Path.Combine(restoreDir, "Directory.Packages.props"), directoryPackagesProps, cancellationToken); 633Path.Combine(restoreDir, "Directory.Build.props"), 643Path.Combine(restoreDir, "Directory.Build.targets"), "<Project />", cancellationToken); 648var dependencyGraphSpecPath = Path.Combine( 690Path.Combine(intermediateOutputPath, IntegrationClosureBuilder.ProjectAssetsFileName), 701Path.Combine(restoreDir, ClosureManifestFileName), 1011Path.Combine(contentRootPath, "appsettings.json"),
Projects\ProjectLocator.cs (6)
741var configFilePath = Path.Combine(searchDirectory.FullName, AspireConfigFile.FileName); 755: Path.Combine(searchDirectory.FullName, configAppHostPath); 810var qualifiedAppHostPath = Path.IsPathRooted(appHostPath) ? appHostPath : Path.Combine(settingsFile.Directory!.FullName, appHostPath); 1315Path.IsPathRooted(existingPath) ? existingPath : Path.Combine(settingsFile.Directory!.FullName, existingPath)); 1386targetSettingsFilePath = Path.Combine(parentDirectory.FullName, AspireConfigFile.FileName); 1402var newConfigPath = Path.Combine(configRoot.FullName, AspireConfigFile.FileName);
Projects\ProjectUpdater.cs (5)
573new(Path.Combine(configRoot.FullName, AspireConfigFile.FileName)) 1574var directoryPackagesPropsPath = Path.Combine(current.FullName, "Directory.Packages.props"); 2083internal string PackagesDirectory => Path.Combine(Directory.FullName, "packages"); 2087["NUGET_HTTP_CACHE_PATH"] = Path.Combine(Directory.FullName, "http-cache"), 2088["NUGET_FALLBACK_PACKAGES"] = Path.Combine(Directory.FullName, "fallback-packages")
Projects\RepositoryToolUpdater.cs (2)
46foreach (var path in new[] { Path.Combine(current.FullName, ".config", "dotnet-tools.json"), Path.Combine(current.FullName, "dotnet-tools.json") }) 69var manifest = await ReadManifestAsync(Path.Combine(current.FullName, "package.json"), isNpm: true, cancellationToken);
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 (12)
207var filePath = Path.Combine(scaffoldDirectory.FullName, fileName); 265var appHostRunPath = Path.Combine(scaffoldDirectory.FullName, "apphost.run.json"); 291if (IsTypeScriptLanguage(language) && File.Exists(Path.Combine(directory.FullName, PackageJsonFileName))) 295return new DirectoryInfo(Path.Combine(directory.FullName, BrownfieldTypeScriptAppHostDirectoryName)); 299File.Exists(Path.Combine(directory.FullName, "go.mod"))) 302return new DirectoryInfo(Path.Combine(directory.FullName, "aspire-apphost")); 312return Path.Combine(scaffoldDirectory.FullName, appHostFileName); 324var packageJsonPath = Path.Combine(rootDirectory.FullName, PackageJsonFileName); 399Path.GetRelativePath(rootDirectory.FullName, Path.Combine(scaffoldDirectory.FullName, appHostFileName))); 521var outputPath = Path.Combine(directoryPath, LanguageInfo.GeneratedFolderName); 526var filePath = Path.Combine(outputPath, fileName); 589var filePath = Path.Combine(rootDirectory, fileName);
src\Shared\AspireHomeDirectory.cs (1)
32? Path.Combine(userProfileDirectory, ".aspire")
src\Shared\BackchannelConstants.cs (3)
259var socketPath = Path.Combine(dir, $"{appHostId}{instanceId}.{processId.ToString(CultureInfo.InvariantCulture)}"); 277var socketPath = Path.Combine(dir, socketName); 315return Path.Combine(dir, appHostId);
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\BundleVersionLease.cs (2)
104var leasesDirectory = Path.Combine(fullVersionDirectory, LeasesDirectoryName); 172var leasesDirectory = Path.Combine(versionDirectory, LeasesDirectoryName);
src\Shared\ChildProcess.cs (1)
132_completionPath = Path.Combine(_completionDirectory.FullName, "exit-code");
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
src\Shared\LinuxTrayPayload.cs (2)
51var executable = Path.Combine(directory, ExecutableName); 60using var icon = File.OpenRead(Path.Combine(directory, IconName));
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
src\Shared\PrivateTemporaryStorage.cs (5)
33var path = Path.Combine(GetTempPath(), Path.GetRandomFileName()); 47return CreatePrivateDirectory(Path.Combine(GetTempPath(), prefix + Path.GetRandomFileName())); 79var session = Path.Combine(root, Path.GetRandomFileName()); 86using var marker = CreateFile(Path.Combine(session, ".preserve")); 106var root = Path.Combine(home, "tmp");
src\Shared\Telemetry\InternalMicrosoftDetector.cs (4)
559var tempPath = Path.Combine(directory, $"{Path.GetRandomFileName()}.tmp"); 905var copilotHome = Path.Combine(_homeDirectory.FullName, ".copilot"); 1582var path = Path.Combine(directory, fileName); 1639var candidate = Path.Combine(directory, command + extension);
src\Shared\Telemetry\LinuxMachineInformationProvider.cs (1)
38userDir = Path.Combine(rootPath, SecondaryPathSubDirectory);
src\Shared\Telemetry\TelemetryMetadata.cs (1)
40new DirectoryInfo(Path.Combine(AspireHomeDirectory.GetDefault(), "cache")),
src\Shared\Telemetry\UnixMachineInformationProvider.cs (2)
83var fullPath = Path.Combine(directoryPath, fileName); 107var path = Path.Combine(directoryPath, fileName);
src\Shared\TerminalHostPayload.cs (2)
33=> GetRequiredFiles(rid).All(file => File.Exists(Path.Combine(directory, file)) && new FileInfo(Path.Combine(directory, file)).Length > 0);
src\Shared\UserSecrets\AspireSecretsPathHelper.cs (1)
45return Path.Combine(directory, $"{environmentName}.json");
src\Shared\UserSecrets\SecretsStore.cs (1)
135var tempFilename = Path.Combine(directory, $".{Path.GetFileName(filePath)}.{Guid.NewGuid():N}.tmp");
src\Shared\WindowsTrayPayload.cs (2)
28var path = Path.Combine(directory, name); 38using var stream = File.OpenRead(Path.Combine(directory, ExecutableName));
Telemetry\AgentTelemetryUploader.cs (1)
19internal static string LockPath => Path.Combine(Path.GetDirectoryName(AspireTelemetryExporter.GetTelemetryStoragePath("cli"))!, LockFileName);
Templating\CliTemplateFactory.cs (1)
339var filePath = Path.Combine(outputPath, relativePath);
Templating\CliTemplateFactory.EmptyTemplate.cs (1)
153var aspireConfigPath = Path.Combine(outputPath, Configuration.AspireConfigFile.FileName);
Templating\CliTemplateFactory.GoStarterTemplate.cs (1)
90var appHostProject = _projectFactory.TryGetProject(new FileInfo(Path.Combine(outputPath, "apphost.go")));
Templating\CliTemplateFactory.JavaStarterTemplate.cs (1)
77var appHostProject = _projectFactory.TryGetProject(new FileInfo(Path.Combine(outputPath, "AppHost.java")));
Templating\CliTemplateFactory.PythonStarterTemplate.cs (1)
91var appHostProject = _projectFactory.TryGetProject(new FileInfo(Path.Combine(outputPath, "apphost.mts")));
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (1)
75var appHostProject = _projectFactory.TryGetProject(new FileInfo(Path.Combine(outputPath, "apphost.mts")));
Templating\DotNetTemplateFactory.cs (1)
122if (File.Exists(Path.Combine(directory, dotnetFileName)))
Templating\OutputPathHelper.cs (1)
149: Path.Combine(normalizedOutputPath, projectName);
Templating\TemplateEngineFactory.cs (7)
150var cacheRoot = Path.Combine(executionContext.CacheDirectory.FullName, "git"); 151var pathRoot = Path.Combine(cacheRoot, "repository"); 173var cacheDirectory = Path.Combine(cacheRoot, key); 187var repositoryRoot = new DirectoryInfo(Path.Combine(checkout.FullName, "repository")); 192Directory.Move(Path.Combine(repositoryRoot.FullName, ".git"), Path.Combine(checkout.FullName, ".git")); 279var repositoryRoot = Path.Combine(checkout, "repository");
Templating\TemplateNuGetConfigService.cs (1)
248var targetFile = new FileInfo(Path.Combine(outputDirectory.FullName, "nuget.config"));
Testing\TestRunReporter.cs (5)
43public string SummaryPath => Path.Combine(OutputPath, "summary.json"); 61var parent = Path.Combine(executionContext.AspireHomeDirectory.FullName, "testruns"); 68var reservation = Path.Combine(parent, $".{id}.reserve"); 69var outputPath = Path.Combine(parent, id); 441var temporaryPath = Path.Combine(OutputPath, $".summary-{Guid.NewGuid():N}.tmp");
Utils\ArchiveHelper.cs (3)
48var fullPath = Path.GetFullPath(Path.Combine(destinationPath, entry.FullName)); 86var fullPath = Path.GetFullPath(Path.Combine(destinationPath, entry.Name)); 122var linkTarget = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(fullPath)!, entry.LinkName));
Utils\AspireRepositoryDetector.cs (1)
97if (File.Exists(Path.Combine(currentDirectory, AspireSolutionFileName)))
Utils\CliDownloader.cs (2)
69var archivePath = Path.Combine(tempDir, archiveFilename); 70var checksumPath = Path.Combine(tempDir, checksumFilename);
Utils\CliPathHelper.cs (7)
68var tempRoot = DirectoryHelper.CreateWithOwnerOnlyPermissions(Path.Combine(aspireHomeDirectory.FullName, "tmp")); 69var sdkRoot = DirectoryHelper.CreateWithOwnerOnlyPermissions(Path.Combine(tempRoot.FullName, "sdk")); 70var directory = DirectoryHelper.CreateWithOwnerOnlyPermissions(Path.Combine(sdkRoot.FullName, Guid.NewGuid().ToString("N"))); 75File.WriteAllText(Path.Combine(directory.FullName, Configuration.AspireConfigFile.FileName), "{}"); 105return Path.Combine(aspireHomeDirectory.FullName, StagingNuGetPackagesFolderName); 150return Path.Combine(GetStagingNuGetPackagesDirectory(aspireHomeDirectory), cacheKey); 217var sidecarPath = Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName);
Utils\ConfigurationHelper.cs (6)
52var newSettingsPath = Path.Combine(currentDirectory.FullName, AspireConfigFile.FileName); 105? new FileInfo(Path.Combine(settingsFile.Directory!.FullName, AspireConfigFile.FileName)) 185return new DirectoryInfo(Path.Combine(configRoot.FullName, AspireJsonConfiguration.SettingsFolder)); 191return new DirectoryInfo(Path.Combine(workspaceAspireDirectory.FullName, IntegrationCacheFolderName)); 204var configPath = Path.Combine(searchDir.FullName, AspireConfigFile.FileName); 349var temporaryPath = Path.Combine(Path.GetDirectoryName(filePath)!, $".{Path.GetFileName(filePath)}.{Guid.NewGuid():N}.tmp");
Utils\DotNetToolDetection.cs (1)
155var storeDirectory = Path.Combine(processDirectory, ".store");
Utils\EnvironmentChecker\DcpConnectionChecker.cs (2)
249var kubeconfigPath = Path.Combine(sessionDirectory, "kubeconfig"); 277var extensionsPath = Path.Combine(dcpDirectory, "ext");
Utils\EnvironmentChecker\DcpDeveloperCertificateCache.cs (1)
28var certificatePath = Path.Combine(cacheDirectory, $"{lookup}.crt");
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (1)
46var configPath = Path.Combine(workingDirectory.FullName, location.RelativePath);
Utils\EnvironmentChecker\DevCertsCheck.cs (2)
293var certificateFile = Path.Combine(trustPath, certificateFileName); 379var hashEntryPath = Path.Combine(trustPath, $"{hash}.{i}");
Utils\EnvironmentChecker\LegacySettingsFileCheck.cs (1)
40var modernConfigPath = Path.Combine(searchDir.FullName, AspireConfigFile.FileName);
Utils\FileSystemHelper.cs (3)
74var targetFilePath = Path.Combine(currentDestination, file.Name); 81var targetSubDir = Path.Combine(currentDestination, subDir.Name); 179? Path.Combine(segments[^2], segments[^1])
Utils\ReparsePoint.cs (2)
301return Path.Combine(parent, $"{name}.new.{suffix}"); 313return Path.GetFullPath(Path.Combine(linkParent, normalizedTarget));
Utils\TemporaryCacheDirectory.cs (1)
40var fullName = Path.Combine(parentDirectory, $".{prefix}-{Guid.NewGuid():N}");
aspire-managed (13)
AppHostServerV2CodeGeneration.cs (1)
20await File.WriteAllTextAsync(Path.Combine(input.Output, name), content).ConfigureAwait(false);
Program.cs (1)
80FileName = Path.Combine(dashboardDirectory, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)),
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\BundleVersionLease.cs (2)
104var leasesDirectory = Path.Combine(fullVersionDirectory, LeasesDirectoryName); 172var leasesDirectory = Path.Combine(versionDirectory, LeasesDirectoryName);
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
TerminalHostForwarder.cs (1)
25var startInfo = new ProcessStartInfo(Path.Combine(directory, BundleDiscovery.GetExecutableFileName(BundleDiscovery.TerminalHostExecutableName)))
aspire-tray (30)
NativeSmokeHarness.cs (3)
53_missing = Path.Combine(_directory.FullName, "Missing.AppHost.cs"); 69var path = Path.Combine(_directory.FullName, name); 102var folder = Directory.CreateDirectory(Path.Combine(_directory.FullName, "project;new-tab")).FullName;
src\Aspire.Tray\Common\AppHostPresentation.cs (1)
47return ToSingleLine(parent is null ? directory : Path.Combine(Path.GetFileName(parent), Path.GetFileName(directory)));
src\Aspire.Tray\Common\FileTraySavedStateStore.cs (2)
37Path.Combine(TrayAppHostPath.Normalize(legacyDirectory), "apphosts.json")); 103var temporaryPath = Path.Combine(_directory, $".history-{Guid.NewGuid():N}.tmp");
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (1)
13: RegisteredTrayStartupSettings(new FileTrayStartupRegistrationStore(Path.Combine(launchAgentsDirectory, FileName)))
src\Aspire.Tray\Common\TrayConfiguration.cs (3)
21=> Path.Combine(GetAspireHome(cliPath, configuredAspireHome, userProfileDirectory), "aspire.config.json"); 37? Path.Combine(userProfileDirectory, ".aspire") : configuredAspireHome); 140using var stream = File.OpenRead(Path.Combine(directory, ".aspire-install.json"));
src\Aspire.Tray\Common\TrayStartupBootstrap.cs (1)
50var temporary = Path.Combine(directory, $".aspire-login-{Guid.NewGuid():N}.tmp");
src\Aspire.Tray\Common\TrayStartupEntry.cs (1)
115current = Path.Combine(current, component);
src\Aspire.Tray\Common\TrayStartupRegistration.cs (1)
157var temporary = Path.Combine(directory, $".aspire-startup-{Guid.NewGuid():N}.tmp");
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\BundleVersionLease.cs (2)
104var leasesDirectory = Path.Combine(fullVersionDirectory, LeasesDirectoryName); 172var leasesDirectory = Path.Combine(versionDirectory, LeasesDirectoryName);
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
src\Shared\LinuxTrayPayload.cs (2)
51var executable = Path.Combine(directory, ExecutableName); 60using var icon = File.OpenRead(Path.Combine(directory, IconName));
TrayApplication.Icons.cs (1)
47var original = NativeMethods.LoadImage(0, Path.Combine(AppContext.BaseDirectory, "Aspire.ico"),
TrayApplication.Panel.cs (1)
757_panelLogo = NativeMethods.LoadImage(0, Path.Combine(AppContext.BaseDirectory, "Aspire.ico"),
WindowsTrayLog.cs (3)
22public static string LogPath => Path.Combine(WindowsSingleInstance.DirectoryPath, "aspire-tray.log"); 49current = Path.Combine(current, component); 64var file = CreateFile(Path.Combine(directory, "aspire-tray.log"),
Aspire.Acquisition.Tests (366)
Scripts\Common\FakeArchiveHelper.cs (9)
22var archivePath = Path.Combine(outputDir, $"aspire-cli-{platform}.{extension}"); 25var contentDir = Path.Combine(outputDir, $"archive-content-{Guid.NewGuid():N}"); 31var binaryPath = Path.Combine(contentDir, binaryName); 61var path = Path.Combine(outputDir, filename); 96var archivePath = Path.Combine(outputDir, $"aspire-cli-{platform}.{extension}"); 99var contentDir = Path.Combine(outputDir, $"verify-content-{Guid.NewGuid():N}"); 107? Path.Combine(contentDir, "payload") 111var binaryPath = Path.Combine(binaryDir, "aspire"); 119var sidecarPath = Path.Combine(contentDir, ".aspire-install.json");
Scripts\Common\ScriptFunctionCommand.cs (4)
47WithEnvironmentVariable("XDG_CONFIG_HOME", Path.Combine(_testEnvironment.MockHome, ".config")); 63var fullScriptPath = Path.Combine(repoRoot, _scriptPath); 89var tempScript = Path.Combine(_testEnvironment.TempDirectory, $"test-func-{Guid.NewGuid():N}.sh"); 131var tempScript = Path.Combine(_testEnvironment.TempDirectory, $"test-func-{Guid.NewGuid():N}.ps1");
Scripts\Common\ScriptHostFixture.cs (1)
183var filePath = Path.Combine(_scriptsDirectory, safeName);
Scripts\Common\ScriptPaths.cs (6)
8private static readonly string s_scriptsDirectory = Path.Combine("eng", "scripts"); 10public static readonly string ReleaseShell = Path.Combine(s_scriptsDirectory, "get-aspire-cli.sh"); 11public static readonly string ReleasePowerShell = Path.Combine(s_scriptsDirectory, "get-aspire-cli.ps1"); 12public static readonly string PRShell = Path.Combine(s_scriptsDirectory, "get-aspire-cli-pr.sh"); 13public static readonly string PRPowerShell = Path.Combine(s_scriptsDirectory, "get-aspire-cli-pr.ps1"); 14public static readonly string VerifyCliArchivePowerShell = Path.Combine(s_scriptsDirectory, "verify-cli-archive.ps1");
Scripts\Common\ScriptToolCommand.cs (2)
39WithEnvironmentVariable("XDG_CONFIG_HOME", Path.Combine(_testEnvironment.MockHome, ".config")); 69var fullScriptPath = Path.Combine(repoRoot, _scriptPath);
Scripts\Common\TestEnvironment.cs (3)
31MockHome = Path.Combine(TempDirectory, "home"); 42var mockBinDir = Path.Combine(TempDirectory, "mock-bin"); 46var ghScriptPath = Path.Combine(mockBinDir, isWindows ? "gh.cmd" : "gh");
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 = await CreateFakeCliAsync(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\FileHelperTests.cs (1)
24var path = Path.Combine(env.TempDirectory, "mock tool");
Scripts\HomebrewCompletionTests.cs (2)
27var loaderPath = Path.Combine(environment.TempDirectory, "loader.ps1"); 29var testPath = Path.Combine(environment.TempDirectory, "test.ps1");
Scripts\LocalHiveScriptFunctionTests.cs (1)
110return Path.Combine(repoRoot, relativePath);
Scripts\PipedInstallTests.cs (2)
127var scriptPath = Path.Combine(repoRoot, ScriptPaths.ReleaseShell); 149var scriptPath = Path.Combine(repoRoot, ScriptPaths.PRShell);
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\PRScriptInstallE2ETests.cs (4)
28var stageDir = Path.Combine(env.TempDirectory, "stage"); 35var installPrefix = Path.Combine(env.TempDirectory, "install"); 57Assert.True(File.Exists(Path.Combine(binDir, "aspire")), $"CLI binary missing under {binDir}"); 59var sidecarPath = Path.Combine(binDir, ".aspire-install.json");
Scripts\PRScriptInstallerModeTests.cs (71)
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"); 116var brewTrustStore = Path.Combine(env.TempDirectory, "brew-trust.txt"); 122var brewPath = Path.Combine(mockBinDir, "brew"); 233var curlPath = Path.Combine(mockBinDir, "curl"); 240var codesignPath = Path.Combine(mockBinDir, "codesign"); 272var mockBinDir = Path.Combine(env.TempDirectory, "mock-winget-bin"); 273var wingetLog = Path.Combine(env.TempDirectory, "winget.log"); 279var implPath = Path.Combine(mockBinDir, "winget-impl.ps1"); 414var wingetCmd = Path.Combine(mockBinDir, "winget.cmd"); 420var aspireCmd = Path.Combine(mockBinDir, "aspire.cmd"); 433await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-arm64-13.3.0.tar.gz"), "fake arm64 archive"); 434await File.WriteAllTextAsync(Path.Combine(root, "aspire-cli-osx-x64-13.3.0.tar.gz"), "fake x64 archive"); 444await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip"), "stub-x64-13.3.0"); 445await WriteRealAspireWinGetZipAsync(Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip"), "stub-arm64-13.3.0"); 569var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact")); 608var localDir = await CreateHomebrewInstallerArtifactAsync(Path.Combine(env.TempDirectory, "homebrew-artifact")); 613var result = await cmd.ExecuteAsync(Path.Combine(localDir, "aspire.rb")); 625var caskPath = Path.Combine(env.TempDirectory, "aspire.rb"); 644var caskPath = Path.Combine(env.TempDirectory, "aspire.rb"); 658var brewLog = (await File.ReadAllLinesAsync(Path.Combine(env.TempDirectory, "brew.log"))).ToList(); 664var trustStore = Path.Combine(env.TempDirectory, "brew-trust.txt"); 674var archiveRoot = Path.Combine(env.TempDirectory, "archives"); 684"--output-dir", Path.Combine(env.TempDirectory, "homebrew-output"), 691var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log")); 696var codesignLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "codesign.log")); 707var archiveRoot = Path.Combine(env.TempDirectory, "archives"); 717"--output-dir", Path.Combine(env.TempDirectory, "homebrew-output"), 721var codesignLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "codesign.log")); 723var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log")); 733var archiveRoot = Path.Combine(env.TempDirectory, "archives"); 736var outputDir = Path.Combine(env.TempDirectory, "homebrew-output"); 749var cask = await File.ReadAllTextAsync(Path.Combine(outputDir, "aspire.rb")); 755Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-arm64-13.3.0.tar.gz"))).ToLowerInvariant(), cask); 756Assert.Contains((await GetSha256HexAsync(Path.Combine(archiveRoot, "aspire-cli-osx-x64-13.3.0.tar.gz"))).ToLowerInvariant(), cask); 758Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.sh"))); 767var brewLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "brew.log")); 831var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact")); 870var archiveRoot = Path.Combine(env.TempDirectory, "archives"); 872var outputDir = Path.Combine(env.TempDirectory, "winget-output"); 883var installerManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml")); 892var localeManifest = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.locale.en-US.yaml")); 894Assert.True(File.Exists(Path.Combine(outputDir, "Microsoft.Aspire.yaml"))); 895Assert.True(File.Exists(Path.Combine(outputDir, "dogfood.ps1"))); 904var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact")); 912var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log")); 923var localDir = await CreateWinGetInstallerArtifactAsync(Path.Combine(env.TempDirectory, "winget-artifact")); 959var wingetLog = await File.ReadAllTextAsync(Path.Combine(env.TempDirectory, "winget.log")); 964var originalInstaller = await File.ReadAllTextAsync(Path.Combine(manifestDir, "Microsoft.Aspire.installer.yaml")); 1013var archiveRoot = Path.Combine(env.TempDirectory, "archives"); 1016var x64Zip = Path.Combine(archiveDir, "aspire-cli-win-x64-13.3.0.zip"); 1017var arm64Zip = Path.Combine(archiveDir, "aspire-cli-win-arm64-13.3.0.zip"); 1021var outputDir = Path.Combine(env.TempDirectory, "winget-output"); 1032var installerYaml = await File.ReadAllTextAsync(Path.Combine(outputDir, "Microsoft.Aspire.installer.yaml")); 1038var extractDir = Path.Combine(env.TempDirectory, $"extract-{Path.GetFileNameWithoutExtension(archive)}"); 1042var 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"); 165var localDir = Path.Combine(env.TempDirectory, "artifacts"); 191var localDir = Path.Combine(env.TempDirectory, "artifacts"); 211var localDir = Path.Combine(env.TempDirectory, "artifacts"); 214var customPath = Path.Combine(env.TempDirectory, "custom"); 224Assert.Contains($"Would install CLI archive to: {Path.Combine(customPath, "bin")}", result.Output); 320var localDir = Path.Combine(env.TempDirectory, "artifacts"); 322var customPath = Path.Combine(env.TempDirectory, "custom"); 332Assert.Contains($"dotnet tool install --tool-path {Path.Combine(customPath, "bin")} Aspire.Cli", result.Output); 341var localDir = Path.Combine(env.TempDirectory, "artifacts"); 362var localDir = Path.Combine(env.TempDirectory, "artifacts"); 382var localDir = Path.Combine(env.TempDirectory, "artifacts"); 385var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt"); 413var localDir = Path.Combine(env.TempDirectory, "artifacts"); 416var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt"); 441Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")), 450var localDir = Path.Combine(env.TempDirectory, "artifacts"); 453var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt"); 484var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt"); 507Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")), 578var localDir = Path.Combine(env.TempDirectory, "artifacts"); 580var customPath = Path.Combine(env.TempDirectory, "custom"); 581var expectedToolPath = Path.Combine(customPath, "bin"); 604var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 624var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 626await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.symbols.nupkg"), "fake-symbols-nupkg-content"); 627await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.snupkg"), "fake-symbols-package-content"); 629await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13_3_0.nupkg"), "fake-invalid-version-content"); 648var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 652await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content"); 671var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 693var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 747var localDir = Path.Combine(env.TempDirectory, "artifacts"); 772var localDir = Path.Combine(env.TempDirectory, "artifacts"); 791var localDir = Path.Combine(env.TempDirectory, "artifacts"); 794var customPath = Path.Combine(env.TempDirectory, "custom"); 803Assert.Contains($"Installing Aspire CLI to {Path.Combine(customPath, "bin")}", result.Output); 897var localDir = Path.Combine(env.TempDirectory, "artifacts"); 899var customPath = Path.Combine(env.TempDirectory, "custom"); 909Assert.Contains($"dotnet tool install --tool-path {Path.Combine(customPath, "bin")} Aspire.Cli", result.Output); 918var localDir = Path.Combine(env.TempDirectory, "artifacts"); 939var localDir = Path.Combine(env.TempDirectory, "artifacts"); 959var localDir = Path.Combine(env.TempDirectory, "artifacts"); 962var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt"); 989var localDir = Path.Combine(env.TempDirectory, "artifacts"); 992var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt"); 1017Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")), 1028var dotnetCommandsPath = Path.Combine(env.TempDirectory, "dotnet-commands.txt"); 1051Assert.True(File.Exists(Path.Combine(prHive, "Aspire.Hosting.13.3.0-pr.5678.deadbeef.nupkg")), 1105var localDir = Path.Combine(env.TempDirectory, "artifacts"); 1107var customPath = Path.Combine(env.TempDirectory, "custom"); 1108var expectedToolPath = Path.Combine(customPath, "bin"); 1131var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 1151var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 1153await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.symbols.nupkg"), "fake-symbols-nupkg-content"); 1154await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13.3.0-pr.5678.deadbeef.snupkg"), "fake-symbols-package-content"); 1156await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.13_3_0.nupkg"), "fake-invalid-version-content"); 1175var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 1178await File.WriteAllTextAsync(Path.Combine(pkgDir, "Aspire.Cli.1_0.nupkg"), "fake-invalid-version-content"); 1197var pkgDir = Path.Combine(env.TempDirectory, "pkgs"); 1219var 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"); 579File.WriteAllText(Path.Combine(env.MockHome, ".bashrc"), "# existing config\n"); 591var bashrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".bashrc")); 603File.WriteAllText(Path.Combine(env.MockHome, ".zshrc"), "# existing config\n"); 615var zshrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".zshrc")); 629Path.Combine(env.MockHome, ".bashrc"), 642var bashrcContent = File.ReadAllText(Path.Combine(env.MockHome, ".bashrc")); 675var mockBinDir = Path.Combine(env.TempDirectory, "mock-bin"); 678var mockCurl = Path.Combine(mockBinDir, "curl"); 711var mockBinDir = Path.Combine(env.TempDirectory, "mock-bin"); 714var 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\ReleaseScriptPSFunctionTests.cs (7)
392var destPath = Path.Combine(env.TempDirectory, "install-dest"); 403Assert.True(File.Exists(Path.Combine(destPath, "aspire")), 413var destPath = Path.Combine(env.TempDirectory, "install-dest-zip"); 424Assert.True(File.Exists(Path.Combine(destPath, "aspire.exe")), 528var cliPath = Path.Combine(env.TempDirectory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 529var capturePath = Path.Combine(env.TempDirectory, "setup-args.txt"); 562var cliPath = Path.Combine(env.TempDirectory, "setup-invoked.txt");
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")));
Scripts\ScriptToolCommandTests.cs (1)
17var scriptPath = Path.Combine(env.TempDirectory, "interleave.sh");
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Azure.AI.Extensions.OpenAI.Tests (2)
AspireAzureOpenAIExtensionsTests.cs (1)
49var schema = JsonSchema.FromFile(Path.Combine(AppContext.BaseDirectory, "ConfigurationSchema.json"),
AspireAzureProjectOpenAIExtensionsTests.cs (1)
47var schema = JsonSchema.FromFile(Path.Combine(AppContext.BaseDirectory, "ConfigurationSchema.json"),
Aspire.Azure.AI.Projects.Tests (1)
AspireAzureAIProjectsExtensionsTests.cs (1)
42var schema = JsonSchema.FromFile(Path.Combine(AppContext.BaseDirectory, "ConfigurationSchema.json"),
Aspire.Cli.EndToEnd.Tests (540)
AgentCommandTests.cs (12)
98var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"); 153var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"); 189var vscodePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".vscode"); 201var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 249var vscodeMcpConfigPath = Path.Combine(vscodePath, "mcp.json"); 311var vscodePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".vscode"); 312var mcpConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"); 429Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 465var executablePathFile = Path.Combine(workspace.WorkspaceRoot.FullName, "cli-executable.txt"); 543var copilotDirectory = scope == "project" ? Path.Combine(root, ".github", "copilot") : Path.Combine(root, ".copilot"); 546(Path.Combine(copilotDirectory, "settings.json"), pluginSettings, expectedPluginSettings), 549(Path.Combine(scope == "project" ? root : Path.Combine(root, ".config", "opencode"), "opencode.jsonc"),
AppHostSyntaxErrorOutputTests.cs (5)
118configureProject(Path.Combine(workspace.WorkspaceRoot.FullName, projectName)); 256var appHostPath = Path.Combine(projectDirectory, "apphost.cs"); 259File.WriteAllText(Path.Combine(projectDirectory, "BrokenDotNetApp.csproj"), $$""" 285File.WriteAllText(Path.Combine(projectDirectory, "MissingSdkAppHost.csproj"), """ 297File.WriteAllText(Path.Combine(projectDirectory, "apphost.mts"), "const value = ;");
BundleSmokeTests.cs (13)
66var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 67var appHostDirectory = Path.Combine(projectRoot, $"{projectName}.AppHost"); 68var appHostProjectPath = Path.Combine(appHostDirectory, $"{projectName}.AppHost.csproj"); 69var appHostSourcePath = Path.Combine(appHostDirectory, "AppHost.cs"); 70var argsOutputPath = Path.Combine(projectRoot, "apphost-args.txt"); 133var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 134var appHostDirectory = Path.Combine(projectRoot, $"{ProjectName}.AppHost"); 135var appHostProjectPath = Path.Combine(appHostDirectory, $"{ProjectName}.AppHost.csproj"); 136var appHostSourcePath = Path.Combine(appHostDirectory, "AppHost.cs"); 137var argsOutputPath = Path.Combine(projectRoot, "apphost-dnx-args.txt"); 227var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 228var appHostSourcePath = Path.Combine(projectRoot, "apphost.cs"); 229var argsOutputPath = Path.Combine(projectRoot, "apphost-file-args.txt");
CentralPackageManagementTests.cs (18)
46var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest"); 47var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost"); 48var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj"); 49var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props"); 68File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """ 158var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest"); 159var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost"); 160var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj"); 161var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props"); 179File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """ 281var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "CpmTest"); 282var appHostDir = Path.Combine(projectDir, "CpmTest.AppHost"); 283var appHostCsprojPath = Path.Combine(appHostDir, "CpmTest.AppHost.csproj"); 284var directoryPackagesPropsPath = Path.Combine(projectDir, "Directory.Packages.props"); 299File.WriteAllText(Path.Combine(appHostDir, "Program.cs"), """ 379var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 380var directoryPackagesPropsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"); 415var lsOutput = File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "ls.json"));
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")));
ConfigDiscoveryTests.cs (2)
57var workspaceConfigPath = Path.Combine(workspaceRoot, "aspire.config.json"); 163var parentConfigPath = Path.Combine(
ConfigMigrationTests.cs (14)
46var aspireHomeDir = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home"); 126var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json"); 127var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json"); 190var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json"); 191var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json"); 235var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json"); 238Path.Combine(aspireHomeDir, "globalsettings.json"), 291var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json"); 292var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json"); 362var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json"); 363var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json"); 443var newConfigPath = Path.Combine(aspireHomeDir, "aspire.config.json"); 444var legacyPath = Path.Combine(aspireHomeDir, "globalsettings.json"); 594return Path.Combine(workspace.Path, "exported-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");
CSharpProjectModeInitTests.cs (6)
67var solutionPath = Path.Combine(workspace.WorkspaceRoot.FullName, solutionFileName); 85var workspaceNuGetConfig = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 139var solutionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"); 141var appHostDir = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost")); 142var leftoverPath = Path.Combine(appHostDir.FullName, "leftover.txt"); 158var workspaceNuGetConfig = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config");
CustomTemplateTests.cs (7)
38Path.Combine(workspace.WorkspaceRoot.FullName, "template")); 73var sourceLocation = CliE2ETestHelpers.ToContainerPath(Path.Combine(workspace.WorkspaceRoot.FullName, "template"), workspace); 104var listed = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "sources.json")))!.AsObject(); 111var table = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "sources.txt")); 188Assert.Empty(JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "empty-sources.json")))!.AsObject()); 192var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "out"); 196await VerifyXunit.Verifier.Verify(files).UseDirectory(Path.Combine(testDirectory, "Snapshots"));
DescribeCommandTests.cs (5)
48var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 101using var resourcesJson = JsonDocument.Parse(File.ReadAllText(Path.Combine(appHostDir, "resources.json"))); 152var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, "AspireReplicaTestApp"); 153var appHostDir = Path.Combine(projectDir, "AspireReplicaTestApp.AppHost"); 154var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
DockerComposeDeployWithVolumeTests.cs (1)
48var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName);
DockerDeploymentTests.cs (6)
54var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 55var appHostDir = Path.Combine(projectDir, $"{ProjectName}.AppHost"); 56var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 151var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 152var appHostDir = Path.Combine(projectDir, $"{ProjectName}.AppHost"); 153var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
DocsCommandE2ETests.cs (1)
19var docsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "llms-small.txt");
DoctorCommandTests.cs (8)
45var skillPath = Path.Combine(skillDirectory.FullName, "SKILL.md"); 66Path.Combine(workspace.Path, "doctor-skills.txt"), TestContext.Current.CancellationToken); 73Path.Combine(workspace.Path, "doctor-skills.json"), TestContext.Current.CancellationToken)); 131Path.Combine(runtimeDirectory.FullName, runtime), 168Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-runtime.txt"), 178Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-runtime.json"), 195Assert.Equal("1", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-text.exit"))); 196Assert.Equal("1", await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "doctor-json.exit")));
EmptyAppHostTemplateTests.cs (6)
79var exitCode = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "destroy-exit.txt")); 80var errorOutput = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "destroy-output.txt")); 81var sentinelPath = Path.Combine(workspace.WorkspaceRoot.FullName, "destroy-apphost-started"); 192var sourcePackage = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "source-template.nupkg")); 275var destinationPath = Path.Combine(destinationFeed.FullName, $"Aspire.ProjectTemplates.{packageVersion}.nupkg"); 319Path.Combine(workspace.FullName, "NuGet.Config"),
EmulatedLocalReleaseBuildTests.cs (7)
88var projectDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectName)); 153var projectDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectName)); 154var configPath = Path.Combine(projectDir.FullName, "aspire.config.json"); 239var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 292Path.Combine(workspace.WorkspaceRoot.FullName, "explicit-feed"), 336var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 571var packagePath = Path.Combine(sourceDirectory, $"{packageId}.{packageVersion}.nupkg");
EmulatedReleasedBuildTests.cs (3)
70var projectDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectName)); 128var projectDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectName)); 129var configPath = Path.Combine(projectDir.FullName, "aspire.config.json");
EmulatedStagingBuildTests.cs (4)
82await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"), $$""" 98var projectDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectName)); 161var projectDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectName)); 162var configPath = Path.Combine(projectDir.FullName, "aspire.config.json");
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");
GoCodegenValidationTests.cs (7)
40existingFiles[Path.Combine(apiDirectory.FullName, "go.mod")] = """ 45existingFiles[Path.Combine(apiDirectory.FullName, "main.go")] = """ 72var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 87Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.go"), 98var sdkPath = Path.Combine(modulesDir, "aspire.go"); 99var codegenHashPath = Path.Combine(modulesDir, ".codegen-hash"); 127var filePath = Path.Combine(modulesDir, file);
GoEmptyAppHostTemplateTests.cs (3)
75var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 76Assert.True(File.Exists(Path.Combine(projectRoot, "apphost.go")), $"Expected apphost.go in {projectRoot}"); 77Assert.True(File.Exists(Path.Combine(projectRoot, "go.mod")), $"Expected go.mod in {projectRoot}");
GoPublishTests.cs (3)
108var composeContent = await File.ReadAllTextAsync(Path.Combine(artifactsPath, "docker-compose.yaml")); 126Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.go"), 139var dockerfilePath = Path.Combine(artifactsPath, $"{resourceName}.Dockerfile");
GoRootModuleInitTests.cs (11)
27File.WriteAllBytes(Path.Combine(root, "go.mod"), goMod); 28File.WriteAllBytes(Path.Combine(root, "main.go"), mainGo); 31File.WriteAllBytes(Path.Combine(root, "go.work"), goWork); 49Assert.Equal(goMod, File.ReadAllBytes(Path.Combine(root, "go.mod"))); 50Assert.Equal(mainGo, File.ReadAllBytes(Path.Combine(root, "main.go"))); 53Assert.Equal(goWork, File.ReadAllBytes(Path.Combine(root, "go.work"))); 57Assert.False(File.Exists(Path.Combine(root, "go.work"))); 60var appHostRoot = Path.Combine(root, "aspire-apphost"); 61Assert.True(File.Exists(Path.Combine(appHostRoot, "apphost.go"))); 62Assert.True(File.Exists(Path.Combine(appHostRoot, "go.mod"))); 63Assert.True(File.Exists(Path.Combine(appHostRoot, "go.work")));
GoSecretAppHostTests.cs (1)
62await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "listed-secrets.json"), TestContext.Current.CancellationToken));
GoStarterReadinessTests.cs (1)
45var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "GoReady");
GoStarterTemplateTests.cs (3)
24var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.go"); 98var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "GoStarterApp"); 104var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(projectRoot, "aspire.config.json")));
Helpers\CliE2ETestHelpers.cs (9)
689if (File.Exists(Path.Combine(dir.FullName, "Aspire.slnx"))) 1224var configPath = Path.Combine(projectRoot, "aspire.config.json"); 1254destDir = Path.Combine(destDir, label); 1257using var logWriter = new StreamWriter(Path.Combine( 1279var destFile = Path.Combine(destDir, captureFileName); 1291? Path.Combine(githubWorkspace, "testresults") 1292: Path.Combine(AppContext.BaseDirectory, "TestResults"); 1305var destFile = Path.Combine(destDir, Path.GetFileName(file)); 1323CopyDirectory(dir, Path.Combine(destDir, destDirName), log);
Helpers\CliInstallStrategyTests.cs (9)
23var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "selected.tar.gz"); 601File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.25175.1.nupkg"), ""); 602File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0-preview.1.25175.1.nupkg"), ""); 898File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0-preview.1.12345.1.nupkg"), ""); 920File.WriteAllText(Path.Combine(tempDir.FullName, $"Aspire.Cli.{version}.nupkg"), ""); 938File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0.nupkg"), ""); 956File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.3.0.nupkg"), ""); 957File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.13.4.0.nupkg"), ""); 976File.WriteAllText(Path.Combine(tempDir.FullName, "Aspire.Cli.linux-x64.13.3.0.nupkg"), "");
Helpers\ConfigSourceTestContext.cs (19)
31_feedRoot = CliE2ETestHelpers.ToContainerPath(Path.Combine(_root, "integration-feed"), workspace); 35_repository = CliE2ETestHelpers.ToContainerPath(Path.Combine(_root, "configuration source"), workspace); 54await File.WriteAllTextAsync(Path.Combine(context._root, "check-source.cs"), SourceCheckProgram, cancellationToken); 94using var archive = ZipFile.Open(Path.Combine(directory.FullName, $"{id}.1.0.0.nupkg"), ZipArchiveMode.Create); 108var integrations = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_root, "integrations.json"), _cancellationToken))!.AsArray(); 120var appHost = await File.ReadAllTextAsync(Path.Combine(_root, "actual-apphost.cs"), _cancellationToken); 204var consentOutput = await File.ReadAllTextAsync(Path.Combine(_root, "consent.log"), _cancellationToken); 207Assert.False(Directory.Exists(Path.Combine(_root, "SourceApp"))); 217Assert.False(Directory.Exists(Path.Combine(_root, "SourceApp"))); 243Assert.Equal("accepted", await File.ReadAllTextAsync(Path.Combine(_root, "git-authenticated.txt"), _cancellationToken)); 252var log = await File.ReadAllTextAsync(Path.Combine(_root, "actual-git-auth-cli.log"), _cancellationToken); 311var actual = await File.ReadAllTextAsync(Path.Combine(_root, "actual-agent-settings.json"), _cancellationToken); 355await File.ReadAllTextAsync(Path.Combine(_root, "run.log"), _cancellationToken)); 371var output = await File.ReadAllTextAsync(Path.Combine(_root, "source-disabled.log"), _cancellationToken); 382var output = await File.ReadAllTextAsync(Path.Combine(_root, "missing-source.log"), _cancellationToken); 457return JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_root, "actual-config.json"), _cancellationToken))!.AsObject(); 461=> (await File.ReadAllTextAsync(Path.Combine(_root, "source-version.txt"), _cancellationToken)).Trim(); 472await File.WriteAllTextAsync(Path.Combine(directory.FullName, "platform.json"), $$""" 503await File.WriteAllTextAsync(Path.Combine(_root, "ssh-probe.cs"), SshProbeProgram, _cancellationToken);
Helpers\GitHttpServer.cs (1)
52startInfo.ArgumentList.Add($"safe.directory={Path.Combine(directory, "template.git")}");
Helpers\GitIgnoreAssertions.cs (1)
12var gitIgnorePath = Path.Combine(projectRoot, ".gitignore");
Helpers\HungCommandDiagnosticsTests.cs (3)
35var home = Path.Combine(workspace.FullName, "home"); 48var diagnostics = Path.Combine(workspace.FullName, CliE2EAutomatorHelpers.DiagnosticsDirectoryName); 49var snapshot = await File.ReadAllTextAsync(Path.Combine(diagnostics, CliE2EAutomatorHelpers.HungCommandProcessesFileName), TestContext.Current.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)
427var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 428var apiDir = Path.Combine(projectDir, $"{projectName}.ApiService"); 430Assert.True(File.Exists(Path.Combine(appHostDir, "AppHost.cs"))); 431Assert.True(File.Exists(Path.Combine(apiDir, $"{projectName}.ApiService.csproj"))); 437var projectFile = Path.Combine(appHostDir, $"{projectName}.AppHost.csproj"); 452output.WriteLine($"Writing AppHost.cs to: {Path.Combine(appHostDir, "AppHost.cs")}"); 453File.WriteAllText(Path.Combine(appHostDir, "AppHost.cs"), appHostCode); 454File.WriteAllText(Path.Combine(apiDir, "Program.cs"), apiProgramCode);
Helpers\KubernetesDeployTestHelpersTests.cs (1)
77var destination = Path.Combine(directory.FullName, "download");
Helpers\LocalDeploymentTestHelpers.cs (3)
16var webDirectory = Path.Combine(projectDir, $"{projectName}.Web"); 17Assert.True(File.Exists(Path.Combine(webDirectory, $"{projectName}.Web.csproj"))); 19var programPath = Path.Combine(webDirectory, "Program.cs");
Helpers\SecretInputTestHelpers.cs (3)
24var valuePath = Path.Combine(workspace.Path, "secret-value.txt"); 25var sourcePath = Path.Combine(workspace.Path, "secret-source.txt"); 26var patternsPath = Path.Combine(workspace.Path, "secret-log-patterns.txt");
Helpers\TerminalRun.cs (3)
132var diagnosticsSource = Path.Combine(_workspace.WorkspaceRoot.FullName, CliE2EAutomatorHelpers.DiagnosticsDirectoryName); 175File.Copy(file, Path.Combine(destination, Path.GetFileName(file)), overwrite: true); 180CopyDirectoryIfExists(dir, Path.Combine(destination, Path.GetFileName(dir)));
Helpers\TestDirectoryHelpers.cs (2)
23File.Copy(file, Path.Combine(destination, Path.GetFileName(file))); 28CopyDirectory(dir, Path.Combine(destination, Path.GetFileName(dir)));
Helpers\TypeScriptAppHostToolchainTestHelpers.cs (5)
36var packageJsonPath = Path.Combine(projectRoot, "package.json"); 51var lockFilePath = Path.Combine(projectRoot, lockFileName); 58var nodeModulesPath = Path.Combine(projectRoot, "node_modules"); 178var yarnConfigPath = Path.Combine(projectRoot, YarnConfigurationFileName); 185var yarnLockPath = Path.Combine(projectRoot, "yarn.lock");
IntegrationSourceTests.cs (6)
77using (var archive = ZipFile.Open(Path.Combine(feed.FullName, $"{packageId}.{packageVersion}.nupkg"), ZipArchiveMode.Create)) 115var projectDirectory = Path.Combine(root, "SourceApp"); 116var nugetConfigPath = Path.Combine(projectDirectory, "nuget.config"); 138await File.ReadAllLinesAsync(Path.Combine(projectDirectory, "apphost.cs"), cancellationToken), 145var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(projectDirectory, "aspire.config.json"), cancellationToken))!; 176var metadata = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(packageCacheDirectory, ".nupkg.metadata"), cancellationToken))!;
JavaCodegenValidationTests.cs (3)
49var modulesDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire/modules"); 55var codegenHashPath = Path.Combine(modulesDir, ".codegen-hash"); 95var filePath = Path.Combine(modulesDir, Path.Combine(file.Split('/')));
JavaEmptyAppHostTemplateTests.cs (1)
37Path.Combine(workspace.WorkspaceRoot.FullName, "JavaEmptyApp"),
JavaPolyglotTests.cs (1)
52var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.java");
JavaScriptPublishTests.cs (9)
157var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 192var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 227var appDir = Path.Combine(workspace.WorkspaceRoot.FullName, appName); 234File.WriteAllText(Path.Combine(appDir, "package.json"), $$""" 249File.WriteAllText(Path.Combine(appDir, "yarn.lock"), $$""" 266File.WriteAllText(Path.Combine(appDir, "server.js"), $$""" 291File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "verify-runtime.sh"), $$""" 346File.Copy(file, Path.Combine(workspace.WorkspaceRoot.FullName, Path.GetFileName(file))); 352var targetDir = Path.Combine(workspace.WorkspaceRoot.FullName, Path.GetFileName(fixtureDir));
KubernetesDeployBasicApiServiceTests.cs (1)
110Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployTypeScriptTests.cs (2)
76var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 77var appHostFilePath = Path.Combine(projectDir, "apphost.mts");
KubernetesDeployTypeScriptWithPersistentVolumeTests.cs (2)
91var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 92var appHostFilePath = Path.Combine(projectDir, "apphost.mts");
KubernetesDeployWithCertManagerTests.cs (2)
29var fixtureDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "pebble-eab"); 33Path.Combine(fixtureDirectory, "reject-issuer-delete.yaml"),
KubernetesDeployWithFileKeyRefTests.cs (1)
124Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithGarnetTests.cs (1)
106Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithHelmChartTests.cs (1)
103Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithMongoDBTests.cs (1)
109Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithMySqlTests.cs (1)
103Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithNatsTests.cs (1)
107Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithPersistentVolumeTests.cs (1)
150Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithPostgresTests.cs (1)
103Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithProjectPersistentVolumeTests.cs (1)
131Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithRabbitMQTests.cs (1)
99Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithRedisTests.cs (1)
111Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithSqlServerTests.cs (1)
103Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesDeployWithValkeyTests.cs (1)
106Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
KubernetesPublishRequiresExternalEndpointTests.cs (3)
89var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 90var appHostDir = Path.Combine(projectDir, $"{ProjectName}.AppHost"); 91var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
KubernetesPublishTests.cs (3)
133var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 134var appHostDir = Path.Combine(projectDir, $"{ProjectName}.AppHost"); 135var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
LaunchProfileTests.cs (4)
29File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "LaunchProfile.sln"), "Fake solution file"); 41var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "LaunchProfile.AppHost"); 42var appHostSourcePath = Path.Combine(appHostDirectory, "AppHost.cs"); 44var profileOutputPath = Path.Combine(appHostDirectory, "selected-profile.txt");
LaunchSettingsPortHelpersTests.cs (2)
129var properties = project.CreateSubdirectory(Path.Combine(projectName, "Properties")); 130File.WriteAllText(Path.Combine(properties.FullName, "launchSettings.json"), content);
LocalConfigMigrationTests.cs (1)
87var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json");
McpDocsE2ETests.cs (6)
344var prScript = $"bash {AspireCliShellCommandHelpers.QuoteBashArg(Path.Combine(scriptsDir, "get-aspire-cli-pr.sh"))}"; 345var installScript = $"bash {AspireCliShellCommandHelpers.QuoteBashArg(Path.Combine(scriptsDir, "get-aspire-cli.sh"))}"; 355Path.Combine(installPrefix, "bin")), 358$"{AspireCliShellCommandHelpers.GetInstallScriptCommand(strategy, installScript)} --install-path {AspireCliShellCommandHelpers.QuoteBashArg(Path.Combine(installPrefix, "bin"))} {isolatedInstallArgs}", 359Path.Combine(installPrefix, "bin")), 371AspireExecutablePath = Path.Combine(cliBinDir, "aspire");
OllamaIntegrationTests.cs (3)
52var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 53var appHostDir = Path.Combine(projectDir, $"{ProjectName}.AppHost"); 54var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
PersistentContainerEndToEndTests.cs (1)
132Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName),
PodmanDeploymentTests.cs (3)
64var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName); 65var appHostDir = Path.Combine(projectDir, $"{ProjectName}.AppHost"); 66var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
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"), """
PsCommandTests.cs (1)
99var outputFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "ps-output.json");
PythonReactTemplateTests.cs (1)
36Path.Combine(workspace.WorkspaceRoot.FullName, "AspirePyReactApp"),
RadiusDotnetProjectDeployTests.cs (1)
27var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, ProjectName);
RadiusPublishTests.cs (2)
118var appBicepPath = Path.Combine(outputDir, "app.bicep"); 130var bicepConfigPath = Path.Combine(outputDir, "bicepconfig.json");
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")));
SdkExportTests.cs (2)
24var scriptPath = Path.Combine(workspace.WorkspaceRoot.FullName, "run-sdk-export.sh"); 25var exportPath = Path.Combine(workspace.WorkspaceRoot.FullName, "sdk-export.json");
SelfUpdateChannelPersistenceTests.cs (2)
71var initialSidecar = ReadSidecar(Path.Combine(workspace.WorkspaceRoot.FullName, "initial-install-sidecar.json")); 85var updatedSidecar = ReadSidecar(Path.Combine(workspace.WorkspaceRoot.FullName, "updated-install-sidecar.json"));
SettledNpmReleasesTests.cs (2)
42File.WriteAllText(Path.Combine(workspace.FullName, "package.json"), """{ "name": "consumer", "version": "1.0.0", "private": true }"""); 43File.WriteAllText(Path.Combine(workspace.FullName, "user.npmrc"), string.Empty);
SingleFileAppHostInitDotnetRunTests.cs (3)
67var appHostCs = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 68var aspireConfigJson = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 69var appHostRunJson = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json");
SmokeTests.cs (3)
247var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 248var configPath = Path.Combine(projectPath, "aspire.config.json"); 250var appHostPath = Path.Combine(projectPath, appHostFileName);
StartStopTests.cs (5)
207var bothInstancesPath = Path.Combine(workspace.WorkspaceRoot.FullName, "both-instances.json"); 208var remainingInstancePath = Path.Combine(workspace.WorkspaceRoot.FullName, "remaining-instance.json"); 209var restartedInstancePath = Path.Combine(workspace.WorkspaceRoot.FullName, "restarted-instance.json"); 210var stoppedInstancesPath = Path.Combine(workspace.WorkspaceRoot.FullName, "stopped-instances.json"); 371var assertionScript = Path.Combine(workspace.WorkspaceRoot.FullName, "assert-detached-process-group.py");
StopNonInteractiveTests.cs (2)
271new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App2")), 272new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App1")));
TerminalCommandTests.cs (7)
36var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TerminalReplicas"); 37var appHostPath = Path.Combine(projectDirectory, "apphost.cs"); 66File.WriteAllText(Path.Combine(projectDirectory, "probe.tape"), ""); 76using var discovery = JsonDocument.Parse(File.ReadAllText(Path.Combine(projectDirectory, "resources.json"))); 105File.ReadAllText(Path.Combine(projectDirectory, "attach-ambiguity.log"))); 110File.ReadAllText(Path.Combine(projectDirectory, "tape-ambiguity.log"))); 132File.WriteAllText(Path.Combine(projectDirectory, "probe.tape"), $$"""
TestCommandTests.cs (7)
44var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TestingApp"); 94File.WriteAllText(Path.Combine(directory, "service.py"), """ 109File.WriteAllText(Path.Combine(directory, "probe.py"), """ 132File.WriteAllText(Path.Combine(directory, "inspect.py"), """ 159File.WriteAllText(Path.Combine(directory, "verify.py"), """ 227File.WriteAllText(Path.Combine(directory, "apphost.mts"), """ 270var appHostPath = Path.Combine(directory, "apphost.cs");
tests\Aspire.Hosting.TestUtilities\Utils\MSBuildUtils.cs (2)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\Hex1bTestHelpers.cs (1)
147return Path.Combine(recordingsDir, $"{testName}.cast");
tests\Shared\PebbleAcmeFixture.cs (1)
187var path = Path.Combine(directory, name);
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
TypeScriptBlazorGatewayTests.cs (2)
83var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 96var verificationScriptPath = Path.Combine(workspace.WorkspaceRoot.FullName, "verify-blazor-gateway.sh");
TypeScriptCodegenValidationTests.cs (11)
95var lockFilePath = Path.Combine( 104var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 144var filePath = Path.Combine(modulesDir, file); 157var aspireTs = File.ReadAllText(Path.Combine(modulesDir, "aspire.mts")); 212var aspireModulePath = Path.Combine(modulesDir, "aspire.mts"); 229var codegenHashPath = Path.Combine(modulesDir, ".codegen-hash"); 254var filePath = Path.Combine(modulesDir, file); 273var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 286var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 337var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 419var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
TypeScriptDotnetProjectBuildConfigurationTests.cs (2)
76var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 90var verificationScriptPath = Path.Combine(workspace.WorkspaceRoot.FullName, "verify-build-configuration.sh");
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();
TypeScriptPolyglotApphostDirectoryTests.cs (2)
59var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "tsapp"); 78var appHostPath = Path.Combine(projectRoot, "apphost.mts");
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)
50var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 122var artifactsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "artifacts"); 128.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(chartPath, "values.yaml")), "yaml") 139var failureLog = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "callback-failure.log")); 183var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 268var artifactsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "artifacts"); 269var composeContent = await File.ReadAllTextAsync(Path.Combine(artifactsPath, "docker-compose.yaml")); 357var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 432var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 473var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 506Path.Combine(s_jsPublishFixturesDir, fixtureName), 507Path.Combine(workspace.WorkspaceRoot.FullName, fixtureName)); 513var 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"), """
TypeScriptSqlServerNativeAssetsBundleTests.cs (1)
54var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
TypeScriptStarterSmokeTests.cs (4)
50var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "TsStarterApp"); 52var modulesDir = Path.Combine(projectRoot, ".aspire/modules"); 59var aspireModulePath = Path.Combine(modulesDir, "aspire.mts"); 79AssertAspireConfigChannelConsistentWithSdkVersion(Path.Combine(projectRoot, "aspire.config.json"));
TypeScriptStarterTemplateTests.cs (3)
37var projectRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "TsStarterApp"); 39var modulesDir = Path.Combine(projectRoot, ".aspire/modules"); 46var aspireModulePath = Path.Combine(modulesDir, "aspire.mts");
UpdateChannelNuGetConfigOrderingTests.cs (18)
68var packagePath = Path.Combine(feed.FullName, $"{dependencyId}.{dependencyVersion}.nupkg"); 97var projectPath = Path.Combine(root, "AppHost.csproj"); 113var configPath = Path.Combine(root, "aspire.config.json"); 123var nugetPath = Path.Combine(root, "nuget.config"); 140foreach (var path in new[] { projectPath, configPath, nugetPath, Path.Combine(root, "packages.lock.json") }) 182Assert.True(File.Exists(Path.Combine(cachedDependency, ".nupkg.metadata"))); 194await File.ReadAllTextAsync(Path.Combine(root, "dry-run-output.txt"))); 198Assert.True(File.Exists(Path.Combine(cachedDependency, ".nupkg.metadata"))); 228await File.ReadAllTextAsync(Path.Combine(root, "dry-run-exit.txt"))); 287var appHostCsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 288var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 289var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 437var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 438var appHostPath = Path.Combine(projectPath, "apphost.cs"); 439var configPath = Path.Combine(projectPath, "aspire.config.json"); 440var nugetConfigPath = Path.Combine(projectPath, "nuget.config"); 441var restoreMarkerPath = Path.Combine(projectPath, "native-restore.txt"); 442await File.WriteAllTextAsync(Path.Combine(projectPath, "Directory.Build.targets"), """
Aspire.Cli.Tests (3906)
Acquisition\IdentityResolverTests.cs (2)
508=> File.WriteAllText(Path.Combine(directory, InstallSidecarReader.SidecarFileName), json); 580logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"),
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\InstallSidecarReaderTests.cs (8)
45var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, InstallSidecarReader.SidecarFileName); 143var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, InstallSidecarReader.SidecarFileName); 162var sidecarPath = Path.Combine(workspace.WorkspaceRoot.FullName, InstallSidecarReader.SidecarFileName); 235var sidecarPath = Path.Combine(workspace.WorkspaceRoot.FullName, InstallSidecarReader.SidecarFileName); 251var sidecarPath = Path.Combine(workspace.WorkspaceRoot.FullName, InstallSidecarReader.SidecarFileName); 267var sidecarPath = Path.Combine(workspace.WorkspaceRoot.FullName, InstallSidecarReader.SidecarFileName); 285var sidecarPath = Path.Combine(workspace.WorkspaceRoot.FullName, InstallSidecarReader.SidecarFileName); 363var path = Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName);
Acquisition\InstallSidecarWriterTests.cs (5)
15var sidecarPath = Path.Combine(workspace.Path, InstallSidecarReader.SidecarFileName); 54var sidecarPath = Path.Combine(workspace.Path, InstallSidecarReader.SidecarFileName); 63var sidecarPath = Path.Combine(workspace.Path, InstallSidecarReader.SidecarFileName); 77var sidecarPath = Path.Combine(workspace.Path, InstallSidecarReader.SidecarFileName); 97var sidecarPath = Path.Combine(workspace.Path, InstallSidecarReader.SidecarFileName);
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");
Acquisition\PeerInstallProbeTests.cs (8)
68var missing = Path.Combine(workspace.WorkspaceRoot.FullName, "does-not-exist"); 366var pidFile = Path.Combine(workspace.WorkspaceRoot.FullName, "descendant.pid"); 430var pidFile = Path.Combine(workspace.WorkspaceRoot.FullName, "peer.pid"); 563var argvFile = Path.Combine(workspace.WorkspaceRoot.FullName, "argv.txt"); 565? Path.Combine(workspace.WorkspaceRoot.FullName, "peer.cmd") 566: Path.Combine(workspace.WorkspaceRoot.FullName, "peer"); 588? Path.Combine(workspace.WorkspaceRoot.FullName, "peer.cmd") 589: Path.Combine(workspace.WorkspaceRoot.FullName, "peer");
Acquisition\WingetRegistryProbeTests.cs (3)
25var sidecarPath = Path.Combine(workspace.Path, SidecarFileName); 44var sidecarPath = Path.Combine(workspace.Path, SidecarFileName); 89var sidecarPath = Path.Combine(workspace.Path, SidecarFileName);
Agents\AgentConfigurationTestContext.cs (2)
34["ProgramFiles"] = Path.Combine(Workspace.WorkspaceRoot.FullName, "system"), 35["ProgramData"] = Path.Combine(Workspace.WorkspaceRoot.FullName, "system-data")
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"))); 717_context.SetVariable("COPILOT_HOME", Path.Combine(_context.ClaudeDirectory, suffix)); 718var path = Path.Combine(_context.ClaudeDirectory, "settings.json"); 722Path.Combine(_context.ClaudeManagedDirectory, "managed-settings.json"),
Agents\AgentPathTests.cs (8)
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)); 82var homePath = Path.Combine(_context.Home.FullName, "config.json"); 83var projectPath = Path.Combine(_context.Project.FullName, "config.json");
Agents\ClaudeCodeAgentEnvironmentScannerTests.cs (3)
22var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"); 108Directory.CreateDirectory(Path.Combine(workingDirectory.FullName, ".claude")); 111Directory.CreateDirectory(Path.Combine(selectedRoot.FullName, ".claude"));
Agents\CopilotAgentEnvironmentScannerTests.cs (2)
19var appPath = Path.Combine(workspace.CreateDirectory("Applications").FullName, "GitHub-Copilot-linux-arm64.AppImage"); 103var configPath = Path.Combine(configDirectory.FullName, "mcp-config.json");
Agents\CopilotAppInstallationDetectorTests.cs (9)
20var appPath = Path.Combine(appDirectory.FullName, fileName); 41await File.WriteAllTextAsync(Path.Combine(appDirectory.FullName, fileName), 60Path.Combine(appDirectory.FullName, "github.exe"), 67var executablePath = Path.Combine(appDirectory.FullName, "github.exe"); 104Path.Combine(applicationsDirectory.FullName, "github-copilot.desktop"), 111var desktopEntryPath = Path.Combine(applicationsDirectory.FullName, "github-copilot.desktop"); 154Path.Combine(dataHome.FullName, "applications"), 155Path.Combine(firstDataDirectory.FullName, "applications"), 156Path.Combine(secondDataDirectory.FullName, "applications"),
Agents\LocalAspireSkillsTests.cs (6)
38names.Select(name => (Path.Combine(skills, name), AgentConfigurationScope.Project)).OrderBy(entry => entry.Item1, StringComparers.FileSystemPath), 56await AgentConfigurationTestContext.WriteAsync(Path.Combine(path, "SKILL.md"), "active local skill"); 75await AgentConfigurationTestContext.WriteAsync(Path.Combine(project, "SKILL.md"), "project"); 76await AgentConfigurationTestContext.WriteAsync(Path.Combine(user, "SKILL.md"), "user"); 92await AgentConfigurationTestContext.WriteAsync(Path.Combine(skill, "SKILL.md"), "shared"); 113await AgentConfigurationTestContext.WriteAsync(Path.Combine(selected, "SKILL.md"), "selected");
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\OpenCodeAgentEnvironmentScannerTests.cs (1)
24var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileName);
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"); 134var blockedPath = Path.Combine(root.FullName, "blocked"); 137var destination = Path.Combine(root.FullName, "skills"); 191new HashSet<string> { Path.Combine(root.FullName, "skills") }, CancellationToken.None); 226var skillFile = Path.Combine(skillDirectory, "SKILL.md"); 235var destination = Path.Combine(root.FullName, "skills"); 327var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}"); 428var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}"); 430var tarballPath = Path.Combine(tempDir, "package.tgz"); 476var tarballPath = Path.Combine(tempDir, "package.tgz"); 519var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}"); 521var tarballPath = Path.Combine(tempDir, "package.tgz"); 563var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}"); 565var tarballPath = Path.Combine(tempDir, "package.tgz"); 612var tempPath = Path.Combine(tempDir, "package.tgz"); 704var tempDir = Path.Combine(Path.GetTempPath(), $"test-playwright-{Guid.NewGuid():N}"); 706var tarballPath = Path.Combine(tempDir, "package.tgz"); 858var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-mirror-test-{Guid.NewGuid():N}"); 873File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill"); 874Directory.CreateDirectory(Path.Combine(skillDir, "subdir")); 892Path.Combine(".claude", "skills"), 893Path.Combine(".agents", "skills") 923var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-sync-test-{Guid.NewGuid():N}"); 924var sourceDir = Path.Combine(tempDir, "source"); 925var targetDir = Path.Combine(tempDir, "target"); 931File.WriteAllText(Path.Combine(sourceDir, "keep.md"), "keep"); 935File.WriteAllText(Path.Combine(targetDir, "keep.md"), "old content"); 936File.WriteAllText(Path.Combine(targetDir, "stale.md"), "should be removed"); 937Directory.CreateDirectory(Path.Combine(targetDir, "stale-dir")); 943Assert.Equal("keep", File.ReadAllText(Path.Combine(targetDir, "keep.md"))); 946Assert.False(File.Exists(Path.Combine(targetDir, "stale.md"))); 947Assert.False(Directory.Exists(Path.Combine(targetDir, "stale-dir"))); 961var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-cleanup-test-{Guid.NewGuid():N}"); 976File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill"); 994Path.Combine(".agents", "skills") 1016var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-preexist-test-{Guid.NewGuid():N}"); 1024await File.WriteAllTextAsync(Path.Combine(preExistingDir, "SKILL.md"), "# User's existing skill"); 1047Path.Combine(".agents", "skills") 1066var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-emptydir-test-{Guid.NewGuid():N}"); 1081File.WriteAllText(Path.Combine(skillDir, "SKILL.md"), "# Playwright CLI Skill"); 1098Path.Combine(".agents", "skills") 1105Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude"))); 1119var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}"); 1133Path.Combine(".claude", "skills")); 1136Assert.False(Directory.Exists(Path.Combine(tempDir, ".claude"))); 1151var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}"); 1165Path.Combine(".claude", "skills")); 1183var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}"); 1199Assert.False(Directory.Exists(Path.Combine(tempDir, ".agents"))); 1215var tempDir = Path.Combine(Path.GetTempPath(), $"aspire-rmparent-test-{Guid.NewGuid():N}"); 1231Path.Combine("a", "b")); 1238Assert.True(Directory.Exists(Path.Combine(tempDir, "a"))); 1276PackResult = Path.Combine(outputDirectory, "package.tgz"); 1337File.WriteAllText(Path.Combine(directory, "SKILL.md"), "# Playwright CLI Skill");
Agents\SkillSourceTests.cs (2)
321await AgentConfigurationTestContext.WriteAsync(Path.Combine(app.FullName, "aspire.config.json"), """ 325var source = Assert.Single(SkillSource.Resolve(app, new FileInfo(Path.Combine(context.Home.FullName, "aspire.config.json"))));
Agents\TelemetryHookConfiguratorTests.cs (21)
68var copilotHome = Path.Combine(workspace.WorkspaceRoot.FullName, "copilot-home-file"); 100Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot"))); 140var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude")); 141var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json"); 179var claude = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude")); 180await File.WriteAllTextAsync(Path.Combine(claude.FullName, "settings.json"), 200var claude = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude")); 215await File.WriteAllTextAsync(Path.Combine(claude.FullName, "settings.json"), settings.ToJsonString()).DefaultTimeout(); 234var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude")); 235var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json"); 261var claude = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude")); 266: Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet"); 271["args"] = new JsonArray(Path.Combine(workspace.Path, assemblyName), "agent", "telemetry", "--hook") 284await File.WriteAllTextAsync(Path.Combine(claude.FullName, "settings.json"), settings.ToJsonString()); 304var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude")); 305var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json"); 321var claudeDirectory = Directory.CreateDirectory(Path.Combine(home.FullName, ".claude")); 322var settingsPath = Path.Combine(claudeDirectory.FullName, "settings.json"); 347Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot"))); 364Assert.False(Directory.Exists(Path.Combine(home.FullName, ".copilot"))); 365Assert.False(Directory.Exists(Path.Combine(home.FullName, ".claude")));
Agents\TelemetryHookInstallerTests.cs (6)
23Assert.Equal(Path.Combine(expectedDirectory, "track-telemetry.sh"), scripts.ShellScriptPath); 24Assert.Equal(Path.Combine(expectedDirectory, "track-telemetry.ps1"), scripts.PowerShellScriptPath); 73var shellPath = Path.Combine(hooksDirectory, "track-telemetry.sh"); 92var powerShellPath = Path.Combine(hooksDirectory, "track-telemetry.ps1"); 94await File.WriteAllTextAsync(Path.Combine(powerShellPath, "blocker"), "x").DefaultTimeout(); 114var powerShellPath = Path.Combine(hooksDirectory, "track-telemetry.ps1");
Agents\TelemetryHookScriptTests.cs (4)
523var capturePath = Path.Combine(workspace.WorkspaceRoot.FullName, "capture.txt"); 537var capturePath = Path.Combine(workspace.WorkspaceRoot.FullName, "capture.txt"); 576var path = Path.Combine(directory, "recorder.sh"); 590var path = Path.Combine(directory, "recorder.ps1");
Agents\VsCodeAgentEnvironmentScannerTests.cs (2)
73var configPath = Path.Combine(configDirectory.FullName, "mcp.json"); 136homeDirectory: new DirectoryInfo(Path.Combine(workingDirectory.FullName, "fake-home")));
AssemblyMetadataChannelTests.cs (1)
61while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "global.json")))
Backchannel\AppHostCliBackchannelTests.cs (4)
36var tempFile = Path.Combine(tempDir.FullName, "large.bin"); 63var socketPath = Path.Combine(tempDir.FullName, "apphost.sock"); 96var socketPath = Path.Combine(tempDir.FullName, "apphost.sock"); 142var tempFile = Path.Combine(tempDir.FullName, "small.bin");
Backchannel\AppHostConnectionResolverTests.cs (13)
36var configPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 61Assert.False(File.Exists(Path.Combine(projectFile.Directory!.FullName, AspireConfigFile.FileName))); 101string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")), 133string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("TestAppHost", "TestAppHost.csproj")), 375var realProjectFile = new FileInfo(Path.Combine(realDirectory.FullName, "TestAppHost.csproj")); 379var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link"); 381var projectFileViaSymlink = new FileInfo(Path.Combine(symlinkDirectory, "TestAppHost.csproj")); 419var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "TestAppHost.csproj")); 466Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git")); 580Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git")); 640var commonGitDirectory = Path.Combine(primaryCheckout.FullName, ".git"); 650var projectFile = new FileInfo(Path.Combine(directory.FullName, fileName)); 670var 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");
Backchannel\OrphanedAppHostCollectorTests.cs (1)
369var path = Path.Combine(directory.FullName, name);
BundleNuGetServiceTests.cs (1)
17var managedPath = Path.Combine(tempDir.FullName, "aspire-managed");
Bundles\BundleServiceCrossRouteExtractionTests.cs (3)
72var processPath = Path.Combine(root, ToNativePath(relativeProcessPath)); 79var sidecarPath = Path.Combine(binaryDir, ".aspire-install.json"); 90: Path.Combine(root, ToNativePath(relativeExpectedExtractDir));
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); 786var linkPath = Path.Combine(layoutRoot, dir); 806var path = Path.Combine(directory, name); 819var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName); 820var managedDir = Path.Combine(bundleDir, BundleDiscovery.ManagedDirectoryName); 821var dcpDir = Path.Combine(bundleDir, BundleDiscovery.DcpDirectoryName); 823var managedExe = Path.Combine(managedDir, managedExeName); 836Managed = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.ManagedDirectoryName), 837Dashboard = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DashboardDirectoryName), 838Dcp = Path.Combine(BundleDiscovery.BundleDirectoryName, BundleDiscovery.DcpDirectoryName), 845var bundleDir = Path.Combine(layoutRoot, BundleDiscovery.BundleDirectoryName); 850LayoutComponent.Dashboard => Path.Combine(bundleDir, BundleDiscovery.DashboardDirectoryName), 851LayoutComponent.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"));
Caching\DiskCacheTests.cs (1)
125var oldName = Path.Combine(diskPath, $"{hash}.{oldUnix}.json");
Certificates\CertificateServiceTests.cs (2)
251return Path.Combine(directory, "aspire-dev-cert-test.pem"); 267Assert.Equal(Path.Combine(aspireHomeDirectory.FullName, "dev-certs"), exportDirectory);
Certificates\DeveloperCertificateCacheWriteTests.cs (3)
36var onDiskPfxPath = Path.Combine(userHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx"); 42var cachedPfxPath = Path.Combine(aspireDevCertsCacheDirectory, $"{aspireLookup}.pfx"); 43var cachedKeyPath = Path.Combine(aspireDevCertsCacheDirectory, $"{aspireLookup}.key");
Certificates\MacOSCertificateManagerTests.cs (3)
24var home = Directory.CreateDirectory(Path.Combine(workspace.Path, "home with spaces")).FullName; 25var tool = Path.Combine(workspace.Path, "security"); 26var argumentsPath = Path.Combine(workspace.Path, "security-arguments");
Certificates\NativeCertificateToolRunnerTests.cs (2)
95var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "dev-certs"); 99var expectedPath = Path.Combine(outputDirectory, $"aspire-dev-cert-{hash}.pem");
Certificates\UnixCertificateManagerTests.cs (21)
212var missingProfileDirectory = Path.Combine(homeDirectory.FullName, "missing-profile"); 248var missingProfileDirectory = Path.Combine(homeDirectory.FullName, "missing-profile"); 362var certificatePath = Path.Combine(homeDirectory.FullName, "certificate with spaces.pem"); 388var certificatePath = Path.Combine(homeDirectory.FullName, "certificate with spaces.pem"); 409var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb")); 410var parentPidFile = Path.Combine(tempDirectory.FullName, "certutil-parent.pid"); 411var childPidFile = Path.Combine(tempDirectory.FullName, "certutil-child.pid"); 460var nssDbDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.FullName, "nssdb")); 501["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"), 503["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db") 509var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{certificate.Thumbprint}.pem"); 536["PATH"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-tools"), 538["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(corruptOpenSslDirectory.FullName, "missing-nss-db") 545File.WriteAllText(Path.Combine(corruptOpenSslDirectory.FullName, certificateFileName), "not a certificate"); 546File.WriteAllText(Path.Combine(validOpenSslDirectory.FullName, certificateFileName), certificate.ExportCertificatePem()); 571["PATH"] = Path.Combine(openSslDirectory.FullName, "missing-tools"), 572["DOTNET_DEV_CERTS_NSSDB_PATHS"] = Path.Combine(openSslDirectory.FullName, "missing-nss-db"), 580var certificatePath = Path.Combine(openSslDirectory.FullName, $"aspnetcore-localhost-{savedCertificate.Thumbprint}.pem"); 606["PATH"] = Path.Combine(nssDbDirectory.FullName, "missing-certutil"), 633var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil")); 657var certUtilFile = new FileInfo(Path.Combine(directory.FullName, "certutil"));
CliBootstrapTests.cs (23)
73var home = Path.Combine(workspace.Path, ".aspire"); 74var configuredHome = Path.Combine(workspace.Path, "workspace-config-home"); 81Assert.StartsWith(Path.Combine(context.AspireHomeDirectory.FullName, "tmp") + Path.DirectorySeparatorChar, storage.GetTempPath()); 168Assert.Equal(Path.Combine(aspireHome.FullName, "cache"), context.CacheDirectory.FullName); 172var cacheDirectory = Path.Combine(context.CacheDirectory.FullName, "tuf"); 173foreach (var directory in new[] { cacheDirectory, Path.Combine(cacheDirectory, "targets") }) 202Directory.CreateDirectory(Path.Combine(tufDirectory.FullName, "targets")); 274Assert.Equal(Path.Combine(aspireHome.FullName, "cache"), context.CacheDirectory.FullName); 275var cacheDirectory = Path.Combine(context.CacheDirectory.FullName, "tuf"); 325File.WriteAllText(Path.Combine(aspireHome.FullName, AspireConfigFile.FileName), globalConfig); 360var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test"); 365Assert.Equal(Path.Combine(installPrefix, "logs"), loggingOptions.LogsDirectory); 373var installPrefix = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-pr-test"); 376var logsDirectory = Path.Combine(installPrefix, "logs"); 377var logFilePath = Path.Combine(logsDirectory, "aspire.log"); 394Assert.Equal(Path.Combine(installPrefix, "hives"), context.HivesDirectory.FullName); 395Assert.Equal(Path.Combine(installPrefix, "cache"), context.CacheDirectory.FullName); 396Assert.Equal(Path.Combine(installPrefix, "sdks"), context.SdksDirectory.FullName); 397Assert.Equal(Path.Combine(installPrefix, "packages"), context.PackagesDirectory?.FullName); 423logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"), 445logsDirectory: Path.Combine(workspace.WorkspaceRoot.FullName, "logs"), 510var binaryPath = Path.Combine(binaryDir, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire"); 513File.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);
CliSmokeTests.cs (1)
100var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "credential-source.log");
Commands\AddCommandTests.cs (95)
37var appHostFile = new FileInfo(Path.Combine(workspace.Path, "apphost.ts")); 50File.WriteAllText(Path.Combine(workspace.Path, "nuget.config"), $$""" 62File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 266var appHostFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 268File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), configuredSources ? """ 277var configPath = Path.Combine(workspace.Path, "nuget.config"); 445var appHostFile = new FileInfo(Path.Combine(workspace.Path, "apphost.ts")); 447File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$""" 453"source": {{JsonSerializer.Serialize(Path.Combine(workspace.Path, "missing"))}}, 523var appHostFile = new FileInfo(Path.Combine(workspace.Path, "apphost.ts")); 525File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 632File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 678var appHostFile = new FileInfo(Path.Combine(workspace.Path, "apphost.ts")); 680File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$""" 688var configPath = Path.Combine(workspace.Path, "nuget.config"); 760var appHostFile = new FileInfo(Path.Combine(workspace.Path, "apphost.ts")); 762File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 769File.WriteAllText(Path.Combine(workspace.Path, "nuget.config"), $$""" 837configurations.Add(new XElement(id, XDocument.Load(Path.Combine(workspace.Path, "nuget.config")).Root)); 850var appHostFile = new FileInfo(Path.Combine(workspace.Path, "apphost.ts")); 852File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 855var configPath = Path.Combine(workspace.Path, "nuget.config"); 900var appHostFile = new FileInfo(Path.Combine(appDirectory.FullName, "AppHost.csproj")); 904File.WriteAllText(Path.Combine(appDirectory.FullName, AspireConfigFile.FileName), $$""" 915var configPath = Path.Combine(workspace.Path, "nuget.config"); 1015var appHostFile = new FileInfo(Path.Combine(appDirectory.FullName, 1018File.WriteAllText(Path.Combine(appDirectory.FullName, AspireConfigFile.FileName), $$""" 1027var configPath = Path.Combine(appDirectory.FullName, "nuget.config"); 1116AmbientSettingsLoader = (directory, _) => File.Exists(Path.Combine(directory, "nuget.config")) 1189var appHostFile = new FileInfo(Path.Combine(appDirectory.FullName, "apphost.ts")); 1191File.WriteAllText(Path.Combine(appDirectory.FullName, AspireConfigFile.FileName), """ 1194File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 1197File.WriteAllText(Path.Combine(workspace.Path, "nuget.config"), """ 1260await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "nuget.config")), "xml").UseParameters(specifyVersion); 1635var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 1637File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 1708var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 1710File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 1789var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 1791File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 1888var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 1892File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), $$""" 1975var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.ts")); 1977File.WriteAllText(Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), """ 1982File.WriteAllText(Path.Combine(invocationDirectory.FullName, "nuget.config"), """ 1987File.WriteAllText(Path.Combine(projectDirectory.FullName, "nuget.config"), """ 2036var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 2109var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 2111File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 2698var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 2700File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 3362File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 3392Assert.True(File.Exists(Path.Combine(dir.FullName, "NuGet.Config"))); 3927var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, isTypeScript ? "apphost.ts" : "AppHost.csproj")); 3932File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), $$""" 4024var appHostFile = new FileInfo(Path.Combine(workspace.Path, "apphost.ts")); 4026File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"channel":"staging"}"""); 4105var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 4107File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 4291File.WriteAllText(Path.Combine(packagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty); 4292File.WriteAllText(Path.Combine(packagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty); 4308var parentConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 4342var config = XDocument.Load(Path.Combine(projectDirectory.FullName, "nuget.config")); 4356var higherPrecedenceConfigPath = Path.Combine(projectWithMappingDisabled.FullName, "nuget.config"); 4378Path.Combine(projectWithoutInheritedMapping.FullName, "nuget.config")); 4396File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty); 4397File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty); 4434File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty); 4435File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty); 4437File.WriteAllText(Path.Combine(prPackagesDir.FullName, $"Aspire.Hosting.{staleVersion}.nupkg"), string.Empty); 4438File.WriteAllText(Path.Combine(prPackagesDir.FullName, $"Aspire.Hosting.Redis.{staleVersion}.nupkg"), string.Empty); 4463var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 4467File.WriteAllText(Path.Combine(identityPackagesDir.FullName, $"Aspire.Hosting.{cliVersion}.nupkg"), string.Empty); 4468File.WriteAllText(Path.Combine(identityPackagesDir.FullName, $"Aspire.Hosting.Redis.{cliVersion}.nupkg"), string.Empty); 4543var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 4604var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 4663var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 4718var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts")); 4722Path.Combine(sourceDirectory.FullName, "Aspire.Hosting.Redis.1.0.0.nupkg"), 4762var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 4770Path.Combine(localSource.FullName, $"Aspire.Hosting.Redis.{packageVersion}.nupkg"), 4817Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 4827var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 4881var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 4929var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 4977var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 5025var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 5077var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 5128var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 5186var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 5258var hivesDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "hives")); 5259var cacheDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "cache")); 5260var sdksDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "sdks")); 5261var logsDirectory = new DirectoryInfo(Path.Combine(aspireDirectory.FullName, "logs")); 5269Path.Combine(logsDirectory.FullName, "test.log"),
Commands\AgentInitClientSelectionTests.cs (27)
120Assert.False(Directory.Exists(Path.Combine(unselectedRoot.FullName, ".agents"))); 159var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"); 277Assert.Equal(before.Append(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc")).Order(StringComparer.Ordinal), 326await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.cs"), string.Empty); 368await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.cs"), string.Empty); 416await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.cs"), string.Empty); 454await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), "{}"); 539await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 666var path = Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"); 684var configPath = Path.Combine(configDirectory.FullName, "mcp.json"); 715var configPath = Path.Combine(configDirectory.FullName, "mcp.json"); 745var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, configFileName); 774var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, expectedRelativePath.Replace('/', Path.DirectorySeparatorChar)); 800await File.WriteAllTextAsync(Path.Combine(configDirectory.FullName, "opencode.json"), """{"model":"keep-json","mcp":{"other":{"command":["other"]}}}"""); 804await File.WriteAllTextAsync(Path.Combine(configDirectory.FullName, "opencode.jsonc"), """{"model":"keep-jsonc","mcp":{"other":{"command":["other"]}}}"""); 813var expectedPath = Path.Combine(configDirectory.FullName, expectedFileName); 850var path = Path.Combine(configDirectory, fileName); 926var jsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.json"); 938var jsoncPath = Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc"); 1051var configPath = Path.Combine(configDirectory.FullName, "opencode.json"); 1078["OPENCODE_CONFIG"] = Path.Combine(openCode.FullName, "custom.json") 1393await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), config); 1487: Path.Combine(homeDirectory.FullName, ".config"); 1569: Path.Combine(homeDirectory.FullName, ".config"); 1596Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"))); 1608? Path.Combine(context.CopilotDirectory, "settings.json") 1665var logDirectory = Path.Combine(".aspire", "logs") + Path.DirectorySeparatorChar;
Commands\AgentInitCommandTests.cs (40)
69var firstProject = new FileInfo(Path.Combine(first.FullName, "First.csproj")); 70var selectedProject = new FileInfo(Path.Combine(selected.FullName, "Selected.csproj")); 71await AgentConfigurationTestContext.WriteAsync(Path.Combine(selected.FullName, AspireConfigFile.FileName), """ 169await AgentConfigurationTestContext.WriteAsync(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"), """ 179await AgentConfigurationTestContext.WriteAsync(Path.Combine(appHostDirectory.FullName, AspireConfigFile.FileName), """ 182await AgentConfigurationTestContext.WriteAsync(Path.Combine(context.Project.FullName, AspireConfigFile.FileName), """ 200new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")))); 210Assert.Equal([Path.Combine(appHostDirectory.FullName, "AppHost.csproj")], 256await AgentConfigurationTestContext.WriteAsync(Path.Combine(context.Project.FullName, AspireConfigFile.FileName), defaultOnly ? "{}" : """ 337await AgentConfigurationTestContext.WriteAsync(Path.Combine(context.Project.FullName, AspireConfigFile.FileName), configuration); 367await File.WriteAllTextAsync(Path.Combine(context.Project.FullName, "apphost.cs"), string.Empty); 451var agentsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".agents"); 545await AgentConfigurationTestContext.WriteAsync(Path.Combine(app.FullName, "aspire.config.json"), """ 577await AgentConfigurationTestContext.WriteAsync(Path.Combine(context.Project.FullName, "aspire.config.json"), """ 592await AgentConfigurationTestContext.WriteAsync(Path.Combine(app.FullName, "aspire.config.json"), """ 644Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"))); 645var openCodeConfig = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc"))); 663Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"))); 664Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc"))); 680Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"))); 681var openCodeConfig = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "opencode.jsonc"))); 715await File.WriteAllTextAsync(Path.Combine(workspace.Path, appHostFileName), string.Empty); 877var expectedPath = Path.Combine(root.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar)); 945await AgentConfigurationTestContext.WriteAsync(Path.Combine(context.Project.FullName, "aspire.config.json"), """ 1036var path = Path.Combine(context.Project.FullName, "opencode.json"); 1080await AgentConfigurationTestContext.WriteAsync(Path.Combine(skillDirectory, "SKILL.md"), "My customized Aspire instructions."); 1123var configPath = Path.Combine(context.Project.FullName, "aspire.config.json"); 1180await AgentConfigurationTestContext.WriteAsync(Path.Combine(skillDirectory, "SKILL.md"), "My customized Aspire instructions."); 1181await AgentConfigurationTestContext.WriteAsync(Path.Combine(context.Project.FullName, "aspire.config.json"), 1224await AgentConfigurationTestContext.WriteAsync(Path.Combine(skillDirectory, "SKILL.md"), "My customized Aspire instructions."); 1279await AgentConfigurationTestContext.WriteAsync(Path.Combine(context.Project.FullName, "aspire.config.json"), 1285? Path.Combine(context.Project.FullName, overridePath) 1286: Path.Combine(AgentPath.GetManagedSettingsDirectory(context.ExecutionContext, context.Environment, "GitHubCopilot", "github-copilot"), overridePath), 1359var sharedFilePath = Path.Combine(shared.FullName, "notes.md"); 1363await AgentConfigurationTestContext.WriteAsync(Path.Combine(skillDirectory, "SKILL.md"), "My customized Aspire instructions."); 1366Directory.CreateSymbolicLink(Path.Combine(skillDirectory, "references"), shared.FullName); 1405var failedDirectory = Path.Combine(skillsDirectory, "aspire"); 1406var failedSkillPath = Path.Combine(failedDirectory, "SKILL.md"); 1407var removableDirectory = Path.Combine(skillsDirectory, "aspire-deployment"); 1410await AgentConfigurationTestContext.WriteAsync(Path.Combine(removableDirectory, "SKILL.md"), skill);
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\BaseCommandTests.cs (3)
305var cliLogPath = Path.Combine(workspace.WorkspaceRoot.FullName, "current-cli.log"); 306var appHostLogPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost-cli.log"); 353var cliLogPath = Path.Combine(workspace.WorkspaceRoot.FullName, "current-cli.log");
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\CompletionsCommandTests.cs (4)
255var legacyConfig = Path.Combine(home.FullName, "globalsettings.json"); 261"global" => Path.Combine(home.FullName, AspireConfigFile.FileName), 264_ => Path.Combine(workspace.Path, AspireConfigFile.FileName) 333var settingsPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
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\ConfigCommandTests.cs (11)
247var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 433var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 464var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 812var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 949var settingsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"); 951var settingsPath = Path.Combine(settingsDir, "settings.json"); 982var settingsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"); 984var settingsPath = Path.Combine(settingsDir, "settings.json"); 1024var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1054var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1151var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
Commands\ConfigSourceCommandTests.cs (64)
54Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 77var config = AspireConfigFile.Load(Path.Combine(workspace.Path, outputDirectory)); 99var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 145Repository = Path.Combine(workspace.Path, "missing-repository"), 202Repository = Path.Combine(workspace.Path, "missing-repository"), 295var projectFile = new FileInfo(Path.Combine(workspace.Path, "apphost.cs")); 353var path = Path.Combine(context.Project.FullName, AspireConfigFile.FileName); 386await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Test.sln"), "Fake solution file"); 405File.WriteAllText(Path.Combine(outputPath, $"{name}.csproj"), "<Project />"); 406File.WriteAllText(Path.Combine(outputPath, AspireConfigFile.FileName), $$""" 434Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 450Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 560var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 598var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 612var projectFile = new FileInfo(Path.Combine(workspace.Path, "apphost.cs")); 690var projectFile = new FileInfo(Path.Combine(project.FullName, "apphost.cs")); 693var rootPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 732Assert.False(File.Exists(Path.Combine(project.FullName, AspireConfigFile.FileName))); 744var localPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 754File.Move(Path.Combine(globalFile.Directory.FullName, AspireConfigFile.FileName), globalFile.FullName); 759$"update --config-source --apphost \"{Path.Combine(workspace.Path, requestedPath)}\" --yes --non-interactive"); 776await File.WriteAllTextAsync(Path.Combine(project.FullName, "apphost.cs"), "#:sdk Aspire.AppHost.Sdk"); 780var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 786var result = command.Parse($"update --config-source --apphost \"{Path.Combine(project.FullName, "apphost.cs")}\" --yes --non-interactive"); 828var localPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 832await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.cs"), "#:sdk Aspire.AppHost.Sdk"); 842File.Move(Path.Combine(globalFile.Directory.FullName, AspireConfigFile.FileName), globalFile.FullName); 846var appHostArgument = explicitAppHost ? $" --apphost \"{Path.Combine(workspace.Path, "apphost.cs")}\"" : ""; 871var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 873var configPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 941Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, AspireConfigFile.FileName))); 957var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 959var configPath = Path.Combine(appHostDirectory.FullName, AspireConfigFile.FileName); 1003var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1006await File.WriteAllTextAsync(Path.Combine(workspace.Path, "AppHost.csproj"), "<Project />"); 1040var selectedFile = new FileInfo(Path.Combine(selected.FullName, "apphost.cs")); 1048await File.WriteAllTextAsync(Path.Combine(selected.FullName, AspireConfigFile.FileName), "{}"); 1093var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1097var projectFile = new FileInfo(Path.Combine(selected.FullName, "apphost.cs")); 1115Assert.False(File.Exists(Path.Combine(selected.FullName, AspireConfigFile.FileName))); 1126var projectFile = new FileInfo(Path.Combine(selected.FullName, "apphost.cs")); 1131Path.Combine(workspace.Path, AspireConfigFile.FileName), "appHost.path", "selected/apphost.cs"); 1158var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1164await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "apphost.cs"), "#:sdk Aspire.AppHost.Sdk"); 1174var selectedPath = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName); 1227var missingProject = Path.Combine(workspace.Path, "missing.csproj"); 1280var output = Path.Combine(workspace.Path, "created-project"); 1284await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 1301var configuration = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(output, AspireConfigFile.FileName)))!; 1304Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 1322var configuration = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName)))!; 1324Assert.True(File.Exists(Path.Combine(workspace.Path, "apphost.cs"))); 1337var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1366await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Test.sln"), "Fake solution file"); 1367var childPath = Path.Combine(workspace.Path, "Test.AppHost"); 1368var projectPath = Path.Combine(childPath, "Test.AppHost.csproj"); 1369var rootConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1391await File.WriteAllTextAsync(Path.Combine(childPath, AspireConfigFile.FileName), templateConfig); 1395var configPath = Path.Combine(configDirectory.FullName, AspireConfigFile.FileName); 1421File.WriteAllText(Path.Combine(outputPath, $"{name}.csproj"), "<Project />"); 1422File.WriteAllText(Path.Combine(outputPath, AspireConfigFile.FileName), templateConfig); 1464Assert.Equal(appHostConfig, File.Exists(Path.Combine(childPath, AspireConfigFile.FileName))); 1503Assert.Equal(appHostConfig, File.Exists(Path.Combine(childPath, AspireConfigFile.FileName))); 1519var output = Path.Combine(workspace.Path, "created-project");
Commands\DashboardRunCommandTests.cs (7)
198File.WriteAllText(Path.Combine(managedDir, Path.GetFileName(dashboardPath)), "fake legacy dashboard"); 657var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [dashboard].log"); 687var layoutDir = Path.Combine(workspace.WorkspaceRoot.FullName, "layout"); 688var managedDir = Path.Combine(layoutDir, "managed"); 690var managedPath = Path.Combine(managedDir, BundleDiscovery.GetExecutableFileName("aspire-managed")); 692var dashboardDir = Path.Combine(layoutDir, BundleDiscovery.DashboardDirectoryName); 693var dashboardPath = Path.Combine(dashboardDir, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName));
Commands\DeployCommandTests.cs (5)
88var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 402var appHostFile = new FileInfo(Path.Combine(tempRepo.WorkspaceRoot.FullName, "AppHost.csproj")); 431var explicitPath = Path.Combine(tempRepo.WorkspaceRoot.FullName, "explicit.json"); 455var appHostFile = new FileInfo(Path.Combine(tempRepo.WorkspaceRoot.FullName, "AppHost.csproj")); 505var testOutputPath = Path.Combine(Path.GetTempPath(), "test");
Commands\DestroyCommandTests.cs (1)
284var testOutputPath = Path.Combine(Path.GetTempPath(), "test-destroy");
Commands\DoctorCommandTests.cs (16)
242var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 269var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 272Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 345var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Normal.csproj")); 373var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Normal.csproj")); 376var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 399await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), "<Project />"); 400await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.fsproj"), "<Project />"); 426var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 483Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 571var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 574Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 602var appHostFile = new FileInfo(Path.Combine(nestedAppHostDir.FullName, "AppHost.csproj")); 605Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 636var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1153return new FileInfo(Path.Combine(directory.FullName, "AppHost.csproj"));
Commands\DotNetSdkCheckTests.cs (2)
103var filePath = Path.Combine(workspace.WorkspaceRoot.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar)); 145? new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, appHostFileName))
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\ExtensionInternalCommandTests.cs (4)
61var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "MyApp.AppHost.csproj")); 102var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "MyApp.AppHost.csproj")); 137var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App1.AppHost.csproj")); 138var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App2.AppHost.csproj"));
Commands\GoAppHostToolingCheckTests.cs (5)
92var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 544var sourceDirectory = Path.Combine(GetRepoRoot(), "src"); 553var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.go"); 562File.WriteAllText(Path.Combine(serviceDirectory.FullName, "Api.csproj"), "<Project Sdk=\"Microsoft.NET.Sdk.Web\" />"); 676while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "global.json")))
Commands\InitCommandTests.cs (100)
38await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Test.sln"), "Fake solution file"); 40var configPath = Path.Combine(workspace.Path, "nuget.config"); 73Assert.False(File.Exists(Path.Combine(workspace.Path, "apphost.cs"))); 74Assert.False(Directory.Exists(Path.Combine(workspace.Path, "Test.AppHost"))); 118var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 121var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectFileName)); 161Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"))); 168await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Test.sln"), "Fake solution file"); 187Assert.True(Directory.Exists(Path.Combine(workspace.Path, "Test.AppHost"))); 192Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 205var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 238Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"))); 265var appHostContent = await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 280var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, solutionPath)); 284var projectPath = Path.Combine(solutionFile.Directory.FullName, "Test.csproj"); 287var otherSolutionPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Other.slnx"); 313Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 314Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json"))); 315var config = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)))!.AsObject(); 354Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 355Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".gitignore"))); 357var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject(); 376LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")); 377LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")); 399var runJsonPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json"); 426var aspireConfig = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject(); 469File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), existingAspireConfig); 480var runJson = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json")))!.AsObject(); 519var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 544Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.run.json"))); 568Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 585await File.WriteAllTextAsync(Path.Combine(workspace.Path, "apphost.mts"), "console.log('existing AppHost');"); 670Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"))); 672var config = JsonNode.Parse(File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")))!.AsObject(); 756var existingAppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"); 759File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), """{ "type": "commonjs" }"""); 774Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"))); 775Assert.Equal("""{ "type": "commonjs" }""", File.ReadAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"))); 784File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{}"); 793File.WriteAllText(Path.Combine(scaffoldDirectory.FullName, context.Language.AppHostFileName!), string.Empty); 823Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"))); 835File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), moduleContent); 836File.WriteAllText(Path.Combine(workspace.Path, "go.work"), workspaceContent); 837File.WriteAllText(Path.Combine(workspace.Path, "main.go"), sourceContent); 866Assert.Equal(moduleContent, File.ReadAllText(Path.Combine(workspace.Path, "go.mod"))); 867Assert.Equal(workspaceContent, File.ReadAllText(Path.Combine(workspace.Path, "go.work"))); 868Assert.Equal(sourceContent, File.ReadAllText(Path.Combine(workspace.Path, "main.go"))); 1017await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), settings); 1062Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 1084Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 1106Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 1120Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, ".mcp.json"))); 1132await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), "My customized Aspire instructions."); 1165var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 1196var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1225var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1249var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1270var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 1290var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 1334File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")), 1343var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 1420var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 1486var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 1535var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 1605Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 1607var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1640Assert.True(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"))); 1642var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1677var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1701var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1750var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1794var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 1909var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2016var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2096var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2184var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2187var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2245var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2274var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2292var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2296var appHostDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost")); 2298Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 2319var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2337var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 2339Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 2356var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2375var solutionFile = new FileInfo(Path.Combine(solutionDir.FullName, "Test.sln")); 2405Assert.True(File.Exists(Path.Combine(solutionDir.FullName, "nuget.config")), 2407Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")), 2409AssertNuGetConfigHasChannelShape(Path.Combine(solutionDir.FullName, "nuget.config"), contextChannel); 2425var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2437var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2486var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2518var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2536var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2581File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")), 2597var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.slnx")); 2627var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2716File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, appHostFileName), string.Empty); 2726File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, AspireConfigFile.FileName), config.ToJsonString());
Commands\IntegrationAssemblyNameResolverTests.cs (1)
60var projectPath = System.IO.Path.Combine(Path, fileName);
Commands\LsCommandTests.cs (2)
174var configuredAppHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "ConfiguredAppHost.csproj")); 176await File.WriteAllTextAsync(Path.Combine(workingDirectory.FullName, "aspire.config.json"), JsonSerializer.Serialize(new
Commands\NewCommandChannelResolutionTests.cs (3)
575pathDeriverCallback: (ctx, projectName) => Path.Combine(ctx.WorkingDirectory.FullName, projectName), 582var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "captured"); 682File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{version}.nupkg"), string.Empty);
Commands\NewCommandLocalTemplateTests.ConfiguredGitSourceObjects.cs (9)
108["local"] = Path.Combine(workspace.Path, "local") 147["working"] = Path.Combine(workspace.Path, "local") 166var link = Path.Combine(workspace.Path, "template-link"); 169Directory.CreateSymbolicLink(link, Path.Combine(workspace.Path, "local")); 180Directory.Move(link, Path.Combine(destination.FullName, "templates")); 189["working"] = Path.Combine(workspace.Path, "local") 212Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git"))); 226Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "templates/sample")), 260Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git")));
Commands\NewCommandLocalTemplateTests.ConfiguredGitSources.cs (8)
206Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 225["local-source"] = Path.Combine(workspace.Path, "local"), 315await File.WriteAllTextAsync(Path.Combine(partial.FullName, "partial-object"), "partial download", token); 335["local-source"] = Path.Combine(workspace.Path, "local"), 367Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git"))); 383await File.WriteAllTextAsync(Path.Combine(partial.FullName, "partial-object"), "partial download", token); 417var cacheRoot = Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git"); 660Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out")));
Commands\NewCommandLocalTemplateTests.ConfiguredSources.cs (17)
45await WriteConfiguredSourcesAsync(provider, new() { ["company"] = Path.Combine(workspace.Path, "template") }); 222await File.WriteAllTextAsync(Path.Combine(workspace.Path, "aspire.config.json"), 246["first-source"] = Path.Combine(workspace.Path, "first"), 247["second-source"] = Path.Combine(workspace.Path, "second") 268await WriteConfiguredSourcesAsync(provider, new() { ["examples"] = Path.Combine(workspace.Path, "template") }); 293["missing"] = Path.Combine(workspace.Path, "missing"), 295["working"] = Path.Combine(workspace.Path, "valid") 366["second-source"] = new { path = Path.Combine(workspace.Path, "second"), displayName = "Company [templates]" }, 367["first-source"] = new { path = Path.Combine(workspace.Path, "first"), displayName = "Company [templates]" } 407var templatePath = Path.Combine(workspace.Path, "template"); 439await WriteConfiguredSourcesAsync(provider, new() { ["company"] = Path.Combine(workspace.Path, "template") }); 477await WriteConfiguredSourcesAsync(provider, new() { ["missing"] = Path.Combine(workspace.Path, "missing") }); 490Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 632Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 672await WriteConfiguredSourcesAsync(provider, new() { ["company"] = Path.Combine(workspace.Path, "templates") }); 688await WriteConfiguredSourcesAsync(provider, new() { ["company"] = Path.Combine(workspace.Path, "template") }); 711await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), JsonSerializer.Serialize(new
Commands\NewCommandLocalTemplateTests.cs (85)
37await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 83await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), JsonSerializer.Serialize(new 209Assert.Equal(ReadOutput(Path.Combine(workspace.Path, "non-interactive-out")), ReadOutput(workspace)); 251await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 377Assert.Equal(!useDatabase, Directory.Exists(Path.Combine(workspace.Path, "out"))); 392await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 441await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 494Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 503await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 544await File.WriteAllTextAsync(Path.Combine(gitDirectory.FullName, "config"), "Original repository configuration"); 551await File.WriteAllTextAsync(Path.Combine(nestedGitDirectory.FullName, "config"), "Nested repository configuration"); 553await File.WriteAllTextAsync(Path.Combine(nestedWorktree.FullName, ".git"), "gitdir: ../../git-storage"); 554await File.WriteAllTextAsync(Path.Combine(nestedWorktree.FullName, "content.txt"), "Keep worktree content"); 558await File.WriteAllTextAsync(Path.Combine(github.FullName, "content.txt"), "Keep GitHub content"); 559var originalSource = ReadOutput(Path.Combine(workspace.Path, "template")); 569Assert.Equal(originalSource, ReadOutput(Path.Combine(workspace.Path, "template"))); 570Assert.Equal("Original repository configuration", await File.ReadAllTextAsync(Path.Combine(gitDirectory.FullName, "config"))); 581var templatePath = Path.Combine(workspace.Path, templateDirectory); 583var config = workspace.CreateDirectory(Path.Combine(templateDirectory, ".template.config")); 584await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 589await File.WriteAllTextAsync(Path.Combine(templatePath, ".git"), "gitdir: ../git-storage"); 593var git = workspace.CreateDirectory(Path.Combine(templateDirectory, ".git")); 594await File.WriteAllTextAsync(Path.Combine(git.FullName, "config"), "Original repository configuration"); 597await File.WriteAllTextAsync(Path.Combine(nestedGit.FullName, "config"), "Nested repository configuration"); 598await File.WriteAllTextAsync(Path.Combine(templatePath, "content.txt"), "Keep template content"); 599await File.WriteAllTextAsync(Path.Combine(templatePath, ".gitignore"), "bin/"); 600var github = workspace.CreateDirectory(Path.Combine(templateDirectory, ".github")); 601await File.WriteAllTextAsync(Path.Combine(github.FullName, "content.txt"), "Keep GitHub content"); 606Assert.False(fileSystem.FileExists(Path.Combine(templatePath, ".git"))); 607Assert.False(fileSystem.DirectoryExists(Path.Combine(templatePath, ".git"))); 608Assert.False(fileSystem.FileExists(Path.Combine(nestedGit.FullName, "config"))); 609Assert.Throws<FileNotFoundException>(() => fileSystem.ReadAllText(Path.Combine(nestedGit.FullName, "config"))); 705await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$""" 821var outputPath = Path.Combine(workspace.Path, "out"); 866var outputPath = Path.Combine(workspace.Path, "out"); 952var outputPath = Path.Combine(workspace.Path, "out"); 990foreach (var file in Directory.EnumerateFiles(Path.Combine(workspace.Path, "template"), "*", SearchOption.AllDirectories)) 992var target = Path.Combine(destination.FullName, Path.GetRelativePath(Path.Combine(workspace.Path, "template"), file)); 1016ReadOutput(Path.Combine(workspace.Path, "template")).Keys); 1021ReadOutput(Path.Combine(workspace.Path, "template")), 1022ReadOutput(Path.Combine(cachedTemplate, "repository"))); 1044Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1060await File.WriteAllTextAsync(Path.Combine(conflictingDirectory.FullName, "keep.txt"), "Template content"); 1151Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1198Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1221await File.WriteAllTextAsync(Path.Combine(workspace.Path, "template"), "not a directory"); 1231Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1303Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1336Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1354Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1371["new", "--template-path", Path.Combine(workspace.Path, "template"), "--name", "Demo", "--output", "out", "--suppress-agent-init"]) 1426Assert.True(Directory.Exists(Path.Combine(checkout, ".git"))); 1447Directory.CreateDirectory(Path.Combine(destination.FullName, ".git")); 1448await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "template"))); 1518Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1546Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1556var linkPath = Path.Combine(workspace.Path, "template-link"); 1569Directory.CreateDirectory(Path.Combine(destination.FullName, ".git")); 1571Directory.Move(linkPath, Path.Combine(destination.FullName, "template")); 1585Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1601var gitObject = Path.Combine(gitDirectory.FullName, "partial-object"); 1616Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 1633Directory.CreateDirectory(Path.Combine(destination.FullName, ".git")); 1637await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "template"))); 1645var cacheRoot = Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git"); 1768Directory.CreateDirectory(Path.Combine(destination.FullName, ".git")); 1769await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "one"))); 1770await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "two"))); 1800var cacheRoot = Path.Combine(provider.GetRequiredService<CliExecutionContext>().CacheDirectory.FullName, "git"); 1826Directory.CreateDirectory(Path.Combine(destination.FullName, ".git")); 1827await CreateTemplateAsync(workspace, Path.GetRelativePath(workspace.Path, Path.Combine(destination.FullName, "template"))); 1845Assert.True(Directory.Exists(Path.Combine(cached, ".git"))); 1987await File.WriteAllTextAsync(Path.Combine(config.FullName, "aspirecli.host.json"), 1989await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$""" 2064await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), """ 2074await File.WriteAllTextAsync(Path.Combine(config.FullName, "aspirecli.host.json"), 2076await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 2095ReadOutput(Path.Combine(workspace.Path, "out")); 2108await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$""" 2160await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), JsonSerializer.Serialize(new 2176await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), $$""" 2218await File.WriteAllTextAsync(Path.Combine(root.FullName, "TemplateApp.cs"), """ 2231await File.WriteAllTextAsync(Path.Combine(root.FullName, "worker-only.txt"), "Worker content"); 2232await File.WriteAllTextAsync(Path.Combine(root.FullName, "identity.txt"), name);
Commands\NewCommandLocalTemplateTests.HostConfiguration.cs (16)
40await File.WriteAllTextAsync(Path.Combine(config, "dotnetcli.host.json"), $$""" 46await File.WriteAllTextAsync(Path.Combine(config, "aspirecli.host.json"), aspireConfiguration == 1 ? "{}" : """ 131await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 153await File.WriteAllTextAsync(Path.Combine(config.FullName, hostFile), """ 207Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 228await File.WriteAllTextAsync(Path.Combine(config, "aspirecli.host.json"), contents); 229await File.WriteAllTextAsync(Path.Combine(config, "dotnetcli.host.json"), "{}"); 239Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 346await File.WriteAllTextAsync(Path.Combine(config, "template.json"), """ 354var hostFile = Path.Combine(config, "aspirecli.host.json"); 363await File.WriteAllTextAsync(Path.Combine(config, "dotnetcli.host.json"), 376var output = Path.Combine(workspace.Path, "out"); 377Assert.Equal(expectedCreate, File.Exists(Path.Combine(output, "nuget.config"))); 432var output = Path.Combine(workspace.Path, "out"); 526var result = await creator.InstantiateAsync(discoveredTemplate, "Demo", null, Path.Combine(workspace.Path, "out"), 532var invalid = await creator.InstantiateAsync(discoveredTemplate, "Demo", null, Path.Combine(workspace.Path, "invalid"),
Commands\NewCommandLocalTemplateTests.InitConfig.cs (7)
51"enterprise": { "path": {{JsonSerializer.Serialize(Path.Combine(workspace.Path, "enterprise"))}} } 61await WriteConfiguredSourcesAsync(provider, new() { ["personal"] = Path.Combine(workspace.Path, "personal") }); 136var localPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 198"templateSources": { "enterprise": { "path": {{JsonSerializer.Serialize(Path.Combine(workspace.Path, "enterprise"))}}, "displayName": "Team [templates]" } }, 207["personal"] = new { path = Path.Combine(workspace.Path, "personal"), displayName = "Team [templates]" } 259await WriteConfiguredSourcesAsync(provider, new() { ["personal"] = Path.Combine(workspace.Path, "personal") }); 281var localPath = Path.Combine(workspace.Path, AspireConfigFile.FileName);
Commands\NewCommandLocalTemplateTests.NuGetValues.cs (27)
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")); 109await File.WriteAllTextAsync(Path.Combine(workspace.Path, "NuGet.Config"), 136var output = Path.Combine(workspace.Path, "out"); 138[policy == "embedded" ? Path.Combine(output, "feed") : feed.FullName], 139NuGetTestHelper.GetEligiblePackageSources(policy == "nested" ? Path.Combine(output, "AppHost") : output, "Aspire.Hosting.Dotnet")); 140await Verify(await File.ReadAllTextAsync(Path.Combine(output, "versions.json"))).UseParameters(policy); 165Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 200Assert.Equal(existingOutput, Directory.Exists(Path.Combine(workspace.Path, "out"))); 203Assert.Empty(Directory.GetFileSystemEntries(Path.Combine(workspace.Path, "out"))); 232Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 260Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 288Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 348File.Move(Path.Combine(config, "aspirecli.host.json"), Path.Combine(config, "dotnetcli.host.json")); 349var definitionPath = Path.Combine(config, "template.json"); 355await File.WriteAllTextAsync(Path.Combine(config, "aspirecli.host.json"), "{}"); 391var hostPath = Path.Combine(config, "aspirecli.host.json"); 396var templatePath = Path.Combine(config, "template.json"); 409Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 436Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 454await File.WriteAllTextAsync(Path.Combine(output.FullName, "keep.txt"), "Concurrent user content", token); 478var path = Path.Combine(config, "template.json"); 488path = Path.Combine(config, "aspirecli.host.json"); 518await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 530await File.WriteAllTextAsync(Path.Combine(config.FullName, "aspirecli.host.json"), $$"""
Commands\NewCommandLocalTemplateTests.PromptDefaults.cs (4)
224Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 251Assert.False(Directory.Exists(Path.Combine(workspace.Path, "out"))); 282await File.WriteAllTextAsync(Path.Combine(config.FullName, "template.json"), """ 318await File.WriteAllTextAsync(Path.Combine(config.FullName, "aspirecli.host.json"), """
Commands\NewCommandLocalTemplateTests.SourceList.cs (1)
434Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName)));
Commands\NewCommandLocalTemplateTests.SourceListGit.cs (12)
73Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 75previousPointer = await File.ReadAllTextAsync(Path.Combine(previousCache, "current")); 76previousCheck = await File.ReadAllTextAsync(Path.Combine(previousCache, "check.json")); 86var projectPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 140var snapshot = Path.Combine(cache, await File.ReadAllTextAsync(Path.Combine(cache, "current"))); 141Assert.True(Directory.Exists(Path.Combine(snapshot, "repository.git"))); 142var metadata = JsonSerializer.Deserialize(await File.ReadAllTextAsync(Path.Combine(snapshot, "metadata.json")), 148JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(snapshot, AspireConfigFile.FileName))))); 156Assert.Equal(previousPointer, await File.ReadAllTextAsync(Path.Combine(cache, "current"))); 157Assert.Equal(previousCheck, await File.ReadAllTextAsync(Path.Combine(cache, "check.json"))); 259await WriteConfiguredSourcesAsync(provider, new() { ["personal"] = Path.Combine(workspace.Path, "personal") });
Commands\NewCommandLocalTemplateTests.SourceManagement.cs (1)
464await File.WriteAllTextAsync(Path.Combine(cache.FullName, "workspace-config-locks"), "Blocks lock directory creation.");
Commands\NewCommandTemplateConfigPersistenceTests.cs (10)
237outputDirectory => File.ReadAllText(Path.Combine(outputDirectory, AspireConfigFile.FileName))); 288File.WriteAllText(Path.Combine(outputPath, $"{name}.generated"), templateName); 327var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName); 332var appHostFile = Path.Combine(outputDirectory, "apphost.cs"); 341var csharpNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config")); 364var dotNetNuGetConfig = await File.ReadAllTextAsync(Path.Combine(outputDirectory, "nuget.config")); 391File.ReadAllText(Path.Combine(outputDirectory, "apphost.go")), 482var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, outputDirectoryName); 592var installPrefix = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "custom-aspire-prefix")); 598File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{s_prVersion}.nupkg"), string.Empty);
Commands\NewCommandTests.cs (87)
52var configPath = Path.Combine(workspace.Path, "nuget.config"); 76Assert.Empty(Directory.EnumerateFiles(Path.Combine(workspace.Path, "TemplateOut"))); 181var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "TemplateOut"); 182var nugetConfigPath = Path.Combine(outputDirectory, "nuget.config"); 587var config = AspireConfigFile.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "output")); 769var doc = XDocument.Load(Path.Combine(outputPath, "nuget.config")); 940File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost"); 997File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.go"), "// test apphost"); 1158File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;"); 1183File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), """ 1221File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;"); 1249File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost"); 1333AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource); 1343var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "relative-feed"); 1345File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty); 1376AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), expectedSource); 1388var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed"); 1390File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty); 1417File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, scaffoldFileName), "// test apphost"); 1429AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride); 1442var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed"); 1444File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty); 1455AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride); 1478Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "output")); 1491Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output"))); 1523var expectedSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.org"); 1526Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "output"))); 1546File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.mts"), "// test apphost"); 1585File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "AppHost.java"), "package aspire;"); 1621File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.py"), "# test apphost"); 1649File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.go"), "// test apphost"); 1779var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 1780var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json"); 1781var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json"); 1813var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 1814var aspireConfigPath = Path.Combine(outputDir, "aspire.config.json"); 1815var appHostRunJsonPath = Path.Combine(outputDir, "apphost.run.json"); 1888var outputRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 1890var aspireConfigPath = Path.Combine(outputRoot, "aspire.config.json"); 1897var appHostRunJsonPath = Path.Combine(outputRoot, "apphost.run.json"); 2022var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestApp"); 2067await File.WriteAllTextAsync(Path.Combine(context.TargetDirectory.FullName, "aspire.config.json"), """ 2161var modulesDir = Directory.CreateDirectory(Path.Combine(directory.FullName, LanguageInfo.GeneratedFolderName)); 2162File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.mts"), "// generated sdk"); 2247var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed"); 2251File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty); 2286File.WriteAllText(Path.Combine(modulesDir.FullName, "aspire.ts"), "// generated sdk"); 2299AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride); 2354AssertSourceOverrideNuGetConfig(Path.Combine(workspace.WorkspaceRoot.FullName, "output"), sourceOverride); 2364var sourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "source-feed"); 2368File.WriteAllText(Path.Combine(sourceOverride, "Aspire.ProjectTemplates.9.2.0.nupkg"), string.Empty); 2463var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 2488var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 2505await File.WriteAllTextAsync(Path.Combine(skillDirectory, "SKILL.md"), "My customized Aspire instructions."); 2617Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-starter"), capturedOutputPath); 2653var result = command.Parse($"new aspire-starter --name MyProject --output {Path.Combine(workspace.WorkspaceRoot.FullName, "my-project")} --use-redis-cache --test-framework None"); 2696var outputDir = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 2815Path.Combine(workspace.WorkspaceRoot.FullName, "source"); 2931Path.Combine(workspace.WorkspaceRoot.FullName, "source"); 2962var expectedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "source"); 3027workspaceRoot => Path.Combine(workspaceRoot, "source") + Path.DirectorySeparatorChar, 3032workspaceRoot => Path.Combine(workspaceRoot, projectName) + Path.DirectorySeparatorChar, 3033workspaceRoot => Path.Combine(workspaceRoot, projectName)); 3059Path.Combine(workspace.WorkspaceRoot.FullName, "source"); 3070File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost"); 3086Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 3096File.WriteAllText(Path.Combine(selectedParent.FullName, "existing.txt"), "existing content"); 3133File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost"); 3148var expectedPath = Path.Combine(selectedParent.FullName, projectName); 3150Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 3160var collidingProject = Directory.CreateDirectory(Path.Combine(collidingParent.FullName, projectName)); 3161File.WriteAllText(Path.Combine(collidingProject.FullName, "existing.txt"), "existing content"); 3226Assert.Equal(Path.Combine(validParent.FullName, projectName), capturedOutputPath); 3286File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost"); 3301var expectedPath = Path.Combine(selectedParent.FullName, projectName); 3303Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 3355File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost"); 3371Assert.True(File.Exists(Path.Combine(selectedOutputPath.FullName, "apphost.ts"))); 3409File.WriteAllText(Path.Combine(context.TargetDirectory.FullName, "apphost.ts"), "// test apphost"); 3425Assert.True(File.Exists(Path.Combine(expectedPath, "apphost.ts"))); 3463var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 3518var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 3547var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 3576var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 3579Assert.False(File.Exists(Path.Combine(outputDirectory, ".mcp.json"))); 3590File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content"); 3639File.WriteAllText(Path.Combine(existingDir.FullName, "file.txt"), "content");
Commands\ParseResultHelperTests.cs (1)
113var relativePath = Path.Combine("Profile Output", "profile.zip");
Commands\PublishCommandPromptingIntegrationTests.cs (8)
262var selectedFile = Path.Combine(workspace.WorkspaceRoot.FullName, "artifact.zip"); 265var missingFile = Path.Combine(workspace.WorkspaceRoot.FullName, "missing.zip"); 803var oversizedFile = Path.Combine(workspace.WorkspaceRoot.FullName, "large.bin"); 806var validFile = Path.Combine(workspace.WorkspaceRoot.FullName, "small.bin"); 849var wrongExtFile = Path.Combine(workspace.WorkspaceRoot.FullName, "cert.txt"); 852var correctFile = Path.Combine(workspace.WorkspaceRoot.FullName, "cert.pem"); 895var validFile = Path.Combine(workspace.WorkspaceRoot.FullName, "deploy.zip"); 941var validFile = Path.Combine(workspace.WorkspaceRoot.FullName, "archive.tar.gz");
Commands\ResourceCommandHelpParserTests.cs (2)
44Assert.EndsWith(Path.Combine("AppHost", "AppHost.csproj"), appHostProjectFile.FullName); 62Assert.EndsWith(Path.Combine("AppHost", "AppHost.csproj"), appHostProjectFile.FullName);
Commands\ResourceCommandTests.cs (6)
198var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 216Path.Combine(workspace.WorkspaceRoot.FullName, "socket1"), 219Path.Combine(workspace.WorkspaceRoot.FullName, "socket2"), 250var appHostProjectFile = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj")); 252var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link"); 254var symlinkedAppHostPath = Path.Combine(symlinkDirectory, appHostProjectFile.Name);
Commands\RestoreCommandTests.cs (2)
19var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 56var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
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\Sdk\SdkResponseFileTests.cs (8)
39var responseFile = Path.Combine( 48await File.WriteAllTextAsync(Path.Combine(aspireHome.FullName, "aspire.config.json"), 79Assert.Equal(Path.Combine(appPath, "server"), project.ProjectModelPath); 81Path.Combine(parentDirectory ? appPath : project.ProjectModelPath, "Directory.Build.rsp"), 90var probeProject = new FileInfo(Path.Combine(modelDirectory.FullName, "Probe.proj")); 104var outputPath = Path.Combine(workspace.Path, "output"); 127Assert.NotEmpty(await File.ReadAllTextAsync(Path.Combine(outputPath, "aspire.mts"))); 145Assert.NotEmpty(await File.ReadAllTextAsync(Path.Combine(outputPath, "Aspire.Hosting.ats.txt")));
Commands\SdkCommandTests.cs (6)
24var aspireHome = new DirectoryInfo(Path.Combine(workspace.Path, "custom-aspire-home")); 26await File.WriteAllTextAsync(Path.Combine(aspireHome.FullName, "aspire.config.json"), 30foreach (var path in new[] { Path.Combine(aspireHome.FullName, "tmp"), Path.Combine(aspireHome.FullName, "tmp", "sdk") }) 54foreach (var directory in new[] { appPath, Path.Combine(aspireHome.FullName, "tmp"), Path.Combine(aspireHome.FullName, "tmp", "sdk") }) 65var integrationProject = Path.Combine(workspace.Path, "Integration.csproj"); 67var outputPath = Path.Combine(workspace.Path, "output");
Commands\SdkDumpCommandTests.cs (4)
277Path.Combine(workspace.Path, "output"), "Aspire.Hosting.Redis@13.2.0"]); 285Assert.Equal([Path.Combine(scannerPath, "aspire.config.json")], scannerFiles); 307var outputPath = Path.Combine(tempDirectory, "capabilities.txt"); 448if (File.Exists(Path.Combine(currentDirectory.FullName, "Aspire.slnx")))
Commands\SdkInstallerTests.cs (3)
29await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), projectContent); 116await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), projectContent); 154await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), projectContent);
Commands\SecretCommandTests.cs (23)
53var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 104var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 147var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 193var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 214var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 257var appHostFile = new FileInfo(Path.Combine(workspace.Path, fileName)); 313var appHostFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 354var appHostFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 412var appHostFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 461var appHostFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 504var appHostFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 564var appHostFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 580var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 606var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 632var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 689var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 726var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 748var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 793var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 854var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 875var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 897Assert.Contains(Path.Combine(directory, $"{originalEnvironment}.json"), outputWriter.Logs); 911var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Commands\SetupCommandTests.cs (2)
20Assert.Equal(Path.Combine("home", ".aspire"), result); 42Assert.Equal(Path.Combine("Program Files", "WindowsApps"), result);
Commands\StartCommandTests.cs (11)
250var propertiesDirectory = Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 251File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """ 302await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake"); 305await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake"); 333await File.WriteAllTextAsync(Path.Combine(appHost1Dir.FullName, "AppHost1.csproj"), "fake"); 336await File.WriteAllTextAsync(Path.Combine(appHost2Dir.FullName, "AppHost2.csproj"), "fake"); 364var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj")); 417var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 687Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git")); 706var appHostFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.csproj")); 720var socketPath = Path.Combine(
Commands\StopCommandTests.cs (43)
191var connection = CreateConnection(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs"), 1); 231var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"); 265var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs"); 304var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs"); 378string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("Resolved.AppHost", "Resolved.AppHost.csproj")), 410var expectedPath1 = Path.Combine("App1", "AppHost.cs"); 411var expectedPath2 = Path.Combine("App2", "AppHost.cs"); 491Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, ".git")); 495Path.Combine(workspace.WorkspaceRoot.FullName, ".git")); 502var nestedAppHost = Path.Combine(worktreeRoot, "AppHost.csproj"); 534var expectedPath = Path.Combine("AppHost", "AppHost.csproj"); 546var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 570string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "AppHost.csproj")), 578var commonGitDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, ".git"); 743var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 768Assert.Contains(interactionService.DisplayedMessages, message => message.Message == string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "AppHost.csproj"))); 778var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 810var runningAppHostFile = new FileInfo(Path.Combine(runningAppHostDirectory.FullName, "Running.AppHost.csproj")); 813var discoveredAppHostFile = new FileInfo(Path.Combine(discoveredAppHostDirectory.FullName, "Discovered.AppHost.csproj")); 852Path.Combine("RunningAppHost", "Running.AppHost.csproj")); 862var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 894var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 929var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 969var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1009var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1050var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1090var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1129var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "apphost.ts")); 1165string.Format(SharedCommandStrings.AppHostNotRunningAtPath, Path.Combine("AppHost", "apphost.ts")), 1175var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1212var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1257var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1295var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1333var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1401var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1653? string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostIdentifierWithProcessId, Path.Combine("AppHost", "AppHost.csproj"), connection.AppHostInfo!.ProcessId) 1654: Path.Combine("AppHost", "AppHost.csproj"); 1702var appHostIdentifier = Path.Combine("AppHost", "AppHost.csproj"); 1764var appHostIdentifier = Path.Combine("AppHost", "AppHost.csproj"); 1777var appHostFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 1801var appHostIdentifier = Path.Combine("AppHost", "AppHost.csproj"); 1925var homeDirectory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".home")); 1933var socketPath = Path.Combine(
Commands\TelemetryFollowTests.cs (1)
240AppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost.csproj"),
Commands\TemplateSourceStartupTests.cs (31)
94var globalPath = Path.Combine(home.FullName, legacyGlobal ? "globalsettings.json" : AspireConfigFile.FileName); 95var projectPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 107Assert.False(File.Exists(Path.Combine(home.FullName, AspireConfigFile.FileName))); 120var globalPath = Path.Combine(home.FullName, legacyGlobal ? "globalsettings.json" : AspireConfigFile.FileName); 121var projectPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 133Assert.False(File.Exists(Path.Combine(home.FullName, AspireConfigFile.FileName))); 144var globalPath = Path.Combine(home.FullName, AspireConfigFile.FileName); 145var projectPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 172var legacyPath = Path.Combine(home.FullName, "globalsettings.json"); 173var migratedPath = Path.Combine(home.FullName, AspireConfigFile.FileName); 175File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), 199var legacyPath = Path.Combine(home.FullName, "globalsettings.json"); 204File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), 207File.WriteAllText(Path.Combine(cache.FullName, "workspace-config-locks"), "Blocks lock directory creation."); 211Assert.False(File.Exists(Path.Combine(home.FullName, AspireConfigFile.FileName))); 223var legacyPath = Path.Combine(home.FullName, "globalsettings.json"); 238var originalPath = Path.Combine(homePath, "globalsettings.json"); 239var destination = Path.Combine(homePath, AspireConfigFile.FileName); 274var legacyPath = Path.Combine(home.FullName, "globalsettings.json"); 290var destination = Path.Combine(homePath, AspireConfigFile.FileName); 291var legacy = Path.Combine(homePath, "globalsettings.json"); 327var legacyPath = Path.Combine(home.FullName, "globalsettings.json"); 328var migratedPath = Path.Combine(home.FullName, AspireConfigFile.FileName); 330File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), 349var legacyPath = Path.Combine(home.FullName, "globalsettings.json"); 350var migratedPath = Path.Combine(home.FullName, AspireConfigFile.FileName); 353File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), 369File.WriteAllText(Path.Combine(legacyDirectory.FullName, "settings.json"), 386var legacyPath = Path.Combine(home.FullName, "globalsettings.json"); 387var migratedPath = Path.Combine(home.FullName, AspireConfigFile.FileName); 390File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName),
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\TestCommandTests.cs (18)
92summaryPath = Path.Combine(context.EnvironmentVariables[KnownConfigNames.TestOutputPath], "summary.json"); 204summaryPath = Path.Combine(outputPath, "summary.json"); 206var summary = System.Text.Json.Nodes.JsonNode.Parse(File.ReadAllText(Path.Combine(outputPath, "summary.json")))!; 345var summaryPath = Path.Combine(context.EnvironmentVariables[KnownConfigNames.TestOutputPath], "summary.json"); 436Assert.False(Directory.Exists(Path.Combine(workspace.CreateExecutionContext().AspireHomeDirectory.FullName, "testruns"))); 477Assert.Equal(Path.Combine(json["outputPath"]!.GetValue<string>(), "summary.json"), summaryPath); 506Assert.False(Directory.Exists(Path.Combine(workspace.CreateExecutionContext().AspireHomeDirectory.FullName, "testruns"))); 534summaryPath = Path.Combine(context.EnvironmentVariables[KnownConfigNames.TestOutputPath], "summary.json"); 628var path = Path.Combine(outputPath!, "summary.json"); 704summaryPath = Path.Combine(context.EnvironmentVariables[KnownConfigNames.TestOutputPath], "summary.json"); 749summaryPath = Path.Combine(context.EnvironmentVariables[KnownConfigNames.TestOutputPath], "summary.json"); 794var logPath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [test].log"); 821var logPath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [test].log"); 841var logPath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.log"); 1158Assert.False(Directory.Exists(Path.Combine(workspace.CreateExecutionContext().AspireHomeDirectory.FullName, "testruns"))); 1187Assert.False(Directory.Exists(Path.Combine(workspace.CreateExecutionContext().AspireHomeDirectory.FullName, "testruns"))); 1265summaryPath = Path.Combine(context.EnvironmentVariables[KnownConfigNames.TestOutputPath], "summary.json"); 1508var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Commands\TrayCommandTests.cs (13)
103var sidecar = Path.Combine(Path.GetDirectoryName(cliPath)!, InstallSidecarReader.SidecarFileName); 131var packagedCli = Path.Combine(packageBin, "aspire"); 133File.WriteAllText(Path.Combine(packageBin, InstallSidecarReader.SidecarFileName), """{"source":"script"}"""); 148File.WriteAllText(Path.Combine(Path.GetDirectoryName(cliPath)!, InstallSidecarReader.SidecarFileName), "{"); 162var installed = Path.Combine(workspace.WorkspaceRoot.FullName, "stable & installed aspire"); 234Assert.Equal(action == "start" ? 1 : 0, Directory.Exists(Path.Combine(root, ".leases")) 235? Directory.GetFiles(Path.Combine(root, ".leases"), "*.lease").Length : 0); 313"dotnet" => Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet"), 314"missing" => Path.Combine(workspace.WorkspaceRoot.FullName, "missing-aspire"), 609File.WriteAllText(Path.Combine(binaryDirectory, InstallSidecarReader.SidecarFileName), """{"source":"script"}"""); 610var cliPath = Path.Combine(binaryDirectory, "aspire"); 635WindowsTrayTestPayload.Create(Path.Combine(bundle.Layout.LayoutPath!, "tray"), 709WindowsTrayTestPayload.Create(Path.Combine(root, "tray"),
Commands\TrayProtocolCommandTests.cs (5)
141var path = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs"); 187var requestedPath = scenario == "path_mismatch" ? Path.Combine(workspace.WorkspaceRoot.FullName, "Other.cs") : path; 239var path = absolutePath ? Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs") : "apphost.cs"; 262var path = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.cs"); 315SocketPath = Path.Combine(Path.GetDirectoryName(path)!, $"socket-{pid}"),
Commands\TypeScriptAppHostToolingCheckTests.cs (5)
137var configuredAppHost = new FileInfo(Path.Combine(configuredWorkspace.Path, "apphost.cs")); 176Path.Combine(workspace.WorkspaceRoot.FullName, "yarn.lock"), 218File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, markerFile), "{}"); 259var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"); 261File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), packageJsonContent);
Commands\UpdateCommandRepositoryToolsTests.cs (17)
27var appHost = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 75var appHost = new FileInfo(Path.Combine(directory.FullName, "AppHost.csproj")); 160var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 274var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 336var selectedDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "selected")); 338var appHost = Path.Combine(selectedDirectory.FullName, "AppHost.csproj"); 400var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 452var appHostDirectory = workspace.CreateDirectory(Path.Combine("src", "AppHost")); 453var appHost = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 461var packagesPath = Path.Combine(directory.FullName, "Directory.Packages.props"); 473var configPath = Path.Combine(directory.FullName, "aspire.config.json"); 481var nugetPath = Path.Combine(directory.FullName, "NuGet.config"); 496var lockPath = Path.Combine(directory.FullName, "package-lock.json"); 661Directory.CreateDirectory(Path.Combine(directory.FullName, ".git")); 662var config = Directory.CreateDirectory(Path.Combine(directory.FullName, ".config")); 663var dotnetManifest = Path.Combine(config.FullName, "dotnet-tools.json"); 673var npmManifest = Path.Combine(directory.FullName, "package.json");
Commands\UpdateCommandTests.cs (106)
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); 1171File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"), projectContent); 1214return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 1354var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"); 1397UseOrFindAppHostProjectFileAsyncCallback = (_, _, _) => Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))) 1479var toolPath = Path.Combine(installDir.FullName, "custom tool path"); 1562var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 1615var processPath = Path.Combine(installDirectory.FullName, "aspire"); 1619var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName); 1657var processPath = Path.Combine(installDirectory.FullName, "aspire"); 1662var sidecarPath = Path.Combine(installDirectory.FullName, InstallSidecarReader.SidecarFileName); 1714var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 1755var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 1789return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 1854return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 1918return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 1976return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 2053return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 2102return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 2158var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2177var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"); 2179var globalSettingsPath = Path.Combine(globalDir, "settings.global.json"); 2197var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2215var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"); 2217File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "daily" }"""); 2219var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2239var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"); 2241File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }"""); 2260var localConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2269return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 2321Path.Combine(workspace.Path, AspireConfigFile.FileName), """{ "channel": "staging" }"""); 2333Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))) 2387var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere")); 2388var projectConfigPath = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName); 2393updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}", 2407Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), 2410var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"); 2412File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }"""); 2414var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere")); 2418updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}", 2435Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), 2438var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere")); 2440Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), 2445updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}", 2461Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), 2464var globalDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"); 2466File.WriteAllText(Path.Combine(globalDir, "settings.global.json"), """{ "channel": "staging" }"""); 2468var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere")); 2470Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), 2475updateArgs: $"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")}", 2518Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), 2555return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 2646var resolved = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2731return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 2773var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "elsewhere")); 2774var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "AppHost.csproj")); 2777Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), 2780Path.Combine(workspace.Path, AspireConfigFile.FileName), 2924Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), 2961Path.Combine(workspace.Path, AspireConfigFile.FileName), 3034? Path.Combine(workspace.Path, AspireConfigFile.FileName) 3040$"update --apphost {Path.Combine(projectDirectory.FullName, "AppHost.csproj")} --channel {selectedChannel}", 3067workspace, $"update --apphost {Path.Combine(projectDirectory.FullName, fileName)}", projectDirectory, identityChannel, 3093"project" => Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName), 3094"parent" => Path.Combine(workspace.Path, AspireConfigFile.FileName), 3106workspace, $"update --apphost {Path.Combine(projectDirectory.FullName, fileName)}", projectDirectory, 3131await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), 3153Path.Combine(workspace.Path, AspireConfigFile.FileName), """{ "channel": "unknown-channel" }"""); 3235return Task.FromResult(new List<FileInfo> { new(Path.Combine(projectDirectory.FullName, appHostFileName)) }); 3239return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(projectDirectory.FullName, appHostFileName))); 3370var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 3415var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 3460var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 3493var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 3526return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 3680var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz"); 3702var executablePath = Path.Combine(contentDirectory.FullName, "aspire"); 3720var tarPath = Path.Combine(archiveDirectory.FullName, "aspire.tar"); 3723var archivePath = Path.Combine(archiveDirectory.FullName, "aspire.tar.gz"); 3750var processPath = Path.Combine(toolPath, GetAspireExecutableName()); 3776var processPath = Path.Combine(binaryDir, GetAspireExecutableName()); 3778File.WriteAllText(Path.Combine(binaryDir, InstallSidecarReader.SidecarFileName), """{"source":"nix"}"""); 3846var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
Commands\VsCodeExtensionCheckTests.cs (6)
63Directory.CreateDirectory(Path.Combine(extensions.FullName, "microsoft-aspire.aspire-vscode-1.2.3")); 91Directory.CreateDirectory(Path.Combine(extensions.FullName, "microsoft-aspire.aspire-vscode-1.2.3")); 188Directory.CreateDirectory(Path.Combine(extensions.FullName, "Microsoft-Aspire.Aspire-VSCode-9.9.9")); 207Directory.CreateDirectory(Path.Combine(extensions.FullName, "ms-dotnettools.csharp-2.0.0")); 229Directory.CreateDirectory(Path.Combine(extensions.FullName, "microsoft-aspire.aspire-vscode-extras-1.0.0")); 250var missingExtensionsDirectory = Path.Combine(home.FullName, "does-not-exist");
Configuration\AppHostPathConfigurationPolicyTests.cs (5)
40var path = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 54var path = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 64var path = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 76var path = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 86var path = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
Configuration\AspireConfigFileTests.cs (26)
42var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 61var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 96var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 97var globalSettingsFile = new FileInfo(Path.Combine(workspace.Path, "globalsettings.json")); 138var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 164File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$""" 187var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 211var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 234var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 253var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 267var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 280var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 303var filePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 321Assert.True(File.Exists(Path.Combine(subDir, AspireConfigFile.FileName))); 337LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)); 353File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), "{}"); 496var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 521Path.GetFullPath(Path.Combine(workspace.WorkspaceRoot.FullName, "DeadlockExtension/DeadlockExtension.csproj")), 530var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 563var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 609var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 629var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 657var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 678var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 705var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 881var configPath = Path.Combine(root, AspireConfigFile.FileName);
Configuration\ConfigSourceServiceGitTests.cs (10)
197var pidFile = Path.Combine(workspace.Path, "child.pid"); 402Assert.False(File.Exists(Path.Combine(cache.FullName, path))); 449configuration.AddJsonFile(Path.Combine(project.FullName, AspireConfigFile.FileName)); 530await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"custom":"preview"}"""); 550await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"custom":"latest"}"""); 575await File.WriteAllTextAsync(Path.Combine(workspace.Path, "unrelated.txt"), "Unrelated change"); 583await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), "invalid JSON is not read during a version check"); 626await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), content); 700await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"custom":"updated"}""", token); 726var configPath = Path.Combine(workspace.Path, path.Replace('/', Path.DirectorySeparatorChar));
Configuration\ConfigSourceServiceTests.cs (60)
89Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 169Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 195Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 220File.Move(Path.Combine(global.FullName, AspireConfigFile.FileName), globalFile.FullName); 226var localPath = Path.Combine(project.FullName, AspireConfigFile.FileName); 229var parentPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 251Assert.False(Directory.Exists(Path.Combine(context.AspireHomeDirectory.FullName, "configsources"))); 260Assert.False(File.Exists(Path.Combine(global.FullName, AspireConfigFile.FileName))); 309File.Move(Path.Combine(global.FullName, AspireConfigFile.FileName), globalFile.FullName); 317var siblingPath = Path.Combine(sibling.FullName, AspireConfigFile.FileName); 322var path = Path.Combine(directory.FullName, AspireConfigFile.FileName); 350var path = Path.Combine(directory.FullName, AspireConfigFile.FileName); 371Assert.False(File.Exists(Path.Combine(gap.FullName, AspireConfigFile.FileName))); 399File.Move(Path.Combine(global.FullName, AspireConfigFile.FileName), globalFile.FullName); 410var parentPath = Path.Combine(parent.FullName, AspireConfigFile.FileName); 411var rootPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 635Assert.False(File.Exists(Path.Combine(other.FullName, AspireConfigFile.FileName))); 658var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 767var repository = System.IO.Path.Combine(workspace.Path, "local\nrepository"); 839Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 1129Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 1136var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1157var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1183var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1219var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1226File.Move(Path.Combine(global.FullName, AspireConfigFile.FileName), globalFile.FullName); 1253Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 1262var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1294await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName)), "json"); 1302var path = Path.Combine(project.FullName, AspireConfigFile.FileName); 1326var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1347var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1369var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1398var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1421var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1458var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1480var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1535var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1591var checkPath = Path.Combine(first.GetCacheDirectory(s_source), "check.json"); 1671var checkPath = Path.Combine(first.GetCacheDirectory(s_source), "check.json"); 1705await File.WriteAllTextAsync(Path.Combine(directory, "current"), "invalid pointer"); 1706using var heldFile = File.Open(Path.Combine(snapshot, AspireConfigFile.FileName), FileMode.Open, FileAccess.ReadWrite, FileShare.None); 1785await File.ReadAllTextAsync(Path.Combine(service.GetCacheDirectory(initialSource), "check.json")), 1840var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1842var pointer = Path.Combine(service.GetCacheDirectory(s_source), "current"); 1872var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1939var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1945Directory.CreateDirectory(Path.Combine(service.GetCacheDirectory(s_source), "current")); 1962var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1984var snapshot = await File.ReadAllTextAsync(Path.Combine(cache, "current")); 1996var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 2028var modernPath = Path.Combine(project.FullName, AspireConfigFile.FileName); 2091var path = Path.Combine(workspace.Path, AspireConfigFile.FileName); 2095var stale = Directory.CreateDirectory(Path.Combine(cache, Guid.NewGuid().ToString("N"))); 2096await File.WriteAllTextAsync(Path.Combine(stale.FullName, "stale.txt"), "obsolete snapshot"); 2097File.SetAttributes(Path.Combine(stale.FullName, "stale.txt"), FileAttributes.ReadOnly); 2136var pointer = await File.ReadAllTextAsync(Path.Combine(next.GetCacheDirectory(s_source), "current")); 2137Assert.Equal(Path.Combine(cache, pointer), Assert.Single(Directory.GetDirectories(cache))); 2218Assert.False(File.Exists(Path.Combine(workspace.Path, AspireConfigFile.FileName))); 2229Assert.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);
Configuration\ConfigurationServiceTests.cs (6)
25var globalSettingsFile = new FileInfo(Path.Combine(globalSettingsDir.FullName, AspireConfigFile.FileName)); 27var settingsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 68var profilesPath = Path.Combine(workspace.Path, "apphost.run.json"); 147await File.WriteAllTextAsync(Path.Combine(cache.FullName, "workspace-config-locks"), "Blocks lock directory creation."); 412Path.Combine(srcDirectory.FullName, AspireConfigFile.FileName), 441Path.Combine(srcDirectory.FullName, AspireConfigFile.FileName),
Configuration\DotNetBasedAppHostServerChannelResolutionTests.cs (2)
72Assert.False(File.Exists(Path.Combine(appPath, AspireConfigFile.FileName))); 109var projectModelPath = Path.Combine(appPath, ".aspire_server");
Configuration\PrebuiltAppHostServerChannelResolutionTests.cs (2)
64Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, AspireConfigFile.FileName))); 97new TestConfigurationService { SettingsFilePath = Path.Combine(appPath, "global.json") }, new Aspire.Shared.TemporaryStorage());
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 (18)
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 original = await File.ReadAllBytesAsync(Path.Combine(root.FullName, "nuget.config")); 137Assert.Equal(original, await File.ReadAllBytesAsync(Path.Combine(root.FullName, "nuget.config"))); 144var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 152var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/'); 204var original = await File.ReadAllBytesAsync(Path.Combine(root.FullName, "nuget.config")); 208Assert.Equal(original, await File.ReadAllBytesAsync(Path.Combine(root.FullName, "nuget.config"))); 211var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 218var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/'); 268var configPath = Path.Combine(root.FullName, "nuget.config"); 276var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 283var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/'); 341var original = await File.ReadAllBytesAsync(Path.Combine(root.FullName, "nuget.config")); 344Assert.Equal(original, await File.ReadAllBytesAsync(Path.Combine(root.FullName, "nuget.config"))); 351var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 359var hivePath = Path.Combine(hivesDir.FullName, channelName).Replace('\\', '/');
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (40)
29var path = Path.Combine(dir.FullName, "nuget.config"); 76File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$""" 149File.WriteAllText(Path.Combine(childDirectory.FullName, AspireConfigFile.FileName), $$""" 184File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$""" 229File.WriteAllText(Path.Combine(directory.FullName, AspireConfigFile.FileName), $$""" 236var childPath = Path.Combine(directory.FullName, "nuget.config"); 283? new[] { Path.Combine(appHostDirectory.FullName, "NuGet.Config"), Path.Combine(workspace.Path, "nuget.config") } 284: [Path.Combine(workspace.Path, "nuget.config")]; 299? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "NuGet") 301string[] configPaths = globalConfigExists ? [Path.Combine(globalDirectory, "NuGet.Config")] : []; 384Path.Combine(target.FullName, "nuget.config"), sourceKey), error.Message); 559var targetConfigPath = Path.Combine(root.FullName, "nuget.config"); 580var targetConfigPath = Path.Combine(root.FullName, "nuget.config"); 623var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 662var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 702var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 730var target = Path.Combine(root.FullName, "nuget.config"); 896var configPath = Path.Combine(root.FullName, "nuget.config"); 900var document = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 936var generated = await File.ReadAllBytesAsync(Path.Combine(output.FullName, "nuget.config")); 937await File.WriteAllBytesAsync(Path.Combine(destination.FullName, "nuget.config"), generated); 943await Verify(XDocument.Load(Path.Combine(output.FullName, "nuget.config")).ToString(), "xml"); 976var configPath = Path.Combine(root.FullName, "nuget.config"); 1013var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 1054var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 1106var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 1172var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 1229var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 1312var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 1362var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config")); 1403var targetConfigPath = Path.Combine(root.FullName, "nuget.config"); 1433var targetConfigPath = Path.Combine(root.FullName, "nuget.config"); 1483var targetConfigPath = Path.Combine(root.FullName, "nuget.config"); 1505var originalContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "nuget.config")).DefaultTimeout(); 1526var targetConfigPath = Path.Combine(root.FullName, "nuget.config"); 1548var targetConfigPath = Path.Combine(root.FullName, "nuget.config"); 1586var directory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "new-config")); 1603var directory = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "new-config")); 2247XDocument.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config")).ToString());
DotNet\DotNetAppHostRestorePreviewTests.cs (2)
18var project = new FileInfo(Path.Combine(appHost.FullName, "AppHost.csproj")); 20new FileInfo(Path.Combine(unrelated.FullName, "NuGet.Config")), null,
DotNet\DotNetAppHostUpdateTransactionTests.cs (8)
19var file = new FileInfo(Path.Combine(workspace.Path, "apphost.cs")); 47var file = new FileInfo(Path.Combine(workspace.Path, "apphost.cs")); 75var file = new FileInfo(Path.Combine(workspace.Path, "apphost.cs")); 115var file = new FileInfo(Path.Combine(workspace.Path, "apphost.cs")); 140var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config")); 172var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config")); 209var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 232var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
DotNet\DotNetCliRunnerTests.cs (131)
52return Path.Combine(dotnetRoot, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet"); 72var validationTargets = Path.Combine(root.FullName, "LegacySdk.targets"); 82var projectFile = new FileInfo(Path.Combine(root.FullName, fileBased ? "apphost.cs" : "AppHost.csproj")); 142var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "apphost.cs" : "AppHost.csproj")); 246var configFile = new FileInfo(Path.Combine(root.FullName, "NuGet.Config")); 258var childDirectory = Directory.CreateDirectory(Path.Combine(root.FullName, "child")); 259var childFile = new FileInfo(Path.Combine(childDirectory.FullName, "Child.csproj")); 260var childTargets = customChildTargets ? Path.Combine(childDirectory.FullName, "Custom;NuGet.targets") : string.Empty; 265<Import Project="{{MSBuildEscaping.Escape(Path.Combine(sdkDirectory, "NuGet.targets"))}}" /> 280await File.WriteAllTextAsync(Path.Combine(childDirectory.FullName, "NuGet.Config"), $$""" 287var projectFile = new FileInfo(Path.Combine(root.FullName, fileBased ? "apphost.cs" : "Root.csproj")); 322Path.Combine(sdkDirectory, "NuGet.targets"), []); 325var sdkCache = isolated ? Path.Combine(isolatedDirectory!.FullName, "packages") : nuGetService.GetGlobalPackagesFolder(root); 366Assert.False(Directory.Exists(Path.Combine(root.FullName, "obj"))); 367Assert.False(Directory.Exists(Path.Combine(childDirectory.FullName, "obj"))); 368Assert.False(File.Exists(Path.Combine(root.FullName, "packages.lock.json"))); 372var rootOutput = isolated ? FindRestoreOutput(isolatedOutputDirectory!, "Root.csproj") : Path.Combine(root.FullName, "obj"); 373var childOutput = isolated ? FindRestoreOutput(isolatedOutputDirectory!, "Child.csproj") : Path.Combine(childDirectory.FullName, "obj"); 374using var graph = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(rootOutput, "Root.csproj.nuget.dgspec.json"))); 379Path.Combine(childOutput, "Child.csproj.nuget.dgspec.json"))); 390Assert.True(File.Exists(Path.Combine(rootOutput, "project.assets.json"))); 391Assert.True(File.Exists(Path.Combine(childOutput, "project.assets.json"))); 392Assert.True(File.Exists(Path.Combine(rootOutput, "packages.lock.json"))); 397await File.ReadAllTextAsync(Path.Combine(childDirectory.FullName, "custom-targets-ran"))); 408File.Delete(Path.Combine(childDirectory.FullName, "custom-targets-ran")); 415await File.ReadAllTextAsync(Path.Combine(childDirectory.FullName, "custom-targets-ran"))); 440var configPath = Path.Combine(workspace.Path, "NuGet.Config"); 446var project = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 492await File.WriteAllTextAsync(Path.Combine(project.FullName, "NuGet.Config"), $$""" 495var projectFile = new FileInfo(Path.Combine(project.FullName, "App.csproj")); 512var lockFilePath = Path.Combine(project.FullName, lockFile); 518File.Move(Path.Combine(project.FullName, "packages.lock.json"), lockFilePath); 521Directory.Delete(Path.Combine(project.FullName, "obj"), recursive: true); 536Assert.False(Directory.Exists(Path.Combine(project.FullName, "obj"))); 544Path.Combine(FindRestoreOutput(outputDirectory, "App.csproj"), "packages.lock.json")); 551Path.Combine(FindRestoreOutput(outputDirectory, "App.csproj"), "packages.lock.json")); 591var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 640var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, appHostFileName)); 679var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 713var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 715var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd")); 755var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 757var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "run-cwd")); 796var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 824var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 856var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 890var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire"); 892File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty); 903var cliPath = Path.Combine(cliDirectory.FullName, "aspire"); 905File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty); 907var linkDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin")); 908var linkPath = Path.Combine(linkDirectory.FullName, "aspire"); 918var dotnetDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "dotnet")); 919var dotnetPath = Path.Combine(dotnetDirectory.FullName, OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet"); 929var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin")); 930var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire"); 932File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty); 933File.WriteAllText(Path.Combine(cliDirectory.FullName, ".aspire-install.json"), """{"source":"script"}"""); 942var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin")); 943var cliPath = Path.Combine(cliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire"); 945File.WriteAllText(Path.Combine(cliDirectory.FullName, "aspire.dll"), string.Empty); 946Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "dcp")); 947Directory.CreateDirectory(Path.Combine(cliDirectory.FullName, "managed")); 966var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 972var targets = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "candidate;targets%('literal')@$?.targets")); 973var packages = new DirectoryInfo(Path.Combine(workspace.Path, "restore packages")); 1018var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "Generated.csproj")); 1019var resultPath = Path.Combine(projectDirectory.FullName, "result.txt"); 1020await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.rsp"), 1056var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1097var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1134var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1163var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1236var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1273var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1314var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1359var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1414var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1511var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1551var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1593var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1640var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1688[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock") 1723var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, singleFile ? "AppHost.cs" : "AppHost.csproj")); 1725var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "test results"); 1759[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock"), 1771var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1805[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock") 1817var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1843[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock") 1859var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1885[KnownConfigNames.UnixSocketPath] = Path.Combine(workspace.WorkspaceRoot.FullName, "cli.sock") 1901var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 1954var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2021var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2087var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2160var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 2165var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj")); 2169var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj")); 2207var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2210var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj")); 2240var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 2287var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 2333var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2370var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 2407var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 2447var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2492var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 2544var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2593var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2641var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 2680var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, fileName)); 2714var projectFile = new FileInfo(Path.Combine(workspace.Path, "AppHost.csproj")); 2747var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2785var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2828var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2870var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2910var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 2949var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "RunPropertiesApp")); 2950var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "RunPropertiesApp.csproj")); 2961await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "Program.cs"), "Console.WriteLine(\"Hello\");"); 2995Assert.Equal(Path.Combine(projectDirectory.FullName, "relative-working-directory"), properties.GetProperty("RunWorkingDirectory").GetString()); 3003var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 3047var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 3232var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 3335var packagePath = Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{packageVersion}.nupkg"); 3405var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 3443var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 3481var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 3521var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 3560var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
DotNet\DotNetRestoreConfigurationTests.cs (7)
20var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, fileName)); 24var toolsPath = Path.Combine(workspace.WorkspaceRoot.FullName, "sdk"); 38values["NuGetRestoreTargets"] = Path.Combine(toolsPath, "NuGet.targets"); 48Assert.Equal(Path.Combine(toolsPath, "NuGet.targets"), settings.RestoreTargets); 60var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 67values[propertyName] = Path.Combine(workspace.WorkspaceRoot.FullName, "custom"); 82var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
DotNet\ProcessExecutionDetachedTests.cs (1)
83var capturePath = Path.Combine(workspace.WorkspaceRoot.FullName, "capture.txt");
DotNet\ProcessExecutionFactoryEnvironmentTests.cs (1)
114await File.WriteAllTextAsync(Path.Combine(directory.FullName, "argv.cjs"),
DotNet\ProcessExecutionTests.cs (2)
296var scriptFile = new FileInfo(Path.Combine(workspaceRoot.FullName, "long-running.cmd")); 305var scriptFile = new FileInfo(Path.Combine(workspaceRoot.FullName, "long-running.sh"));
DotNet\ProcessInvocationOptionsTests.cs (2)
27NuGetRestoreTargetsFile = new FileInfo(Path.Combine(Path.GetFullPath("."), "Candidate.targets")), 28IsolatedRestorePackagesDirectory = new DirectoryInfo(Path.Combine(Path.GetFullPath("."), "packages")),
DotNetSdkInstallerTests.cs (4)
55var parentPidFile = Path.Combine(tempDirectory.FullName, "dotnet-parent.pid"); 56var childPidFile = Path.Combine(tempDirectory.FullName, "dotnet-child.pid"); 329var scriptFile = Path.Combine(directory.FullName, "dotnet-shim.ps1"); 352var shellFile = Path.Combine(directory.FullName, "dotnet");
Git\GitClientTests.cs (1)
114var repository = new GitRepositoryLocation(new DirectoryInfo(Path.Combine(workspace.Path, "repository.git")), IsBare: true);
Git\GitCommandRunnerTests.Authentication.cs (18)
52var marker = Path.Combine(workspace.Path, "askpass-called"); 53var helper = Path.Combine(workspace.Path, "askpass.sh"); 61var config = Path.Combine(workspace.Path, "gitconfig"); 99var marker = Path.Combine(workspace.Path, "credential-operations"); 100var helper = Path.Combine(workspace.Path, "credential.sh"); 108var config = Path.Combine(workspace.Path, "gitconfig"); 176var config = Path.Combine(workspace.Path, "gitconfig"); 212var config = Path.Combine(workspace.Path, "gitconfig"); 278var config = Path.Combine(workspace.Path, "gitconfig"); 301var config = Path.Combine(workspace.Path, "gitconfig"); 303var executables = Directory.CreateDirectory(Path.Combine(workspace.Path, "Git child executables")); 304var ssh = Path.Combine(executables.FullName, "ssh"); 330var config = Path.Combine(workspace.Path, "gitconfig"); 339.Where(directory => !File.Exists(Path.Combine(directory, "ssh.exe")) && !File.Exists(Path.Combine(directory, "ssh")))); 365var gitDirectory = Path.Combine(workspace.Path, "git-directory"); 366var absolute = Path.Combine(workspace.Path, "absolute"); 371Assert.Equal($"{Path.Combine(gitDirectory, "tools")}{Path.PathSeparator}{absolute}", normalized);
Git\GitCommandRunnerTests.cs (2)
178var startInfo = new ProcessStartInfo(Path.Combine(workspace.Path, "missing-private-executable")) 248var logPath = Path.Combine(workspace.Path, "git.log");
Git\GitRepositoryTests.cs (8)
35await File.WriteAllTextAsync(Path.Combine(workspace.Path, "example.txt"), "example"); 47Assert.Equal([Path.Combine(workspace.Path, "example.txt")], Assert.IsAssignableFrom<IReadOnlySet<string>>(result)); 142var trackedFile = Path.Combine(appDir.FullName, "AppHost.csproj"); 147var untrackedFile = Path.Combine(samplesDir.FullName, "Sample.csproj"); 151var gitignorePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".gitignore"); 156var ignoredFile = Path.Combine(binDir.FullName, "Stale.csproj"); 183var trackedFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"); 210var trackedFile = 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\ConsoleInteractionServiceTests.cs (2)
1329var logFilePath = Path.Combine(s_logsDirectory.FullName, "cli [dev team].log"); 1357var logFilePath = Path.Combine(s_logsDirectory.FullName, "cli [dev team].log");
Interaction\ExtensionInteractionServiceTests.cs (10)
116var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "cli [extension].log"); 149var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log"); 191var cliLogFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log"); 192var appHostLogFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cli.log"); 246var logFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log"); 310Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.cli.log"), 502var invalidPath = Path.Combine(workspace.WorkspaceRoot.FullName, "invalid"); 503var validPath = Path.Combine(workspace.WorkspaceRoot.FullName, "valid"); 544var invalidPath = Path.Combine(workspace.WorkspaceRoot.FullName, "invalid"); 612var 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 (17)
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() 75var source = Path.Combine(workspace.Path, "publish"); 83writer.WriteEntry(Path.Combine(source, file), $"{rid}/tray/{file}"); 87var extracted = Path.Combine(workspace.Path, "extracted"); 89LinuxTrayPayload.Validate(Path.Combine(extracted, "tray"), rid); 91Directory.GetFiles(Path.Combine(extracted, "tray")).Select(Path.GetFileName).Order(StringComparer.Ordinal)); 100var source = Path.Combine(workspace.Path, "publish"); 108writer.WriteEntry(Path.Combine(source, file), $"{rid}/tray/{file}"); 112var extracted = Path.Combine(workspace.Path, "extracted"); 116WindowsTrayPayload.Validate(Path.Combine(extracted, "tray"), rid); 118Directory.GetFiles(Path.Combine(extracted, "tray")).Select(Path.GetFileName).Order()); 121Assert.Equal(File.ReadAllBytes(Path.Combine(source, file)), File.ReadAllBytes(Path.Combine(extracted, "tray", file)));
Mcp\ApiDocs\ApiDocsCacheTests.cs (2)
114new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), 115new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")),
Mcp\AppHostConnectionSelectionLogicTests.cs (9)
77var firstDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "AppHost")); 78var secondDirectoryPath = Path.Combine(tempRoot.FullName, "apphost"); 83var firstPath = Path.Combine(firstDirectory.FullName, "AppHost.csproj"); 84var secondPath = Path.Combine(secondDirectory.FullName, "AppHost.csproj"); 130var appHostPath = Path.Combine(appHostDirectory.FullName, "RootCase.AppHost.csproj"); 142var realAppHostPath = Path.Combine(realDirectory.FullName, "Symlinked.AppHost.csproj"); 144var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link"); 155var symlinkedAppHostPath = Path.Combine(symlinkDirectory, "Symlinked.AppHost.csproj"); 203var actualAppHostPath = Path.Combine(directory.FullName, "CaseSensitive.AppHost.csproj");
Mcp\Docs\DocsCacheTests.cs (2)
127new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-runtimes")), 128new DirectoryInfo(Path.Combine(Path.GetTempPath(), "aspire-test-logs")),
Mcp\E2E\McpDocsE2ETests.cs (1)
289while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "Aspire.slnx")))
Mcp\ListAppHostsToolTests.cs (2)
47var appHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "TestAppHost"); 111var inScopeAppHostPath = Path.Combine(workspace.WorkspaceRoot.FullName, "InScopeAppHost");
Mcp\ListIntegrationsToolTests.cs (5)
29File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 33File.WriteAllText(Path.Combine(directory.FullName, AspireConfigFile.FileName), """ 43var appHostFile = new FileInfo(Path.Combine(directory.FullName, "AppHost.csproj")); 114File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 138File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """
Mcp\ListResourcesToolTests.cs (3)
278var realAppHostPath = Path.Combine(realDirectory.FullName, "Symlinked.AppHost.csproj"); 280var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link"); 291var symlinkedAppHostPath = Path.Combine(symlinkDirectory, "Symlinked.AppHost.csproj");
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")))
Npm\NpmRunnerTests.cs (4)
168var argumentsPath = Path.Combine(tempDirectory.FullName, "arguments.txt"); 175var tarballPath = Path.Combine(tempDirectory.FullName, "playwright-%PATH%! cli.tgz"); 261Path.Combine(directory.FullName, "npm.cmd"), 274var npmPath = Path.Combine(directory.FullName, "npm");
NuGet\BundleNuGetServiceTests.cs (29)
33File.WriteAllText(Path.Combine(app.FullName, AspireConfigFile.FileName), $$""" 40var configPath = Path.Combine(inherited ? workspace.Path : app.FullName, "nuget.config"); 64new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()); 118File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), invalidConfiguration ? """ 123File.WriteAllText(Path.Combine(workspace.Path, "nuget.config"), """ 130new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()); 155var global = new FileInfo(Path.Combine(workspace.Path, "global.json")); 159File.WriteAllText(Path.Combine(workspace.Path, "nuget.config"), """ 190File.WriteAllText(Path.Combine(app.FullName, AspireConfigFile.FileName), """ 193File.WriteAllText(Path.Combine(workspace.Path, "nuget.config"), """ 199new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()); 211var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 239new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()); 248Assert.StartsWith(Path.Combine(appHostDirectory.FullName, ".aspire") + Path.DirectorySeparatorChar, preview.EffectiveWorkingDirectory.FullName); 252Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "private-feed"), privateSource.Source); 288Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"), 303new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()); 331var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 350var globalPackagesFolder = Path.Combine(workspace.WorkspaceRoot.FullName, "packages"); 365Assert.Equal(Path.Combine(Path.GetDirectoryName(manifestPath)!, "obj"), capturedOutputPath); 474var toolPath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.dll"); 494Path.Combine(AppContext.BaseDirectory, $"{typeof(BundleNuGetService).Assembly.GetName().Name}.dll"), 551var manifestPath = Path.Combine(GetRestoreDirectory(workspace, packageList), ManifestFileName); 575var manifestPath = Path.Combine(GetRestoreDirectory(workspace, packageList), ManifestFileName); 595var firstAppHost = workspace.CreateDirectory(Path.Combine("apps", "api")); 596var secondAppHost = workspace.CreateDirectory(Path.Combine("apps", "web")); 631var legacyLibsDirectory = Directory.CreateDirectory(Path.Combine(restoreDirectory, "libs")); 632var lockedFilePath = Path.Combine(legacyLibsDirectory.FullName, "Microsoft.Extensions.DependencyInjection.xml"); 643Assert.Equal(Path.Combine(restoreDirectory, ManifestFileName), result);
NuGet\NuGetClientTests.cs (43)
48.Save(Path.Combine(workspace.Path, "nuget.config")); 52File.Delete(Path.Combine(feed.FullName, $"{packageId}.{version}.nupkg")); 180await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), """ 201await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), $$""" 224await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), 255var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 370Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"), 459var configPath = Path.Combine(workspace.Path, "NuGet.Config"); 493var configPath = Path.Combine(workspace.Path, "NuGet.Config"); 527Path.Combine(machineDirectory.FullName, "NuGet.Config"), 538Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"), 647Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"), 712var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 755var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1048var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1083var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName); 1085Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName), 1093Assert.False(Directory.Exists(Path.Combine(restoreDirectory.FullName, "libs"))); 1143var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1193var assets = new LockFileFormat().Read(Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName)); 1251var assets = new LockFileFormat().Read(Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName)); 1299var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName); 1301Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName), 1353var manifestPath = Path.Combine(restoreDirectory.FullName, IntegrationPackageProbeManifest.FileName); 1355Path.Combine(restoreDirectory.FullName, LockFileFormat.AssetsFileName), 1428var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1493var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1555var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1672var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1692File.WriteAllText(Path.Combine(incompleteInstallPath, "partial.txt"), "incomplete"); 1714Assert.True(File.Exists(Path.Combine(package.InstallPath, ".nupkg.metadata"))); 1719Directory.Delete(Path.Combine(globalPackagesFolder, packageId.ToLowerInvariant()), recursive: true); 1728var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 1786Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"), 1808var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 1841var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 1898var originalPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 1913var overlayPath = Path.Combine(overlayDirectory.FullName, "NuGet.Config"); 1932var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 1952var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2009var lockFile = new LockFileFormat().Read(Path.Combine(restoreDirectory, LockFileFormat.AssetsFileName)); 2031var packagePath = Path.Combine(feedDirectory, $"{packageId}.{version}.nupkg"); 2093var packageDirectory = Path.Combine(globalPackagesFolder, packageId.ToLowerInvariant());
NuGet\NuGetConfigurationQueryTests.cs (16)
25var configPath = Path.Combine(workspace.Path, "nuget.config"); 46await File.WriteAllTextAsync(Path.Combine(appHostDirectory.FullName, Aspire.Cli.Configuration.AspireConfigFile.FileName), $$""" 55new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()); 65Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, "nuget.config"))); 83var configPath = Path.Combine(workspace.Path, "nuget.config"); 107await File.WriteAllTextAsync(Path.Combine(appHostDirectory.FullName, Aspire.Cli.Configuration.AspireConfigFile.FileName), $$""" 116new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()); 127Assert.False(File.Exists(Path.Combine(appHostDirectory.FullName, "nuget.config"))); 172await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), $$""" 235var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 326var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 382Path.Combine(directory.FullName, "NuGet.Config"), 425var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 455Path.Combine(nonCanonicalDirectory.FullName, "NuGet.Config"), 469Path.Combine(mappingThenClearDirectory.FullName, "NuGet.Config"), 481Path.Combine(clearThenMappingDirectory.FullName, "NuGet.Config"),
NuGet\NuGetPackageCacheTests.cs (2)
49File.WriteAllText(Path.Combine(workspace.Path, "NuGet.Config"), """ 121Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"),
NuGet\NuGetPackageOperationConfigurationTests.cs (3)
97var ambientPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 214var persistentPath = Path.Combine(workspace.CreateDirectory("persistent").FullName, "NuGet.Config"); 249Path.Combine(directory.FullName, "NuGet.Config"),
NuGet\NuGetTestHelperTests.cs (4)
16var expectedConfigPath = Path.Combine(AppContext.BaseDirectory, "NuGetTestSettings.config"); 39var configPath = Path.Combine(workspace.Path, "NuGet.Config"); 51var machineConfigPath = Path.Combine(machineDirectory.FullName, "NuGet.Config"); 68Assert.Equal([configPath, Path.Combine(AppContext.BaseDirectory, "NuGetTestSettings.config"), machineConfigPath], snapshot.ConfigPaths);
NuGet\TemporaryNuGetConfigFileTests.cs (2)
19var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config")); 42var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"));
Packaging\IntegrationSourceTests.cs (17)
72var global = new FileInfo(Path.Combine(workspace.Path, "global.json")); 79File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 82File.WriteAllText(Path.Combine(app.FullName, AspireConfigFile.FileName), $$""" 96new[] { "https://example.com/global", "https://example.com/team", Path.Combine(app.FullName, "packages") } 105var global = new FileInfo(Path.Combine(workspace.Path, "global.json")); 106File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 121File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), json); 124workspace.WorkspaceRoot, new FileInfo(Path.Combine(workspace.Path, "global.json")))); 185var global = new FileInfo(Path.Combine(workspace.Path, "global.json")); 189File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 192File.WriteAllText(Path.Combine(app.FullName, AspireConfigFile.FileName), """ 215File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 265File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 349File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 400File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """ 429File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """{"integrationSources":"invalid"}"""); 463File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), """
Packaging\PackageChannelTests.cs (41)
28var source = Path.Combine(workspace.Path, "unavailable"); 60var source = Path.Combine(workspace.Path, "packages"); 88File.WriteAllText(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$""" 93"missing": {"source": {{JsonSerializer.Serialize(Path.Combine(workspace.Path, "missing"))}}} 250Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"), 332File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty); 336File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty); 379File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty); 382File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty); 420File.WriteAllText(Path.Combine(channelPackagesDirectory.FullName, "Aspire.ProjectTemplates.13.4.0-preview.1.nupkg"), string.Empty); 424File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0-preview.2.nupkg"), string.Empty); 459File.WriteAllText(Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0-preview.2.nupkg"), string.Empty); 486File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Redis.{pinnedVersion}.nupkg"), string.Empty); 487File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.PostgreSQL.{pinnedVersion}.nupkg"), string.Empty); 488File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"CommunityToolkit.Aspire.Hosting.NodeJS.{pinnedVersion}.nupkg"), string.Empty); 491File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.SqlServer.13.3.0.nupkg"), string.Empty); 494File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty); 501File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.AppHost.{pinnedVersion}.nupkg"), string.Empty); 502File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Sdk.{pinnedVersion}.nupkg"), string.Empty); 503File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Orchestration.linux-arm64.{pinnedVersion}.nupkg"), string.Empty); 504File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Testing.{pinnedVersion}.nupkg"), string.Empty); 505File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Msi.{pinnedVersion}.nupkg"), string.Empty); 506File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Integration.Analyzers.{pinnedVersion}.nupkg"), string.Empty); 509File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.Dapr.{pinnedVersion}.nupkg"), string.Empty); 510File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.GitHub.Models.{pinnedVersion}.nupkg"), string.Empty); 511File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.Hosting.NodeJs.{pinnedVersion}.nupkg"), string.Empty); 794File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.4.0.nupkg"), string.Empty); 795File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0-preview.1.nupkg"), string.Empty); 796File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.PostgreSQL.13.4.0-preview.1.nupkg"), string.Empty); 813File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.4.0.nupkg"), string.Empty); 814File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0-preview.1.nupkg"), string.Empty); 815File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.PostgreSQL.13.4.0.nupkg"), string.Empty); 832File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.5.0.nupkg"), string.Empty); 833File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Redis.13.6.0-preview.1.nupkg"), string.Empty); 834File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Azure.Kubernetes.13.6.0-pr.19404.gf51e8e1d.nupkg"), string.Empty); 863File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Dapr.13.4.0.nupkg"), string.Empty); 864File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Sql.13.4.0.nupkg"), string.Empty); 883File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Dapr.13.4.0.nupkg"), string.Empty); 884File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.Hosting.Sql.13.4.0.nupkg"), string.Empty); 1142var missingDirectory = Path.Combine(Path.GetTempPath(), $"aspire-missing-{Guid.NewGuid():N}"); 1182CreatePackageWithTags(Path.Combine(packagesDirectory.FullName, $"{packageId}.{version}.nupkg"), packageId, version, tags);
Packaging\PackageSourceIdentityTests.cs (2)
146var caseVariant = Path.Combine(feed.Parent!.FullName, "feed with spaces"); 173.Save(Path.Combine(directory.FullName, "NuGet.Config"));
Packaging\PackageSourceOverrideMappingsTests.cs (2)
182Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, "relative:feed"), result); 195Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, source), result);
Packaging\PackagingServiceTests.cs (47)
869var configPath = Path.Combine(workspace.Path, "nuget.config"); 1187var nugetConfigPath = Path.Combine(tempDir.FullName, "nuget.config"); 1216Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-10167")); 1217Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-11832")); 1272Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-12345")); 1442var nugetConfigPath = Path.Combine(tempDir.FullName, "nuget.config"); 1558File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{localVersion}.nupkg"), string.Empty); 1559File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{localVersion}.nupkg"), string.Empty); 1579var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix")); 1585File.WriteAllText(Path.Combine(packagesDirectory.FullName, $"Aspire.ProjectTemplates.{prVersion}.nupkg"), string.Empty); 1624File.WriteAllText(Path.Combine(defaultPackagesDirectory.FullName, $"Aspire.ProjectTemplates.{defaultHiveVersion}.nupkg"), string.Empty); 1626var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix")); 1632File.WriteAllText(Path.Combine(dogfoodPackagesDirectory.FullName, $"Aspire.ProjectTemplates.{dogfoodHiveVersion}.nupkg"), string.Empty); 1662var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix")); 1668File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.not-a-semver.nupkg"), string.Empty); 1698var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix")); 1728var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix")); 1784var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix")); 1820var installPrefix = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "custom-aspire-prefix")); 1846File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{localVersion}.nupkg"), string.Empty); 2038File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty); 2071File.WriteAllText(Path.Combine(runPackagesDir.FullName, $"Aspire.ProjectTemplates.{pinnedVersion}.nupkg"), string.Empty); 2106File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.{localVersion}.nupkg"), string.Empty); 2108File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.Redis.{localVersion}.nupkg"), string.Empty); 2109File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.Hosting.JavaScript.{localVersion}.nupkg"), string.Empty); 2111File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.ProjectTemplates.{localVersion}.nupkg"), string.Empty); 2112File.WriteAllText(Path.Combine(localPackagesDir.FullName, $"Aspire.AppHost.Sdk.{localVersion}.nupkg"), string.Empty); 2143File.WriteAllText(Path.Combine(localPackagesDir.FullName, "Aspire.Hosting.13.4.0-pr.16820.g1a99aa46.nupkg"), string.Empty); 2179var localHiveDir = new DirectoryInfo(Path.Combine(hivesDir.FullName, PackageChannelNames.Local)); 2194var expectedLocalPackagesPath = Path.Combine(localHiveDir.FullName, "packages").Replace('\\', '/'); 2230var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping")); 2232File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, $"Aspire.ProjectTemplates.{overrideVersion}.nupkg"), string.Empty); 2233File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, $"Aspire.Hosting.{overrideVersion}.nupkg"), string.Empty); 2260File.WriteAllText(Path.Combine(staleHiveDir.FullName, "Aspire.Hosting.13.4.0.nupkg"), string.Empty); 2262var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping")); 2264File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, $"Aspire.Hosting.{overrideVersion}.nupkg"), string.Empty); 2289var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping")); 2290File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.Hosting.13.4.1.nupkg"), string.Empty); 2291File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.Hosting.13.4.2.nupkg"), string.Empty); 2293File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.ProjectTemplates.13.4.2.nupkg"), string.Empty); 2317var packagesOverrideDir = Directory.CreateDirectory(Path.Combine(tempDir.FullName, "shipping")); 2318File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.Hosting.13.4.1.nupkg"), string.Empty); 2319var nestedDir = Directory.CreateDirectory(Path.Combine(packagesOverrideDir.FullName, "nested")); 2320File.WriteAllText(Path.Combine(nestedDir.FullName, "Aspire.Hosting.13.4.2.nupkg"), string.Empty); 2322File.WriteAllText(Path.Combine(nestedDir.FullName, "Aspire.ProjectTemplates.13.4.2.nupkg"), string.Empty); 2323File.WriteAllText(Path.Combine(packagesOverrideDir.FullName, "Aspire.ProjectTemplates.13.4.2.nupkg"), string.Empty); 2344var 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"),
ProfileCaptureOptionsTests.cs (4)
74var outputDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "profiles")); 92var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "profiles") + Path.DirectorySeparatorChar; 117var expectedDashboardPath = Path.Combine( 138var expectedDashboardPath = Path.Combine(
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"),
ProgramTests.cs (6)
65File.WriteAllText(Path.Combine(workspace.Path, InstallSidecarReader.SidecarFileName), $$"""{"source":"{{source}}"}"""); 73: Path.Combine(workspace.Path, "aspire"); 104new TestProcessPathProvider(Path.Combine(workspace.Path, "aspire.exe")), 192var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 209var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 226var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
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\AppHostInfoResolverTests.cs (1)
241var path = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.AppHost.csproj");
Projects\AppHostServerProjectTests.cs (22)
91var parentConfigPath = Path.Combine(_workspace.Path, "NuGet.Config"); 107var repoConfigPath = Path.Combine(repoRoot.FullName, "NuGet.Config"); 120await File.WriteAllTextAsync(Path.Combine(repoRoot.FullName, "Directory.Packages.props"), "<Project />"); 121await File.WriteAllTextAsync(Path.Combine(appPath.FullName, "NuGet.Config"), """ 207var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json"); 228var programCsPath = Path.Combine(project.ProjectModelPath, "Program.cs"); 250var programCs = Path.Combine(project.ProjectModelPath, "Program.cs"); 273var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json"); 328Path.Combine("src", "Aspire.Hosting.PostgreSQL")); 329var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "Aspire.Hosting.PostgreSQL.csproj"); 363Path.Combine("src", "Aspire.Hosting.Redis")); 364var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "Aspire.Hosting.Redis.csproj"); 436var expectedRoot = Path.Combine(CliPathHelper.GetAspireHomeDirectory(), "hosts"); 437var expectedPath = Path.Combine(expectedRoot, pathDir); 497var aspireConfigPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 545var projectModelPath = Path.Combine(appPath, ".aspire_server"); 576var projectFilePath = Path.Combine(project.ProjectModelPath, DotNetBasedAppHostServerProject.ProjectFileName); 601var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName); 619var projectModelPath = Path.Combine(appPath, ".aspire_server"); 663var projectModelPath = Path.Combine(appPath, ".aspire_server"); 691var aspireConfigPath = Path.Combine(appPath, AspireConfigFile.FileName); 709var projectModelPath = Path.Combine(appPath, ".aspire_server");
Projects\AppHostServerSessionTests.cs (1)
214Path.Combine(workspace.WorkspaceRoot.FullName, "absent.sock"), output, execution);
Projects\AppHostWorkloadIdTests.cs (7)
14var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 17var linkPath = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.Link.csproj"); 31var target = new FileInfo(Path.Combine(nestedDirectory.FullName, "AppHost.csproj")); 34var linkDirectoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "link"); 49var target = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 61var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 81var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Projects\DefaultLanguageDiscoveryTests.cs (5)
164var file = new FileInfo(Path.Combine(Path.GetTempPath(), fileName)); 179var file = new FileInfo(Path.Combine(Path.GetTempPath(), fileName)); 190var file = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.py")); 203var file = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.py")); 248var appHostPath = Path.Combine(workspace.Path, relativePath.Replace('/', Path.DirectorySeparatorChar));
Projects\DotNetAppHostProjectTests.cs (92)
84var appHostFile = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, fileName)); 93var appHostFile = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "Missing.csproj")); 308File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """ 445await File.WriteAllTextAsync(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """ 561Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]); 590var customDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "custom-dcp")); 592var customDashboardPath = Path.Combine( 643var inheritedDcpDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dcp")).FullName; 645var inheritedDashboardPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-dashboard"); 706: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dcp"); 709: Path.Combine(_workspace.WorkspaceRoot.FullName, "missing-dashboard"); 976var repoLocalTerminalHost = Path.Combine(_workspace.WorkspaceRoot.FullName, "repo-local-terminalhost"); 1036var customTerminalHost = Path.Combine(_workspace.WorkspaceRoot.FullName, "my-custom-terminal-host"); 1104var runWorkingDirectory = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, "run-cwd")); 1115Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1214Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1256"--log-file", Path.Combine(_workspace.WorkspaceRoot.FullName, "child.log"), 1304Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1370Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1460Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1502Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1546Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1593Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1638Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1758var targetPath = Path.Combine(outputDirectory.FullName, "AppHost.dll"); 1871Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 1938Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 2042File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "AppHost.run.json"), """ 2107Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "My Project")); 2168Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 2233Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 2290Directory.CreateDirectory(Path.Combine(appHostFile.DirectoryName!, "Properties")); 2401Assert.Equal(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName), env![BundleDiscovery.DcpPathEnvVar]); 2585File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """ 2817var appHostSymlink = Path.Combine(appHostFile.DirectoryName!, "apphost-link.cs"); 2846var targetAppHostFile = new FileInfo(Path.Combine(realDirectory.FullName, "apphost.cs")); 2850var selectedAppHostPath = Path.Combine(selectedDirectory.FullName, "apphost.cs"); 2880var selectedAppHostFile = new FileInfo(Path.Combine(configuredAppHostFile.DirectoryName!, "AppHost.cs")); 2943File.WriteAllText(Path.Combine(appHostFile.DirectoryName!, "apphost.run.json"), """ 3097var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs"); 3118var socketPath = Path.Combine( 3128var targetPath = Path.Combine(outputDirectory.FullName, fileName); 3137var commandPath = Path.Combine(outputDirectory.FullName, fileName); 3238var appHost = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs")); 3254var appHost = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs")); 3267var appHost = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.cs")); 3596WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 3688WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """ 3693WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.targets"), """ 3882WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 3917WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """ 3922WriteIsLikelyAppHostProject(Path.Combine("repo", "Custom.props"), """ 3952WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """ 3987WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4019WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4059WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4102WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4140WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4168WriteIsLikelyAppHostProject(Path.Combine("outer", "directory.build.props"), """ 4192WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """ 4223WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.targets"), """ 4285WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4309WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4368var projectFile = WriteIsLikelyAppHostProject(Path.Combine("proj", "MyApp.csproj"), """ 4377WriteIsLikelyAppHostProject(Path.Combine("proj", "Directory.Build.props"), $""" 4382WriteIsLikelyAppHostProject(Path.Combine("external", "Directory.Build.props"), """ 4458WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """ 4476WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """ 4494WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """ 4515WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """ 4537WriteIsLikelyAppHostProject(Path.Combine("src", "Directory.Build.props"), """ 4588WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4626WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4659WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """ 4678WriteIsLikelyAppHostProject(Path.Combine("repo", "Directory.Build.props"), """ 4710WriteIsLikelyAppHostProject(Path.Combine("outer", "Repo.marker"), "<Project />"); 4711WriteIsLikelyAppHostProject(Path.Combine("outer", "Directory.Build.props"), """ 4787var projectFile = new FileInfo(Path.Combine(repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar))); 4805while (dir is not null && !File.Exists(Path.Combine(dir.FullName, "Aspire.slnx"))) 4821Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, ".git")); 4823var path = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName); 4858var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName); 4875var projectPath = Path.Combine(_workspace.WorkspaceRoot.FullName, fileName); 4889var bundleRoot = Directory.CreateDirectory(Path.Combine(_workspace.WorkspaceRoot.FullName, Guid.NewGuid().ToString())); 4890var dcpDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.DcpDirectoryName)); 4891var managedDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.ManagedDirectoryName)); 4892var dashboardDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.DashboardDirectoryName)); 4893var terminalHostDirectory = Directory.CreateDirectory(Path.Combine(bundleRoot.FullName, BundleDiscovery.TerminalHostDirectoryName)); 4896Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.ManagedExecutableName)), 4899Path.Combine(dashboardDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.DashboardExecutableName)), 4902Path.Combine(terminalHostDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.TerminalHostExecutableName)), 4959=> File.WriteAllText(Path.Combine(directory, "aspire.config.json"), content);
Projects\DotNetBasedAppHostServerScaffoldCacheTests.cs (9)
77Path.Combine(project.ProjectModelPath, DotNetBasedAppHostServerProject.ProjectFileName)); 95var programPath = Path.Combine(project.ProjectModelPath, "Program.cs"); 116var objPath = Path.Combine(project.ProjectModelPath, "obj"); 118var stalePath = Path.Combine(objPath, "stale.cache"); 144var csprojPath = Path.Combine(project.ProjectModelPath, DotNetBasedAppHostServerProject.ProjectFileName); 166var appSettingsPath = Path.Combine(project.ProjectModelPath, "appsettings.json"); 193var objPath = Path.Combine(project.ProjectModelPath, "obj"); 195var assetsPath = Path.Combine(objPath, "project.assets.json"); 204var projectModelPath = Path.Combine(appPath, ".aspire_server");
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 (20)
28var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 43var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 81var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 97var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{extension}")); 127var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj"); 149var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj"); 174var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj"); 199var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj"); 224var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj"); 250var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj"); 289var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj"); 316var referencedPath = Path.Combine(webDirectory.FullName, "Web.csproj"); 319var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 341var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs"); 365var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs"); 395var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs"); 418var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs"); 442var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs"); 465var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs"); 487var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.txt");
Projects\GuestAppHostProjectTests.cs (92)
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"); 2105var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts"); 2192var appHostFile = new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts")); 2195await File.WriteAllTextAsync(Path.Combine(properties.FullName, "launchSettings.json"), """ 2308var appHostFile = new FileInfo(Path.Combine(root.FullName, "apphost.mts")); 2309var executable = Path.Combine(root.FullName, "server"); 2365var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts"); 2392var secretsFilePath = secretsFileName is null ? null : Path.Combine(_workspace.WorkspaceRoot.FullName, secretsFileName); 2427var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts"); 2442new FileInfo(Path.Combine(_workspace.WorkspaceRoot.FullName, "package.json"))); 2479var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2487var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts"); 2569var configPath = Path.Combine(_workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2577var appHostPath = Path.Combine(_workspace.WorkspaceRoot.FullName, "apphost.ts"); 2665var socketPath = Path.Combine( 2696var logFilePath = Path.Combine(_workspace.WorkspaceRoot.FullName, $"test-guest-{Guid.NewGuid()}.log"); 2774var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem"); 2790Assert.False(Directory.Exists(Path.Combine(_workspace.WorkspaceRoot.FullName, "bundles"))); 2796var devCertificatePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "aspire-dev-cert.pem"); 2817var lowerCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "certificates"); 2818var upperCaseDirectory = Path.Combine(_workspace.WorkspaceRoot.FullName, "CERTIFICATES"); 2821var devCertificatePath = Path.Combine(lowerCaseDirectory, "aspire.pem"); 2822var existingBundlePath = Path.Combine(upperCaseDirectory, "ASPIRE.PEM"); 2871var existingBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "existing-ca-certs.pem"); 2872var inheritedBundlePath = Path.Combine(_workspace.WorkspaceRoot.FullName, "inherited-ca-certs.pem"); 2874var devCertificatePath = Path.Combine(devCertificateDirectory, "aspire-dev-cert.pem"); 2946var 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 (73)
17var path = Path.Combine(directory, wrapperName); 35["/c", "call", Path.Combine(".", Path.GetRelativePath(appHostDirectory, wrapperPath)), .. toolArgs], 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); 328Assert.Equal(["/c", "call", Path.Combine(".", expectedWrapper)], invocation.PrefixArgs); 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"), ""); 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\LanguageInfoTests.cs (4)
65File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"), ""); 76File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "MyApp.csproj"), ""); 89File.WriteAllText(Path.Combine(nested, "apphost.cs"), ""); 103File.WriteAllText(Path.Combine(deep, "apphost.cs"), "");
Projects\LegacyTypeScriptAppHostHelperTests.cs (3)
14File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"), "// legacy"); 23File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"), "// legacy"); 24File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"), "// modern");
Projects\NativeAppHostServerProjectTests.cs (33)
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"); 34var managedExecutable = Path.Combine(managedDirectory.FullName, 73var executable = Path.Combine(serverDirectory.FullName, "server"); 74var contract = Path.Combine(serverDirectory.FullName, "ats-contract.json"); 78var managed = Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName("aspire-managed")); 81var entryPoint = Path.Combine(providerDirectory.FullName, "host.mjs"); 83await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "metadata.json"), "{}"); 84await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "aspire.apphost-server.json"), 119Path.Combine(workspace.Path, "missing"), new TestProcessExecutionFactory(), new Aspire.Shared.TemporaryStorage(), NullLogger.Instance)); 126var executable = Path.Combine(workspace.Path, "server"); 138[IntegrationReference.FromProject("Aspire.Hosting.Redis", Path.Combine(workspace.Path, "Redis.csproj"))])); 149var executable = Path.Combine(workspace.Path, "server"); 153? IntegrationReference.FromProject(name, Path.Combine(workspace.Path, "tooling.csproj")) 163var executable = Path.Combine(workspace.Path, "server"); 218var executable = Path.Combine(workspace.Path, "server"); 258var executable = Path.Combine(workspace.Path, "server"); 310var executable = Path.Combine(workspace.Path, "server"); 375var executable = Path.Combine(workspace.Path, "server"); 434var executable = Path.Combine(workspace.Path, "server"); 436var root = Directory.CreateDirectory(Path.Combine(workspace.Path, "provider")); 437var entryPoint = Path.Combine(root.FullName, "host.mjs"); 439await File.WriteAllTextAsync(Path.Combine(root.FullName, "aspire.apphost-server.json"), new JsonObject 447await File.WriteAllTextAsync(Path.Combine(workspace.Path, "outside.json"), "{}"); 461var executable = Path.Combine(workspace.Path, "server"); 462var managedDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "managed")); 464await File.WriteAllTextAsync(Path.Combine(managedDirectory.FullName, BundleDiscovery.GetExecutableFileName("aspire-managed")), ""); 465await File.WriteAllTextAsync(Path.Combine(workspace.Path, "ats-contract.json"), "{}"); 466var providerDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "provider")); 467var entryPoint = Path.Combine(providerDirectory.FullName, "host.mjs"); 469await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "metadata.json"), "{}"); 470await File.WriteAllTextAsync(Path.Combine(providerDirectory.FullName, "aspire.apphost-server.json"),
Projects\PrebuiltAppHostServerTests.cs (119)
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"), 269new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()) 353await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), $$""" 378var configPath = Path.Combine(workspace.Path, "NuGet.Config"); 391new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()) 554Path.Combine("/custom/output/path", "bin") + Path.DirectorySeparatorChar, 570var integrationProjectPath = Path.Combine(integrationDirectory.FullName, "MyIntegration.csproj"); 581var projectPath = Path.Combine(projectDirectory.FullName, "GeneratedClosure.csproj"); 582var nuGetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 600Path.Combine(projectDirectory.FullName, "Directory.Build.props"), 603Path.Combine(restoreDirectory.FullName, "obj"), 630Assert.False(Directory.Exists(Path.Combine(projectDirectory.FullName, "obj"))); 631Assert.False(Directory.Exists(Path.Combine(projectDirectory.FullName, "bin"))); 634Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName)); 639await File.ReadAllLinesAsync(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName))); 642await File.ReadAllLinesAsync(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureTargetsFileName))); 645await File.ReadAllLinesAsync(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ProjectRefAssemblyNamesFileName))); 675var projectIntegrationPath = Path.Combine(projectIntegrationDirectory.FullName, "ProjectIntegration.csproj"); 766.Save(Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config")); 781var generatedProjectPath = Path.Combine(generatedProjectDirectory.FullName, "IntegrationRestore.csproj"); 789Path.Combine(generatedProjectDirectory.FullName, "Directory.Build.props"), 792Path.Combine(restoreDirectory.FullName, "obj"), 794Path.Combine(workspace.WorkspaceRoot.FullName, "packages")).ToString()); 796Path.Combine(generatedProjectDirectory.FullName, "Directory.Packages.props"), 804var restoreConfig = XDocument.Load(Path.Combine( 865Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName)); 867Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName)); 897Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ClosureMetadataFileName), doc.Descendants(ns + "AspireClosureMetadataFile").FirstOrDefault()?.Value); 898Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ClosureSourcesFileName), doc.Descendants(ns + "AspireClosureSourcesFile").FirstOrDefault()?.Value); 899Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ClosureTargetsFileName), doc.Descendants(ns + "AspireClosureTargetsFile").FirstOrDefault()?.Value); 900Assert.Equal(Path.Combine("/tmp/work", IntegrationClosureBuilder.ProjectRefAssemblyNamesFileName), doc.Descendants(ns + "AspireProjectRefAssemblyNamesFile").FirstOrDefault()?.Value); 1228var firstAppHost = workspace.CreateDirectory(Path.Combine("apps", "api")); 1229var secondAppHost = workspace.CreateDirectory(Path.Combine("apps", "web")); 1270var linkDirectoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "linked-apphost"); 1286await File.WriteAllTextAsync(Path.Combine(lexicalWorkspace.FullName, AspireConfigFile.FileName), "{}"); 1288var linkedAppHostPath = Path.Combine(lexicalWorkspace.FullName, "apphost"); 1439var expectedCachePath = Path.Combine( 1497var expectedCachePath = Path.Combine( 1888var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 1910var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 1944var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 1993var expectedCachePath = Path.Combine( 2003var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 2032var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "integration-packages"); 2127var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 2153var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 2196var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 2218var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 2240var packageSourceOverride = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-packages"); 2374new DirectoryInfo(Path.Combine(Path.GetTempPath(), "hives")), 2375new DirectoryInfo(Path.Combine(Path.GetTempPath(), "cache")), 2376new DirectoryInfo(Path.Combine(Path.GetTempPath(), "sdks")), 2377new DirectoryInfo(Path.Combine(Path.GetTempPath(), "logs")), 2401new TestConfigurationService { SettingsFilePath = Path.Combine(workspace.Path, "global.json") }, new Aspire.Shared.TemporaryStorage()) 2507var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2541var appSettingsPath = Path.Combine(workingDirectory, "appsettings.json"); 2620Path.Combine("aspire-pr-hive", "packages")).FullName; 2682Path.Combine("aspire-pr-hive", "packages")).FullName; 2714var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2763var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2813var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2863var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2910var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 2952var missingPackageSource = Path.Combine(workspace.WorkspaceRoot.FullName, "this-hive-was-deleted"); 2954var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 3011var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 3077var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 3236var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 3242var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 3382Path.Combine(workspace.WorkspaceRoot.FullName, AspireJsonConfiguration.SettingsFolder), 3429Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), 3518Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"), 3579Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"), 3644var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 3694var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 3774var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 3851var ambientConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NuGet.Config"); 4049var restoreDirectory = Path.Combine(workingDirectory, IntegrationClosureBuilder.IntegrationRestoreFolderName); 4051Path.Combine(restoreDirectory, PrebuiltAppHostServer.IntegrationProjectFileName)); 4052var intermediateOutputPath = Path.Combine(restoreDirectory, "obj"); 4053dependencyGraphSpecPath = Path.Combine( 4198var aspireConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 4454Assert.Equal(Path.Combine(layoutPath, "libs"), startInfo.Environment[KnownConfigNames.IntegrationLibsPath]); 4524var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories) 4525.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/')) 4533Path.Combine(workingDirectory, IntegrationPackageProbeManifest.FileName), 4556await Verify(await File.ReadAllTextAsync(Path.Combine(workingDirectory, "appsettings.json")), "json"); 4680var copiedLibs = Directory.GetFiles(Path.Combine(layoutPath, "libs"), "*", SearchOption.AllDirectories) 4681.Select(path => Path.GetRelativePath(Path.Combine(layoutPath, "libs"), path).Replace('\\', '/')) 4824var firstSourcePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll"); 4825var secondSourcePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll"); 4869var firstPackagePath = Path.Combine(firstPackageRoot.FullName, "Aspire.Hosting.Redis.dll"); 4870var secondPackagePath = Path.Combine(secondPackageRoot.FullName, "Aspire.Hosting.Redis.dll"); 4871var projectPath = Path.Combine(projectRoot.FullName, "MyIntegration.dll"); 4918var sourcePath = Path.Combine(restoreDirectory.FullName, "MyIntegration.dll "); 4922Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName), 4925Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName), 4928Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureTargetsFileName), 4930var intermediateOutputPath = Path.Combine(restoreDirectory.FullName, "obj"); 4935Path.Combine(intermediateOutputPath, IntegrationClosureBuilder.ProjectAssetsFileName), 5040File.WriteAllText(Path.Combine(terminalDirectory.FullName, BundleDiscovery.GetExecutableFileName(BundleDiscovery.TerminalHostExecutableName)), "native"); 5042Path.Combine( 5093var sourcePath = Path.Combine(sourceRoot.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar)); 5113File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureMetadataFileName), metadataLines); 5114File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureSourcesFileName), sourcePaths); 5115File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ClosureTargetsFileName), targetPaths); 5116File.WriteAllLines(Path.Combine(restoreDirectory.FullName, IntegrationClosureBuilder.ProjectRefAssemblyNamesFileName), projectReferenceAssemblyNames); 5135var packagePath = Path.Combine(feedDirectory.FullName, $"{packageId}.{packageVersion}.nupkg"); 5175var document = XDocument.Load(Path.Combine(restoreDirectory.FullName, "Directory.Build.props")); 5213Path.Combine(intermediateOutputPath, $"{generatedProjectFile.Name}.nuget.dgspec.json"), 5249File.WriteAllText(Path.Combine(objDirectory.FullName, "project.assets.json"), projectAssetsContent); 5345var dashboardPath = Path.Combine( 5414var props = XDocument.Load(Path.Combine(projectFilePath.DirectoryName!, "Directory.Build.props")); 5419return XDocument.Load(Path.Combine(policyDirectory, "NuGet.Config"));
Projects\ProcessGuestLauncherTests.cs (3)
219var descendantPidFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "descendant.pid")); 353var scriptFile = new FileInfo(Path.Combine(workspaceRoot.FullName, "spawn-descendant.ps1")); 367var shellFile = new FileInfo(Path.Combine(workspaceRoot.FullName, "spawn-descendant.sh"));
Projects\ProjectLocatorTests.cs (222)
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); 3575var appHost = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 3577await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName), """ 3736var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 3740var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 3774var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 3803var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.unknown")); 3807var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 3836var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 3840var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 3884var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 3919var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 3950var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 3977var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 4002var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 4027var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 4057var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"); 4084var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"); 4111var settingsPath = Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"); 4149var realAppHost = new FileInfo(Path.Combine(realAppDirectory.FullName, "AppHost.csproj")); 4156var linkDirectory = Path.Combine(nodeModulesDir.FullName, "link"); 4170var pathThroughLink = Path.Combine(linkDirectory, "AppHost.csproj"); 4178var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 4221var appHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 4224var differentlyCasedPath = Path.Combine(workspace.WorkspaceRoot.FullName, "APPHOST.csproj"); 4232var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName); 4259var configPath = Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName);
Projects\ProjectUpdaterNuGetConfigurationTests.cs (47)
57var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 84json["Properties"]![overriddenProperty] = Path.Combine(workspace.WorkspaceRoot.FullName, "custom-policy"); 110Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*")); 152Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 153Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*")); 177projectFile.MoveTo(Path.Combine(workspace.CreateDirectory("AppHost").FullName, fileName)); 179var configPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 295var propsPath = Path.Combine(workspace.Path, "Directory.Build.props"); 404var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 520Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*")); 550Assert.False(File.Exists(Path.Combine(workspace.Path, "nuget.config"))); 551Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*")); 579var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 587var projectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 594var webProject = new FileInfo(Path.Combine(webDirectory.FullName, "Web.csproj")); 682var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 690var projectFile = new FileInfo(Path.Combine(workspace.Path, "apphost.cs")); 700var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 782var file = new FileInfo(Path.Combine(workspace.Path, fileName)); 812await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), 859Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*")); 894var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 974var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 1103await File.WriteAllTextAsync(Path.Combine(workspace.Path, AspireConfigFile.FileName), 1133var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1198projectFile.MoveTo(Path.Combine(workspace.CreateDirectory("AppHost").FullName, projectFile.Name)); 1203var parentConfig = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 1215var configFile = new FileInfo(Path.Combine(projectFile.DirectoryName!, "NuGet.Config")); 1233await File.WriteAllTextAsync(Path.Combine(projectFile.DirectoryName!, AspireConfigFile.FileName), 1364var aspireConfigPath = Path.Combine(workspace.Path, AspireConfigFile.FileName); 1501Assert.Empty(Directory.EnumerateDirectories(Path.Combine(workspace.Path, ".aspire"), ".aspire-nuget-config-*")); 1521project.MoveTo(Path.Combine(appHostDirectory.FullName, fileName)); 1524var configPath = Path.Combine( 1533Assert.StartsWith(Path.Combine(appHostDirectory.FullName, ".aspire") + Path.DirectorySeparatorChar, directory.FullName); 1539? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "NuGet") 1546: [Path.Combine(globalConfigDirectory, "NuGet.Config")]); 1566Assert.StartsWith(Path.Combine(appHostDirectory.FullName, ".aspire") + Path.DirectorySeparatorChar, 1636var propsFile = new FileInfo(Path.Combine(workspace.Path, "Directory.Packages.props")); 1691await File.WriteAllTextAsync(Path.Combine(workspace.Path, "NuGet.Config"), 1694var childDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "Child")); 1698await File.WriteAllTextAsync(Path.Combine(childDirectory.FullName, "NuGet.Config"), 1787var configFile = new FileInfo(Path.Combine(workspace.Path, "NuGet.Config")); 1821var configPath = Path.Combine(workspace.Path, "NuGet.Config"); 1870var configPath = Path.Combine(workspace.Path, "NuGet.Config"); 1938projectFile.MoveTo(Path.Combine(directory.FullName, projectFile.Name)); 1939var parentPath = Path.Combine(workspace.Path, "NuGet.Config"); 1954var configPath = Path.Combine(directory.FullName, "NuGet.Config");
Projects\ProjectUpdaterTests.cs (93)
34var file = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 69var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{extension}")); 72var importedFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"); 194var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "apphost.cs" : $"AppHost{extension}")); 209await File.WriteAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"), 219? await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props")) 221var configFile = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"); 223var cpmFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"); 264document.WithProperty("DirectoryBuildPropsPath", Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props")); 266Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"); 304Assert.Equal(importedContent, await File.ReadAllTextAsync(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"))); 323var props = System.Xml.Linq.XDocument.Load(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props")); 351var appHost = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 403var appHostProject = new FileInfo(Path.Combine(realDirectory.FullName, "AppHost.csproj")); 406var symlinkDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "link"); 408var appHostProjectViaSymlink = new FileInfo(Path.Combine(symlinkDirectory, appHostProject.Name)); 420var lowerCaseProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.csproj")); 422var upperCaseProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 439var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 442var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 445var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 549var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 552var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 555var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 568var aspireConfigFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json")); 713var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 716var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 719var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 731var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json")); 820var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 823var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 826var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 836var aspireConfigFile = new FileInfo(Path.Combine(appHostFolder.FullName, "aspire.config.json")); 995var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1115var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj")); 1118var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj")); 1121var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj")); 1124var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj")); 1248var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 1251var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1253var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1384var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1386var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1487var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1489var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1609var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1611var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1720var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1799var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1876var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1877var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1976Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 1977Assert.False(File.Exists(Path.Combine(appHostProjectFile.DirectoryName!, "nuget.config"))); 1991var nugetConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 2018Assert.StartsWith(Path.Combine(appHostProjectFile.DirectoryName!, ".aspire") + Path.DirectorySeparatorChar, workingDirectory.FullName); 2059Assert.True(File.Exists(Path.Combine(appHostProjectFile.DirectoryName!, "nuget.config"))); 2065var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2226var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2228var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 2339var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2341var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 2463var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2465var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 2577var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2579var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 2688var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2782var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2784var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 2884var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2964var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 3046var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 3139var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 3233var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 3309var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 3391var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 3477var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 3555var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 3633var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 3766var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 3768var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 3893var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}"); 3926var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}"); 3958var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}"); 3995var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}"); 4031var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}"); 4064var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}"); 4101var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectExtension}"); 4119var directoryPackagesPropsFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"); 4171var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "Issue15891.AppHost.csproj")); 4290var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 4367var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 4421var existingConfigFile = new FileInfo(Path.Combine(executionContext.WorkingDirectory.FullName, "nuget.config")); 4453var 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\RunningInstanceManagerTests.cs (1)
42var socketPath = Path.Combine(socketDirectory.FullName, "a.sock");
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\DefaultHostingPackagesTests.cs (4)
66Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), 83Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 103Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.config.json"), 155var sourceDirectory = Path.Combine(GetRepoRoot(), "src");
Scaffolding\ScaffoldingServiceTests.cs (14)
41File.WriteAllText(Path.Combine(rootDirectory.FullName, "go.mod"), "module existing\n\ngo 1.26\n"); 47hasModule ? Path.Combine(rootDirectory.FullName, "aspire-apphost") : rootDirectory.FullName, 50Path.Combine(scaffoldDirectory.FullName, "apphost.go"), 66File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}"); 71Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName), 104File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}"); 186var appHostDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName)); 187File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{ \"packageManager\": \"npm@10.0.0\" }"); 188File.WriteAllText(Path.Combine(appHostDirectory.FullName, "package.json"), "{ \"packageManager\": \"pnpm@10.0.0\" }"); 258var scaffoldDirectory = Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ScaffoldingService.BrownfieldTypeScriptAppHostDirectoryName)); 281File.WriteAllText(Path.Combine(rootDirectory.FullName, ".gitignore"), "node_modules/\n"); 282File.WriteAllText(Path.Combine(rootDirectory.FullName, "package.json"), "{}"); 283File.WriteAllText(Path.Combine(rootDirectory.FullName, "apphost.mts"), string.Empty); 320Directory.CreateDirectory(Path.Combine(rootDirectory.FullName, ".vscode"));
Secrets\SecretsStoreTests.cs (2)
14_tempDir = Path.Combine(Path.GetTempPath(), $"aspire-test-{Guid.NewGuid():N}"); 26private string GetSecretsPath() => Path.Combine(_tempDir, "secrets.json");
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\AgentTelemetryPersistenceTests.cs (1)
398var lockPath = Path.Combine(workspace.Path, "uploader.lock");
Telemetry\AgentTelemetryUploaderTests.cs (5)
17var pending = Path.Combine(storage, "pending"); 18var lockPath = Path.Combine(workspace.Path, "uploader.lock"); 42var lockPath = Path.Combine(workspace.Path, "uploader.lock"); 53var pending = Path.Combine(storage, "pending"); 54var lockPath = Path.Combine(workspace.Path, "uploader.lock");
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\ProfilingTelemetryTests.cs (4)
55var aspirePath = Path.Combine("tools", "aspire"); 56var npmPath = Path.Combine("node", "npm"); 125var aspirePath = Path.Combine("tools", "aspire"); 171var appHostProjectFile = new FileInfo(Path.Combine("AppHost", "AppHost.csproj"));
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);
Telemetry\TelemetryShutdownTests.cs (1)
152var storage = Path.Combine(directory, "storage");
Templating\CliTemplateFactoryConfigLineEndingTests.cs (2)
33var outputDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "out"); 41LineEndingAssert.FileUsesOsLineBreaksAndSingleFinalNewline(Path.Combine(outputDirectory, fileName));
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\GoStarterTemplateTests.cs (13)
20var path = Path.Combine(GetGoStarterDirectory(), "aspire.config.json"); 71var apiDirectory = Path.Combine(GetGoStarterDirectory(), "api"); 72var main = ConditionalBlockProcessor.Process(File.ReadAllText(Path.Combine(apiDirectory, "main.go")), conditions); 73var goMod = ConditionalBlockProcessor.Process(File.ReadAllText(Path.Combine(apiDirectory, "go.mod")), conditions); 74var goSum = ConditionalBlockProcessor.Process(File.ReadAllText(Path.Combine(apiDirectory, "go.sum")), conditions); 86var frontendDirectory = Path.Combine(GetGoStarterDirectory(), "frontend"); 88Assert.True(File.Exists(Path.Combine(frontendDirectory, "package.json"))); 89Assert.True(File.Exists(Path.Combine(frontendDirectory, "package-lock.json"))); 91Assert.True(File.Exists(Path.Combine(frontendDirectory, "vite.config.ts"))); 100var apiDirectory = Path.Combine(GetGoStarterDirectory(), "api"); 102var goMod = File.ReadAllText(Path.Combine(apiDirectory, "go.mod")); 105var telemetry = File.ReadAllText(Path.Combine(apiDirectory, "telemetry.go")); 117var path = Path.Combine(GetGoStarterDirectory(), "apphost.go");
Templating\JavaAppHostTemplateTests.cs (8)
81var apiDirectory = Path.Combine(GetJavaStarterDirectory(), "api"); 83var buildPath = Path.Combine(apiDirectory, "build.gradle"); 90var settingsPath = Path.Combine(apiDirectory, "settings.gradle"); 111var path = Path.Combine(GetJavaStarterDirectory(), "aspire.config.json"); 132var apiDirectory = Path.Combine(GetJavaStarterDirectory(), "api"); 136var path = Path.Combine(apiDirectory, relativePath); 149var path = Path.Combine(apiDirectory, relativePath); 173var path = Path.Combine(GetJavaStarterDirectory(), "AppHost.java");
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 (12)
31Assert.Equal(new byte[] { 1, 2, 3 }, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, commit), "content"))); 51var actual = await File.ReadAllBytesAsync(Path.Combine(destination, path)); 63await File.WriteAllBytesAsync(Path.Combine(repository.FullName, "content"), [4, 5, 6]); 70Assert.Equal(content, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, commit), "content"))); 79await File.WriteAllBytesAsync(Path.Combine(repository.FullName, "content"), [4, 5, 6]); 87Assert.Equal(new byte[] { 4, 5, 6 }, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, branchCommit), "content"))); 89Assert.Equal(new byte[] { 1, 2, 3 }, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, tagCommit), "content"))); 105new TemplateSource(".", Path.Combine(workspace.Path, "repository-diagnostic-marker"), null), TestContext.Current.CancellationToken)); 135Assert.Equal(new byte[] { 1, 2, 3 }, await File.ReadAllBytesAsync(Path.Combine(GetCheckout(workspace, commit), "content"))); 154return Path.Combine(cached, "repository"); 162var file = Path.Combine(repository.FullName, path); 166await File.WriteAllTextAsync(Path.Combine(configuration.FullName, "template.json"),
Templating\TemplateEngineFactoryGitTests.cs (2)
264await File.WriteAllTextAsync(Path.Combine(configuration.FullName, "template.json"), 266await File.WriteAllTextAsync(Path.Combine(destination.FullName, "content.txt"), "template content", token);
Templating\TemplateGitIgnoreTests.cs (1)
38var gitIgnorePath = Path.Combine(starterDirectory, ".gitignore");
Templating\TemplateNuGetConfigServiceTests.cs (38)
35var ambientPath = Path.Combine(workspace.Path, "nuget.config"); 71var ambientPath = Path.Combine(workspace.Path, "nuget.config"); 113await Verify(await File.ReadAllTextAsync(Path.Combine(output.FullName, "nuget.config"))) 146Assert.Equal(builtInCreatesConfig, File.Exists(Path.Combine(builtInOutput.FullName, "nuget.config"))); 147Assert.Equal(templateEngineCreatesConfig, File.Exists(Path.Combine(templateEngineOutput.FullName, "nuget.config"))); 170var path = Path.Combine(output.FullName, fileName); 220var inheritedPath = Path.Combine(workspace.Path, "nuget.config"); 221var nestedPath = Path.Combine(nested.FullName, "nuget.config"); 231var generated = await File.ReadAllBytesAsync(Path.Combine(output.FullName, "nuget.config")); 234Assert.Equal(generated, await File.ReadAllBytesAsync(Path.Combine(output.FullName, "nuget.config"))); 240await Verify(await File.ReadAllTextAsync(Path.Combine(output.FullName, "nuget.config"))) 250Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"), 299await File.WriteAllTextAsync(Path.Combine(workspace.Path, "nuget.config"), """ 326var doc = XDocument.Load(Path.Combine(outputDirectory.FullName, "nuget.config")); 341Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"), 351Path.Combine(outputDirectory.FullName, "nuget.config"), 368var projectConfigPath = Path.Combine(outputDirectory.FullName, "nuget.config"); 369var parentConfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"); 409Assert.False(File.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, "nuget.config"))); 679Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), 877File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty); 878File.WriteAllText(Path.Combine(prPackagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty); 951File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty); 952File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"), string.Empty); 993Path.Combine(nestedDirectory.FullName, "Aspire.ProjectTemplates.13.6.0.nupkg"), 1030File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty); 1031File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.99.0.0.nupkg"), string.Empty); 1066File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.99.0.0.nupkg"), string.Empty); 1107File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.6.0-dev.nupkg"), string.Empty); 1108File.WriteAllText(Path.Combine(packagesDirectory.FullName, "Aspire.ProjectTemplates.13.7.0-dev.nupkg"), string.Empty); 1208File.WriteAllText(Path.Combine(packagesDir.FullName, "Aspire.ProjectTemplates.13.5.0.nupkg"), string.Empty); 1361var configPath = Path.Combine(outputDir.FullName, "nuget.config"); 1400Assert.False(File.Exists(Path.Combine(outputDir.FullName, "nuget.config"))); 1411Path.Combine(outputDir.FullName, "nuget.config"), 1441var configPath = Path.Combine(outputDir.FullName, "nuget.config"); 1465Path.Combine(outputDir.FullName, "nuget.config"), 1494var configPath = Path.Combine(outputDir.FullName, "nuget.config"); 1524var configPath = Path.Combine(outputDir.FullName, "nuget.config");
Templating\TemplatePackageLockTests.cs (3)
219var directory = Path.Combine(GetRepoRoot(), relativeDirectory); 220Assert.True(File.Exists(Path.Combine(directory, "package-lock.json")), $"Expected a package-lock.json in {relativeDirectory}."); 222var npmrcPath = Path.Combine(directory, ".npmrc");
Testing\TestRunReporterTests.cs (4)
32Assert.Equal(Path.Combine(context.AspireHomeDirectory.FullName, "testruns"), Path.GetDirectoryName(reporter.OutputPath)); 111Assert.Empty(Directory.GetFiles(Path.Combine(context.AspireHomeDirectory.FullName, "testruns"))); 119var parent = Path.Combine(context.AspireHomeDirectory.FullName, "testruns"); 696var target = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "untouched.txt"));
tests\Shared\LinuxTrayTestPayload.cs (2)
18var executable = Path.Combine(directory, "aspire-tray"); 24File.WriteAllBytes(Path.Combine(directory, "Aspire.png"),
tests\Shared\Processes\ChildProcessTests.cs (1)
393var cleanupPath = Path.Combine(fixture.CreateDirectory().FullName, "cleanup-completed");
tests\Shared\Processes\ProcessSupervisorTests.cs (2)
36var shim = Path.Combine(directory.FullName, "literal %PATH%! shim.cmd"); 73var completionPath = Path.Combine(directory.FullName, "exit-code");
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"]);
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
tests\Shared\WindowsTrayTestPayload.cs (2)
13File.WriteAllText(Path.Combine(directory, "Aspire.ico"), "test icon"); 14using var stream = File.Create(Path.Combine(directory, "aspire-tray.exe"));
TestServices\DcpConnectionTestProcess.cs (5)
69var standardOutputPath = Path.Combine(workingDirectory, StandardOutputFileName); 70var standardErrorPath = Path.Combine(workingDirectory, StandardErrorFileName); 79File.WriteAllText(Path.Combine(workingDirectory, SessionDirectoryFileName), sessionDirectory); 136await WaitForApiAsync(Path.Combine(sessionDirectory, "kubeconfig"), readiness.Token); 162await File.WriteAllTextAsync(Path.Combine(sessionDirectory, "kubeconfig"), "clusters:", handoff.Token);
TestServices\FakePlaywrightServices.cs (2)
47internal static string SkillBaseDirectory { get; } = Path.Combine(".claude", "skills"); 58File.WriteAllText(Path.Combine(skillDirectory, "SKILL.md"), "# Playwright CLI Skill");
TestServices\NuGetTestHelper.cs (3)
20using var archive = ZipFile.Open(Path.Combine(feed.FullName, $"{id}.{version}.nupkg"), ZipArchiveMode.Create); 60.Select(name => Path.Combine(directory.FullName, name)) 68configPaths.Add(Path.Combine(AppContext.BaseDirectory, "NuGetTestSettings.config"));
TestServices\ProcessTestHelpers.cs (1)
12var path = Path.Combine(directory.FullName, OperatingSystem.IsWindows() ? $"{name}.cmd" : name);
TestServices\TerminalTapeTestHost.cs (1)
34SocketPath = Path.Combine(_directory.FullName, "h.sock");
TestServices\TestCliDownloader.cs (1)
37var path = Path.Combine(_tempDirectory.FullName, filename);
TestServices\TestConfigSourceServices.cs (2)
22var path = Path.Combine(projectDirectory.FullName, AspireConfigFile.FileName); 62var path = Path.Combine(service.GetCacheDirectory(source), "check.json");
TestServices\TestConfigurationService.cs (1)
62public string SettingsFilePath { get; set; } = Path.Combine(AppContext.BaseDirectory, "settings.global.json");
TestServices\TestDotNetCliRunner.cs (1)
179values["NuGetRestoreTargets"] = Path.Combine(AppContext.BaseDirectory, "NuGet.targets");
TestServices\TestGitWorktree.cs (2)
21File.WriteAllText(Path.Combine(adminDirectory, "gitdir"), backPointer + Environment.NewLine); 33var gitFilePath = Path.Combine(fullCheckoutRoot, ".git");
Utils\AppHostHelperTests.cs (1)
28var projectFile = new FileInfo(Path.Combine(Path.GetTempPath(), "test.csproj"));
Utils\AspireRepositoryDetectorTests.cs (3)
41File.WriteAllText(Path.Combine(repoRoot, "Aspire.slnx"), string.Empty); 67File.WriteAllText(Path.Combine(repoRoot, "Aspire.slnx"), string.Empty); 88File.WriteAllText(Path.Combine(repoRoot, "Aspire.slnx"), string.Empty);
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\CliTestHelper.cs (1)
680var tmpDirectory = new DirectoryInfo(Path.Combine(executionContext.WorkingDirectory.FullName, "tmp"));
Utils\CliUpdateNotificationServiceTests.cs (2)
219var toolPath = Path.Combine(workspace.CreateDirectory("install").FullName, "custom tool path"); 409var processPath = Path.Combine(toolPath, GetAspireExecutableName());
Utils\DcpConnectionHealthCheckTests.cs (6)
207Path.Combine(sessionDirectory, "kubeconfig") 362File.WriteAllText(Path.Combine(environment["DCP_SESSION_FOLDER"], "kubeconfig"), server.Kubeconfig); 469File.WriteAllText(Path.Combine(environment["DCP_SESSION_FOLDER"], "kubeconfig"), "clusters:"); 629var kubeconfigPath = Path.Combine(workspace.WorkspaceRoot.FullName, "kubeconfig"); 674var certificatePath = Path.Combine(cacheDirectory, $"{lookup}.crt"); 675var keyPath = Path.Combine(cacheDirectory, $"{lookup}.key");
Utils\DcpConnectionLifetimeTests.cs (4)
65using var storage = new PrivateTemporaryStorage(Path.Combine(workspace.Path, ".aspire"), new ConfigurationBuilder().Build()); 140var linkedDirectory = Path.Combine(workspace.Path, "linked-dcp"); 164var sessionDirectoryFile = Path.Combine(workspace.Path, DcpConnectionTestProcess.SessionDirectoryFileName); 247var path = Path.Combine(workspace.Path, logFile);
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\DotNetToolDetectionTests.cs (4)
27var toolPath = Path.Combine(workspace.Path, "custom tool path"); 28var processPath = Path.Combine(toolPath, GetAspireExecutableName()); 54var toolPath = Path.Combine(workspace.Path, "custom tool path"); 82var processPath = Path.Combine(workspace.Path, GetAspireExecutableName());
Utils\FileDeleteHelperTests.cs (2)
18var filePath = Path.Combine(directory, "Aspire.Hosting.dll"); 41var filePath = Path.Combine(directory, "Aspire.Hosting.dll");
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\FirstTimeUseNoticeSentinelTests.cs (7)
29var cliDir = Path.Combine(workspace.WorkspaceRoot.FullName, "cli"); 31var sentinelFilePath = Path.Combine(cliDir, "cli.firstUseSentinel"); 62var cliDir = Path.Combine(workspace.WorkspaceRoot.FullName, "cli"); 64var sentinelFilePath = Path.Combine(cliDir, "cli.firstUseSentinel"); 81var nonExistentDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "non-existent-dir"); 88var cliDir = Path.Combine(nonExistentDirectory, "cli"); 89var sentinelFilePath = Path.Combine(cliDir, "cli.firstUseSentinel");
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\MissingJavaScriptToolWarningTests.cs (1)
52File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "package.json"), "{ \"packageManager\": \"bun@1.2.0\" }");
Utils\PathNormalizerTests.cs (20)
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 alias = Path.Combine(testRoot.FullName, "CAFE\u0301"); 261var normalizationMatch = Path.Combine(testRoot.FullName, "Cafe\u0301"); 267var candidate = Path.Combine(testRoot.FullName, "Caf\u00E9"); 287var 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")));
Utils\TemporaryStorageTests.cs (14)
17var home = Path.Combine(workspace.Path, ".aspire"); 23Assert.Equal(Path.Combine(home, "tmp"), Path.GetDirectoryName(session)); 33Assert.Equal(directoryMode, File.GetUnixFileMode(Path.Combine(home, "tmp"))); 52var home = Path.Combine(workspace.Path, ".aspire"); 69using var storage = CreateStorage(Path.Combine(workspace.Path, ".aspire"), value); 70Assert.Equal(expected, File.Exists(Path.Combine(storage.GetTempPath(), ".preserve"))); 79using var storage = CreateStorage(Path.Combine(workspace.Path, ".aspire")); 106var home = Directory.CreateDirectory(Path.Combine(workspace.Path, ".aspire")); 107var directory = configureTmp ? Directory.CreateDirectory(Path.Combine(home.FullName, "tmp")) : home; 122Assert.Equal(Path.Combine(home.FullName, "tmp"), Path.GetDirectoryName(Path.TrimEndingDirectorySeparator(storage.GetTempPath()))); 144var home = Path.Combine(workspace.Path, ".aspire"); 166var home = Directory.CreateDirectory(Path.Combine(workspace.Path, ".aspire")); 175Assert.Equal(privateMode, File.GetUnixFileMode(Path.Combine(home.FullName, "tmp"))); 188var home = Path.Combine(workspace.Path, ".aspire");
Utils\TemporaryWorkspaceTests.cs (1)
23Assert.True(Directory.Exists(Path.Combine(workspace.Path, ".git")));
Utils\TestExecutionContextHelper.cs (2)
65homeDirectory ??= new DirectoryInfo(Path.Combine(root, ".home")); 69logFilePath ??= Path.Combine(logsDirectory.FullName, "test.log");
Aspire.Components.Common.TestUtilities (4)
ConformanceTests.cs (4)
56protected string JsonSchemaPath => Path.Combine(AppContext.BaseDirectory, "ConfigurationSchema.json"); 681var launchedToolsFile = Path.Combine(toolsDirectory.FullName, "launched-tools.txt"); 686File.WriteAllText(Path.Combine(toolsDirectory.FullName, $"{tool}.cmd"), $"@echo {tool}>>\"{launchedToolsFile}\"\r\n@exit /b 1\r\n"); 690var toolPath = Path.Combine(toolsDirectory.FullName, tool);
Aspire.Dashboard (40)
DashboardWebApplication.cs (2)
683var baseDirectoryPath = Path.Combine(baseDirectory, manifestFileName); 689var contentRootManifestPath = Path.Combine(contentRootPath, manifestFileName);
ServiceClient\DashboardRunStore.cs (18)
133DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName); 141CurrentWorkingDirectory = Path.Combine(_runsDirectory, runId); 142DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName); 145File.WriteAllText(Path.Combine(CurrentWorkingDirectory, _applicationMarkerFileName), string.Empty); 153_metadataPath = Path.Combine(CurrentWorkingDirectory, "run.json"); 158CurrentWorkingDirectory = Path.Combine(resumesDirectory, _applicationMarkerFileName); 159DatabasePath = Path.Combine(CurrentWorkingDirectory, DatabaseFileName); 218!File.Exists(Path.Combine(directory, DatabaseFileName))) 322var metadataPath = Path.Combine(runDirectory, "run.json"); 410if (!File.Exists(Path.Combine(directory, _applicationMarkerFileName))) 415var metadataPath = Path.Combine(directory, "run.json"); 543var metadataPath = Path.Combine(runDirectory, "run.json"); 575var runDirectory = Path.Combine(runsDirectory, runId); 667Path.Combine(runDirectory, metadata.DatabaseFileName), 676return Path.Combine(GetResumesDirectory(dataRoot), GetApplicationDirectoryName(applicationName)); 679internal static string GetRunsDirectory(string? dataRoot) => Path.Combine(GetDataRoot(dataRoot), "runs"); 681internal static string GetResumesDirectory(string? dataRoot) => Path.Combine(GetDataRoot(dataRoot), "resumes"); 685? Path.Combine(AspireHomeDirectory.GetDefault(), "dashboard")
src\Shared\AspireHomeDirectory.cs (1)
32? Path.Combine(userProfileDirectory, ".aspire")
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\BundleVersionLease.cs (2)
104var leasesDirectory = Path.Combine(fullVersionDirectory, LeasesDirectoryName); 172var leasesDirectory = Path.Combine(versionDirectory, LeasesDirectoryName);
src\Shared\ChildProcess.cs (1)
132_completionPath = Path.Combine(_completionDirectory.FullName, "exit-code");
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
src\Shared\Telemetry\InternalMicrosoftDetector.cs (4)
559var tempPath = Path.Combine(directory, $"{Path.GetRandomFileName()}.tmp"); 905var copilotHome = Path.Combine(_homeDirectory.FullName, ".copilot"); 1582var path = Path.Combine(directory, fileName); 1639var candidate = Path.Combine(directory, command + extension);
src\Shared\Telemetry\LinuxMachineInformationProvider.cs (1)
38userDir = Path.Combine(rootPath, SecondaryPathSubDirectory);
src\Shared\Telemetry\TelemetryMetadata.cs (1)
40new DirectoryInfo(Path.Combine(AspireHomeDirectory.GetDefault(), "cache")),
src\Shared\Telemetry\UnixMachineInformationProvider.cs (2)
83var fullPath = Path.Combine(directoryPath, fileName); 107var path = Path.Combine(directoryPath, fileName);
Aspire.Dashboard.Components.Tests (6)
Layout\ResourcesLayoutTests.cs (1)
511var original = type is KnownResourceTypes.Project or KnownResourceTypes.Executable ? Path.Combine("workspace", value) : value;
Shared\FluentUISetupHelpers.cs (3)
174var databasePath = Path.Combine(context.Services.GetRequiredService<TemporaryWorkspace>().Path, "dashboard.db"); 215var databasePath = Path.Combine(services.GetRequiredService<TemporaryWorkspace>().Path, "dashboard.db"); 248var databasePath = Path.Combine(services.GetRequiredService<TemporaryWorkspace>().Path, "dashboard.db");
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
Aspire.Dashboard.Playwright.Tests (30)
Integration\Playwright\DashboardInteractionsTests.cs (3)
444await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, "fluentui-grid-disposal-regression.png") }); 481await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, "fluentui-legacy-splitter.png") }); 562await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, $"fluentui-filter-{(legacy ? "legacy" : "new")}.png") });
Integration\Playwright\Infrastructure\DashboardServerFixture.cs (1)
92WebRootPath = Path.Combine(aspireAssemblyDirectory, "wwwroot"),
Integration\Playwright\NativeAotDashboardTests.cs (2)
64var leasesDirectory = Path.Combine(workingDirectory.FullName, ".leases"); 121var leasesDirectory = Path.Combine(workingDirectory.FullName, ".leases");
Integration\Playwright\ResourcePaneMotionTests.cs (2)
520await page.Context.Tracing.StopAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, $"resource-pane-motion-{width}-{reducedMotion}.zip") }); 573await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, $"resource-pane-motion-{width}-{reducedMotion}-{expanding}.png") });
Integration\Playwright\ResourcePaneResponsiveTests.cs (16)
219await File.WriteAllTextAsync(Path.Combine(AppContext.BaseDirectory, $"axe-pane-{width}-{dark}-{canvas}-{surface}.json"), 439await File.WriteAllTextAsync(Path.Combine(AppContext.BaseDirectory, "activity-performance.json"), 469await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, "activity-populated-28-resources.png") }); 1122Path = Path.Combine(AppContext.BaseDirectory, $"ux29-final-{(dark ? "dark" : "light")}-{density}-pane{width}.png") 1169var prefix = Path.Combine(AppContext.BaseDirectory, $"dynamic-reorder-{(dark ? "dark" : "light")}"); 1212Path.Combine(AppContext.BaseDirectory, $"dynamic-geometry-{(dark ? "dark" : "light")}.json"), 1678await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, $"resource-tree-{theme}-{width}.png") }); 1688await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, $"canvas-failure-{theme}.png") }); 1711await Assertions.Expect(source).ToHaveAttributeAsync("data-tooltip", Path.Combine("workspace", "MyFrontend.csproj")); 1712await Assertions.Expect(source).ToHaveAttributeAsync("aria-label", $"Source: {Path.Combine("workspace", "MyFrontend.csproj")}"); 1721await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, $"resource-tree-{theme}-canvas-{width}.png") }); 2573await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, $"resource-pane-label-canvas-{width}.png") }); 2690await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, "resource-pane-label-resize-460.png") }); 2693await page.ScreenshotAsync(new() { Path = Path.Combine(AppContext.BaseDirectory, "resource-pane-label-resize-560.png") }); 2915var value = type == KnownResourceTypes.Project ? Path.Combine("workspace", name == "api" ? "MyFrontend.csproj" : $"{name}.csproj") : 2916type == KnownResourceTypes.Container ? name == "cache" ? LongImage : "rabbitmq:4" : Path.Combine("tools", name);
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestCertificateLoader.cs (2)
17public static string TestCertificatePath { get; } = Path.Combine(s_baseDir, "testCert.pfx"); 18public static string GetCertPath(string name) => Path.Combine(s_baseDir, name);
Aspire.Dashboard.Tests (88)
BlazorAssetsTests.cs (1)
63while (directory is not null && !File.Exists(Path.Combine(directory.FullName, "Aspire.slnx")))
Integration\OtlpHttpServiceTests.cs (1)
170var configFilePath = Path.Combine(tempDirectory.FullName, "appsettings.json");
Integration\StartupTests.cs (3)
316var configFilePath = Path.Combine(tempDirectory.FullName, Path.GetRandomFileName()); 727var configFilePath = Path.Combine(tempDirectory.FullName, Path.GetRandomFileName()); 1383var browserTokenConfigFile = Path.Combine(fileConfigDirectory.FullName, DashboardConfigNames.DashboardFrontendBrowserTokenName.EnvVarName);
Integration\StaticAssetsTests.cs (4)
218var baseDir = Path.Combine(tempRoot.FullName, "base"); 219var contentRoot = Path.Combine(tempRoot.FullName, "content"); 225var contentManifestPath = Path.Combine(contentRoot, "Aspire.Dashboard.staticwebassets.endpoints.json"); 230var baseManifestPath = Path.Combine(baseDir, "Aspire.Dashboard.staticwebassets.endpoints.json");
Model\DashboardClientTests.cs (3)
253var path = Path.Combine(workspace.Path, "client.pfx"); 296var path = Path.Combine(workspace.Path, "client.pfx"); 323var path = Path.Combine(workspace.Path, "missing.pfx");
Model\DashboardDataSourceTests.cs (33)
41var expectedRunsDirectory = Path.Combine(workspace.Path, "runs"); 43Assert.True(File.Exists(Path.Combine(runStore.CurrentWorkingDirectory, applicationDirectoryName))); 44Assert.False(Directory.Exists(Path.Combine(workspace.Path, applicationDirectoryName))); 56var expectedResumesDirectory = Path.Combine(workspace.Path, "resumes"); 57Assert.Equal(Path.Combine(expectedResumesDirectory, applicationDirectoryName), runStore.CurrentWorkingDirectory); 58Assert.True(File.Exists(Path.Combine(expectedResumesDirectory, $"{applicationDirectoryName}.lock"))); 139Assert.True(File.Exists(Path.Combine(secondRunStore.CurrentWorkingDirectory, applicationDirectoryName))); 147var existingRunDirectory = Path.Combine(DashboardRunStore.GetRunsDirectory(workspace.Path), "20260720T123456789Z"); 149var existingFilePath = Path.Combine(existingRunDirectory, "existing.txt"); 171Directory.CreateDirectory(DashboardRunStore.GetRunLockPath(Path.Combine(runsDirectory, runId))); 186var metadataPath = Path.Combine(runStore.CurrentWorkingDirectory, "run.json"); 220using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(runStore.CurrentWorkingDirectory, "run.json"))); 243metadataPath = Path.Combine(historicalRunStore.CurrentWorkingDirectory, "run.json"); 300using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(currentRunStore.CurrentWorkingDirectory, "run.json"))); 328Assert.False(File.Exists(Path.Combine(runStore.CurrentWorkingDirectory, "run.json"))); 449File.WriteAllText(Path.Combine(abandonedDirectory, "dashboard.db"), string.Empty); 472var abandonedLockPath = Path.Combine(temporaryRoot, $"aspire-dashboard-{Guid.NewGuid():N}.lock"); 473var activeLockPath = Path.Combine(temporaryRoot, $"aspire-dashboard-{Guid.NewGuid():N}.lock"); 474var unrelatedLockPath = Path.Combine(temporaryRoot, $"unrelated-{Guid.NewGuid():N}.lock"); 553File.WriteAllText(Path.Combine(otherDirectory, "dashboard.db"), string.Empty); 698var databasePath = Path.Combine(workspace.Path, $"malformed-{Guid.NewGuid():N}.db"); 805var metadataPath = Path.Combine(incompatibleRunDirectory, "run.json"); 846var metadataPath = Path.Combine(futureRunDirectory, "run.json"); 890var metadataPath = Path.Combine(incompatibleRunDirectory, "run.json"); 1001var abandonedLockPath = Path.Combine(runsDirectory, "abandoned.lock"); 1002var activeLockPath = Path.Combine(runsDirectory, "active.lock"); 1088using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(pinnedRunDirectories[^1], "run.json"))); 1265using var metadata = JsonDocument.Parse(File.ReadAllText(Path.Combine(Path.GetDirectoryName(historicalRun.DatabasePath)!, "run.json"))); 1360var historicalDirectory = Path.Combine(workspace.Path, "historical"); 1361var historicalDatabasePath = Path.Combine(historicalDirectory, DashboardRunStore.DatabaseFileName); 1366var malformedDirectory = Path.Combine(workspace.Path, "malformed"); 1367var malformedDatabasePath = Path.Combine(malformedDirectory, DashboardRunStore.DatabaseFileName); 1426var 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);
Model\ResourceMenuBuilderTests.cs (1)
49var runStore = new TestDashboardRunStore(databasePath: Path.Combine(temporaryDirectory.FullName, "dashboard.db"));
Model\SqliteResourceRepositoryTests.cs (1)
940private static string GetDatabasePath(string workspacePath) => Path.Combine(workspacePath, "dashboard.db");
Model\TelemetryExportServiceTests.cs (2)
1271var runStore = new TestDashboardRunStore(databasePath: Path.Combine(temporaryDirectory.FullName, "dashboard.db")); 1351Path.Combine(workspacePath, "dashboard.db"),
Shared\SqliteRepositoryTestHelpers.cs (1)
42Path.Combine(temporaryDirectory.FullName, "dashboard.db"),
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");
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (1)
1225private static string GetDatabasePath(string workspacePath) => Path.Combine(workspacePath, "dashboard.db");
TelemetryRepositoryTests\TelemetryReceiptTests.cs (6)
28var path = Path.Combine(_workspace.Path, "dashboard.db"); 58using var context = SqliteRepositoryTestHelpers.CreateTelemetryRepository(Path.Combine(_workspace.Path, "dashboard.db")); 79Path.Combine(_workspace.Path, "dashboard.db"), pauseManager: pauseManager); 89using var context = SqliteRepositoryTestHelpers.CreateTelemetryRepository(Path.Combine(_workspace.Path, "dashboard.db")); 109var path = Path.Combine(_workspace.Path, "dashboard.db"); 128using var context = SqliteRepositoryTestHelpers.CreateTelemetryRepository(Path.Combine(_workspace.Path, "dashboard.db"));
TelemetryRepositoryTests\TelemetryRepositoryTestBase.cs (1)
47Path.Combine(temporaryDirectory, "dashboard.db"),
Terminal\DefaultTerminalConnectionResolverTests.cs (4)
67var socketPath = Path.Combine(directory.FullName, "terminal.sock"); 74udsPath: resourceName == "svc-abc" ? socketPath : Path.Combine(directory.FullName, "other.sock")), 76udsPath: resourceName == "svc-def" ? socketPath : Path.Combine(directory.FullName, "other.sock")) 147udsPath: Path.Combine(directory.FullName, "nonexistent.sock"));
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestCertificateLoader.cs (2)
17public static string TestCertificatePath { get; } = Path.Combine(s_baseDir, "testCert.pfx"); 18public static string GetCertPath(string name) => Path.Combine(s_baseDir, name);
Aspire.Deployment.EndToEnd.Tests (190)
AcaCompactNamingDeploymentTests.cs (2)
105var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 250var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AcaCompactNamingUpgradeDeploymentTests.cs (1)
221var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AcaCustomRegistryDeploymentTests.cs (3)
104var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 105var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 106var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AcaDeploymentErrorOutputTests.cs (2)
60var deployOutputFile = Path.Combine(workspace.WorkspaceRoot.FullName, "deploy-output.txt"); 94var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AcaExistingRegistryDeploymentTests.cs (3)
132var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 133var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 134var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AcaExpressDeploymentTests.cs (3)
58var projectDirectory = Path.Combine(workspace.Path, ProjectName); 182var appHostPath = Path.Combine(projectDirectory, "apphost.cs"); 331var summary = File.ReadAllText(Path.Combine(projectDirectory, DeploymentLogFile));
AcaManagedRedisDeploymentTests.cs (5)
71var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 72var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 73var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 74var serverDir = Path.Combine(projectDir, $"{projectName}.Server"); 75var programFilePath = Path.Combine(serverDir, "Program.cs");
AcaStarterDeploymentTests.cs (5)
103var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 104var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 105var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 201var frontendUrlFile = Path.Combine(projectDir, "frontend-url.txt"); 202var apiUrlFile = Path.Combine(projectDir, "api-url.txt");
AcrPurgeTaskDeploymentTests.cs (3)
107var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 108var appHostFilePath = Path.Combine(projectDir, "apphost.mts"); 159var projectDir2 = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
AksAzureKubernetesEnvironmentCertManagerDeploymentTests.cs (4)
80var pebbleDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "pebble-eab"); 112var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 113var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 114var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs (2)
132var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 135var appHostFilePath = Path.Combine(projectDir, "apphost.mts");
AksAzureKubernetesEnvironmentGatewayDeploymentTests.cs (3)
108var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 109var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 110var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AksBlazorRedisDeploymentTests.cs (3)
98var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 99var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 100var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AksCrossResourceGroupRegistryDeploymentTests.cs (3)
65await File.WriteAllTextAsync(Path.Combine(appHostDirectory, "AppHost.cs"), $$""" 280await File.WriteAllTextAsync(Path.Combine(appHostDirectory, "legacy-cluster.bicep"), """ 360var destination = Path.Combine(artifactsDirectory, Path.GetRelativePath(workspace.Path, source));
AksMultipleNodePoolsDeploymentTests.cs (3)
98var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 99var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 100var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AksPersistentVolumeDeploymentTests.cs (3)
75var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 76var appHostDirectory = Path.Combine(projectDirectory, $"{projectName}.AppHost"); 77var appHostPath = Path.Combine(appHostDirectory, "AppHost.cs");
AksStarterDeploymentTests.cs (3)
188var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 189var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 190var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AksStarterWithRedisHelmDeploymentTests.cs (3)
179var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 180var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 181var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AksVnetInfraDeploymentTests.cs (1)
93var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AksVnetWithAzureResourcesDeploymentTests.cs (4)
123var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 124var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 125var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 179var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
AksWithAzureResourcesDeploymentTests.cs (4)
121var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 122var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 123var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 165var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
AksWithHelmChartDeploymentTests.cs (3)
102var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 103var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 104var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
ApiManagementInfraDeploymentTests.cs (1)
73var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AppServiceDotnetProjectDeploymentTests.cs (3)
36var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 52File.WriteAllText(Path.Combine(publicDir.FullName, "deployment-marker.txt"), $"static:{marker}"); 62var urlFile = Path.Combine(projectDir, "server-url.txt");
AppServicePythonDeploymentTests.cs (2)
111var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 112var appHostFilePath = Path.Combine(projectDir, "apphost.mts");
AppServiceReactDeploymentTests.cs (3)
117var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 118var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 119var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AppServiceStoragePrivateEndpointDeploymentTests.cs (1)
99var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
AzureAppConfigDeploymentTests.cs (1)
101var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AzureConnectorNamespaceDeploymentTests.cs (1)
194var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AzureContainerRegistryDeploymentTests.cs (1)
87var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AzureEntraIdAppRoleDeploymentTests.cs (4)
29var projectDirectory = Path.Combine(deployment.Workspace.Path, "EntraRoles"); 40Path.Combine(projectDirectory, "apphost.cs"), "Read orders.", "Read all orders."); 46var appHost = Path.Combine(projectDirectory, "apphost.cs"); 57var appHostPath = Path.Combine(projectDirectory, "apphost.cs");
AzureEntraIdDeploymentTests.cs (3)
36var projectDirectory = Path.Combine(deployment.Workspace.Path, "EntraDeployment"); 54Path.Combine(projectDirectory, "apphost.cs"), RedirectUri, UpdatedRedirectUri); 63var appHostPath = Path.Combine(projectDirectory, "apphost.cs");
AzureEntraIdStarterDeploymentTests.cs (1)
36WriteStarterWithEntra(Path.Combine(deployment.Workspace.Path, projectName), projectName);
AzureEventHubsDeploymentTests.cs (1)
101var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
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"), """
AzureKeyVaultDeploymentTests.cs (1)
101var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AzureLogAnalyticsDeploymentTests.cs (1)
87var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AzureResourceScopeDeploymentTests.cs (1)
86var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AzureRoleAssignmentRunModeTests.cs (2)
93var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 112var validateScriptPath = Path.Combine(workspace.WorkspaceRoot.FullName, "validate-role-assignment.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"), """
AzureSandboxesDotnetProjectDeploymentTests.cs (1)
17var appHostPath = Path.Combine(projectDir.FullName, "apphost.cs");
AzureServiceBusDeploymentTests.cs (1)
102var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
AzureStorageDeploymentTests.cs (4)
113var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 260var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 261var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 262var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
AzureStorageRunModeTests.cs (2)
82var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"); 96var validateScriptPath = Path.Combine(workspace.WorkspaceRoot.FullName, "validate-get-resource.py");
FoundryDotnetProjectDeploymentTests.cs (3)
47var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 48var appHostFile = Path.Combine(projectDir, "apphost.cs"); 63FoundryEchoTestApp.Write(Path.Combine(projectDir, "EchoAgent"), marker);
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");
FrontDoorDeploymentTests.cs (3)
110var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 111var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 112var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
Helpers\FoundryEchoTestApp.cs (3)
13File.WriteAllText(Path.Combine(directory, "EchoAgent.csproj"), """ 26File.WriteAllText(Path.Combine(directory, "Program.cs"), """ 39File.WriteAllText(Path.Combine(directory, "EchoAIAgent.cs"), $$"""
KubernetesGatewayTlsDeploymentTests.cs (3)
261var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 262var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 263var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
KubernetesHelmChartDeploymentTests.cs (3)
149var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 150var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 151var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
NspStorageKeyVaultDeploymentTests.cs (4)
129var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 130var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 131var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 191var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
PythonFastApiDeploymentTests.cs (2)
113var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 114var appHostFilePath = Path.Combine(projectDir, "apphost.mts");
RadiusStarterDeploymentTests.cs (3)
337var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 338var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 339var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs");
tests\Shared\Hex1bTestHelpers.cs (1)
147return Path.Combine(recordingsDir, $"{testName}.cast");
tests\Shared\PebbleAcmeFixture.cs (1)
187var path = Path.Combine(directory, name);
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
TypeScriptAzureContainerAppJobDeploymentTests.cs (1)
127File.WriteAllText(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts"), """
TypeScriptAzureProvisioningDeploymentTests.cs (1)
141File.WriteAllText(Path.Combine(workspace.Path, "apphost.mts"), appHostSource);
TypeScriptExpressDeploymentTests.cs (2)
107var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 108var appHostFilePath = Path.Combine(projectDir, "apphost.mts");
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"), """
TypeScriptVnetSqlServerInfraDeploymentTests.cs (1)
178var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.mts");
VnetKeyVaultConnectivityDeploymentTests.cs (4)
113var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 114var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 115var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 155var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
VnetKeyVaultInfraDeploymentTests.cs (1)
99var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
VnetSqlServerConnectivityDeploymentTests.cs (4)
118var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 119var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 120var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 161var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
VnetSqlServerInfraDeploymentTests.cs (1)
99var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
VnetStorageBlobConnectivityDeploymentTests.cs (4)
115var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName); 116var appHostDir = Path.Combine(projectDir, $"{projectName}.AppHost"); 117var appHostFilePath = Path.Combine(appHostDir, "AppHost.cs"); 160var projectDir = Path.Combine(workspace.WorkspaceRoot.FullName, projectName);
VnetStorageBlobInfraDeploymentTests.cs (1)
100var appHostFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs");
Aspire.EndToEnd.Tests (37)
IntegrationServicesFixture.cs (1)
47_testProjectPath = Path.Combine(BuildEnvironment.TestAssetsPath, "testproject");
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
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"); 336workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost"); 340var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true"); 343var 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");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (4)
29? Path.Combine(Path.GetTempPath(), $"templates-${s_tmpDirSuffix}") 30: Path.Combine(AppContext.BaseDirectory, "templates"); 31_customHiveDirectory = Path.Combine(customHiveBaseDirectory, customHiveDirName); 32_stampFilePath = Path.Combine(_customHiveDirectory, ".stamp-installed");
Aspire.Hosting (72)
ApplicationModel\AppHostLocalStateStore.cs (2)
55_statePath = Path.Combine(_stateDirectory, $"{identityHash}.json"); 197var ignorePath = Path.Combine(_stateDirectory!, ".gitignore");
ApplicationModel\AspireStore.cs (1)
64var finalFilePath = Path.Combine(_basePath, $"{name}.{Convert.ToHexString(hash.GetCurrentHash())[..12].ToLowerInvariant()}{ext}");
ApplicationModel\DockerfileBuildAnnotation.cs (1)
172var contextRootIgnore = Path.Combine(ContextPath, ".dockerignore");
ApplicationModel\DotnetProgramPublishing.cs (3)
243var normalizedArchivePath = Path.Combine(stagedArchiveDirectory.Path, "normalized.tar"); 326: Path.Combine(outputPath, $"{ResourceExtensions.FlattenContainerImageName(imageName)}.tar"); 350var tempPath = Path.Combine(
ApplicationModel\ResourceExtensions.cs (1)
1444return Path.Combine(outputPath, fileName);
Dashboard\DashboardEventHandlers.cs (2)
101originalRuntimeConfig = Path.Combine(directory, $"{baseName}.runtimeconfig.json"); 183var assemblyPath = Path.Combine(directory, $"{baseName}.dll");
Dcp\DcpHost.cs (1)
473if (File.Exists(Path.Combine(candidate, "conpty.dll")) &&
Dcp\DcpOptions.cs (2)
267options.ExtensionsPath = Path.Combine(dcpDir, "ext"); 274options.ExtensionsPath = Path.Combine(configDcpPath, "ext");
Dcp\Locations.cs (2)
20public string DcpKubeconfigPath => Path.Combine(DcpSessionDir, "kubeconfig"); 22public string DcpLogSocket => Path.Combine(DcpSessionDir, "output.sock");
Devcontainers\DevcontainerSettingsWriter.cs (5)
220yield return Path.Combine(userHomeDir, VscodeRemotePathSegment); 224var vscodeServerPath = Path.Combine(userHomeDir, VscodeServerPathSegment); 225var vscodeInsidersServerPath = Path.Combine(userHomeDir, VscodeInsidersServerPathSegment); 229yield return Path.Combine(vscodeServerPath, LocalDevcontainerSettingsPath); 234yield return Path.Combine(vscodeInsidersServerPath, LocalDevcontainerSettingsPath);
DistributedApplicationBuilder.cs (1)
465return new AspireStore(Path.Combine(aspireDir, ".aspire"), directoryService);
DistributedApplicationOptions.cs (2)
213var csprojPath = Path.Combine(fullPath, $"{name}.csproj"); 234var csprojPath = Path.Combine(projectDirectory, $"{projectName}.csproj");
ExecutableResourceBuilderExtensions.cs (2)
61workingDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, workingDirectory)); 233workingDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.ApplicationBuilder.AppHostDirectory, workingDirectory));
Pipelines\Internal\FileDeploymentStateManager.cs (3)
212aspireHome = Path.Combine( 223return Path.Combine(aspireDir, $"{environment}.json"); 459var temporaryStatePath = Path.Combine(
Pipelines\PipelineOutputService.cs (4)
39: Path.Combine(Environment.CurrentDirectory, "aspire-output"); 61return Path.Combine(baseDirectory, "aspire-output"); 76return Path.Combine(baseOutputDir, resource.Name); 91return Path.Combine(baseTempDir, resource.Name);
ProjectResourceBuilderExtensions.cs (6)
349projectPath = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, projectPath)); 452path = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, path)); 1120var appSettingsPath = Path.Combine(projectDirectoryPath, "appsettings.json"); 1121var appSettingsEnvironmentPath = Path.Combine(projectDirectoryPath, $"appsettings.{env}.json"); 1124var appNameSettingsPath = Path.Combine(projectDirectoryPath, $"{appFileName}.settings.json"); 1125var appNameSettingsEnvironmentPath = Path.Combine(projectDirectoryPath, $"{appFileName}.settings.{env}.json");
Publishing\ManifestPublisher.cs (1)
45_options.Value.OutputPath = Path.Combine(_options.Value.OutputPath, "aspire-manifest.json");
Publishing\ManifestPublishingContext.cs (1)
443var resourceDockerfilePath = Path.Combine(manifestDirectory, $"{container.Name}.Dockerfile");
Publishing\ManifestPublishingExtensions.cs (1)
52outputPath = Path.Combine(outputPath, "aspire-manifest.json");
src\Shared\BackchannelConstants.cs (3)
259var socketPath = Path.Combine(dir, $"{appHostId}{instanceId}.{processId.ToString(CultureInfo.InvariantCulture)}"); 277var socketPath = Path.Combine(dir, socketName); 315return Path.Combine(dir, appHostId);
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
85null => Path.Combine("Properties", "launchSettings.json"),
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
21? Path.Combine("Properties", "launchSettings.json")
src\Shared\MsBuildResponseFile.cs (1)
29var responseFilePath = Path.Combine(directory.Path, "build-properties.rsp");
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
src\Shared\TerminalHost\TerminalHostPaths.cs (2)
112return Path.Combine(trmnlDirectory, $"{replicaId}.{sockPurpose}.sock"); 123return Path.Combine(trmnlDirectory, $"{replicaId}.{MetadataSuffix}");
src\Shared\UserSecrets\AspireSecretsPathHelper.cs (1)
45return Path.Combine(directory, $"{environmentName}.json");
src\Shared\UserSecrets\SecretsStore.cs (1)
135var tempFilename = Path.Combine(directory, $".{Path.GetFileName(filePath)}.{Guid.NewGuid():N}.tmp");
TestResourceBuilderExtensions.cs (2)
152var resourceOutputPath = Path.Combine(runOutputPath, resourceName); 156var reservationPath = Path.Combine(runOutputPath, $".{resourceName.ToLowerInvariant()}.reserve");
Utils\DotnetSdkUtils.cs (1)
45var globalJsonPath = Path.Combine(directory.FullName, "global.json");
Utils\FileSystemService.cs (1)
167var filePath = Path.Combine(tempDir, fileName);
Utils\Hex1bPtySocketHelper.cs (2)
40var proxyDirectory = Path.Combine(directory, "proxy"); 41var socketPath = Path.Combine(proxyDirectory, $"{Guid.NewGuid():N}.socket");
Aspire.Hosting.Analyzers.Tests (1)
AnalyzerTest.cs (1)
58Path.Combine("ref", $"net{s_targetFrameworkVersion}"));
Aspire.Hosting.Azure (11)
AzureBicepResource.cs (3)
171? Path.Combine(directory ?? s_temporaryStorage.CreateTempSubdirectory("aspire").FullName, $"{Name.ToLowerInvariant()}.module.bicep") 172: Path.Combine(TempDirectory, $"{Name.ToLowerInvariant()}.module.bicep"); 183: Path.Combine(directory, $"{TemplateResourceName.ToLowerInvariant()}");
AzureBicepResourceExtensions.cs (1)
29var path = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, bicepFile));
AzureProvisioningResource.cs (2)
132var moduleSourcePath = Path.Combine(generationPath, "main.bicep"); 135var moduleDestinationPath = Path.Combine(directory ?? generationPath, $"{Name}.module.bicep");
AzurePublishingContext.cs (4)
186var modulePath = Path.Combine(moduleDirectory.FullName, $"{resource.Name}.bicep"); 497var resourceDockerfilePath = Path.Combine(outputPath, $"{resource.Name}.Dockerfile"); 509var modulePath = Path.Combine(moduleDirectory.FullName, $"{resource.Name}.bicep"); 642var bicepPath = Path.Combine(outputDirectoryPath, $"{MainInfrastructure.BicepName}.bicep");
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
Aspire.Hosting.Azure.EntraId.Tests (13)
EntraIdApiProvisioningTests.cs (1)
786await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep")
EntraIdAppRoleAssignmentTests.cs (1)
253await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep")
EntraIdProvisioningTests.cs (5)
891await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep") 918await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep") 946await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep"); 976await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep") 1044var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep"));
EntraIdStarterScenarioPublishTests.cs (4)
29var outputPath = Path.Combine(workspace.Path, "out"); 70await Verify(await File.ReadAllTextAsync(Path.Combine(outputPath, "main.bicep")), "bicep") 81var projectPath = Path.Combine(directory, $"{name}.csproj"); 89Directory.CreateDirectory(Path.Combine(directory, "Properties"));
LocalDeveloperCertificateTests.cs (1)
247Assert.False(Directory.Exists(Path.Combine(app.Services.GetRequiredService<IAspireStore>().BasePath, "dev-certs")));
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Azure.Functions (7)
AzureFunctionsProjectResourceExtensions.cs (5)
167projectPath = NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, projectPath)); 221var normalizedAppDirectory = NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory)); 448if (File.Exists(Path.Combine(resource.AppDirectory, "Dockerfile"))) 461var hasPackageJson = File.Exists(Path.Combine(resource.AppDirectory, "package.json")); 462var hasPackageLock = File.Exists(Path.Combine(resource.AppDirectory, "package-lock.json"));
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
85null => Path.Combine("Properties", "launchSettings.json"),
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
21? Path.Combine("Properties", "launchSettings.json")
Aspire.Hosting.Azure.Kubernetes (1)
AzureKubernetesEnvironmentResource.AksPipeline.cs (1)
286var kubeConfigPath = Path.Combine(kubeConfigDir.Path, "kubeconfig");
Aspire.Hosting.Azure.Kubernetes.Tests (6)
AzureKubernetesEnvironmentExtensionsTests.cs (5)
608var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 818var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 1033var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 1131var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 1221var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep"));
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Azure.Kusto.Tests (2)
AddAzureKustoTests.cs (1)
242Assert.Equal(Path.Combine(builder.AppHostDirectory, "custom-data"), mountAnnotation.Source);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Azure.Tests (72)
AzureApiManagementTests.cs (10)
386var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 422var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 880var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 914var documentPath = Path.Combine(workspace.Path, "deploy-only.json"); 938var documentPath = Path.Combine(workspace.Path, "deploy-only.json"); 965var documentPath = Path.Combine(workspace.Path, "generated.json"); 991var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 1085var documentPath = Path.Combine(temporaryWorkspace.Path, "catalog.json"); 1194Path.Combine(builder.AppHostDirectory, "catalog.json"), 2095var mainBicepPath = Path.Combine(workspace.Path, "main.bicep");
AzureAppServiceTests.cs (3)
508File.WriteAllText(Path.Combine(directory.FullName, "Dockerfile"), ""); 631var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 832Path.Combine(workspace.Path, "aspire-manifest.json"),
AzureBicepResourceTests.cs (4)
257var bicepFilePath = Path.Combine(workspace.Path, bicepFileName); 264var outputDir = Path.Combine(workspace.Path, "output"); 282var bicepFilePath = Path.Combine(workspace.Path, bicepFileName); 306var outputDir = Path.Combine(workspace.Path, "output");
AzureContainerAppEnvironmentExtensionsTests.cs (2)
565var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 606Assert.True(File.Exists(Path.Combine(workspace.Path, "main.bicep")));
AzureContainerAppExpressEndpointTests.cs (1)
266Assert.True(File.Exists(Path.Combine(workspace.Path, "main.bicep")));
AzureContainerAppsTests.cs (3)
85File.WriteAllText(Path.Combine(directory.FullName, "Dockerfile"), ""); 2036await VerifyFile(Path.Combine(workspace.Path, "aspire-manifest.json")); 2834File.WriteAllText(Path.Combine(workspace.Path, "Dockerfile"), "FROM alpine");
AzureEnvironmentResourceTests.cs (18)
149var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep"); 186var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep"); 239var mainBicepPath = Path.Combine(workspace.FullName, "main.bicep"); 289var mainBicep = File.ReadAllText(Path.Combine(workspace.FullName, "main.bicep")); 318var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep")); 363var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep")); 379var outputPath = Path.Combine(workspace.Path, "exclude-main"); 388Assert.False(File.Exists(Path.Combine(outputPath, "main.bicep"))); 418var mainBicep = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")); 433var outputPath = Path.Combine(workspace.Path, "write-main"); 449var mainBicep = await File.ReadAllTextAsync(Path.Combine(outputPath, "main.bicep")); 472var outputPath = Path.Combine(workspace.Path, "provider"); 479await Verify(await File.ReadAllTextAsync(Path.Combine(outputPath, "main.bicep")), "bicep"); 535var mainBicepPath = Path.Combine(workspace.Path, "main.bicep"); 566var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 593var bicepFilePath = Path.Combine(workspace, bicepFileName); 612var outputDir = Path.Combine(workspace, "output"); 629var mainBicepPath = Path.Combine(outputDir, "main.bicep");
AzureEventHubsExtensionsTests.cs (1)
188Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source);
AzureFrontDoorAppServicePrivateLinkTests.cs (1)
30await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "main.bicep")), "bicep");
AzureFunctionsTests.cs (17)
504var dockerfilePath = Path.Combine(tempDir.Path, "funcapp.Dockerfile"); 543var dockerfileContents = File.ReadAllText(Path.Combine(tempDir.Path, "funcapp.Dockerfile")); 558File.WriteAllText(Path.Combine(appDirectory, "Dockerfile"), "FROM custom-functions-image\n"); 566Assert.False(File.Exists(Path.Combine(tempDir.Path, "funcapp.Dockerfile"))); 965var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj"); 990var projectPath = Path.Combine(workspace.Path, "MyFunctions.csproj"); 1012var projectPath = Path.Combine(workspace.Path, "TestFunctions.csproj"); 1042var projectPath1 = Path.Combine(workspace.Path, "Functions1.csproj"); 1043var projectPath2 = Path.Combine(workspace.Path, "Functions2.csproj"); 1064var projectPath = Path.Combine(workspace.Path, "Functions.csproj"); 1094var projectPath = Path.Combine(workspace.Path, "Functions.csproj"); 1134var appDirectory = Path.Combine(rootDirectory, "functions"); 1136Directory.CreateDirectory(Path.Combine(appDirectory, "src")); 1138File.WriteAllText(Path.Combine(appDirectory, "host.json"), "{}"); 1139File.WriteAllText(Path.Combine(appDirectory, "package.json"), """ 1147File.WriteAllText(Path.Combine(appDirectory, "local.settings.json"), "{}"); 1151File.WriteAllText(Path.Combine(appDirectory, "package-lock.json"), "{}");
AzureManifestUtils.cs (2)
39if (pathNode?.ToString() is not { } path || !File.Exists(Path.Combine(manifestDir, path))) 44var bicepText = await File.ReadAllTextAsync(Path.Combine(manifestDir, path));
AzureResourceOptionsTests.cs (3)
25var outputPath = Path.Combine(tempDir.FullName, "aspire-manifest.json"); 45var sbBicep = await File.ReadAllTextAsync(Path.Combine(tempDir.FullName, "sb.module.bicep")); 47var sqlBicep = await File.ReadAllTextAsync(Path.Combine(tempDir.FullName, "sql-server.module.bicep"));
AzureSandboxesTests.cs (1)
218var mainBicep = File.ReadAllText(Path.Combine(workspace.Path, "main.bicep"));
AzureStorageExtensionsTests.cs (1)
63Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source);
FoundryExtensionsTests.cs (3)
176var daemonPidPath = Path.Combine(temporaryDirectory.FullName, "daemon.pid"); 312var commandLogPath = Path.Combine(temporaryDirectory.FullName, "commands.log"); 313var executablePath = Path.Combine(temporaryDirectory.FullName, "foundry");
SqlServerContainerFixture.cs (1)
87"unix" or "npipe" => !File.Exists(Path.Combine(Path.GetPathRoot(Directory.GetCurrentDirectory()) ?? "/", ".dockerenv")),
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Blazor (6)
BlazorGatewayExtensions.cs (4)
218var resolvedPath = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, projectPath)); 421var outputDir = Path.Combine(gatewayOutputRoot, "output"); 440var mergedRuntimePath = Path.Combine(outputDir, "merged.staticwebassets.runtime.json"); 606var destEndpoints = Path.Combine(outputDir, $"{reg.Resource.Name}.endpoints.json");
BlazorWasmAppBuilder.cs (2)
106var endpoints = Path.GetFullPath(Path.Combine(projectDir, props.StaticWebAssetEndpointsBuildManifestPath)); 107var runtime = Path.GetFullPath(Path.Combine(projectDir, props.StaticWebAssetDevelopmentManifestPath));
Aspire.Hosting.Blazor.Tests (45)
AddBlazorGatewayTests.cs (25)
61Path.Combine("Scripts", "Gateway.cs"), 194var clientDirectory = Path.Combine(directory.Path, "Client"); 196await File.WriteAllTextAsync(Path.Combine(clientDirectory, "global.json"), 198File.Copy(Path.Combine(clientDirectory, "global.json"), Path.Combine(directory.Path, "global.json")); 201await File.WriteAllTextAsync(Path.Combine(directory.Path, "PrefixEndpoints.cs"), 214await File.WriteAllTextAsync(Path.Combine(directory.Path, "Dockerfile"), dockerfile); 233var clientDirectory = Path.Combine(directory.Path, "Client"); 235await File.WriteAllTextAsync(Path.Combine(directory.Path, "Test.slnx"), "<Solution />"); 245var client = publishBuilder.AddBlazorWasmApp("app", Path.Combine(clientDirectory, "Client.csproj")) 254var gatewayDirectory = Directory.CreateDirectory(Path.Combine(directory.Path, "Gateway")).FullName; 256await File.WriteAllTextAsync(Path.Combine(gatewayDirectory, "Gateway.cs"), 257restoreDirective + await File.ReadAllTextAsync(Path.Combine(gatewayBuild.ContextPath, "Gateway.cs"))); 259gatewayContainer.Annotations.Add(new DockerfileBuildAnnotation(gatewayDirectory, Path.Combine(gatewayDirectory, "Dockerfile"), stage: null) 361Directory.CreateDirectory(Path.Combine(clientDirectory, "wwwroot")); 362await File.WriteAllTextAsync(Path.Combine(clientDirectory, "Client.csproj"), 374await File.WriteAllTextAsync(Path.Combine(clientDirectory, "Program.cs"), 408var projectPath = Path.Combine(directory.Path, "Client.csproj"); 437var projectPath = Path.Combine(directory.Path, "Client.csproj"); 455File.WriteAllText(Path.Combine(solutionRoot.FullName, "Test.slnx"), "<Solution />"); 474var appHostDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "AppHost")).FullName; 476var projectDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "Client")).FullName; 495var appHostDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "AppHost")).FullName; 496File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.slnx"), "<Solution />"); 497var projectDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "Client")).FullName;
BlazorHostedExtensionsTests.cs (7)
244var serverProjectPath = Path.Combine(tempDirectory.Path, "Server.csproj"); 321var serverProjectPath = Path.Combine(tempDirectory.Path, "Server.csproj"); 637var serverDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.Path, "Server")); 638var clientDirectory = Directory.CreateDirectory(Path.Combine(tempDirectory.Path, "Client")); 639var serverProjectPath = Path.Combine(serverDirectory.FullName, "Server.csproj"); 640var clientProjectPath = Path.Combine(clientDirectory.FullName, "Client.csproj"); 661var serverProjectPath = Path.Combine(tempDirectory.Path, "Server.csproj");
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");
tests\Shared\TestFileSystemService.cs (1)
34var filePath = System.IO.Path.Combine(tempDir.FullName, resolvedName);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Browsers (9)
BrowserEndpointDiscovery.cs (1)
50Path.Combine(userDataDirectory, "aspire-debug-endpoint.json");
BrowserHost.cs (1)
149var devToolsActivePortFilePath = Path.Combine(userDataDirectory.Path, "DevToolsActivePort");
BrowserHostRegistry.cs (1)
334var localStatePath = Path.Combine(userDataDirectory, "Local State");
BrowserLogsArtifacts.cs (1)
73var filePath = Path.Combine(directory, fileName);
ChromiumBrowserResolver.cs (4)
80var localStatePath = Path.Combine(userDataDirectory, "Local State"); 136if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)) || 166var localStatePath = Path.Combine(userDataDirectory, "Local State"); 292if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)))
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
Aspire.Hosting.Browsers.Tests (43)
BrowserHostTests.cs (2)
21var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser"); 23var devToolsActivePortPath = Path.Combine(userDataDirectory.FullName, "DevToolsActivePort");
BrowserLogsBuilderExtensionsTests.cs (3)
1020var tempBrowserPath = Path.Combine(tempDirectory.FullName, OperatingSystem.IsWindows() ? "tracked-browser.exe" : "tracked-browser"); 1785Path.Combine(AppContext.BaseDirectory, "screenshot.png"), 1946public string FilePath => Path.Combine(AppContext.BaseDirectory, "test-secrets.json");
BrowserLogsRunningSessionTests.cs (1)
22var browserExecutable = Path.Combine(userDataDirectory.FullName, "browser");
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")),
BrowserPageSessionTests.cs (2)
350Path.Combine(AppContext.BaseDirectory, "browser"), 351Path.Combine(AppContext.BaseDirectory, "user-data"));
src\Aspire.Hosting.Browsers\BrowserEndpointDiscovery.cs (1)
50Path.Combine(userDataDirectory, "aspire-debug-endpoint.json");
src\Aspire.Hosting.Browsers\BrowserHost.cs (1)
149var devToolsActivePortFilePath = Path.Combine(userDataDirectory.Path, "DevToolsActivePort");
src\Aspire.Hosting.Browsers\BrowserHostRegistry.cs (1)
334var localStatePath = Path.Combine(userDataDirectory, "Local State");
src\Aspire.Hosting.Browsers\BrowserLogsArtifacts.cs (1)
73var filePath = Path.Combine(directory, fileName);
src\Aspire.Hosting.Browsers\ChromiumBrowserResolver.cs (4)
80var localStatePath = Path.Combine(userDataDirectory, "Local State"); 136if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)) || 166var localStatePath = Path.Combine(userDataDirectory, "Local State"); 292if (!Directory.Exists(Path.Combine(userDataDirectory, profileEntry.Name)))
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
Aspire.Hosting.CodeGeneration.Go (2)
GoLanguageSupport.cs (2)
116var appHostPath = Path.Combine(directoryPath, "apphost.go"); 122var goModPath = Path.Combine(directoryPath, "go.mod");
Aspire.Hosting.CodeGeneration.Go.Tests (35)
AtsGoCodeGeneratorTests.cs (14)
77await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 79await File.WriteAllTextAsync(Path.Combine(directory.FullName, "terminal_test.go"), """ 157await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 160await File.WriteAllTextAsync(Path.Combine(directory.FullName, "transport_test.go"), """ 224: Path.Combine(directory.FullName, "socket"); 304await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 307await File.WriteAllTextAsync(Path.Combine(directory.FullName, "transport_hardening_test.go"), """ 983await File.WriteAllTextAsync(Path.Combine(directory.FullName, "decode_test.go"), """ 1353await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 1356await File.WriteAllTextAsync(Path.Combine(directory.FullName, "runtime_test.go"), """ 2197await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 2200await File.WriteAllTextAsync(Path.Combine(directory.FullName, "callback_test.go"), """ 2369await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 2372await File.WriteAllTextAsync(Path.Combine(directory.FullName, "declared_interface_test.go"), """
AtsGoDerivedBuilderTests.cs (2)
405await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, cancellationToken); 412await File.WriteAllTextAsync(Path.Combine(packageDirectory.FullName, $"{packageName}.go"), source, cancellationToken);
GoDocCommentTests.cs (3)
230await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 232await File.WriteAllTextAsync(Path.Combine(directory.FullName, "options_compatibility.go"), """ 239await File.WriteAllTextAsync(Path.Combine(directory.FullName, "functional_options_test.go"), """
GoGeneratorEscapingTests.cs (4)
65await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 74var consumerDirectory = Directory.CreateDirectory(Path.Combine(directory.FullName, "consumer")); 75await File.WriteAllTextAsync(Path.Combine(consumerDirectory.FullName, "go.mod"), """ 84await File.WriteAllTextAsync(Path.Combine(consumerDirectory.FullName, "main.go"), """
GoScaffoldTests.cs (9)
58var starterRoot = Path.Combine(AppContext.BaseDirectory, "go-starter"); 148File.WriteAllText(Path.Combine(workspace.Path, name), content); 163File.WriteAllText(Path.Combine(workspace.Path, "apphost.go"), "// marker"); 175File.WriteAllText(Path.Combine(workspace.Path, "apphost.ts"), "// typescript"); 176File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module apphost"); 197WriteGoFile(workspace.Path, Path.Combine("scaffold", "apphost.go"), Scaffold(workspace)["apphost.go"]); 200var starterRoot = Path.Combine(AppContext.BaseDirectory, "go-starter"); 206WriteGoFile(workspace.Path, Path.Combine("go-starter", Path.GetRelativePath(starterRoot, starterFile)), File.ReadAllText(starterFile)); 248var path = Path.Combine(root, relativePath);
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.CodeGeneration.Java (3)
JavaLanguageSupport.cs (3)
126if (File.Exists(Path.Combine(directoryPath, relativePath))) 277Path.Combine(classOutputDirectory, $"{AppHostClassName}.class") 282stampFileProperty.SetValue(upToDateCheck, Path.Combine(classOutputDirectory, CompileStampFileName));
Aspire.Hosting.CodeGeneration.Java.Tests (11)
AtsJavaCodeGeneratorTests.cs (3)
4033_classes = Directory.CreateDirectory(Path.Combine(_root.FullName, "classes")); 4038var path = Path.Combine(_root.FullName, relativePath.Replace('/', Path.DirectorySeparatorChar)); 4051var sourcesFile = Path.Combine(_root.FullName, "sources.txt");
JavaLanguageSupportDetectionTests.cs (5)
26var appHostPath = Path.Combine(workspace.Path, expected); 46File.WriteAllText(Path.Combine(workspace.Path, "AppHost.java"), "void main(String[] args) { }"); 48File.WriteAllText(Path.Combine(nested.FullName, "AppHost.java"), "void main(String[] args) { }"); 57File.WriteAllText(Path.Combine(workspace.Path, "pom.xml"), "<project />"); 75var path = Path.Combine(workspace.Path, relativePath.Replace('/', Path.DirectorySeparatorChar));
JavaLanguageSupportTests.cs (2)
112Assert.Equal([Path.Combine(".java-build", "AppHost.class")], check.Outputs!); 114Assert.Equal(Path.Combine(".java-build", ".aspire-compile-stamp"), check.StampFile);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.CodeGeneration.Python (3)
PythonLanguageSupport.cs (3)
142var appHostPath = Path.Combine(directoryPath, "apphost.py"); 148var hasPylock = File.Exists(Path.Combine(directoryPath, "pylock.apphost.toml")); 149var hasRequirements = File.Exists(Path.Combine(directoryPath, "apphost_requirements.txt"));
Aspire.Hosting.CodeGeneration.Python.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.CodeGeneration.Rust (2)
RustLanguageSupport.cs (2)
116var appHostPath = Path.Combine(directoryPath, AppHostFileName); 122var cargoPath = Path.Combine(directoryPath, "Cargo.toml");
Aspire.Hosting.CodeGeneration.Rust.Tests (11)
AtsRustCodeGeneratorTests.cs (3)
58await File.WriteAllTextAsync(Path.Combine(directory.FullName, name), content, timeout.Token); 60await File.WriteAllTextAsync(Path.Combine(directory.FullName, "Cargo.toml"), """ 78await File.WriteAllTextAsync(Path.Combine(directory.FullName, "terminal.rs"), """
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");
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.CodeGeneration.TypeScript (5)
TypeScriptLanguageSupport.cs (5)
181File.Exists(Path.Combine(parent.FullName, PackageJsonFileName)); 186var packageJsonPath = Path.Combine(request.TargetPath, PackageJsonFileName); 227var appHostFileName = File.Exists(Path.Combine(directoryPath, AppHostFileName)) 230var appHostPath = Path.Combine(directoryPath, appHostFileName); 237var packageJsonPath = Path.Combine(directoryPath, PackageJsonFileName);
Aspire.Hosting.CodeGeneration.TypeScript.Tests (8)
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
TypeScriptLanguageSupportTests.cs (5)
71File.WriteAllText(Path.Combine(workspace.Path, "package.json"), """ 136File.WriteAllText(Path.Combine(workspace.Path, "package.json"), """{ "name": "existing-app" }"""); 137var appHostDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "aspire-apphost")); 158File.WriteAllText(Path.Combine(workspace.Path, "package.json"), """ 195var existingTsConfigPath = Path.Combine(workspace.Path, "tsconfig.json");
Aspire.Hosting.Containers.Tests (11)
ContainerResourceTests.cs (1)
240Assert.Equal(Path.Combine(basePath, "source"), mountAnnotation.Source);
DockerSocketBindMountTests.cs (2)
24var dockerFilePath = Path.Combine(contextDir.FullName, "Dockerfile"); 48var infoFile = Path.Combine(outDir.FullName, "docker-info.txt");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
WithDockerfileTests.cs (7)
263var manifestOutputPath = Path.Combine(tempContextPath, "aspire-manifest.json"); 313var manifestOutputPath = Path.Combine(tempContextPath, "aspire-manifest.json"); 362var manifestOutputPath = Path.Combine(tempContextPath, "aspire-manifest.json"); 410var manifestOutputPath = Path.Combine(tempContextPath, "aspire-manifest.json"); 868var manifestOutputPath = Path.Combine(tempContextPath, "aspire-manifest.json"); 913var manifestPath = Path.Combine(tempDir.FullName, "manifest.json"); 928var dockerfilePath = Path.Combine(tempDir.FullName, "testcontainer.Dockerfile");
Aspire.Hosting.DevTunnels.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Docker (9)
DockerComposeEnvironmentResource.cs (4)
434var dockerComposeFilePath = Path.Combine(outputPath, "docker-compose.yaml"); 478var dockerComposeFilePath = Path.Combine(outputPath, "docker-compose.yaml"); 602var envFilePath = Path.Combine(outputPath, $".env.{environmentName}"); 611ComposeFilePath = Path.Combine(outputPath, "docker-compose.yaml"),
DockerComposePublishingContext.cs (4)
97var resourceDockerfilePath = Path.Combine(OutputPath, $"{serviceResource.TargetResource.Name}.Dockerfile"); 148var outputFile = Path.Combine(OutputPath, "docker-compose.yaml"); 154var envFilePath = Path.Combine(OutputPath, ".env"); 198Directory.CreateDirectory(Path.Combine(OutputPath, composeService.Name));
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
Aspire.Hosting.Docker.Tests (83)
DockerComposePublisherTests.cs (58)
63await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")), "env") 92await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml")), "yaml").UseParameters(longNames); 170await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")), "env").UseParameters(overridden); 199await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml")), "yaml") 200.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env")), "env") 201.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")), "env"); 285var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 286var envPath = Path.Combine(workspace.Path, ".env"); 308var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml")); 346var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 347var envPath = Path.Combine(workspace.Path, ".env"); 369var compose = File.ReadAllText(Path.Combine(workspace.Path, "docker-compose.yaml")); 370var environment = File.ReadAllText(Path.Combine(workspace.Path, ".env")); 394var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 423var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 474var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 476var envPath = Path.Combine(workspace.Path, ".env"); 505var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 513var envFilePath = Path.Combine(workspace.Path, ".env"); 544var envFilePath = Path.Combine(workspace.Path, ".env"); 585var envFilePath = Path.Combine(workspace.Path, ".env"); 618var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 644var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 676var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 707var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 735var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 769var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 793var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 821var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 851var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 880var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 912var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 937var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 961var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 988var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1017var envFilePath = Path.Combine(workspace.Path, ".env.Staging"); 1051var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1073var envFilePath = Path.Combine(workspace.Path, ".env.Production"); 1107var envFilePath = Path.Combine(workspace.Path, ".env.Staging"); 1140var composeContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "docker-compose.yaml")); 1141var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1173var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1199var envFileContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, ".env.Production")); 1224var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1225var envPath = Path.Combine(workspace.Path, ".env"); 1251var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1282var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1283var envPath = Path.Combine(workspace.Path, ".env"); 1310var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1346var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1347var envPath = Path.Combine(workspace.Path, ".env"); 1394var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1395var envPath = Path.Combine(workspace.Path, ".env"); 1428var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1429var envPath = Path.Combine(workspace.Path, ".env"); 1472var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1506var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 1534var composePath = Path.Combine(workspace.Path, "docker-compose.yaml");
DockerComposeTests.cs (8)
63var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 85var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 152var outputPath = Path.Combine(workspace.Path, "output"); 191var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 225var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 264var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml"); 351var composePath = Path.Combine(workspace.Path, "docker-compose.yaml"); 971["ComposeFilePath"] = 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");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Dotnet (24)
DotnetProjectBuildArtifactManager.cs (5)
55var coordinationLockPath = Path.Combine(BuildDirectory, ".coordination.lock"); 164Path.Combine(BuildDirectory, $"{BuildProjectFilePrefix}{hash}{BuildProjectFileExtension}"); 167Path.Combine(GetStateDirectory(), $"{hash}{StateFileExtension}"); 180var temporaryPath = Path.Combine(BuildDirectory, $".{Path.GetRandomFileName()}.tmp"); 427var temporaryPath = Path.Combine(stateDirectory, $".{Path.GetRandomFileName()}.tmp");
DotnetProjectBuildCoordinator.cs (1)
1139var globalJsonPath = Path.Combine(directory.FullName, "global.json");
DotnetProjectHostingExtensions.cs (1)
370path = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, path));
DotnetProjectRunPropertiesResolver.cs (1)
43var resultOutputPath = Path.Combine(resultDirectory.Path, "run-properties.json");
MsTestTrxReport.cs (3)
36var path = Path.Combine(reportDirectory, FileName); 51path = Path.Combine(context.OutputPath, FileName); 80var target = Path.Combine(destination, entry.Name);
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
85null => Path.Combine("Properties", "launchSettings.json"),
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
21? Path.Combine("Properties", "launchSettings.json")
src\Shared\MsBuildResponseFile.cs (1)
29var responseFilePath = Path.Combine(directory.Path, "build-properties.rsp");
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
Aspire.Hosting.Dotnet.Tests (212)
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 (95)
141var globalJsonPath = Path.Combine(workspace.Path, "global.json"); 213var firstDotnetPath = Path.Combine(workspace.Path, "first-sdk"); 214var secondDotnetPath = Path.Combine(workspace.Path, "second-sdk"); 633var filePath = Path.Combine(appDirectory, "Caf\u00e9.cs"); 634var suppliedPath = Path.Combine(appDirectory, pathAlias switch 685var filePath = Path.Combine(appDirectory, "worker.cs"); 771var filePath = Path.Combine(workspace.Path, "worker.cs"); 778Path.Combine(workspace.Path, "artifacts"); 802var filePath = Path.Combine(appDirectory, "worker.cs"); 831var fileDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "worker")); 832var filePath = Path.Combine(fileDirectory.FullName, "worker.cs"); 921var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt"); 922var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 993var appPath = Path.Combine(appDirectory, "worker.cs"); 1111var customTargetsPath = Path.Combine(workspace.Path, "CustomNuGet.targets"); 1213Assert.True(File.Exists(Path.Combine(Path.GetDirectoryName(projectPath)!, "restore-ran.txt"))); 1222var aspireStoreRoot = Path.Combine(workspace.Path, "custom-obj"); 1294var feed = Directory.CreateDirectory(Path.Combine(projectRoot, "feed")).FullName; 1300File.WriteAllText(Path.Combine(projectRoot, "nuget.config"), $$""" 1308File.WriteAllText(Path.Combine(projectRoot, "Directory.Build.props"), """ 1320var versionsPath = Path.Combine(projectRoot, "Directory.Packages.props"); 1357var escapedDirectory = Path.Combine(projectRoot, "First's Project;100% (test)"); 1359firstProject = Path.Combine(escapedDirectory, Path.GetFileName(firstProject)); 1377File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt"))); 1378Assert.True(File.Exists(Path.Combine(Path.GetDirectoryName(project)!, "packages.lock.json"))); 1396File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt"))); 1404File.ReadAllText(Path.Combine(Path.GetDirectoryName(project)!, "package-version.txt"))); 2225Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), 2546var appPath = Path.Combine(workspace.Path, "app.cs"); 3067var firstSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-1")).FullName; 3068var secondSdkWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "sdk-runtime-2")).FullName; 3115var sourceRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName; 3116File.WriteAllText(Path.Combine(sourceRoot, "global.json"), "{}"); 3119var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")).FullName; 3141Directory.CreateDirectory(Path.Combine(workspace.Path, "source")).FullName, 3145var foreignRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "foreign")).FullName; 3146File.WriteAllText(Path.Combine(foreignRoot, "global.json"), "{}"); 3147var runtimeWorkingDirectory = Directory.CreateDirectory(Path.Combine(foreignRoot, "runtime")).FullName; 3226var filePath = Path.Combine(workspace.Path, "worker.cs"); 3277File.WriteAllText(Path.Combine(Path.GetDirectoryName(firstPath)!, "global.json"), """ 3301Assert.True(File.Exists(Path.Combine(firstBuild.WorkingDirectory, "global.json"))); 3322var physicalRoot = Directory.CreateDirectory(Path.Combine(workspace.Path, "Physical")); 3324File.WriteAllText(Path.Combine(physicalRoot.FullName, "global.json"), """ 3332var linkPath = Path.Combine(workspace.Path, "Alias"); 3356Assert.True(File.Exists(Path.Combine(linkedBuild.WorkingDirectory, "global.json"))); 3576File.WriteAllText(Path.Combine(Path.GetDirectoryName(firstPath)!, "global.json"), """ 3634var linkDirectory = Path.Combine(workspace.Path, "ServiceAlias"); 3645var aliasPath = Path.Combine(linkDirectory, Path.GetFileName(projectPath)); 3726var escapedDirectory = Path.Combine(workspace.Path, "Api's Project 100% (test)"); 3728apiProject = Path.Combine(escapedDirectory, Path.GetFileName(apiProject)); 3729var apiSentinel = Path.Combine(workspace.Path, "api-ran.txt"); 3730var workerSentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 3770var restoreCountPath = Path.Combine(Path.GetDirectoryName(project)!, "restore-count.txt"); 3786File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """ 3793var sentinels = Directory.CreateDirectory(Path.Combine(workspace.Path, "instances")).FullName; 3828Assert.True(File.Exists(Path.Combine(sentinels, $"{processId}.txt"))); 3895var firstSentinel = Path.Combine(workspace.Path, "first-ran.txt"); 3896var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 3940var secondBuildMarker = Path.Combine(workspace.Path, "second-built.txt"); 3946var secondSentinel = Path.Combine(workspace.Path, "second-ran.txt"); 4002File.WriteAllText(Path.Combine(Path.GetDirectoryName(validProject)!, "Program.cs"), """ 4005var sentinelPath = Path.Combine(workspace.Path, "valid-ran.txt"); 4113var sentinelPath = Path.Combine(workspace.Path, "environment-build-ran.txt"); 4210var sentinelPath = Path.Combine(Path.GetDirectoryName(projectPath)!, "build-sentinel.txt"); 4229Path.Combine(Path.GetDirectoryName(projectPath)!, "PersistentProject.dll"), 4271var filePath = Path.Combine(workspace.Path, "worker.cs"); 4504var filePath = Path.Combine(workspace.Path, "worker.cs"); 4538var filePath = Path.Combine(workspace.Path, "worker.cs"); 4571Path.Combine(Path.GetDirectoryName(projectPath)!, "Api.dll"), 4609Path.Combine(workspace.Path, "missing-dotnet"); 4645var fileApp = Path.Combine(workspace.Path, "worker.cs"); 4646var sentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 4707var releaseBuild = Path.Combine(workspace.Path, "release-build"); 4709var fileApp = Path.Combine(workspace.Path, "worker.cs"); 4710var sentinel = Path.Combine(workspace.Path, "worker-ran.txt"); 4820using var archive = ZipFile.Open(Path.Combine(feed, $"Aspire.RestoreTest.{version}.nupkg"), ZipArchiveMode.Create); 4848var directory = Directory.CreateDirectory(Path.Combine(root, directoryName)); 4849var path = Path.Combine(directory.FullName, projectFileName); 4857Path.Combine(Path.GetDirectoryName(projectPath)!, "Properties")); 4858File.WriteAllText(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), $$""" 4893File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "SharedValue.cs"), """ 4909var directory = Directory.CreateDirectory(Path.Combine(root, name)); 4911var projectPath = Path.Combine(directory.FullName, $"{name}{extension}"); 4965File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), """ 4984File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "BuildGate.cs"), $$""" 5015File.WriteAllText(Path.Combine(projectDirectory, "Program.cs"), "System.Console.WriteLine(\"Started\");"); 5032File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, "Program.cs"), "this does not compile"); 5041var directory = Directory.CreateDirectory(Path.Combine(root, name)); 5042var projectPath = Path.Combine(directory.FullName, $"{name}{extension}"); 5049var directory = Directory.CreateDirectory(Path.Combine(root, name)); 5050var appPath = Path.Combine(directory.FullName, $"{name}.cs"); 5067var linkDirectory = Path.Combine(Path.GetDirectoryName(directory)!, "FileAppAlias"); 5077aliasPath = Path.Combine(linkDirectory, Path.GetFileName(filePath)); 5112Path.Combine(Path.GetDirectoryName(projectPath)!, "build-count.txt"); 5253var responseFilePath = Path.Combine(directory, "build-properties.rsp");
DotnetProjectFacadeTests.cs (1)
160var path = Path.Combine(workspace.Path, "Service.vbproj");
DotnetProjectLaunchProfileTests.cs (5)
118File.WriteAllText(Path.Combine(Path.GetDirectoryName(path)!, "appsettings.json"), """ 286var directory = Directory.CreateDirectory(Path.Combine(root, "Service")); 287var path = Path.Combine(directory.FullName, $"Service{extension}"); 295var directory = Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(projectPath)!, directoryName)); 296var path = Path.Combine(directory.FullName, "launchSettings.json");
DotnetProjectOptionsTests.cs (5)
102var projectDirectory = Directory.CreateDirectory(Path.Combine(workspacePath, "Service")); 103var projectPath = Path.Combine(projectDirectory.FullName, "Service.csproj"); 105var propertiesDirectory = Directory.CreateDirectory(Path.Combine(projectDirectory.FullName, "Properties")); 106await File.WriteAllTextAsync(Path.Combine(propertiesDirectory.FullName, "launchSettings.json"), """ 122await File.WriteAllTextAsync(Path.Combine(projectDirectory.FullName, "appsettings.json"), """
DotnetProjectPathTests.cs (22)
24var projectPath = Path.Combine(workspace.Path, $"Service{extension}"); 56var projectPath = Path.Combine(directory.FullName, $"Service{extension}"); 58File.WriteAllText(Path.Combine(directory.FullName, "app.cs"), ""); 59File.WriteAllText(Path.Combine(directory.FullName, "script.fsx"), ""); 61File.WriteAllText(Path.Combine(nested.FullName, "Other.csproj"), "<Project />"); 78File.WriteAllText(Path.Combine(directory.FullName, "Later.vbproj"), "<Project />"); 89var path = Path.Combine(workspace.Path, "Service.fsproj"); 122File.WriteAllText(Path.Combine(directory.FullName, $"First{firstExtension}"), "<Project />"); 123File.WriteAllText(Path.Combine(directory.FullName, $"Second{secondExtension}"), "<Project />"); 125File.WriteAllText(Path.Combine(directory.FullName, "app.cs"), ""); 158var path = Path.Combine(workspace.Path, fileName); 188var csharpPath = Path.Combine(directory.FullName, "Service.csproj"); 193File.WriteAllText(Path.Combine(directory.FullName, "Service.fsproj"), "<Project />"); 194File.WriteAllText(Path.Combine(directory.FullName, "Service.vbproj"), "<Project />"); 216var path = Path.Combine(workspace.Path, $"Service{extension}"); 237var path = Path.Combine(workspace.Path, $"Service{extension}"); 264File.WriteAllText(Path.Combine(directory.FullName, $"First{firstExtension}"), "<Project />"); 265File.WriteAllText(Path.Combine(directory.FullName, $"Second{secondExtension}"), "<Project />"); 267File.WriteAllText(Path.Combine(directory.FullName, "app.cs"), ""); 287var path = Path.Combine(workspace.Path, fileName); 308var path = Path.Combine(workspace.Path, "MissingDirectory"); 327var path = Path.Combine(workspace.Path, $"Missing{extension}");
DotnetProjectResourceTests.cs (38)
54var appPath = Path.Combine(builder.AppHostDirectory, "service.cs"); 254await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Dockerfile"), "FROM scratch"); 293var appPath = Path.Combine(workspace.Path, "app.cs"); 300var archivePath = Path.Combine(workspace.Path, "app.tar.gz"); 330var sentinelDockerfilePath = Path.Combine(workspace.Path, "Dockerfile.sentinel"); 331await File.WriteAllTextAsync(Path.Combine(workspace.Path, "sentinel.txt"), marker, cancellation.Token); 399var projectPath = Path.Combine(workspace.Path, "Project.csproj"); 406context.OutputPath = Path.Combine(workspace.Path, "project.tar"); 425var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project")); 427var runtimeDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "runtime")); 428File.WriteAllText(Path.Combine(projectDirectory.FullName, "Dockerfile"), "FROM scratch"); 451var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 452var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj"); 469var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "AmbiguousService")); 470File.WriteAllText(Path.Combine(projectDir.FullName, "First.csproj"), "<Project />"); 471File.WriteAllText(Path.Combine(projectDir.FullName, "Second.csproj"), "<Project />"); 538var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 539var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj"); 542var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties")); 543await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """ 584var appPath = Path.Combine(builder.AppHostDirectory, "service.cs"); 620AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts") 672var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 673var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj"); 676var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties")); 677await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """ 742var projectDir = Directory.CreateDirectory(Path.Combine(workspace.Path, "MyService")); 743var projectPath = Path.Combine(projectDir.FullName, "MyService.csproj"); 746var propertiesDir = Directory.CreateDirectory(Path.Combine(projectDir.FullName, "Properties")); 747await File.WriteAllTextAsync(Path.Combine(propertiesDir.FullName, "launchSettings.json"), """ 841var appPath = Path.Combine(builder.AppHostDirectory, "service.cs"); 876var appPath = Path.Combine(builder.AppHostDirectory, "service.cs"); 1064var appPath = Path.Combine(builder.AppHostDirectory, "service.cs"); 1125var projectDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "project")); 1126var projectPath = Path.Combine(projectDirectory.FullName, $"Project{extension}"); 1152var archivePath = Path.Combine(workspace.Path, "project.tar.gz"); 1218var projectDirectory = Directory.CreateDirectory(Path.Combine(workspacePath, "MyService")); 1225var path = Path.Combine(directory, fileName);
DotnetProjectRunPropertiesResolverTests.cs (3)
21var projectPath = Path.Combine(workspace.Path, "Broken.csproj"); 57var projectPath = Path.Combine(workspace.Path, "Warning.csproj"); 86Path.Combine(workspace.Path, "bin"),
Helpers\DotnetProjectContractFactory.cs (4)
49var projectPath = Path.Combine(directory, "Service.csproj"); 58File.WriteAllText(Path.Combine(directory, "Program.cs"), """ 67var properties = Directory.CreateDirectory(Path.Combine(directory, "Properties")).FullName; 69Path.Combine(properties, "launchSettings.json"),
Helpers\DotnetProjectTestHelpers.cs (1)
18File.WriteAllText(Path.Combine(Path.GetDirectoryName(projectPath)!, fileName), source);
MsTestCollectorTests.cs (16)
78Directory.CreateDirectory(Path.Combine(Path.GetDirectoryName(path)!, "merged")); 169var source = Path.Combine(workspace.Path, "runner reports"); 170File.WriteAllText(Path.Combine(source, "results.trx"), Report); 172File.WriteAllText(Path.Combine(external, "external.txt"), "not copied"); 176File.WriteAllText(Path.Combine(external, "results.trx"), Report); 181Directory.CreateSymbolicLink(Path.Combine(link == "nested-source" ? source : annotation.OutputPath!, "nested"), external); 184Directory.CreateDirectory(Path.Combine(source, "nested")); 207var target = Path.Combine(workspace.Path, "outside.trx"); 215File.Copy(target, Path.Combine(targetDirectory, "results.trx")); 237File.Copy(Path.Combine(MSBuildUtils.GetRepoRoot(), "NuGet.config"), Path.Combine(workspace.Path, "NuGet.config")); 238var projectPath = Path.Combine(projectDirectory, "Fixture.csproj"); 254File.WriteAllText(Path.Combine(projectDirectory, "Fixture.cs"), """ 313builder.Configuration[KnownConfigNames.TestOutputPath] = Path.Combine(workspace.Path, "test output"); 320var path = Path.Combine(workspace.Path, "tests.csproj"); 331return Path.Combine(resource.Resource.Annotations.OfType<TestingAnnotation>().Single().OutputPath!, "results.trx");
MsTestResourceTests.cs (12)
43var path = Path.Combine(project, "tests.csproj"); 49builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports with spaces"); 104var path = Path.Combine(workspace.Path, "tests.csproj"); 107builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 123var path = Path.Combine(workspace.Path, "tests.csproj"); 126builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 142var path = Path.Combine(workspace.Path, "tests.csproj"); 145builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 174var path = Path.Combine(workspace.Path, "tests.csproj"); 177builder.Configuration["ASPIRE_TEST_OUTPUT_PATH"] = Path.Combine(workspace.Path, "reports"); 196Assert.Throws<FileNotFoundException>(() => builder.AddMsTest("tests", Path.Combine(workspace.Path, "missing.csproj"))); 197var path = Path.Combine(workspace.Path, "tests.csproj");
tests\Shared\TestFileSystemService.cs (1)
34var filePath = System.IO.Path.Combine(tempDir.FullName, resolvedName);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
WslcDotnetPublishingTests.cs (3)
63options.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"); 134options.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"); 154MsBuildResponseFileFactory.CreatePropertyArgument("ContainerArchiveOutputPath", Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"))
Aspire.Hosting.EntityFrameworkCore (6)
EFMigrationResourceBuilderExtensions.cs (3)
242projectPath = Path.GetFullPath(Path.Combine(builder.ApplicationBuilder.AppHostDirectory, projectPath)); 332var buildContext = Path.Combine(ResolvePipelineOutputDirectory(builder), "efmigrations"); 377return Path.Combine(builder.ApplicationBuilder.AppHostDirectory, "aspire-output");
EFResourceBuilderExtensions.cs (3)
339? Path.Combine(outputDir, migrationResource.Name + ".sql") 383? Path.Combine(outputDir, GetBundleFileName(migrationResource)) 453var outputDir = Path.Combine(pipelineOutputService.GetOutputDirectory(), "efmigrations");
Aspire.Hosting.EntityFrameworkCore.Tests (3)
EFMigrationConfigurationTests.cs (2)
273Assert.Equal(Path.GetFullPath(Path.Combine(builder.AppHostDirectory, "Target.csproj")), migrations.Resource.MigrationsProjectPath); 275Assert.Equal(Path.GetFullPath(Path.Combine(builder.AppHostDirectory, "Target.csproj")), migrations.Resource.MigrationsProjectPath);
EFMigrationPipelineTests.cs (1)
475Assert.Equal(Path.Combine(Path.GetFullPath("./"), "efmigrations"), dockerfileAnnotation.ContextPath);
Aspire.Hosting.Foundry.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Garnet.Tests (1)
AddGarnetTests.cs (1)
241Assert.Equal(Path.Combine(builder.AppHostDirectory, "mygarnetdata"), volumeAnnotation.Source);
Aspire.Hosting.Go (4)
GoHostingExtensions.cs (3)
169if (File.Exists(Path.Combine(appDirectory, "Dockerfile"))) 188var hasGoMod = File.Exists(Path.Combine(appDirectory, "go.mod")); 189var hasGoSum = File.Exists(Path.Combine(appDirectory, "go.sum"));
GoVersionDetector.cs (1)
14var goModPath = Path.Combine(appDirectory, "go.mod");
Aspire.Hosting.Go.Tests (42)
AddGoAppTests.cs (31)
109File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 116var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 916File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.23\n"); 917File.WriteAllText(Path.Combine(sourceDir.FullName, "main.go"), "package main\nfunc main() {}"); 924var dockerfilePath = Path.Combine(outputDir.FullName, "api.Dockerfile"); 944var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 956File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.22\n"); 966var 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"); 988var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1001File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch"); 1042$"Go app resource 'api' is configured to run package './cmd/server', but publish is using the existing Dockerfile '{Path.Combine(sourceDir, "Dockerfile")}'. " + 1236File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.22\n"); 1244var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1258File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1266var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1278File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1286var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1334File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1351var dockerfile = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1368File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1391var dockerfile = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1436File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1443var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1510File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1517var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1529File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1537var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1643File.WriteAllText(Path.Combine(sourceDir.FullName, "go.mod"), "module example.com/api\n\ngo 1.24\n"); 1644File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\nENTRYPOINT [\"/app/api\"]\n"); 1651var dockerfilePath = Path.Combine(directory, fileName);
GoRunDebuggingTests.cs (5)
52var command = Path.Combine(builder.AppHostDirectory, "custom go"); 354File.WriteAllText(Path.Combine(workspace.Path, "go.mod"), "module example.com/debugflags\n\ngo 1.18\n"); 355File.WriteAllText(Path.Combine(workspace.Path, "main.go"), """ 421File.WriteAllText(Path.Combine(workspace.Path, "tag.go"), """ 436var goEnvironment = Path.Combine(workspace.Path, "go.env");
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");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Java (34)
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")),
JavaDockerfileGenerator.cs (3)
121&& !File.Exists(Path.Combine(appDirectory, ".dockerignore"))) 782var path = Path.Combine(appDirectory, fileName); 1077if (!File.Exists(Path.Combine(appDirectory, posixSibling.Replace('/', Path.DirectorySeparatorChar))))
JavaHostingExtensions.cs (9)
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)); 1505relativeWrapperPath = Path.Combine(".", relativeWrapperPath); 1866var jarPath = Path.GetFullPath(Path.Combine(resource.WorkingDirectory, NormalizeJarPathForJava(jar.JarPath))); 1900JavaBuildTool.Maven => Path.Combine(resource.WorkingDirectory, "target"), 2020JavaBuildTool.Maven => TryReadMavenArtifactId(Path.Combine(resource.WorkingDirectory, "pom.xml")), 2087var 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")),
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
Aspire.Hosting.Java.Tests (130)
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"))
AddQuarkusAppTests.cs (2)
101Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultMavenWrapper), tempDir.Path, "quarkus:dev"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource)); 118Assert.Equal(ExpectedWrapperInvocation.Args(Path.Combine(tempDir.Path, JavaHostingExtensions.s_defaultGradleWrapper), tempDir.Path, "quarkusDev"), await ArgumentEvaluator.GetArgumentListAsync(app.Resource));
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"));
ExpectedWrapperInvocation.cs (1)
29? ["/c", "call", Path.Combine(".", Path.GetRelativePath(workingDirectory, wrapperPath)), .. toolArgs]
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/>");
TempJavaAppDirectory.cs (2)
27: Directory.CreateDirectory(System.IO.Path.Combine(_root.FullName, directoryName)); 43var fullPath = System.IO.Path.Combine(Path, fileName);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.JavaScript (38)
DenoHostingExtensions.cs (2)
1197else if (File.Exists(Path.Combine(workingDirectory, "deno.lock"))) 1386return File.Exists(Path.Combine(workingDirectory, lockFile));
JavaScriptHostingExtensions.cs (28)
181if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile"))) 269if (File.Exists(Path.Combine(appDirectory, "package.json"))) 509if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile"))) 674if (File.Exists(Path.Combine(appDirectory, "package.json"))) 882if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile"))) 1036if (File.Exists(Path.Combine(appDirectory, "package.json")) || 1037File.Exists(Path.Combine(appDirectory, "deno.json")) || 1038File.Exists(Path.Combine(appDirectory, "deno.jsonc"))) 1170appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory)); 1674if (File.Exists(Path.Combine(appDirectory, "Dockerfile"))) 1995appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory)); 2198appDirectory = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, appDirectory)); 2368var hasBunLock = File.Exists(Path.Combine(workingDirectory, "bun.lock")) || 2369File.Exists(Path.Combine(workingDirectory, "bun.lockb")); 2374if (File.Exists(Path.Combine(workingDirectory, "bun.lock"))) 2378if (File.Exists(Path.Combine(workingDirectory, "bun.lockb"))) 2458if (File.Exists(Path.Combine(workingDirectory, manifest))) 2521File.Exists(Path.Combine(resource.Resource.WorkingDirectory, "package-lock.json")) 2539var hasYarnLock = File.Exists(Path.Combine(workingDirectory, "yarn.lock")); 2540var hasYarnrc = File.Exists(Path.Combine(workingDirectory, ".yarnrc.yml")); 2541var hasYarnBerryDir = Directory.Exists(Path.Combine(workingDirectory, ".yarn")); 2618var hasPnpmLock = File.Exists(Path.Combine(workingDirectory, "pnpm-lock.yaml")); 2619var hasPnpmWorkspace = File.Exists(Path.Combine(workingDirectory, "pnpm-workspace.yaml")); 2673var packageJsonPath = Path.Combine(workingDirectory, "package.json"); 3133var configPath = Path.Combine(appDirectory, configFileName); 3258var nvmrcPath = Path.Combine(workingDirectory, ".nvmrc"); 3271var nodeVersionPath = Path.Combine(workingDirectory, ".node-version"); 3284var toolVersionsPath = Path.Combine(workingDirectory, ".tool-versions");
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
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)
59var appDir = Path.Combine(workspace.Path, "js"); 64File.WriteAllText(Path.Combine(appDir, "package.json"), "{}"); 71var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 87var appDir = Path.Combine(workspace.Path, "js"); 89File.WriteAllText(Path.Combine(appDir, "package.json"), "{}"); 98var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 110var appDir = Path.Combine(workspace.Path, "js"); 112File.WriteAllText(Path.Combine(appDir, "package.json"), "{}"); 121var perDockerfileIgnorePath = Path.Combine(workspace.Path, "js.Dockerfile.dockerignore"); 127Assert.False(File.Exists(Path.Combine(appDir, ".dockerignore")), "Aspire should not write a .dockerignore into the user's source tree."); 142var appDir = Path.Combine(workspace.Path, "js"); 149var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 177var appDir = Path.Combine(workspace.Path, "js"); 180File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}"); 186var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 197var appDir = Path.Combine(workspace.Path, "js"); 199File.WriteAllText(Path.Combine(appDir, "custom.lock"), "{}"); 209var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 221var appDir = Path.Combine(workspace.Path, "js"); 223File.WriteAllText(Path.Combine(appDir, "custom.lock"), "{}"); 235await Verify(File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile"))); 244var appDir = Path.Combine(workspace.Path, "js"); 246File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}"""); 253var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 264var appDir = Path.Combine(workspace.Path, "js"); 266File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}"""); 267File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}"); 278var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 291var appDir = Path.Combine(workspace.Path, "js"); 293File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"build":"deno run -A build.ts","start":"deno run -A main.ts"}}"""); 302var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 317var appDir = Path.Combine(workspace.Path, "js"); 320Path.Combine(appDir, "deno.json"), 333var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 348var appDir = Path.Combine(workspace.Path, "js"); 368var appDir = Path.Combine(workspace.Path, "js"); 388var appDir = Path.Combine(workspace.Path, "js"); 390File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"importMap":"import_map.json","tasks":{"start":"deno run main.ts"}}"""); 391File.WriteAllText(Path.Combine(appDir, "import_map.json"), """{"imports":{}}"""); 398var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile")); 412var appDir = Path.Combine(workspace.Path, "js"); 414File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"importMap":"import_map.json","tasks":{"start":"deno run main.ts"}}"""); 415File.WriteAllText(Path.Combine(appDir, "import_map.json"), """{"imports":{}}"""); 423var dockerfileLines = File.ReadAllLines(Path.Combine(workspace.Path, "js.Dockerfile")); 437var appDir = Path.Combine(workspace.Path, "js"); 443var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 455var appDir = Path.Combine(workspace.Path, "js"); 462var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 474var appDir = Path.Combine(workspace.Path, "js"); 483var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 501var appDir = Path.Combine(workspace.Path, "js"); 520var appDir = Path.Combine(workspace.Path, "js"); 522File.WriteAllText(Path.Combine(appDir, "Dockerfile"), "FROM denoland/deno:2.9.0"); 529Assert.False(File.Exists(Path.Combine(workspace.Path, "js.Dockerfile"))); 538var appDir = Path.Combine(workspace.Path, "js"); 540File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);"); 550var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 565var appDir = Path.Combine(workspace.Path, "js"); 567File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);"); 581var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 608var appDir = Path.Combine(workspace.Path, "js"); 610File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);"); 619var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 629var appDir = Path.Combine(workspace.Path, "js"); 631File.WriteAllText(Path.Combine(appDir, "main.ts"), "console.log(1);"); 640var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 650var appDir = Path.Combine(workspace.Path, "js"); 652File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"build prod":"deno run -A build.ts","start":"deno run -A main.ts"}}"""); 661var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 672var appDir = Path.Combine(workspace.Path, "js"); 674File.WriteAllText(Path.Combine(appDir, "package.json"), """{"scripts":{"build prod":"echo build","start":"node main.js"}}"""); 684var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 694var appDir = Path.Combine(workspace.Path, "js"); 696File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}"""); 705var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 723var appDir = Path.Combine(workspace.Path, "js"); 725File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}"""); 743var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 754var appDir = Path.Combine(workspace.Path, "js"); 756File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}"""); 764var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 858var appDir = Path.Combine(workspace.Path, "js"); 860File.WriteAllText(Path.Combine(appDir, "deno.json"), """{"tasks":{"start":"deno run -A main.ts"}}"""); 870var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 882var appDir = Path.Combine(workspace.Path, "js"); 884File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}"); 891var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 901var appDir = Path.Combine(workspace.Path, "js"); 903File.WriteAllText(Path.Combine(appDir, "deno.lock"), "{}"); 910var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 949var appDir = Path.Combine(workspace.Path, "js"); 958var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 970var appDir = Path.Combine(workspace.Path, "js"); 972File.WriteAllText(Path.Combine(appDir, "custom lock's.lock"), "{}"); 981var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 993var appDir = Path.Combine(workspace.Path, "js"); 1002var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1019var appDir = Path.Combine(workspace.Path, "js"); 1027var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1037var appDir = Path.Combine(workspace.Path, "js"); 1046var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1058var appDir = Path.Combine(workspace.Path, "js"); 1067var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1079var appDir = Path.Combine(workspace.Path, "js"); 1091var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1103var appDir = Path.Combine(workspace.Path, "js"); 1121var appDir = Path.Combine(workspace.Path, "js"); 1148var appDir = Path.Combine(workspace.Path, "js"); 1177var appDir = Path.Combine(workspace.Path, "js"); 1196var appDir = Path.Combine(workspace.Path, "js"); 1225var appDir1 = Path.Combine(workspace.Path, "js1"); 1226var appDir2 = Path.Combine(workspace.Path, "js2"); 1240var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js2.Dockerfile")); 1250File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');"); 1272File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 1299File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 1321File.WriteAllText(Path.Combine(workspace.Path, "main.ts"), "console.log('hi');"); 1575var appDir = Path.Combine(workspace.Path, "js"); 1584var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1599var appDir = Path.Combine(workspace.Path, "js"); 1609var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1626var appDir = Path.Combine(workspace.Path, "js"); 1635var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1646var appDir = Path.Combine(workspace.Path, "js"); 1654var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "js.Dockerfile")); 1681var appDir = Path.Combine(workspace.Path, "js"); 2345var appDir = Path.Combine(workspace.Path, "deno-app"); 2347await File.WriteAllTextAsync(Path.Combine(appDir, "main.ts"), """ 2356var dockerfilePath = Path.Combine(workspace.Path, "deno-app.Dockerfile"); 2583File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2601File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}"); 2620File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
AddJavaScriptAppTests.cs (44)
24var appDir = Path.Combine(workspace.Path, "js"); 33var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 46var appDir = Path.Combine(workspace.Path, "js"); 56var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 66var appDir = Path.Combine(workspace.Path, "js"); 76var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 86var appDir = Path.Combine(workspace.Path, "js"); 96var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 109var appDir = Path.Combine(workspace.Path, "js"); 114File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), string.Empty); 123var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 135var appDir = Path.Combine(workspace.Path, "js"); 144var dockerfileLines = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 169var appDir = Path.Combine(workspace.Path, "js"); 174File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), string.Empty); 184var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 411var appDir = Path.Combine(workspace.Path, "js"); 414File.WriteAllText(Path.Combine(appDir, "pnpm-workspace.yaml"), "allowBuilds: {}\n"); 422var dockerfilePath = Path.Combine(workspace.Path, "js.Dockerfile"); 442var appDir = Path.Combine(workspace.Path, "js"); 445Path.Combine(appDir, "package.json"), 458var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 476var appDir = Path.Combine(workspace.Path, "js"); 479Path.Combine(appDir, "package.json"), 493var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 508var appDir = Path.Combine(workspace.Path, "js"); 511Path.Combine(appDir, "package.json"), 524var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 537var appDir = Path.Combine(workspace.Path, "js"); 540Path.Combine(appDir, "package.json"), 553var dockerfile = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "js.Dockerfile")); 576var appDir = Path.Combine(workspace.Path, "js"); 578var packageJsonPath = Path.Combine(appDir, "package.json"); 603var appDir = Path.Combine(workspace.Path, "pnpm-app"); 617await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson); 625var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile"); 640var dockerfileInContext = Path.Combine(appDir, "Dockerfile"); 698var appDir = Path.Combine(workspace.Path, "pnpm-app"); 712await File.WriteAllTextAsync(Path.Combine(appDir, "package.json"), packageJson); 721var dockerfilePath = Path.Combine(workspace.Path, "pnpm-app.Dockerfile"); 730var dockerfileInContext = Path.Combine(appDir, "Dockerfile"); 783var appDir = Path.Combine(rootDirectory, "js"); 793File.WriteAllText(Path.Combine(appDir, "Dockerfile"), dockerfile); 794File.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"); 559File.WriteAllText(Path.Combine(workspace.Path, "app.js"), "console.log('hello');");
AddViteAppTests.cs (77)
25var viteDir = Path.Combine(workspace.Path, "vite"); 29File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty"); 60var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 86var viteDir = Path.Combine(workspace.Path, "vite"); 88File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty"); 96var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 112var viteDir = Path.Combine(workspace.Path, "vite"); 114File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty"); 116var apiDir = Path.Combine(workspace.Path, "api"); 118File.WriteAllText(Path.Combine(apiDir, "package-lock.json"), "empty"); 129var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 139var viteDir = Path.Combine(workspace.Path, "vite"); 141File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty"); 160var viteDir = Path.Combine(workspace.Path, "vite"); 162File.WriteAllText(Path.Combine(viteDir, "package-lock.json"), "empty"); 164var apiDir = Path.Combine(workspace.Path, "api"); 166File.WriteAllText(Path.Combine(apiDir, "package-lock.json"), "empty"); 190var appDir = Path.Combine(workspace.Path, "angular"); 192File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "empty"); 200var dockerfilePath = Path.Combine(workspace.Path, "angular.Dockerfile"); 216var appDir = Path.Combine(workspace.Path, "vite"); 218File.WriteAllText(Path.Combine(appDir, "package-lock.json"), "empty"); 226var dockerfilePath = Path.Combine(workspace.Path, "vite.Dockerfile"); 239var nextDir = Path.Combine(workspace.Path, "nextjs"); 241File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty"); 248var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile"); 260var nextDir = Path.Combine(workspace.Path, "nextjs"); 262File.WriteAllText(Path.Combine(nextDir, "pnpm-lock.yaml"), ""); 269var dockerfilePath = Path.Combine(workspace.Path, "nextjs.Dockerfile"); 279var appDir = Path.Combine(workspace.Path, "nuxt"); 281File.WriteAllText(Path.Combine(appDir, "pnpm-lock.yaml"), ""); 289var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile"); 299var appDir = Path.Combine(workspace.Path, "nuxt"); 301File.WriteAllText(Path.Combine(appDir, "bun.lock"), ""); 309var dockerfilePath = Path.Combine(workspace.Path, "nuxt.Dockerfile"); 319File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), "18.20.0"); 327var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 339File.WriteAllText(Path.Combine(workspace.Path, ".node-version"), "v21.5.0"); 347var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 364File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions); 372var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 390File.WriteAllText(Path.Combine(workspace.Path, ".tool-versions"), toolVersions); 398var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 416File.WriteAllText(Path.Combine(workspace.Path, "package.json"), packageJson); 424var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 441var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 457File.WriteAllText(Path.Combine(workspace.Path, ".nvmrc"), versionString); 465var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 487var dockerfileContents = File.ReadAllText(Path.Combine(workspace.Path, "vite.Dockerfile")); 545Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 548var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 593Assert.Contains(Path.Combine("node_modules", ".aspire"), newConfigPath); 606Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 609var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 710var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 753Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 756var viteConfigPath = Path.Combine(workspace.Path, "vite.config.js"); 808var repoRoot = Path.Combine(workspace.Path, "repo"); 811Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules")); 814var viteConfigPath = Path.Combine(appDir, "vite.config.ts"); 884var repoRoot = Path.Combine(workspace.Path, "repo"); 889Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules")); 891var firstConfigPath = Path.Combine(firstAppDirectory, "vite.config.ts"); 892var secondConfigPath = Path.Combine(secondAppDirectory, "vite.config.ts"); 947var repoRoot = Path.Combine(workspace.Path, "repo"); 952Directory.CreateDirectory(Path.Combine(repoRoot, "node_modules")); 954var firstConfigPath = Path.Combine(firstAppDirectory, "vite.config.ts"); 955var secondConfigPath = Path.Combine(secondAppDirectory, "vite.config.ts"); 993Directory.CreateDirectory(Path.Combine(workspace.Path, "node_modules")); 996var viteConfigPath = Path.Combine(workspace.Path, configFileName); 1048var nextDir = Path.Combine(workspace.Path, "nextjs"); 1050File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty"); 1071var nextDir = Path.Combine(workspace.Path, "nextjs"); 1073File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty"); 1092var nextDir = Path.Combine(workspace.Path, "nextjs"); 1094File.WriteAllText(Path.Combine(nextDir, "package-lock.json"), "empty"); 1095File.WriteAllText(Path.Combine(nextDir, "next.config.ts"), standalone
BunAppFixture.cs (2)
83File.WriteAllText(Path.Combine(tempDir, "server.ts"), 101File.WriteAllText(Path.Combine(tempDir, "package.json"),
DenoAppFixture.cs (2)
118File.WriteAllText(Path.Combine(tempDir, "main.ts"), 136File.WriteAllText(Path.Combine(tempDir, "deno.json"),
NodeAppFixture.cs (2)
75File.WriteAllText(Path.Combine(tempDir, "app.js"), 95File.WriteAllText(Path.Combine(tempDir, "package.json"),
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");
RequiredCommandTests.cs (2)
155File.WriteAllText(Path.Combine(workspace.Path, "package.json"), "{}"); 168File.WriteAllText(Path.Combine(workspace.Path, "deno.json"), "{}");
ResourceCreationTests.cs (1)
44Assert.Equal(Path.Combine(builder.AppHostDirectory, "test"), resource.WorkingDirectory);
Aspire.Hosting.Kafka.Tests (1)
AddKafkaTests.cs (1)
205Assert.Equal(Path.Combine(appBuilder.AppHostDirectory, "kafka-data"), volumeAnnotation.Source);
Aspire.Hosting.Keycloak.Tests (2)
KeycloakPublicApiTests.cs (1)
177var filePath = Path.Combine(workspace.Path, file);
KeycloakResourceBuilderTests.cs (1)
122Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source);
Aspire.Hosting.Kubernetes (16)
Deployment\HelmDeploymentEngine.cs (4)
246var valuesFilePath = Path.Combine(outputPath, "values.yaml"); 364var overrideFilePath = Path.Combine(outputPath, GetDeployValuesFileName(environment.Name)); 436var valuesFilePath = Path.Combine(outputPath, "values.yaml"); 453var deployValuesFilePath = Path.Combine(outputPath, GetDeployValuesFileName(environment.Name));
KubernetesEnvironmentResource.cs (7)
1530var patchFilePath = Path.Combine(patchTempDir.Path, "patch.json"); 1642var certPath = Path.Combine(tempDir.Path, "tls.crt"); 1643var keyPath = Path.Combine(tempDir.Path, "tls.key"); 1960var patchFilePath = Path.Combine(patchTempDir.Path, "patch.json"); 2141var manifestPath = Path.Combine(tempDir.Path, "gateway.json"); 2263var certPath = Path.Combine(tempDir.Path, "tls.crt"); 2264var keyPath = Path.Combine(tempDir.Path, "tls.key");
KubernetesPublishingContext.cs (4)
95var resourceDockerfilePath = Path.Combine(OutputPath, $"{serviceResource.TargetResource.Name}.Dockerfile"); 398var outputFile = Path.Combine(templatesFolder, fileName); 448var outputFile = Path.Combine(OutputPath!, "values.yaml"); 470var outputFile = Path.Combine(OutputPath, "Chart.yaml");
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
Aspire.Hosting.Kubernetes.Tests (95)
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"); 1827var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1862var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 1898var valuesPath = Path.Combine(workspace.Path, "values.yaml");
KubernetesEnvironmentResourceTests.cs (3)
30var chartYaml = Path.Combine(workspace.Path, "Chart.yaml"); 31var valuesYaml = Path.Combine(workspace.Path, "values.yaml"); 96var outputPath = Path.Combine(workspace.Path, "output");
KubernetesGatewayTests.cs (1)
108var valuesPath = Path.Combine(workspace.Path, "values.yaml");
KubernetesIngressTests.cs (2)
115var valuesPath = Path.Combine(workspace.Path, "values.yaml"); 178var valuesPath = Path.Combine(workspace.Path, "values.yaml");
KubernetesPublisherTests.cs (56)
83var overridePath = Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env")); 215await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 259await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml").UseParameters(gateway, tls); 323await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 390await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates/backend/config.yaml")), "yaml") 391.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 392.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml"); 437await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "templates/myapp/deployment.yaml")), "yaml") 494var filePath = Path.Combine(workspace.Path, expectedFile); 543var deployment = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "templates/myapp/deployment.yaml")); 566await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml"))); 575Assert.False(File.Exists(Path.Combine(workspace.Path, "templates/myapp/config.yaml"))); 576Assert.False(File.Exists(Path.Combine(workspace.Path, "templates/myapp/secrets.yaml"))); 621var deployment = await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "templates/myapp/deployment.yaml")); 661var deploymentPath = Path.Combine(workspace.Path, "templates/service/deployment.yaml"); 719var filePath = Path.Combine(workspace.Path, expectedFile); 763var manifestPath = Path.Combine(workspace.Path, "templates/myapp/scaler.yaml"); 908var filePath = Path.Combine(workspace.Path, expectedFile); 962var filePath = Path.Combine(workspace.Path, expectedFile); 994var dockerfilePath = Path.Combine(workspace.Path, "testcontainer.Dockerfile"); 1069var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1118var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1153var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1246var deploymentPath = Path.Combine(workspace.Path, "templates/myapp/deployment.yaml"); 1342var filePath = Path.Combine(workspace.Path, expectedFile); 1396await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1416await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 1443var publishedValues = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")); 1447.AppendContentAsFile(await File.ReadAllTextAsync(Path.Combine(workspace.Path, HelmDeploymentEngine.GetDeployValuesFileName("env"))), "yaml") 1465await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml"); 1488await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1512await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1532await Verify(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1549await Verify(File.ReadAllText(Path.Combine(workspace.Path, "Chart.yaml")), "yaml") 1550.AppendContentAsFile(File.ReadAllText(Path.Combine(workspace.Path, "values.yaml")), "yaml") 1586var filePath = Path.Combine(workspace.Path, expectedFile); 1630var filePath = Path.Combine(workspace.Path, expectedFile); 1656var servicePath = Path.Combine(workspace.Path, "templates/database/service.yaml"); 1692var filePath = Path.Combine(workspace.Path, expectedFile); 1744var filePath = Path.Combine(workspace.Path, expectedFile); 1787var filePath = Path.Combine(workspace.Path, expectedFile); 1832var filePath = Path.Combine(workspace.Path, expectedFile); 1987var filePath = Path.Combine(workspace.Path, expectedFile); 2033var filePath = Path.Combine(workspace.Path, expectedFile); 2094var filePath = Path.Combine(workspace.Path, expectedFile); 2145var filePath = Path.Combine(workspace.Path, expectedFile); 2207var filePath = Path.Combine(workspace.Path, expectedFile); 2243var valuesContent = await File.ReadAllTextAsync(Path.Combine(workspace.Path, "values.yaml")); 2292var filePath = Path.Combine(workspace.Path, expectedFile); 2346var filePath = Path.Combine(workspace.Path, expectedFile); 2403var filePath = Path.Combine(workspace.Path, expectedFile); 2497var filePath = Path.Combine(workspace.Path, expectedFile); 2552var filePath = Path.Combine(workspace.Path, expectedFile); 2839var filePath = Path.Combine(workspace.Path, expectedFile); 2919var filePath = Path.Combine(workspace.Path, expectedFile); 3113var valuesPath = Path.Combine(workspace.Path, "values.yaml");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Maui (11)
MauiPlatformHelper.cs (1)
56Path.Combine(builder.ApplicationBuilder.AppHostDirectory, projectPath));
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
Utilities\MauiEnvironmentHelper.cs (2)
60var targetsFilePath = Path.Combine(tempDirectory, $"{sanitizedName}.targets"); 201var targetsFilePath = Path.Combine(tempDirectory, $"{sanitizedName}.targets");
Aspire.Hosting.Maui.Tests (66)
MauiiOSValidationTests.cs (6)
24var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 50var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 76var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 97var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 116var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 135var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
MauiOtlpTemplateTests.cs (4)
26var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 53var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 80var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 107var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj");
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");
MauiUnsupportedPlatformTests.cs (6)
17var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 41var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 65var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 89var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 114var tempFile = Path.Combine(workspace.Path, "TempMauiProject.csproj"); 129var 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");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Milvus.Tests (1)
MilvusFunctionalTests.cs (1)
99bindMountPath = Path.Combine(Directory.CreateTempSubdirectory().FullName, "data");
Aspire.Hosting.MongoDB.Tests (3)
MongoDbFunctionalTests.cs (3)
227bindMountPath = Path.Combine(Directory.CreateTempSubdirectory().FullName, "data"); 365var initFilePath = Path.Combine(bindMountPath, "mongo-init.js"); 462var initFilePath = Path.Combine(initFilesPath, "mongo-init.js");
Aspire.Hosting.MySql.Tests (3)
MySqlFunctionalTests.cs (3)
152bindMountPath = Path.Combine(Directory.CreateTempSubdirectory().FullName, "data"); 325File.WriteAllText(Path.Combine(bindMountPath, "init.sql"), """ 410File.WriteAllText(Path.Combine(initFilesPath, "init.sql"), """
Aspire.Hosting.Native.CodeGeneration (15)
NativeContractCompilation.cs (2)
60var directory = Directory.CreateDirectory(Path.Combine(outputDirectory, "contract")); 61var assemblyPath = Path.Combine(directory.FullName, $"{assemblyName}.dll");
NativeProviderProjection.cs (3)
145await File.WriteAllTextAsync(Path.Combine(output, "ProviderContract.g.cs"), code.ToString()).ConfigureAwait(false); 146await File.WriteAllTextAsync(Path.Combine(output, "provider-contract.json"), metadata).ConfigureAwait(false); 211var path = Path.Combine(Path.GetDirectoryName(assemblyPath)!, name.Name + ".dll");
NativeProviderTypeScriptProjection.cs (1)
19await File.WriteAllTextAsync(Path.Combine(output, "provider-client.mts"), code).ConfigureAwait(false);
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)
DcpConnectionMaterialTests.cs (2)
53var path = Path.Combine(directory.FullName, "kubeconfig"); 86Path.Combine(directory.FullName, "kubeconfig"), () => true, TimeSpan.FromSeconds(1),
NativeCliProtocolTests.cs (4)
62var target = Directory.CreateDirectory(Path.Combine(parent, "target")); 64var link = Path.Combine(parent, "link"); 66Assert.Throws<IOException>(() => CreateProtocol(Path.Combine(link, "cli.sock"))); 68Assert.False(File.Exists(Path.Combine(target.FullName, "cli.sock")));
NativeComposeCSharpDockerTests.cs (4)
34"-p", project, "-f", Path.Combine(work.FullName, "compose.yaml")]; 38var inputs = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(work.FullName, "deployment-inputs.json")))!; 58if (File.Exists(Path.Combine(work.FullName, "compose.yaml"))) 123var state = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(work.FullName, "deployment-state.json")))!;
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);
NativeDashboardConfigurationTests.cs (1)
23var path = Path.Combine(directory.FullName, fileName);
NativeIpcSecurityTests.cs (1)
39var canaryPath = Path.Combine(directory.FullName, "public.sock");
NativeModelAlignmentTests.cs (2)
125var missing = Path.Combine(AppContext.BaseDirectory, "missing-" + Guid.NewGuid().ToString("N")); 132composition.AddExecutable("tool", Path.Combine(missing, "tool"), missing);
NativeProductCliTests.cs (7)
22var apphost = Path.Combine(directory.FullName, "apphost.mts"); 23var proof = Path.Combine(directory.FullName, "proof.json"); 45await File.WriteAllTextAsync(Path.Combine(directory.FullName, "aspire.config.json"), 48Path.Combine(directory.FullName, "package.json")); 50Path.Combine(directory.FullName, "tsconfig.apphost.json")); 77await File.WriteAllTextAsync(Path.Combine(directory.FullName, "finish"), ""); 108start.Environment["ASPIRE_HOME"] = Path.Combine(directory.FullName, "home");
NativeProviderActivationTests.cs (2)
24Path.Combine(directory.FullName, "missing-provider"), [], options, clock, 51var missing = Path.Combine(directory.FullName, "missing-provider");
TestServices\ComposeTestApplication.cs (1)
31builder.AddExecutable("web", Path.Combine(root, "deployment-only", "node"), Path.Combine(root, "web"))
TestServices\DcpReadyTestHost.cs (2)
20public string KubeconfigPath => Path.Combine(directory.FullName, "kubeconfig"); 25while (!File.Exists(Path.Combine(root.FullName, "Aspire.slnx")))
TestServices\NativeAuxiliaryTestHost.cs (2)
44while (!File.Exists(Path.Combine(root.FullName, "Aspire.slnx"))) 50AppHostPath = Path.Combine(HomeDirectory, "apphost.mts");
TestServices\NativeCliTestHost.cs (1)
25public string SocketPath => Path.Combine(_directory.FullName, "cli.sock");
TestServices\NativeSocketTestHost.cs (2)
120public string SocketPath => Path.Combine(_directory.FullName, "rpc.sock"); 127while (!File.Exists(Path.Combine(root.FullName, "Aspire.slnx")))
Aspire.Hosting.Native.Server (23)
Dcp\DcpApiClient.cs (1)
54var kubeconfig = Path.Combine(_directory.FullName, "kubeconfig");
Rpc\NativeLanguageCatalog.cs (1)
65catalog._providers = JsonNode.Parse(File.ReadAllText(Path.Combine(generatedSdkDirectory, "providers.json")))!.AsArray();
src\Shared\BackchannelConstants.cs (3)
259var socketPath = Path.Combine(dir, $"{appHostId}{instanceId}.{processId.ToString(CultureInfo.InvariantCulture)}"); 277var socketPath = Path.Combine(dir, socketName); 315return Path.Combine(dir, appHostId);
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\BundleVersionLease.cs (2)
104var leasesDirectory = Path.Combine(fullVersionDirectory, LeasesDirectoryName); 172var leasesDirectory = Path.Combine(versionDirectory, LeasesDirectoryName);
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
Aspire.Hosting.Oracle.Tests (2)
OracleFunctionalTests.cs (2)
280File.WriteAllText(Path.Combine(bindMountPath, "01_init.sql"), $""" 372File.WriteAllText(Path.Combine(initFilesPath, "01_init.sql"), $"""
Aspire.Hosting.PostgreSQL.Tests (5)
AddPostgresTests.cs (2)
908Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source); 935Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source);
PostgresFunctionalTests.cs (3)
226bindMountPath = Path.Combine(Directory.CreateTempSubdirectory().FullName, "data"); 385File.WriteAllText(Path.Combine(bindMountPath, "init.sql"), """ 471File.WriteAllText(Path.Combine(initFilesPath, "init.sql"), """
Aspire.Hosting.Python (15)
PythonAppResourceBuilderExtensions.cs (13)
433if (File.Exists(Path.Combine(resource.WorkingDirectory, "Dockerfile"))) 529if (File.Exists(Path.Combine(appDirectoryFullPath, "pyproject.toml")) || 530File.Exists(Path.Combine(appDirectoryFullPath, "requirements.txt"))) 591var uvLockPath = Path.Combine(resource.WorkingDirectory, "uv.lock"); 700var requirementsTxtPath = Path.Combine(resource.WorkingDirectory, "requirements.txt"); 740var pyprojectTomlPath = Path.Combine(resource.WorkingDirectory, "pyproject.toml"); 835return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath); 843var venvPath = Path.Combine(currentDirectory, virtualEnvironmentPath); 873return Path.Combine(appDirectoryFullPath, virtualEnvironmentPath); 1216if (File.Exists(Path.Combine(workingDirectory, "pyproject.toml"))) 1221else if (File.Exists(Path.Combine(workingDirectory, "requirements.txt"))) 1329var fullPath = Path.Combine(directory, commandWithExt); 1342var fullPath = Path.Combine(directory, command);
PythonVersionDetector.cs (2)
20var pythonVersionFile = Path.Combine(appDirectory, ".python-version"); 31var pyprojectFile = Path.Combine(appDirectory, "pyproject.toml");
Aspire.Hosting.Python.Tests (125)
AddPythonAppTests.cs (118)
30var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json"); 68var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json"); 309var scriptPath = Path.Combine(projectDirectory, "main.py"); 312var requirementsPath = Path.Combine(projectDirectory, "requirements.txt"); 316var dockerFilePath = Path.Combine(projectDirectory, "Dockerfile"); 453var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 566var appVenvPath = Path.Combine(appDir.FullName, ".venv"); 579var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, appDir.FullName)); 580var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv"); 596var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName); 600var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv"); 642var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName); 646var appVenvPath = Path.Combine(appDirPath, ".venv"); 649var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv"); 699var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, appDir.FullName)); 700var expectedVenvPath = Path.Combine(expectedProjectDirectory, ".venv"); 716var appDirPath = Path.Combine(builder.AppHostDirectory, appDirName); 720var appHostVenvPath = Path.Combine(builder.AppHostDirectory, ".venv"); 724var customVenvPath = Path.Combine(appDirPath, "custom-venv"); 776var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1026var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1060var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1094var expectedProjectDirectory = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, workspace.Path)); 1290$"Python app resource 'api' is configured to run {expectedKind} '{entrypoint}', but publish is using the existing Dockerfile '{Path.Combine(sourceDir, "Dockerfile")}'. " + 1410File.WriteAllText(Path.Combine(sourceDir.FullName, "main.py"), "print('Hello from Python!')"); 1418var content = await File.ReadAllTextAsync(Path.Combine(outputDir.FullName, "api.Dockerfile")); 1587File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent); 1588File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent); 1589File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 1591var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json"); 1610var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile"); 1613var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile"); 1616var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile"); 1653File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent); 1655File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 1657var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json"); 1676var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile"); 1679var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile"); 1682var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile"); 1715var appDirectory = Path.Combine(workspace.Path, "myapp"); 1717var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1759var appDirectory = Path.Combine(workspace.Path, "myapp"); 1761var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1799var appDirectory = Path.Combine(workspace.Path, "myapp"); 1801var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1834var appDirectory = Path.Combine(workspace.Path, "myapp"); 1836var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1845Assert.Equal(Path.Combine(appDirectory, "main.py"), launchConfig.ProgramPath); 1855var appDirectory = Path.Combine(workspace.Path, "myapp"); 1857var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1879var appDirectory = Path.Combine(workspace.Path, "myapp"); 1881var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1903var appDirectory = Path.Combine(workspace.Path, "myapp"); 1905var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1907var customWorkingDirectory = Path.Combine(workspace.Path, "custom"); 1918Path.Combine(builder.AppHostDirectory, customWorkingDirectory)); 1930var appDirectory = Path.Combine(workspace.Path, "myapp"); 1932var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 1934var customWorkingDirectory = Path.Combine(workspace.Path, "custom"); 1944Path.Combine(builder.AppHostDirectory, customWorkingDirectory)); 1946Assert.Equal(Path.Combine(expectedWorkingDirectory, "main.py"), launchConfig.ProgramPath); 1971var appDirectory = Path.Combine(workspace.Path, "myapp"); 1973var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 2004var appDirectory = Path.Combine(workspace.Path, "myapp"); 2006var virtualEnvironmentPath = Path.Combine(workspace.Path, ".venv"); 2113File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent); 2114File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent); 2115File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 2130var dockerfilePath = Path.Combine(outputDir.FullName, "custom-images-app.Dockerfile"); 2160File.WriteAllText(Path.Combine(projectDirectory, "requirements.txt"), requirementsContent); 2161File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 2172var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile"); 2210File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 2211File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent); 2222var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile"); 2243File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 2254var dockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile"); 2277File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 2278File.WriteAllText(Path.Combine(projectDirectory, ".python-version"), pythonVersionContent); 2291var scriptDockerfilePath = Path.Combine(outputDir.FullName, "script-app.Dockerfile"); 2294var moduleDockerfilePath = Path.Combine(outputDir.FullName, "module-app.Dockerfile"); 2297var executableDockerfilePath = Path.Combine(outputDir.FullName, "executable-app.Dockerfile"); 2326var scriptPath = Path.Combine(workspace.Path, scriptName); 2330var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml"); 2360var scriptPath = Path.Combine(workspace.Path, scriptName); 2364var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2395var scriptPath = Path.Combine(workspace.Path, scriptName); 2399var pyprojectPath = Path.Combine(workspace.Path, "pyproject.toml"); 2401var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2425var scriptPath = Path.Combine(workspace.Path, scriptName); 2449var scriptPath = Path.Combine(workspace.Path, scriptName); 2472var scriptPath = Path.Combine(workspace.Path, scriptName); 2476var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2500var scriptPath = Path.Combine(workspace.Path, scriptName); 2504var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2529var scriptPath = Path.Combine(workspace.Path, "main.py"); 2557var scriptPath = Path.Combine(workspace.Path, "main.py"); 2561var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2600var scriptPath = Path.Combine(workspace.Path, "main.py"); 2603var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2630var scriptPath = Path.Combine(workspace.Path, "main.py"); 2633var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2664var scriptPath = Path.Combine(workspace.Path, "main.py"); 2667var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2700var scriptPath = Path.Combine(workspace.Path, "main.py"); 2703var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2730var scriptPath = Path.Combine(workspace.Path, "main.py"); 2733var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2762var scriptPath = Path.Combine(workspace.Path, "main.py"); 2765var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2794var scriptPath = Path.Combine(workspace.Path, "main.py"); 2797var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2830var scriptPath = Path.Combine(workspace.Path, "main.py"); 2884var scriptPath = Path.Combine(workspace.Path, scriptName); 2887var requirementsPath = Path.Combine(workspace.Path, "requirements.txt"); 2906File.WriteAllText(Path.Combine(sourceDir.FullName, "main.py"), "print('Hello from Python!')"); 2907File.WriteAllText(Path.Combine(sourceDir.FullName, "Dockerfile"), "FROM scratch\nENTRYPOINT [\"python\", \"main.py\"]\n"); 2914var dockerfilePath = Path.Combine(directory, fileName);
AddUvicornAppTests.cs (6)
16var appDirectory = Path.Combine(Path.GetTempPath(), "test-app"); 56File.WriteAllText(Path.Combine(projectDirectory, "pyproject.toml"), pyprojectContent); 57File.WriteAllText(Path.Combine(projectDirectory, "uv.lock"), uvLockContent); 58File.WriteAllText(Path.Combine(projectDirectory, "main.py"), scriptContent); 60var manifestPath = Path.Combine(projectDirectory, "aspire-manifest.json"); 86var appDockerfilePath = Path.Combine(outputDir.FullName, "main.Dockerfile");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Qdrant.Tests (1)
QdrantFunctionalTests.cs (1)
118bindMountPath = Path.Combine(Directory.CreateTempSubdirectory().FullName, "data");
Aspire.Hosting.Radius (7)
Publishing\RadiusBicepPublishingContext.cs (2)
91var bicepPath = Path.Combine(outputDir, "app.bicep"); 92var configPath = Path.Combine(outputDir, "bicepconfig.json");
Publishing\RadiusDeploymentPipelineStep.cs (3)
294Pin("AZURE_CONFIG_DIR", Path.Combine(realHome, ".azure")); 519var bicepPath = Path.Combine(outputDir, "app.bicep"); 701var filePath = Path.Combine(directory.Path, "parameters.json");
Secrets\SealedSecretArtifact.cs (2)
33Path.Combine(outputDirectory, RootDirectoryName); 40Path.Combine(outputDirectory, RelativePath(storeName, sourceManifestPath));
Aspire.Hosting.Radius.Tests (17)
Deployment\ControlPlaneVersionGateTests.cs (7)
83var home = Path.Combine(Path.GetTempPath(), "aspire-radius-kubeconfig-test"); 114var home = Path.Combine(Path.GetTempPath(), "aspire-radius-kubeconfig-test"); 115var realHome = Path.Combine(Path.GetTempPath(), "aspire-radius-real-home"); 126Assert.Equal(Path.Combine(realHome, ".azure"), environment["AZURE_CONFIG_DIR"]); 140var home = Path.Combine(Path.GetTempPath(), "aspire-radius-kubeconfig-test"); 141var realHome = Path.Combine(Path.GetTempPath(), "aspire-radius-real-home"); 159var home = Path.Combine(Path.GetTempPath(), "aspire-radius-kubeconfig-test");
Publishing\PostCallbackSecretValidationTests.cs (1)
30var path = Path.Combine(_manifestDirectory, $"{fileName}.sealed.yaml");
Publishing\SealedSecretPublishTests.cs (5)
24var path = Path.Combine(_dir, $"{name}.sealed.yaml"); 74.WithSealedSecret(Path.Combine("secrets", "db-creds.sealed.yaml"), "username"); 80Path.GetFullPath(Path.Combine("secrets", "db-creds.sealed.yaml"), store.ApplicationBuilder.AppHostDirectory), 87var missing = Path.Combine(_dir, "does-not-exist.sealed.yaml"); 102var manifest = Path.Combine(_dir, "no-payload.sealed.yaml");
Secrets\SealedSecretManifestTests.cs (1)
16var path = Path.Combine(_dir, $"{Guid.NewGuid():N}.sealed.yaml");
Secrets\SecretStoreValidationTests.cs (1)
56var path = Path.Combine(_sealedManifestDirectory, $"{Guid.NewGuid():N}.sealed.yaml");
tests\Shared\TestFileSystemService.cs (1)
34var filePath = System.IO.Path.Combine(tempDir.FullName, resolvedName);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Redis.Tests (2)
AddRedisTests.cs (2)
668Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source); 810var stubPath = Path.Combine(binDirectory.FullName, "redis-server");
Aspire.Hosting.RemoteHost (4)
AssemblyLoader.cs (1)
356var libsPath = Path.Combine(integrationLibsPath, sharedName + ".dll");
IntegrationLoadContext.cs (1)
139var path = Path.Combine(dir, $"{assemblyName}.dll");
src\Shared\ChildProcess.cs (1)
132_completionPath = Path.Combine(_completionDirectory.FullName, "exit-code");
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
Aspire.Hosting.RemoteHost.Tests (60)
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);
AtsExportsTests.cs (1)
139var tempFile = Path.Combine(workspace.WorkspaceRoot.FullName, "artifact.zip");
CodeGeneration\ApiReferenceExportTests.cs (2)
100var manifestPath = Path.Combine(manifestDirectory.Path, "integration-package-probe-manifest.json"); 358var destinationPath = Path.Combine(destinationDirectory, Path.GetFileName(assemblyPath));
IntegrationHostConfigurationTests.cs (1)
17var entryPoint = Path.Combine(workspace.Path, "host.mts");
IntegrationHostLauncherTests.cs (2)
207var entryPoint = Path.GetFullPath(Path.Combine("integration packages", "host entry.mts")); 265var entryPoint = Path.GetFullPath(Path.Combine("integration %TEMP%! packages", "host entry.mts"));
IntegrationHostProcessLauncherTests.cs (3)
55var descriptor = new IntegrationHostDescriptor { Language = "test/launch", PackageName = "example", HostEntryPoint = Path.Combine(AppContext.BaseDirectory, "host.mts") }; 76var entryPoint = Path.Combine(workspace.Path, "entry point.mts"); 139var descriptor = new IntegrationHostDescriptor { Language = "test/launch", PackageName = "example", HostEntryPoint = Path.Combine(AppContext.BaseDirectory, "host.mts") };
IntegrationHostProcessTests.cs (4)
88Assert.Equal("once\n", await File.ReadAllTextAsync(Path.Combine(server.Directory, "side-effects"))); 113Assert.Equal("once\n", await File.ReadAllTextAsync(Path.Combine(server.Directory, "side-effects"))); 132Assert.Equal("4", await File.ReadAllTextAsync(Path.Combine(server.Directory, "generation"))); 231Assert.False(File.Exists(Path.Combine(server.Directory, "host-pids")));
IntegrationLoadContextTests.cs (4)
41var assemblyPath = Path.Combine(AppContext.BaseDirectory, "Aspire.Hosting.CodeGeneration.Go.dll"); 47var manifestPath = Path.Combine(manifestDirectory.FullName, "integration-package-probe-manifest.json"); 79var manifestPath = Path.Combine(manifestDirectory.FullName, "integration-package-probe-manifest.json"); 108var manifestPath = Path.Combine(manifestDirectory.FullName, "integration-package-probe-manifest.json");
IntegrationPackageProbeManifestTests.cs (1)
26var manifestPath = Path.Combine(manifestDirectory.FullName, "integration-package-probe-manifest.json");
JsonRpcAuthenticationTests.cs (6)
128var existingFile = Path.Combine(target.FullName, "rpc.sock"); 130workspace.CreateDirectory(Path.Combine(".aspire", "cli")); 136["REMOTE_APP_HOST_SOCKET_PATH"] = symbolicLink ? Path.Combine(link, "rpc.sock") : existingFile 213var blockingFile = Path.Combine(workspace.Path, "not-a-directory"); 217["REMOTE_APP_HOST_SOCKET_PATH"] = Path.Combine(blockingFile, "rpc.sock") 283var directory = Path.Combine(workspace.Path, "rpc");
tests\Shared\Processes\ChildProcessTests.cs (1)
393var cleanupPath = Path.Combine(fixture.CreateDirectory().FullName, "cleanup-completed");
tests\Shared\Processes\ProcessSupervisorTests.cs (2)
36var shim = Path.Combine(directory.FullName, "literal %PATH%! shim.cmd"); 73var completionPath = Path.Combine(directory.FullName, "exit-code");
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"]);
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
TestServices\IntegrationHostProcessFixture.cs (15)
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"), ""); 98await File.WriteAllTextAsync(Path.Combine(directory.FullName, "delay-host-pid-write"), ""); 436while (!File.Exists(Path.Combine(Directory, name))) 442public int[] HostProcessIds => File.ReadAllLines(Path.Combine(Directory, "host-pids")).Select(int.Parse).ToArray(); 447var path = Path.Combine(Directory, "host-pids"); 508await File.WriteAllTextAsync(Path.Combine(Directory, "stop-server"), "");
Aspire.Hosting.Rust (14)
RustDockerfileGenerator.cs (3)
66&& !File.Exists(Path.Combine(workingDirectory, ".dockerignore"))) 276var candidate = Path.Combine(current, segments[i]); 281current = Path.Combine(current, segments[i]);
RustHostingExtensions.cs (3)
606if (File.Exists(Path.Combine(candidate, "Cargo.lock"))) 748if (File.Exists(Path.Combine(workingDirectory, "Dockerfile"))) 753Path.Combine(workingDirectory, "Dockerfile"),
src\Shared\PathNormalizer.cs (8)
83var candidate = Path.Combine(current, segment); 99Path.Exists(Path.Combine(current, caseVariant))) || 101Path.Exists(Path.Combine(current, normalizationVariant))); 297var candidate = Path.Combine(current, segment); 405current = Path.Combine(current, segments[i]); 454current = Path.Combine(current, segments[j]); 493current = Path.Combine(current, segments[i]); 506current = Path.Combine(current, segments[j]);
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);
CargoMetadataTests.cs (4)
290Directory.CreateDirectory(Path.Combine(crate.Path, "src")); 291crate.Write(Path.Combine("src", "main.rs"), "fn main() { println!(\"hello\"); }"); 311TestPathNormalizer.ResolveSymlinks(Path.Combine(crate.Path, "target")), 315Assert.False(Directory.Exists(Path.Combine(crate.Path, "target")));
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);
TempCrateDirectory.cs (1)
16=> File.WriteAllText(System.IO.Path.Combine(Path, fileName), content);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Aspire.Hosting.Sdk.Tests (134)
AppHostSdkTargetsTests.cs (132)
137await File.WriteAllTextAsync(Path.Combine(workspace.Path, "AppHost.csproj"), 236var projectDirectory = Path.Combine(workspace.Path, "AppHost"); 254await File.WriteAllTextAsync(Path.Combine(projectDirectory, "AppHost.csproj"), 328var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 357var repoRoot = Path.Combine(workspace.Path, "repo"); 361var artifactsPath = Path.Combine(workspace.Path, "artifacts"); 377var destination = Path.Combine(repoRoot, target); 379File.Copy(Path.Combine(sourceRepoRoot, target), destination); 417var projectFile = Path.Combine(workspace.Path, "AppHost.csproj"); 437var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 476var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 515var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 545var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path")); 571var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 605var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 627var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 649var nonExecutableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "non-executable")); 650var nonExecutableDnxPath = Path.Combine(nonExecutableDirectory.FullName, "dnx"); 657var executableDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "executable")); 678var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(project.ProjectDirectory, RelativeCliDirectory)); 697var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 718var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 733var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@")); 751var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path")); 758var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 782var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 823var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 852var appHostDirectory = Path.Combine(workspace.Path, "FileApp"); 854var appHostFile = Path.Combine(appHostDirectory, "apphost.cs"); 875var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 945await File.WriteAllTextAsync(Path.Combine(workspace.Path, "Directory.Build.props"), """ 1043var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1058var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli")); 1059var captureFile = Path.Combine(workspace.Path, "aspire-args.txt"); 1095var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected cli")); 1096var captureFile = Path.Combine(workspace.Path, "dnx-args.txt"); 1138var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native aspire")); 1139var captureFile = Path.Combine(workspace.Path, "aspire-native-args.txt"); 1178var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake cli !& (shim)^,;=+[]{}~@")); 1179var captureFile = Path.Combine(workspace.Path, "aspire-args.txt"); 1215var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1216var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1231var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1238var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1264var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli")); 1270var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, dnxDirectoryName)); 1275var aspireHome = Path.Combine(workspace.Path, aspireHomeDirectoryName); 1311var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "dnx")); 1313var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1345var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "dnx")); 1347var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1376var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "dnx")); 1378var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1379var setupArgumentsPath = Path.Combine(workspace.Path, "setup-arguments.txt"); 1440var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "cli")); 1452["ASPIRE_HOME"] = Path.Combine(workspace.Path, "aspire-home"), 1475var dnxDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "dnx")); 1477var cliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "cli")); 1481await File.WriteAllTextAsync(Path.Combine(cliDirectory.FullName, "setup-exit-code"), "42"); 1484var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1508var path = Path.Combine(directory, OperatingSystem.IsWindows() ? "Aspire.TerminalHost.exe" : "Aspire.TerminalHost"); 1530File.Move(bundle.DashboardPath, Path.Combine(managedDir, Path.GetFileName(bundle.DashboardPath))); 1561var managedPath = Path.Combine(managedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed"); 1567expectedDashboardPath = Path.Combine(managedDir, Path.GetFileName(bundle.DashboardPath)); 1600Path.Combine(workspace.Path, "cli $HOME `aspire-test-command`")); 1602var aspireHome = Path.Combine(workspace.Path, "empty-aspire-home"); 1624var selectedCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "selected-cli")); 1626var staleCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "stale-cli")); 1629var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1655var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "native%ASPIRE_TEST_LITERAL%")); 1657var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1673Assert.False(Directory.Exists(Path.Combine(workspace.Path, "nativeexpanded"))); 1681var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1684var aspireHome = Path.Combine(workspace.Path, "aspire-home"); 1710var fakeCommandDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-command")); 1712var commandShimPath = Path.Combine(fakeCommandDirectory.FullName, "aspire.cmd"); 1718var childPidPath = Path.Combine(workspace.Path, "child.pid"); 1720var projectPath = Path.Combine(workspace.Path, "RunAspireCliCommand.proj"); 1778var commandPath = Path.Combine(workspace.Path, OperatingSystem.IsWindows() ? "hang.cmd" : "hang"); 1847var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1849var environmentAspireHome = Path.Combine(workspace.Path, "environment-aspire-home"); 1850var propertyAspireHome = Path.Combine(workspace.Path, "property-aspire-home"); 1864Assert.False(Directory.Exists(Path.Combine(propertyAspireHome, "bundle"))); 1872var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1898var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1899var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1914var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1915var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1930var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1931var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1946var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1947var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1962var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "fake-cli")); 1963var cliPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1978var emptyPathDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "empty-path")); 1992var projectDirectory = Path.Combine(workspace.Path, "AppHost"); 1998await File.WriteAllTextAsync(Path.Combine(projectDirectory, "AppHost.csproj"), 2039var projectDirectory = Path.Combine(workspace, "AppHost"); 2043var appHostTargetsFile = Path.Combine(projectDirectory, "Aspire.Hosting.AppHost.targets"); 2047var projectFile = Path.Combine(projectDirectory, $"AppHost{projectExtension}"); 2082await File.WriteAllTextAsync(Path.Combine(projectDirectory, "Program.cs"), """ 2171var aspirePath = Path.Combine(fakeCliDirectory, "aspire"); 2187var aspirePath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 2226File.WriteAllText(Path.Combine(bundle.DcpDirectory, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), ""); 2236var bundleRoot = Path.Combine(layoutRoot, "bundle"); 2237var dcpDirectory = Path.Combine(bundleRoot, "dcp"); 2238var dashboardDirectory = Path.Combine(bundleRoot, "dashboard"); 2239var dashboardPath = Path.Combine(dashboardDirectory, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"); 2245var aspirePath = Path.Combine(fakeCliDirectory, $"aspire{extension}"); 2281var dnxPath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "dnx.cmd" : "dnx"); 2286await File.WriteAllTextAsync(Path.Combine(fakeSdkDirectory.FullName, "dotnet.dll"), ""); 2351await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "setup-exit-code"), exitCode.ToString(CultureInfo.InvariantCulture)); 2359await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "fail-version"), ""); 2373var aspirePath = Path.Combine(fakeCliDirectory, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire"); 2384File.Copy(sourcePath, Path.Combine(destinationDirectory, Path.GetFileName(sourcePath)), overwrite: true); 2387return Path.Combine(destinationDirectory, Path.GetFileName(fakeCommandHostPath)); 2392var captureFile = Path.Combine(workingDirectory, $"{command}-shadow-invoked.txt"); 2396Path.Combine(workingDirectory, $"{command}.cmd"), 2411await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$""" 2423var aspirePath = Path.Combine(fakeCliDirectory, "aspire"); 2439await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), $$""" 2452var aspirePath = Path.Combine(fakeCliDirectory, "aspire"); 2473await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """ 2486var aspirePath = Path.Combine(fakeCliDirectory, "aspire"); 2503await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """ 2520var aspirePath = Path.Combine(fakeCliDirectory, "aspire"); 2541await File.WriteAllTextAsync(Path.Combine(fakeCliDirectory, "aspire.cmd"), """ 2557var aspirePath = Path.Combine(fakeCliDirectory, "aspire"); 2659=> OperatingSystem.IsWindows() ? Path.Combine(Path.GetDirectoryName(dnxPath)!, "dotnet.exe") : dnxPath; 2788return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName))); 2897while (directory is not null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
Aspire.Hosting.Seq.Tests (2)
AddSeqTests.cs (1)
160Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source);
SeqFunctionalTests.cs (1)
98bindMountPath = Path.Combine(Directory.CreateTempSubdirectory().FullName, "data");
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
305var path = Path.Combine(source, dir);
Aspire.Hosting.Tasks (15)
CommandPathResolver.cs (1)
36var candidate = Path.Combine(directory, executableName);
ResolveAspireCliBundle.cs (13)
251if (TryResolveBundleRoot(Path.Combine(fullPath, BundleDirectoryName), out resolution)) 263var dcpDir = Path.Combine(bundleRoot, "dcp"); 264var dcpPath = Path.Combine(dcpDir, IsWindows() ? "dcp.exe" : "dcp"); 265var managedDir = Path.Combine(bundleRoot, "managed"); 266var managedPath = Path.Combine(managedDir, IsWindows() ? "aspire-managed.exe" : "aspire-managed"); 272var dashboardDir = Path.Combine(bundleRoot, "dashboard"); 273var dashboardPath = Path.Combine(dashboardDir, IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"); 284dashboardPath = Path.Combine(managedDir, IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"); 292var terminalHostDir = Path.Combine(bundleRoot, "terminalhost"); 293var terminalHostPath = Path.Combine(terminalHostDir, IsWindows() ? "Aspire.TerminalHost.exe" : "Aspire.TerminalHost"); 410var versionsRoot = Path.Combine(layoutPath, VersionsDirectoryName); 506var sidecarPath = Path.Combine(cliDirectory, InstallSidecarFileName); 533? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspire")
ResolveAspireCliInvocation.cs (1)
122var dotnetPath = Path.Combine(dotnetRoot, "dotnet.exe");
Aspire.Hosting.Testing (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
21? Path.Combine("Properties", "launchSettings.json")
Aspire.Hosting.Testing.Tests (6)
TestingBuilderTests.cs (1)
76var appHostAssembly = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, testProjectAssemblyPath));
tests\Aspire.Hosting.TestUtilities\Utils\MSBuildUtils.cs (2)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
72var uniqueFolder = Path.Combine(baseDcpLogFolder, folderName);
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Hosting.Tests (676)
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");
AspireStoreTests.cs (1)
69Assert.Equal(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire"), store.BasePath);
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (4)
1664producerUdsPath: Path.Combine(baseDir, $"{pseudoId}.dcp.sock"), 1665consumerUdsPath: Path.Combine(baseDir, $"{pseudoId}.host.sock"), 1666controlUdsPath: Path.Combine(baseDir, $"{pseudoId}.ctrl.sock"), 1667metadataPath: Path.Combine(baseDir, $"{pseudoId}.metadata.json"));
Backchannel\AuxiliaryBackchannelTests.cs (6)
716var realDirectory = Directory.CreateDirectory(Path.Combine(tempRoot.FullName, "real")); 717var symlinkDirectory = Path.Combine(tempRoot.FullName, "link"); 720var appHostFileViaSymlink = Path.Combine(symlinkDirectory, "apphost.cs"); 750var appHostFile = new FileInfo(Path.Combine(tempRoot.FullName, "AppHost.cs")); 752var differentlyCasedPath = Path.Combine(tempRoot.FullName, "APPHOST.CS"); 782var appHostFile = Path.Combine(tempRoot.FullName, "apphost.cs");
Backchannel\GetTerminalInfoAsyncTests.cs (5)
339var producer = Path.Combine(baseDir, $"{pseudoId}.dcp.sock"); 340var consumer = Path.Combine(baseDir, $"{pseudoId}.host.sock"); 346: Path.Combine(baseDir, $"{pseudoId}.ctrl.sock"); 347var metadata = Path.Combine(baseDir, $"{pseudoId}.metadata.json"); 393var socketPath = Path.Combine(dir, "ctrl.sock");
Cli\ProcessStartTimeHelperTests.cs (2)
114var statDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, pid.ToString(CultureInfo.InvariantCulture))); 118File.WriteAllText(Path.Combine(statDirectory.FullName, "stat"), $"{pid} (proc name) {string.Join(' ', fields)}");
Cli\TestingCollectorTests.cs (16)
66Assert.Equal(Path.Combine(builder.Configuration[KnownConfigNames.TestOutputPath]!, "late"), annotation.OutputPath); 207await File.WriteAllTextAsync(Path.Combine(context.OutputPath, "result.txt"), "artifact", context.CancellationToken); 223Assert.Equal("artifact", await File.ReadAllTextAsync(Path.Combine(context.OutputPath, "result.txt"))); 306await File.WriteAllTextAsync(Path.Combine(first.OutputPath!, "result.txt"), "artifact"); 313Path.Combine(context.OutputPath, "result.txt"), context.CancellationToken)); 421Assert.Equal(Path.Combine(context.TestingContext.OutputPath, "tests"), context.OutputPath); 760Assert.Equal(Path.Combine(first.TestingContext!.OutputPath, "first"), first.OutputPath); 761Assert.Equal(Path.Combine(second.TestingContext!.OutputPath, "second"), second.OutputPath); 785var runPath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-output"); 787var launcher = Path.Combine(workspace.WorkspaceRoot.FullName, "with-umask"); 799Assert.Equal(Path.Combine(runPath, "tests"), annotation.OutputPath); 852var existingPath = Path.Combine(runPath, existingName); 860File.WriteAllText(Path.Combine(existingPath, "artifact.txt"), "existing"); 867Assert.Equal("existing", File.ReadAllText(isFile ? existingPath : Path.Combine(existingPath, "artifact.txt"))); 882Directory.CreateSymbolicLink(Path.Combine(runPath, "tests"), target.FullName); 1042var path = Path.Combine(workspace.WorkspaceRoot.FullName, "test-output");
Cli\TestRunCoordinatorEndToEndTests.cs (1)
52await File.WriteAllTextAsync(Path.Combine(runnerOutput.FullName, "tests.cmd"),
Cli\TestRunStreamingTests.cs (2)
148var path = Path.Combine(workspace.WorkspaceRoot.FullName, "test-output"); 175Assert.Equal(Path.Combine(path, "tests"), annotation.OutputPath);
Dashboard\DashboardEventHandlersTests.cs (17)
445var appHostDirectory = Path.Combine(Path.GetTempPath(), "apphost-project"); 450[dataDirectoryKey] = Path.Combine(".", "dashboard-data") 456Path.Combine(appHostDirectory, "dashboard-data"), 463var absoluteDataDirectory = Path.Combine(Path.GetTempPath(), "shared-dashboard-data"); 467["AppHost:Directory"] = Path.Combine(Path.GetTempPath(), "apphost-project"), 661var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll"); 662var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json"); 750var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard.exe"); 751var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll"); 752var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json"); 819var dashboardExe = Path.Combine(tempDir, "Aspire.Dashboard"); 820var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll"); 821var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json"); 888var dashboardDll = Path.Combine(tempDir, "Aspire.Dashboard.dll"); 889var runtimeConfig = Path.Combine(tempDir, "Aspire.Dashboard.runtimeconfig.json"); 953var dashboardExecutable = Path.Combine(tempDir.FullName, executableName); 982var dashboardDll = Path.Combine(tempDirectory.FullName, "Aspire.Dashboard.dll");
Dashboard\DashboardResourceTests.cs (1)
42var dashboardPath = Path.Combine(dashboardDirectory.FullName, "dashboard");
Dashboard\DashboardServiceDataTerminalTests.cs (4)
194producerUdsPath: Path.Combine(baseDir, $"{pseudoId}.dcp.sock"), 195consumerUdsPath: Path.Combine(baseDir, $"{pseudoId}.host.sock"), 196controlUdsPath: Path.Combine(baseDir, $"{pseudoId}.ctrl.sock"), 197metadataPath: Path.Combine(baseDir, $"{pseudoId}.metadata.json"));
Dashboard\DashboardServiceTests.cs (4)
1611producerUdsPath: Path.Combine(directory.Path, "producer.sock"), 1612consumerUdsPath: Path.Combine(directory.Path, "consumer.sock"), 1613controlUdsPath: Path.Combine(directory.Path, "control.sock"), 1614metadataPath: Path.Combine(directory.Path, "metadata.json"));
Dcp\AppHostLocalStateStoreTests.cs (1)
43Assert.Equal($"*{Environment.NewLine}", File.ReadAllText(Path.Combine(Path.GetDirectoryName(stateFile)!, ".gitignore")));
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\DcpExecutorTests.cs (6)
1777["AppHost:Directory"] = Path.Combine(workspace.WorkspaceRoot.FullName, "apphost-file"), 6174var artifactsPath = Path.Combine(Path.GetTempPath(), "aspire-artifacts"); 6211var artifactsPath = Path.Combine(Path.GetTempPath(), "aspire-artifacts"); 8449? Path.GetFullPath(Path.Combine("test-dotnet-root", OperatingSystem.IsWindows() ? "dotnet.exe" : "dotnet")) 9084var projectPath = Path.Combine("src", "app.cs"); 9130var projectPath = Path.Combine("src", "app.cs");
Dcp\DcpHostNotificationTests.cs (18)
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)); 818var cliPath = Path.Combine(dcpDir.FullName, OperatingSystem.IsWindows() ? "dcp.cmd" : "dcp"); 880var scriptPath = Path.Combine(directory, "dcp.cmd"); 892var shellScriptPath = Path.Combine(directory, "dcp"); 910var scriptPath = Path.Combine(directory, "dcp.cmd"); 916var shellScriptPath = Path.Combine(directory, "dcp"); 942var scriptPath = Path.Combine(directory, "dcp.cmd"); 947var shellScriptPath = Path.Combine(directory, "dcp"); 1159var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test"); 1307var appHostDirectory = Path.Combine(Path.GetTempPath(), "aspire-apphost-test");
Dcp\DcpSocketTests.cs (1)
29var socketPath = Path.Combine(directory, "output.sock");
Dcp\ExecutableLaunchPlanTests.cs (1)
131var projectPath = Path.Combine("tmp", "project.csproj");
Dcp\ProcessCaptureTests.cs (1)
121var missing = Path.Combine(workspace.Path, "missing-executable");
DebugSupportExtensionsTests.cs (2)
378var appPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs"); 394var appPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs");
DistributedApplicationBuilderTests.cs (40)
126Path.Combine(projectDirectory, "appsettings.json"), 142Path.Combine(projectDirectory, "appsettings.PolyglotTest.json"), 155AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts") 172Path.Combine(projectDirectory, "appsettings.json"), 186AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts") 220AppHostFilePath = Path.Combine(projectDirectory, "apphost.mts") 284Assert.Equal(Path.Combine(projectDirectory, "aspire-output"), outputService.GetOutputDirectory()); 307Assert.Equal(Path.Combine(Environment.CurrentDirectory, "aspire-output"), outputService.GetOutputDirectory()); 597var unrelatedFile = Path.Combine(tempDirectory.FullName, "unrelated.json"); 621var secretsFile = Path.Combine(tempDirectory.FullName, "Production.json"); 710var path = Path.Combine(directory.FullName, "state.json"); 763var legacyPath = Path.Combine(directory.FullName, "legacy.json"); 764var aspirePath = Path.Combine(directory.FullName, "Development.json"); 813var secretsFile = Path.Combine(tempDirectory.FullName, "Production.json"); 844var secretsFile = Path.Combine(tempDirectory.FullName, "Production.json"); 1039var appHostPath = Path.Combine(projectDirectory.FullName, "apphost.ts"); 1052AppHostFilePath = Path.Combine(projectDirectory.FullName, "AppHost.ts"), 1088var appHostPath = Path.Combine(realDirectory.FullName, "apphost.ts"); 1091var symlinkDirectory = Path.Combine(projectDirectory.FullName, "link"); 1093var appHostPathViaSymlink = Path.Combine(symlinkDirectory, "apphost.ts"); 1129var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json"); 1141AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"), 1189AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"), 1214AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"), 1224var currentDirectory = Path.Combine(deploymentsDirectory, currentSha); 1225var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha); 1226var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json"); 1227var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json"); 1273AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"), 1283var currentDirectory = Path.Combine(deploymentsDirectory, currentSha); 1284var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha); 1285var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json"); 1286var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json"); 1337AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"), 1347var currentDirectory = Path.Combine(deploymentsDirectory, currentSha); 1348var legacyDirectory = Path.Combine(deploymentsDirectory, legacySha); 1349var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json"); 1350var legacyStatePath = Path.Combine(legacyDirectory, $"{environment}.json"); 1399AppHostFilePath = Path.Combine(projectDirectory.FullName, "apphost.ts"), 1409var currentStatePath = Path.Combine(currentDirectory, $"{environment}.json");
DotnetProgramPublishingTests.cs (9)
143var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"); 322resource.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 328context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"); 380.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "local.csproj"))); 382.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "archive.csproj"))) 386context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archive.tar"); 440var metadata = new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj")); 494var path = Path.Combine(workspace.WorkspaceRoot.FullName, name); 513var path = Path.Combine(workspace.WorkspaceRoot.FullName, name);
ExecutableResourceBuilderExtensionTests.cs (2)
29var expectedPath = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, workingDirectory)); 56var expectedPath = PathNormalizer.NormalizePathForCurrentPlatform(Path.Combine(builder.AppHostDirectory, workingDirectory));
ManifestExpressionTests.cs (1)
727Path.Combine(builder.AppHostDirectory, "manifest.json"), writer, cts.Token);
MSBuildTests.cs (105)
25File.WriteAllText(Path.Combine(directory, "Consumer.cs"), """ 54using var diagnostics = JsonDocument.Parse(File.ReadAllText(Path.Combine(directory, "diagnostics.sarif"))); 75File.WriteAllText(Path.Combine(directory, "Consumer.cs"), """ 114var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost"); 117File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), 146File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"), 171var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost"); 174File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), 202File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"), 213var appHostMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "_AppHost.ProjectMetadata.g.cs")); 214var appMetadata = await File.ReadAllTextAsync(Path.Combine(metadataDirectory, "App.ProjectMetadata.g.cs")); 242File.WriteAllText(Path.Combine(directory, "Consumer.csproj"), $""" 269File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"), 283File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"), 299var libraryDirectory = Path.Combine(basePath, name); 302File.WriteAllText(Path.Combine(libraryDirectory, $"{name}.csproj"), 314File.WriteAllText(Path.Combine(libraryDirectory, "Class1.cs"), 326var appDirectory = Path.Combine(basePath, name); 329File.WriteAllText(Path.Combine(appDirectory, $"{name}.csproj"), 340File.WriteAllText(Path.Combine(appDirectory, "Program.cs"), 457var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost"); 459var artifactsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".artifacts"); 462File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), 520var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "Plain.AppHost.csproj"); 572var layoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "layout"); 596var layoutRoot = Path.Combine(workspace.WorkspaceRoot.FullName, "layout"); 643var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "bin")); 645var bundle = CreateFakeCliBundle(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home")); 667var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"); 668var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli")); 681var bundleRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName); 682var expectedDcpDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "dcp")); 683var expectedDashboardDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName)); 686Assert.Equal(Path.Combine(expectedDashboardDir, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"), resolvedPaths[2]); 687Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName))); 696var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"); 697var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli")); 715Assert.False(Directory.Exists(Path.Combine(aspireHome, BundleDiscovery.BundleDirectoryName))); 716Assert.False(Directory.Exists(Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName))); 725var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"); 726var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli")); 755var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"); 756var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli")); 785var aspireHome = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"); 787var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, literalSegment)); 805var bundleRoot = Path.Combine(workspace.WorkspaceRoot.FullName, BundleDiscovery.BundleDirectoryName); 806Assert.Equal(EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DcpDirectoryName)), resolvedPaths[0]); 807Assert.Equal(EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName)), resolvedPaths[1]); 819var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, literalSegment)); 832["ASPIRE_HOME"] = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"), 847var bundle = CreateFakeCliBundle(Path.Combine(workspace.WorkspaceRoot.FullName, "aspire-home")); 883File.WriteAllText(Path.Combine(nativeCliDirectory.FullName, ".aspire-install.json"), """{"source":"dotnet-tool"}"""); 907var repoDcpDir = EnsureTrailingSeparator(Path.Combine(workspace.WorkspaceRoot.FullName, "repo-dcp")); 908var repoDashboardDir = EnsureTrailingSeparator(Path.Combine(workspace.WorkspaceRoot.FullName, "repo-dashboard")); 926Assert.Contains(Path.Combine(repoDashboardDir, "Aspire.Dashboard"), resolvedPaths[2]); 935var missingBundlePath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing-bundle"); 973var fakeCliDirectory = Directory.CreateDirectory(Path.Combine(workspace.WorkspaceRoot.FullName, "fake-cli")); 974var dnxPath = Path.Combine(fakeCliDirectory.FullName, OperatingSystem.IsWindows() ? "dnx.exe" : "dnx"); 979File.Copy(Path.Combine(Environment.SystemDirectory, "where.exe"), dnxPath); 991["ASPIRE_HOME"] = Path.Combine(workspace.WorkspaceRoot.FullName, "empty-aspire-home"), 1010var missingCliPath = Path.Combine(workspace.WorkspaceRoot.FullName, "missing-aspire"); 1032var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost"); 1034File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.fsproj"), 1092var appHostDirectory = Path.Combine(basePath, "AppHost"); 1095File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), 1133File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"), 1150File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"), 1160File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"), 1175return CreateFakeCliBundleAtLayoutRoot(Path.Combine(basePath, "layout")); 1180return CreateFakeCliBundleRoot(layoutRoot, Path.Combine(layoutRoot, "bundle")); 1190var dcpDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "dcp")); 1191var managedDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, "managed")); 1192var dashboardDir = EnsureTrailingSeparator(Path.Combine(bundleRoot, BundleDiscovery.DashboardDirectoryName)); 1197File.WriteAllText(Path.Combine(dcpDir, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), ""); 1198var managedPath = Path.Combine(managedDir, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed"); 1200var dashboardPath = Path.Combine(dashboardDir, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"); 1208var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.exe" : "aspire"); 1215var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1253var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1279var cliPath = Path.Combine(directory, OperatingSystem.IsWindows() ? "aspire.cmd" : "aspire"); 1334return executableNames.Any(executableName => File.Exists(Path.Combine(directory.Trim().Trim('"'), executableName))); 1349var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost"); 1352File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), 1381File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"), 1408var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost"); 1411File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), 1440File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.cs"), 1461var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension"); 1464File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"), 1481File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"), 1510var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension"); 1513File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"), 1530File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"), 1559var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages"); 1586var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages"); 1632var packageOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "packages"); 1642var projectDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "MyHostingExtension"); 1644var nuGetConfigPath = Path.Combine(projectDirectory, "NuGet.config"); 1688File.WriteAllText(Path.Combine(projectDirectory, "MyHostingExtension.csproj"), 1711File.WriteAllText(Path.Combine(projectDirectory, "Extensions.cs"), 1738File.WriteAllText(Path.Combine(basePath, "Directory.Build.props"), 1750File.WriteAllText(Path.Combine(basePath, "Directory.Build.targets"), 1775var appHostDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost"); 1778File.WriteAllText(Path.Combine(appHostDirectory, "AppHost.csproj"), 1806File.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");
Pipelines\PipelineOutputComparisonTests.cs (12)
22var added = Path.Combine(root, "added.txt"); 23var changed = Path.Combine(root, "changed.txt"); 24var removed = Path.Combine(root, "removed.txt"); 25var unchanged = Path.Combine(root, "unchanged.txt"); 60var path = Path.Combine(root, "artifact.txt"); 88var path = Path.Combine(root, "artifact.txt"); 113var root = rootExists ? parent : Path.Combine(parent, "missing"); 116File.WriteAllText(Path.Combine(root, "artifact.txt"), "content"); 141var path = Path.Combine(root, "artifact.txt"); 163var root = Directory.CreateDirectory(Path.Combine(parent, "nested")).FullName; 164var path = Path.Combine(root, "artifact.txt"); 181Assert.Equal(Path.Combine("nested", "artifact.txt"), reverse.Path);
Pipelines\PipelineOutputDiffingTests.cs (45)
92var artifact = Path.Combine(generated, "deployment.yaml"); 136Assert.Equal("Pipeline output changed:" + Environment.NewLine + " Changed: " + Path.Combine("generated", "deployment.yaml"), failure.Message); 166var artifact = Path.Combine(workspace.Path, "artifact.bin"); 167var control = Path.Combine(workspace.Path, "control.bin"); 222var artifact = Path.Combine(workspace.Path, "early.txt"); 250var artifact = Path.Combine(workspace.Path, "factory.txt"); 328var artifact = Path.Combine(workspace.Path, "late.txt"); 372var artifact = Path.Combine(workspace.Path, "ordinary.txt"); 388var artifact = Path.Combine(workspace.Path, "tracked.tmp"); 389await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "**/bin/\n**/obj/\n*.tmp\n", TestContext.Current.CancellationToken); 405await File.WriteAllTextAsync(Path.Combine(binaryDirectory.FullName, "Api.dll"), "build output", TestContext.Current.CancellationToken); 406await File.WriteAllTextAsync(Path.Combine(objectDirectory.FullName, "project.assets.json"), "{}", TestContext.Current.CancellationToken); 413Assert.False(Directory.Exists(Path.Combine(workspace.Path, "src"))); 437var source = Path.Combine(sourceDirectory, "Program.cs"); 438var artifact = Path.Combine(workspace.CreateDirectory("generated").FullName, "deployment.yaml"); 443await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "**/bin/\n**/obj/\n", TestContext.Current.CancellationToken); 454Assert.False(Directory.Exists(Path.Combine(sourceDirectory, "bin"))); 455Assert.False(Directory.Exists(Path.Combine(sourceDirectory, "obj"))); 476Assert.False(Directory.Exists(Path.Combine(sourceDirectory, "bin"))); 477Assert.False(Directory.Exists(Path.Combine(sourceDirectory, "obj"))); 490var source = Path.Combine(workspace.CreateDirectory("src").FullName, "Program.cs"); 492var artifact = Path.Combine(generated, "deployment.yaml"); 493var temporary = Path.Combine(generated, "cache.tmp"); 566var artifact = Path.Combine(workspace.CreateDirectory("generated").FullName, "deployment.yaml"); 568await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "generated/\n", TestContext.Current.CancellationToken); 604var artifact = Path.Combine(workspace.CreateDirectory("generated").FullName, "deployment.yaml"); 608await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitattributes"), "*.yaml text eol=lf\n", TestContext.Current.CancellationToken); 609await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "generated/\n", TestContext.Current.CancellationToken); 643var artifact = Path.Combine(workspace.Path, "stable.txt"); 658Assert.False(Directory.Exists(Path.Combine(workspace.Path, ".git"))); 673var artifact = Path.Combine(external, "artifact.txt"); 696var changed = Path.Combine(workspace.Path, "changed.txt"); 697var removed = Path.Combine(workspace.Path, "removed.txt"); 698var added = Path.Combine(workspace.Path, "added.txt"); 733var artifact = Path.Combine(workspace.Path, "unchanged.txt"); 774var artifact = Path.Combine(workspace.Path, "stable.txt"); 836var artifact = Path.Combine(workspace.Path, "result.txt"); 867var artifact = Path.Combine(workspace.Path, "custom.txt"); 891var artifact = Path.Combine(workspace.Path, "cancelled.txt"); 918var included = Path.Combine(workspace.Path, "included.txt"); 919var excluded = Path.Combine(workspace.Path, "excluded.tmp"); 967var artifact = Path.Combine(workspace.Path, "tracked.txt"); 968var added = Path.Combine(workspace.Path, "untracked.txt"); 969var excluded = Path.Combine(workspace.Path, "excluded.tmp"); 1005var artifact = Path.Combine(workspace.Path, "stable.txt");
Pipelines\PipelineOutputGitFingerprintTests.cs (29)
33File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt " + attributes + "\n"); 35var path = Path.Combine(root, "model.txt"); 73File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "output*/**/*.txt filter=stripspace -text\n"); 77var path = Path.Combine(root, "model café name.txt"); 149var path = Path.Combine(root, "model.txt"); 204File.WriteAllText(Path.Combine(root, "model.txt"), "same content\n"); 235File.WriteAllText(Path.Combine(first, "model.txt"), "same content\n"); 236File.WriteAllText(Path.Combine(second, "model.txt"), "same content\n"); 237var link = Path.Combine(root, "link"); 295var target = Path.Combine(workspace.Path, "target.txt"); 297var link = Path.Combine(root, "link"); 301File.WriteAllText(Path.Combine(target, "content.txt"), "target content must not be hashed"); 329var contentPath = directoryLink ? Path.Combine(target, "content.txt") : target; 333var other = directoryLink ? workspace.CreateDirectory("other-target").FullName : Path.Combine(workspace.Path, "other-target.txt"); 334File.WriteAllText(directoryLink ? Path.Combine(other, "content.txt") : other, File.ReadAllText(contentPath)); 335Assert.Equal(File.ReadAllText(contentPath), File.ReadAllText(directoryLink ? Path.Combine(other, "content.txt") : other)); 364var path = Path.Combine(root, "model.txt"); 394var path = Path.Combine(root, "model.txt"); 401File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=reject\n"); 428File.WriteAllText(Path.Combine(root, $"model {i:D2} ü.txt"), $"content {i}\n"); 430var clean = Path.Combine(root, "clean.keep"); 435var log = Path.Combine(workspace.Path, "filter-pids"); 436File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=record\n*.keep filter=reject\n"); 473var path = Path.Combine(root, "model.txt"); 529var target = Path.Combine(workspace.Path, "target.txt"); 531var path = Path.Combine(root, "model.txt"); 575var path = Path.Combine(root, "model.txt"); 597File.WriteAllText(Path.Combine(root, "model.txt"), "untracked content\n"); 601File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=reject\n");
Pipelines\PipelineOutputGitTestHelper.cs (1)
34process.StartInfo.Environment["GIT_DIR"] = Path.Combine(directory, ".git");
Pipelines\PipelineOutputResolutionTests.cs (5)
24var artifact = Path.Combine(workspace.Path, "artifact.txt"); 113var artifact = Path.Combine(root, "artifact.txt"); 119var administration = Path.Combine(workspace.Path, ".git"); 130Directory.Move(administration, Path.Combine(workspace.Path, "saved-git")); 245await File.ReadAllTextAsync(Path.Combine(outputDirectory, "artifact.txt"), ct));
Pipelines\PipelineOutputSelectionTests.cs (24)
28await File.WriteAllTextAsync(Path.Combine(root, ".gitignore"), "src/Ev2OutputRoot/**\n", TestContext.Current.CancellationToken); 62await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 198var link = Path.Combine(root, "ignored"); 210Assert.Equal(File.ReadAllText(fileLink ? first : Path.Combine(first, "model.json")), 211File.ReadAllText(fileLink ? second : Path.Combine(second, "model.json"))); 276await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 307await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 367await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/**\n", TestContext.Current.CancellationToken); 377Assert.True(File.Exists(Path.Combine(root, "ignored.bin"))); 399Directory.Move(Path.Combine(workspace.Path, ".git"), Path.Combine(workspace.Path, "saved-git")); 400Assert.False(Directory.Exists(Path.Combine(workspace.Path, ".git"))); 527var link = Path.Combine(root, "link"); 537var expected = pattern == "**/*" ? new[] { Path.Combine(root, "artifact.txt"), link } : 568var expected = new List<string> { Path.Combine(root, ".gitignore") }; 632var git = Assert.IsType<GitPipelineOutputReader>(await GitPipelineOutputReader.TryCreateAsync(Path.Combine(root, "nested"), new DefaultProcessRunner(), TestContext.Current.CancellationToken)); 647var link = Path.Combine(root, "link"); 706await File.WriteAllTextAsync(Path.Combine(workspace.Path, ".gitignore"), "output/*.tmp\noutput/ignored/\n", TestContext.Current.CancellationToken); 718Assert.NotEmpty(Directory.GetFiles(Path.Combine(workspace.Path, ".git"), "sharedindex.*")); 733Assert.False(Directory.Exists(Path.Combine(workspace.Path, "excluded"))); 802var added = Path.Combine(cache, "new.tmp"); 841File.WriteAllText(Path.Combine(nested, ".git"), "not a repository"); 883Assert.False(File.Exists(Path.Combine(nested, ".git"))); 914var path = Path.Combine(root, relative.Replace('/', Path.DirectorySeparatorChar));
Pipelines\PipelineOutputSnapshotterTests.cs (22)
22var added = Path.Combine(root, "added.txt"); 48var path = Path.Combine(root, "large.bin"); 73var nested = Directory.CreateDirectory(Path.Combine(root, "nested")).FullName; 79File.WriteAllBytes(Path.Combine(index % 2 == 0 ? root : nested, $"{index:D2}.bin"), bytes); 222var missing = Path.Combine(root, "missing.txt"); 239var missing = Path.Combine(root, "missing"); 257var lower = Path.Combine(parent, "output"); 258var upper = Path.Combine(parent, "OUTPUT"); 469var target = Directory.CreateDirectory(Path.Combine(parent, "target")).FullName; 470var root = Directory.CreateDirectory(Path.Combine(parent, "output")).FullName; 471var link = Path.Combine(root, "link"); 499var root = Directory.CreateDirectory(Path.Combine(parent, "output")).FullName; 500var target = Path.Combine(parent, "target.txt"); 505var link = Path.Combine(root, "link"); 533var path = Path.Combine(root, "artifact.txt"); 560var directoryLink = Path.Combine(root, "directory-link"); 563var fileLink = Path.Combine(root, "file-link"); 564var missingTarget = Path.Combine(workspace.Path, "missing.txt"); 612var target = Path.Combine(root, "missing-target.txt"); 613var link = Path.Combine(root, "link"); 643var path = Path.Combine(directory, relativePath.Replace('/', Path.DirectorySeparatorChar)); 683var path = Path.GetFullPath(Path.Combine(directory, relativePath));
Pipelines\PipelineOutputStrategyTests.cs (23)
23var path = Path.Combine(workspace.Path, "artifact.txt"); 41var artifact = Path.Combine(workspace.Path, "artifact.txt"); 43var metadata = Path.Combine(workspace.Path, metadataPath.Replace('/', Path.DirectorySeparatorChar)); 92var path = Path.Combine(workspace.Path, "artifact.txt"); 112var missing = Path.Combine(workspace.Path, "missing"); 129var directory = Path.Combine(workspace.Path, "missing"); 138var path = Path.Combine(directory, "artifact.txt"); 191var path = Path.Combine(workspace.Path, "bad" + delimiter + "name.txt"); 208var target = directoryLink ? workspace.CreateDirectory("target").FullName : Path.Combine(workspace.Path, "target.txt"); 213var path = Path.Combine(root, "link"); 267var path = Path.Combine(workspace.Path, gitPath.Replace('/', Path.DirectorySeparatorChar)); 289var path = Path.Combine(directory, "artifact.txt"); 455var fileHashes = await git.HashFilesAsync([new FileInfo(Path.Combine(workspace.Path, "artifact.txt"))], TestContext.Current.CancellationToken); 491await git.HashFilesAsync([new FileInfo(Path.Combine(workspace.Path, "artifact.txt"))], TestContext.Current.CancellationToken); 540var first = Path.Combine(workspace.Path, "first.txt"); 541var second = Path.Combine(workspace.Path, "second.txt"); 574var path = Path.Combine(child, "model.txt"); 577File.WriteAllText(Path.Combine(workspace.Path, ".gitignore"), "output/ignored-child*\n"); 580var external = Path.Combine(target, "model.txt"); 609Assert.Equal(Path.Combine("ignored-child", "model.txt"), change.Path); 632var path = Path.Combine(root, "model.txt"); 634File.WriteAllText(Path.Combine(root, "clean.txt"), "clean\n"); 638File.WriteAllText(Path.Combine(workspace.Path, ".gitattributes"), "*.txt filter=reject\n");
ProjectRebuilderResourceTests.cs (1)
98var artifactsPath = Path.Combine(Path.GetTempPath(), "aspire-artifacts");
ProjectResourceTests.cs (7)
64var projectFilePath = Path.Combine(projectDirectoryPath, "Project.csproj"); 65var propertiesDirectoryPath = Path.Combine(projectDirectoryPath, "Properties"); 66var launchSettingsFilePath = Path.Combine(propertiesDirectoryPath, "launchSettings.json"); 104var projectFilePath = Path.Combine(projectDirectoryPath, "Project.csproj"); 105var propertiesDirectoryPath = Path.Combine(projectDirectoryPath, "Properties"); 106var launchSettingsFilePath = Path.Combine(propertiesDirectoryPath, "launchSettings.json"); 1123Path.Combine(builder.AppHostDirectory, "app.cs"),
PublishAsDockerfileTests.cs (7)
218var projectPath = Path.Combine(path, "project.csproj"); 275var projectPath = Path.Combine(path, "project.csproj"); 294var projectPath = Path.Combine(path, "project.csproj"); 316var projectPath = Path.Combine(path, "project.csproj"); 341var projectPath = Path.Combine(path, "project.csproj"); 419var projectPath = Path.Combine(path, "project.csproj"); 439var projectPath = Path.Combine(path, "project.csproj");
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\ContainerRuntimeBaseTests.cs (2)
30await runtime.BuildImageAsync(rootPath, Path.Combine(rootPath, "Dockerfile"), 44var dockerfile = Path.Combine(contextPath, "Dockerfile");
Publishing\DeploymentStateManagerTests.cs (1)
1203var legacyPath = Path.Combine(legacyDirectory, "production.json");
Publishing\DotnetProgramArchiveTests.cs (16)
44var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"); 80var firstArchive = Path.Combine(firstWorkspace.WorkspaceRoot.FullName, "program.tar"); 81var secondArchive = Path.Combine(secondWorkspace.WorkspaceRoot.FullName, "program.tar"); 139var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar")); 185var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar")); 223var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz"); 265var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"); 288var blockedDirectory = Path.Combine(workspace.WorkspaceRoot.FullName, "output"); 293Path.Combine(blockedDirectory, "program.tar.gz")); 321var resource = AddArchiveResource(builder, workspace.WorkspaceRoot.FullName, Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar")); 416var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, path); 480var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archives"); 487var archivePath = Path.Combine(outputPath, FlattenedArchiveName); 501var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, path); 515? Path.Combine(outputPath, FlattenedArchiveName) 559return 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 (31)
60var appPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs"); 66var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar.gz"); 95var appPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs"); 109var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar"); 395var tempOutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "NewFolder"); // tests that the folder is created if it doesn't exist 784.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 815.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 848.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 895.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 905context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"); 933var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"); 946context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar"); 987var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz"); 989var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"); 1077var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "program.tar.gz"); 1080.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 1128.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs"))) 1133context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar"); 1169var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj"); 1175context.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.tar"); 1209var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj"); 1270var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, fileBased ? "app.cs" : "app.csproj"); 1336Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Build.props"), 1344var probePath = Path.Combine(workspace.WorkspaceRoot.FullName, "properties.proj"); 1398var projectPath = Path.Combine(workspace.WorkspaceRoot.FullName, "app.csproj"); 1399var outputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archive;100%.tar"); 1425var probePath = Path.Combine(workspace.WorkspaceRoot.FullName, "properties.proj"); 1694var tempSecretFile = System.IO.Path.Combine(workspace.WorkspaceRoot.FullName, ".npmrc"); 2091ctx.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archives"); 2219ctx.OutputPath = Path.Combine(workspace.WorkspaceRoot.FullName, "archives"); 2290var dockerfilePath = Path.Combine(workspace.WorkspaceRoot.FullName, "Dockerfile");
PythonAppDeployPipelineTests.cs (2)
21File.WriteAllText(Path.Combine(appDirectory, "main.py"), "print('Hello from Python!')"); 22File.WriteAllText(Path.Combine(appDirectory, "Dockerfile"), "FROM scratch\nENTRYPOINT [\"python\", \"main.py\"]\n");
ResourceCommandServiceTests.cs (4)
1766var buildCountPath = Path.Combine(workspace.WorkspaceRoot.FullName, "build-count.txt"); 1798var keepAlivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "keep-alive.txt"); 1891var projectPath = Path.Combine(directoryPath, "BuildOutputProject.csproj"); 1892var programPath = Path.Combine(directoryPath, "Program.cs");
ResourceFailureLoggingTests.cs (1)
79var relativeWorkingDirectory = Path.Combine("missing-working-directories", Guid.NewGuid().ToString("N"));
Schema\SchemaTests.cs (9)
81var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName()); 83var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile"); 93var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName()); 95var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile"); 111var tempContextPath = Path.Combine(tempPath, Path.GetRandomFileName()); 113var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile"); 144var tempDockerfilePath = Path.Combine(tempContextPath, "Dockerfile"); 240var relativePath = Path.Combine("Schema", "aspire-8.0.json"); 253var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, outputPath: Path.Combine(manifestDir, "not-used.json"), step: "publish-json-manifest");
TerminalHostPathsTests.cs (3)
38Assert.Equal(Path.Combine(trmnlDirectory, $"{id}.{TerminalHostPaths.ControlSockPurpose}.sock"), control); 48Assert.Equal(Path.Combine(trmnlDirectory, $"{id}.{TerminalHostPaths.MetadataSuffix}"), metadata); 59Path.Combine(trmnlDirectory, $"{id}.{TerminalHostPaths.MetadataTemporarySuffix}"),
Terminals\Hex1bAspireTerminalTests.cs (1)
244await File.WriteAllTextAsync(Path.Combine(directory.Path, "working-directory-marker"), string.Empty);
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));
Terminals\ResourceAspireTerminalTests.cs (3)
69var missingSocket = Path.Combine(_socketDirectory, "not-listening.sock"); 81var terminal = new ResourceAspireTerminal("resource:test:0", "test", Path.Combine(_socketDirectory, "unused.sock"), NullLogger.Instance).Handle; 149=> Path.Combine(_socketDirectory, $"{Guid.NewGuid().ToString("N")[..8]}.sock");
Terminals\TerminalKeyInputTests.cs (1)
38? await TestResourceTerminalHost.StartAsync(Path.Combine(_socketDirectory, "keys.sock"), workload)
Terminals\TerminalServiceTests.cs (1)
294options.WorkingDirectory = Path.Combine(secondDirectory, "must-not-be-used");
tests\Shared\TestFileSystemService.cs (1)
34var filePath = System.IO.Path.Combine(tempDir.FullName, resolvedName);
tests\Shared\TestInteractionFileUploadStore.cs (1)
33var filePath = Path.Combine("memory", fileId);
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Utils\DotnetSdkVersionProviderTests.cs (6)
287File.WriteAllText(Path.Combine(workspace.Path, "global.json"), "{}"); 309var firstDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "First")).FullName; 310var secondDirectory = Directory.CreateDirectory(Path.Combine(workspace.Path, "Second")).FullName; 311File.WriteAllText(Path.Combine(firstDirectory, "global.json"), "{}"); 312File.WriteAllText(Path.Combine(secondDirectory, "global.json"), "{}"); 334var globalJsonPath = Path.Combine(workspace.Path, "global.json");
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);
WithBindMountTests.cs (1)
50.WithBindMount(Path.Combine(source, "."), "/mnt/data")
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"); 1470var directory = Path.Combine(_terminalRoot, "custom");
WithVolumeTests.cs (2)
103var markerPath = Path.Combine(sessionPath, "marker.txt"); 109Assert.Equal("persisted", await File.ReadAllTextAsync(Path.Combine(persistentPath, "marker.txt")));
Aspire.Hosting.TestUtilities (11)
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
72var uniqueFolder = Path.Combine(baseDcpLogFolder, folderName);
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
Utils\DockerfileUtils.cs (1)
45var tempDockerfilePath = Path.Combine(tempContextPath, dockerfileName);
Utils\DotnetFileAppProcess.cs (1)
17var appPath = Path.Combine(directoryPath, fileName);
Utils\ManifestUtils.cs (3)
34var context = new ManifestPublishingContext(executionContext, Path.Combine(manifestDirectory, "manifest.json"), writer); 56var context = new ManifestPublishingContext(executionContext, Path.Combine(manifestDirectory, "manifest.json"), writer); 75var context = new ManifestPublishingContext(executionContext, Path.Combine(Environment.CurrentDirectory, "manifest.json"), writer);
Utils\MSBuildUtils.cs (2)
13while (directory != null && !Directory.Exists(Path.Combine(directory, ".git")) && !File.Exists(Path.Combine(directory, ".git")))
Aspire.Hosting.Valkey.Tests (2)
AddValkeyTests.cs (1)
237Assert.Equal(Path.Combine(builder.AppHostDirectory, "myValkeydata"), volumeAnnotation.Source);
ValkeyFunctionalTests.cs (1)
87bindMountPath = Path.Combine(Directory.CreateTempSubdirectory().FullName, "data");
Aspire.Hosting.Yarp.Tests (2)
tests\Shared\TestModuleInitializer.cs (1)
27directory: Path.Combine(
YarpConfigGeneratorTests.cs (1)
292var composeFile = Path.Combine(workspace.Path, "docker-compose.yaml");
Aspire.Managed.Tests (35)
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 (17)
27var socketDirectory = new DirectoryInfo(Path.Combine(root.FullName, "terminals")); 28var producerPath = Path.Combine(socketDirectory.FullName, "p.sock"); 29var consumerPath = Path.Combine(socketDirectory.FullName, "h.sock"); 30var controlPath = Path.Combine(socketDirectory.FullName, "c.sock"); 111var controlPath = Path.Combine(root.FullName, "c.sock"); 254var socketDirectory = new DirectoryInfo(Path.Combine(root.FullName, "terminals")); 255var parentProducerPath = Path.Combine(socketDirectory.FullName, "pp.sock"); 256var parentConsumerPath = Path.Combine(socketDirectory.FullName, "ph.sock"); 257var parentControlPath = Path.Combine(socketDirectory.FullName, "pc.sock"); 259var producerPath = Path.Combine(socketDirectory.FullName, "p.sock"); 260var consumerPath = Path.Combine(socketDirectory.FullName, "h.sock"); 261var controlPath = Path.Combine(socketDirectory.FullName, "c.sock"); 368var managed = Directory.CreateDirectory(Path.Combine(root, "managed")); 369var terminal = Directory.CreateDirectory(Path.Combine(root, "terminalhost")); 375var target = Path.Combine(directory, Path.GetRelativePath(output, file)); 383var managedAssembly = Path.Combine(managed.FullName, "aspire-managed.dll"); 390startInfo.ArgumentList.Add(Path.Combine(output, Path.GetFileName(hostAssemblyPath)));
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
Aspire.Playground.Tests (3)
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
Aspire.Templates.Tests (49)
AppHostTemplateTests.cs (1)
27var projectPath = Path.Combine(project.RootDir, $"{projectId}.csproj");
BuildAndRunTemplateTests.cs (1)
110var cpmFilePath = Path.Combine(project.RootDir, "Directory.Packages.props");
LocalhostTldHostnameTests.cs (1)
70"aspire-apphost-singlefile" => Path.Combine(project.RootDir, "apphost.run.json"),
NewUpAndBuildStandaloneTemplateTests.cs (1)
110var webProjectDirectory = Path.Combine(project.RootDir, $"{project.Id}.Web");
NewUpAndBuildSupportProjectTemplatesTests.cs (2)
15var topLevelDir = Path.Combine(BuildEnvironment.TestRootPath, id + "_root"); 42project.AppHostProjectDirectory = Path.Combine(topLevelDir, id + ".AppHost");
StarterTemplateRunTestsBase.cs (1)
120string screenshotPath = Path.Combine(logPath, "webfrontend-fail.png");
TemplateTestsBase.cs (6)
71var testProjectDir = Path.Combine(rootDirToUse, testProjectName); 74var testProjectPath = Path.Combine(testProjectDir, testProjectName + ".csproj"); 111var testCsPath = Path.Combine(projectDir, "IntegrationTest1.cs"); 166string screenshotPath = Path.Combine(logPath, $"dashboard-fail-{Guid.NewGuid().ToString()[..8]}.png"); 201var solution = XDocument.Load(Path.Combine(project.RootDir, solutionFileName)); 240Assert.All(projectPaths, projectPath => Assert.True(File.Exists(Path.Combine(project.RootDir, projectPath)), $"Solution references missing project '{projectPath}'."));
tests\Shared\Playwright\TestUtils.cs (2)
14if (Directory.Exists(Path.Combine(repoRoot.FullName, ".git")) || File.Exists(Path.Combine(repoRoot.FullName, ".git")))
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"); 336workingDirectory ??= Path.Combine(RootDir, $"{Id}.AppHost"); 340var res = await restoreCmd.ExecuteAsync($"restore \"-bl:{Path.Combine(LogPath!, $"{Id}-restore.binlog")}\" /p:TreatWarningsAsErrors=true"); 343var 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");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (4)
29? Path.Combine(Path.GetTempPath(), $"templates-${s_tmpDirSuffix}") 30: Path.Combine(AppContext.BaseDirectory, "templates"); 31_customHiveDirectory = Path.Combine(customHiveBaseDirectory, customHiveDirName); 32_stampFilePath = Path.Combine(_customHiveDirectory, ".stamp-installed");
Aspire.TerminalHost (12)
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\BundleVersionLease.cs (2)
104var leasesDirectory = Path.Combine(fullVersionDirectory, LeasesDirectoryName); 172var leasesDirectory = Path.Combine(versionDirectory, LeasesDirectoryName);
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
src\Shared\TerminalHost\TerminalHostPaths.cs (2)
112return Path.Combine(trmnlDirectory, $"{replicaId}.{sockPurpose}.sock"); 123return Path.Combine(trmnlDirectory, $"{replicaId}.{MetadataSuffix}");
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));
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
Aspire.TestTools (3)
GitHubCli.cs (2)
218var fixturePath = Path.Combine(fixtureDirectory, $"{name}{extension}"); 381fixturePath = Path.Combine(fixtureDirectory, $"{fileName}{extension}");
ProcessRunner.cs (1)
24fileName = searchPath.Split(Path.PathSeparator).Select(path => Path.Combine(path, searchName))
Aspire.TestUtilities (1)
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
Aspire.Tray.Tests (134)
AppHostPresentationTests.cs (5)
16Assert.Equal($"{Path.Combine("worktree-a", "apphost")} \u00b7 PID 42", AppHostPresentation.GetSubtitle(host)); 17Assert.Equal($"apphost - {Path.Combine("worktree-a", "apphost")} (PID 42)", AppHostPresentation.GetLabel(host)); 45Assert.Equal($"{Path.Combine("worktree-a", "Shop.AppHost")} \u00b7 PID 42", AppHostPresentation.GetSubtitle(first)); 46Assert.Equal($"{Path.Combine("worktree-b", "Shop.AppHost")} \u00b7 PID 43", AppHostPresentation.GetSubtitle(second)); 93var location = Path.Combine("worktree branch", "apphost");
Helpers\FixtureCli.cs (1)
21Path = System.IO.Path.Combine(_directory.FullName, "aspire");
Helpers\TestMacTrayLogDirectory.cs (1)
20var directory = new DirectoryInfo(Path.Combine(Root, component));
Helpers\TestTrayBundle.cs (2)
16Root = Path.Combine(_directory.FullName, "layout with spaces"); 17CliPath = Path.Combine(_directory.FullName, "aspire cli");
Helpers\TestTrayStartupInstallation.cs (3)
16public string MacCli => Path.Combine(Root, "aspire mac"); 17public string WindowsCli => Path.Combine(Root, "aspire.exe"); 24Root = Path.Combine(_directory.FullName, "i & s");
Helpers\TestTrayStateDirectory.cs (3)
11public string UserProfilePath => Path.Combine(_directory.FullName, "user"); 12public string LegacyDirectory => Path.Combine(_directory.FullName, "legacy"); 19var path = Path.GetFullPath(Path.Combine(_directory.FullName, relativePath));
LinuxFolderApplicationTests.cs (2)
65Assert.Throws<DirectoryNotFoundException>(() => application.CreateStartInfo(Path.Combine(folder, "missing"))); 106Assert.Equal([folder, "--working-directory", folder], File.ReadAllLines(Path.Combine(folder, "arguments.txt")));
LinuxTrayTests.cs (15)
487var location = Path.Combine("worktree-a", "Shop.AppHost"); 651var cli = Path.Combine(installation.Root, "aspire-tray"); 652var directory = Path.Combine(installation.Root, "autostart"); 660var registration = Path.Combine(directory, LinuxTrayStartupSettings.FileName); 672var cli = Path.Combine(installation.Root, "aspire-tray"); 673var directory = Path.Combine(installation.Root, "autostart"); 694File.WriteAllText(Path.Combine(installation.Root, "aspire-tray.runtimeconfig.json"), "{}"); 703var directory = Path.Combine(installation.Root, "runtime"); 709Assert.Equal(UnixFileMode.UserRead | UnixFileMode.UserWrite, File.GetUnixFileMode(Path.Combine(directory, "instance.lock"))); 711Assert.True(File.Exists(Path.Combine(directory, "instance.lock"))); 716var lockPath = Path.Combine(directory, "instance.lock"); 752var home = Path.Combine(installation.Root, "home"); 753var alias = Path.Combine(installation.Root, "alias"); 762var linkedRuntime = Path.Combine(installation.Root, "linked-runtime"); 775LinuxTrayTestPayload.Create(Path.Combine(installation.BundleRoot, "tray"), "linux-x64");
MacSingleInstanceTests.cs (2)
19Assert.Equal(Path.Combine(directory, "control-v1.sock"), SingleInstance.ActivationPipeName); 33var directory = Path.Combine(parent.FullName, "state");
MacTrayLauncherTests.cs (9)
52var targetDirectory = Directory.CreateDirectory(Path.Combine(directory.Root, "target")).FullName; 53var target = Path.Combine(targetDirectory, "tray.log"); 75var target = Path.Combine(directory.Root, "target"); 103var leasePath = Path.Combine(directory.Root, "parent.lease"); 138var targetDirectory = Directory.CreateDirectory(Path.Combine(directory.Root, "target")).FullName; 139var target = Path.Combine(targetDirectory, "tray.log"); 145var moved = Path.Combine(directory.Root, "retained"); 147retained = Path.Combine(moved, "tray.log"); 152retained = Path.Combine(directory.Root, "retained.log");
MacTrayPayloadTests.cs (3)
33File.Copy(Path.Combine(AppContext.BaseDirectory, "verify-tray-payload.sh"), script); 51var source = Path.Combine(workspace.FullName, "main.c"); 67var archive = Path.Combine(workspace.FullName, "payload.tar.gz");
MacTrayStartupSettingsTests.cs (7)
39var path = Path.Combine(installation.LaunchAgents, MacTrayStartupSettings.FileName); 68var path = Path.Combine(installation.LaunchAgents, MacTrayStartupSettings.FileName); 84var path = Path.Combine(installation.LaunchAgents, MacTrayStartupSettings.FileName); 85var changed = MacTrayStartupSettings.Serialize(Path.Combine(installation.Root, "another-cli")); 105File.GetUnixFileMode(Path.Combine(installation.LaunchAgents, MacTrayStartupSettings.FileName))); 113var outside = Path.Combine(installation.Root, "unrelated.plist"); 115File.CreateSymbolicLink(Path.Combine(installation.LaunchAgents, MacTrayStartupSettings.FileName), outside);
src\Aspire.Tray\Common\AppHostPresentation.cs (1)
47return ToSingleLine(parent is null ? directory : Path.Combine(Path.GetFileName(parent), Path.GetFileName(directory)));
src\Aspire.Tray\Common\FileTraySavedStateStore.cs (2)
37Path.Combine(TrayAppHostPath.Normalize(legacyDirectory), "apphosts.json")); 103var temporaryPath = Path.Combine(_directory, $".history-{Guid.NewGuid():N}.tmp");
src\Aspire.Tray\Common\MacTrayStartupSettings.cs (1)
13: RegisteredTrayStartupSettings(new FileTrayStartupRegistrationStore(Path.Combine(launchAgentsDirectory, FileName)))
src\Aspire.Tray\Common\TrayConfiguration.cs (3)
21=> Path.Combine(GetAspireHome(cliPath, configuredAspireHome, userProfileDirectory), "aspire.config.json"); 37? Path.Combine(userProfileDirectory, ".aspire") : configuredAspireHome); 140using var stream = File.OpenRead(Path.Combine(directory, ".aspire-install.json"));
src\Aspire.Tray\Common\TrayStartupBootstrap.cs (1)
50var temporary = Path.Combine(directory, $".aspire-login-{Guid.NewGuid():N}.tmp");
src\Aspire.Tray\Common\TrayStartupEntry.cs (1)
115current = Path.Combine(current, component);
src\Aspire.Tray\Common\TrayStartupRegistration.cs (1)
157var temporary = Path.Combine(directory, $".aspire-startup-{Guid.NewGuid():N}.tmp");
src\Aspire.Tray\Linux\LinuxFolderApplication.cs (1)
19var executable = directories.Select(directory => Path.Combine(directory, command))
src\Aspire.Tray\Linux\LinuxPlasmaAnchor.cs (2)
106home = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config"); 117using var reader = File.OpenText(Path.Combine(directory, "kdeglobals"));
src\Aspire.Tray\Linux\LinuxTrayApplication.cs (1)
75var icon = Path.Combine(AppContext.BaseDirectory, "Aspire.png");
src\Aspire.Tray\Linux\LinuxTrayIcons.cs (1)
25path = Path.Combine(_directory.FullName, $"{status}.png");
src\Aspire.Tray\Linux\LinuxTrayPanel.cs (1)
304_logo = Gtk.cairo_image_surface_create_from_png(Path.Combine(AppContext.BaseDirectory, "Aspire.png"));
src\Aspire.Tray\Linux\LinuxTrayRuntime.cs (3)
21internal static string PipeName => Path.Combine(DirectoryPath, "control-v1.sock"); 22internal static string LogPath => Path.Combine(DirectoryPath, "aspire-tray.log"); 27var handle = OpenPrivateFile(Path.Combine(directory, "instance.lock"), append: false);
src\Aspire.Tray\Linux\LinuxTrayStartupSettings.cs (3)
12: RegisteredTrayStartupSettings(new FileTrayStartupRegistrationStore(Path.Combine(directory, FileName))) 20return Path.Combine(config is not null && Path.IsPathFullyQualified(config) ? config 21: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config"), "autostart");
src\Aspire.Tray\Mac\SingleInstance.cs (2)
20public static string ActivationPipeName => Path.Combine(DirectoryPath, "control-v1.sock"); 42stream = new FileStream(Path.Combine(directory, "instance.lock"), new FileStreamOptions
src\Aspire.Tray\Windows\WindowsTrayLog.cs (3)
22public static string LogPath => Path.Combine(WindowsSingleInstance.DirectoryPath, "aspire-tray.log"); 49current = Path.Combine(current, component); 64var file = CreateFile(Path.Combine(directory, "aspire-tray.log"),
src\Shared\BundleDiscovery.cs (6)
161var dcpDir = Path.Combine(baseDirectory, DcpDirectoryName); 167dcpExtensionsPath = Path.Combine(dcpDir, "ext"); 168dcpBinPath = Path.Combine(dcpExtensionsPath, "bin"); 192var managedDir = Path.Combine(baseDirectory, ManagedDirectoryName); 193var managedExe = Path.Combine(managedDir, GetExecutableFileName(ManagedExecutableName)); 320return Path.Combine(dcpDirectory, exeName);
src\Shared\BundleVersionLease.cs (2)
104var leasesDirectory = Path.Combine(fullVersionDirectory, LeasesDirectoryName); 172var leasesDirectory = Path.Combine(versionDirectory, LeasesDirectoryName);
src\Shared\HeldFileLease.cs (2)
65var verifiedLeasePath = Path.Combine( 70: Path.Combine(
src\Shared\LinuxTrayPayload.cs (2)
51var executable = Path.Combine(directory, ExecutableName); 60using var icon = File.OpenRead(Path.Combine(directory, IconName));
tests\Shared\LinuxTrayTestPayload.cs (2)
18var executable = Path.Combine(directory, "aspire-tray"); 24File.WriteAllBytes(Path.Combine(directory, "Aspire.png"),
tests\Shared\WindowsTrayTestPayload.cs (2)
13File.WriteAllText(Path.Combine(directory, "Aspire.ico"), "test icon"); 14using var stream = File.Create(Path.Combine(directory, "aspire-tray.exe"));
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));
TrayPanelTests.cs (4)
821var location = Path.Combine("src", "eShop.AppHost"); 1263: Path.Combine(AppContext.BaseDirectory, "TrayPanelPreviews"); 1284var path = Path.Combine(directory, $"{name}-{palette.Name}.svg"); 1288var guides = Path.Combine(directory, $"{name}-{palette.Name}-guides.svg");
TraySavedStateTests.cs (2)
127var differentlyCased = Path.Combine(Path.GetDirectoryName(original)!, "APPHOST.CS"); 251var link = Path.Combine(Path.GetDirectoryName(target)!, "linked.cs");
TrayStartupOptionsTests.cs (4)
19var startup = Path.Combine(bundle.Root, "installed & stable CLI"); 68var cli = Path.Combine(installation.BundleRoot, "aspire"); 94var link = Path.Combine(installation.Root, "stable-installation"); 99var versioned = Path.Combine(installation.BundleRoot, "aspire");
TrayUserPreferencesTests.cs (3)
26var legacyPath = Path.Combine(directory.LegacyDirectory, "apphosts.json"); 44new FileTraySavedStateStore(Path.Combine(directory.LegacyDirectory, "apphosts.json")) 58var legacyPath = Path.Combine(directory.LegacyDirectory, "apphosts.json");
WindowsTrayLaunchCommandTests.cs (1)
21Assert.Equal(Path.Combine(bundle.Root, "tray"), start.WorkingDirectory);
WindowsTrayLauncherTests.cs (4)
46var ping = Path.Combine(Environment.SystemDirectory, "ping.exe"); 99var executable = Path.Combine(Environment.SystemDirectory, $"aspire-tray-missing-{Guid.NewGuid():N}.exe"); 113var start = new ProcessStartInfo(Path.Combine(Environment.SystemDirectory, "ping.exe")) 141using var child = Process.Start(new ProcessStartInfo(Path.Combine(Environment.SystemDirectory, "cmd.exe"))
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")));
WindowsTrayStartupSettingsTests.cs (3)
117store.Value = WindowsTrayStartupSettings.BuildRunCommand(installation.Bootstrap, Path.Combine(installation.Root, "different.exe")); 171var cli = Path.Combine(installation.Root, "%INSTALL%.exe"); 227var cli = Path.Combine(installation.Root, new string('a', length - originalLength) + Path.GetFileName(installation.WindowsCli));
Binding.UDS.IntegrationTests (2)
UDSBindingTests.cs (2)
209return Path.Combine(Path.GetTempPath(), "unix1.txt"); 214return Path.Combine(Path.GetTempPath(), "invalid.txt");
blazor-devserver (1)
Server\Program.cs (1)
45config.AddJsonFile(Path.Combine(applicationDirectory, "blazor-devserversettings.json"), optional: true, reloadOnChange: true);
CodeStyleConfigFileGenerator (3)
Program.cs (3)
68var configDir = Path.Combine(outputDir, "config"); 91var configFilePath = Path.Combine(directory.FullName, configFileName); 205var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
ConfigurationSchemaGenerator.Tests (2)
GeneratorTests.cs (2)
1595var outputPath = Path.Combine(Directory.GetCurrentDirectory(), "IntegrationTest.json"); 1606var baseline = File.ReadAllText(Path.Combine("Baselines", "IntegrationTest.baseline.json")).ReplaceLineEndings();
CreateLayout (36)
Program.cs (30)
225var destination = Path.Combine(_outputPath, "tray"); 229var source = Path.Combine(_trayDirectory, name); 230var target = Path.Combine(destination, name); 241var destination = Path.Combine(_outputPath, "tray"); 247File.Copy(Path.Combine(_trayDirectory, name), Path.Combine(destination, name), overwrite: true); 260var path = Path.Combine(_trayDirectory, relativePath); 293var managedDir = Path.Combine(_outputPath, "managed"); 301var managedExePath = Path.Combine(managedPublishPath, managedExeName); 307File.Copy(managedExePath, Path.Combine(managedDir, managedExeName), overwrite: true); 318var path = Path.Combine(publishPath, file); 325CopyDirectory(publishPath, Path.Combine(_outputPath, "terminalhost"), excludeSymbols: true); 334File.Copy(Path.Combine(publishPath, file), destination, overwrite: true); 345var source = Path.Combine(publishPath, "Aspire.Hosting.Native.Server" + extension); 346foreach (var requiredFile in new[] { source, Path.Combine(publishPath, "ats-contract.json") }) 353var destination = Path.Combine(_outputPath, "apphost-server"); 356File.Move(Path.Combine(destination, Path.GetFileName(source)), 357Path.Combine(destination, "aspire-apphost-server" + extension), overwrite: true); 387var dashboardExePath = Path.Combine(dashboardPublishPath, dashboardExeName); 393var wwwrootPath = Path.Combine(dashboardPublishPath, "wwwroot"); 408var sqliteLibraryPath = Path.Combine(dashboardPublishPath, sqliteLibraryName); 416var dashboardDir = Path.Combine(_outputPath, "dashboard"); 436var dcpDir = Path.Combine(_outputPath, "dcp"); 448var archivePath = Path.Combine(Path.GetDirectoryName(_outputPath)!, archiveName + ".tar.gz"); 599var dcpPackagePath = Path.Combine(nugetPackages, dcpPackageName); 612var toolsPath = Path.Combine(latestVersion.Path, "tools"); 623var oldPackagePath = Path.Combine(nugetPackages, oldPackageName); 633var toolsPath = Path.Combine(latestVersion, "tools"); 656var destFile = Path.Combine(destination, Path.GetFileName(file)); 673var destDir = Path.Combine(destination, Path.GetFileName(dir));
src\Shared\LinuxTrayPayload.cs (2)
51var executable = Path.Combine(directory, ExecutableName); 60using var icon = File.OpenRead(Path.Combine(directory, IconName));
src\Shared\TerminalHostPayload.cs (2)
33=> GetRequiredFiles(rid).All(file => File.Exists(Path.Combine(directory, file)) && new FileInfo(Path.Combine(directory, file)).Length > 0);
src\Shared\WindowsTrayPayload.cs (2)
28var path = Path.Combine(directory, name); 38using var stream = File.OpenRead(Path.Combine(directory, ExecutableName));
crossgen2 (2)
parent\parent\Common\CommandLineHelpers.cs (2)
223zipFileName = Path.Combine(makeReproPath, Path.ChangeExtension(zipFileName, ".zip")); 342reproPackagePath = Path.Combine(reproFileDir, Path.GetFileName(originalPath));
Crossgen2Tasks (2)
PrepareForReadyToRunCompilation.cs (2)
368compilerOutputPath = Path.Combine(OutputPath, compilerOutputRelativePath); 369string publishOutputPath = Path.Combine(OutputPath, publishOutputRelativePath);
csc (8)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (4)
462var processFilePath = Path.Combine(clientDir, $"VBCSCompiler{PlatformInformation.ExeExtension}"); 819var result = Path.Combine(tempPath, ".roslyn"); 827FilePath = Path.Combine(mutexDirectory, name); 828GuardPath = Path.Combine(mutexDirectory, ".guard");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
182loggingFilePath = Path.Combine(loggingFilePath, $"server.{processId}.log");
src\roslyn\src\Compilers\Shared\Csc.cs (1)
26var responseFile = Path.Combine(buildPaths.ClientDirectory, CSharpCompiler.ResponseFileName);
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (1)
36return Path.Combine("/tmp", pipeName);
src\roslyn\src\Compilers\Shared\StandardBuildEnvironment.cs (1)
21public string GetFullyQualifiedPath(string path) => Path.Combine(CurrentDirectory, path);
CSharpSyntaxGenerator (4)
Program.cs (4)
104var outputMainFile = Path.Combine(outputLocation.Trim('"'), $"CSharp.Generated.g4"); 144var outputMainFile = Path.Combine(outputPath, $"{prefix}.Main.Generated.cs"); 145var outputInternalFile = Path.Combine(outputPath, $"{prefix}.Internal.Generated.cs"); 146var outputSyntaxFile = Path.Combine(outputPath, $"{prefix}.Syntax.Generated.cs");
csi (1)
Csi.cs (1)
32responseFile: Path.Combine(csiDirectory, InteractiveResponseFileName),
datacollector (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
datacollector.arm64 (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
dotnet (7)
Program.cs (7)
8Console.WriteLine($"13.5.0 [{Path.Combine(AppContext.BaseDirectory, "sdk")}]"); 45var setupExitCodePath = Path.Combine(AppContext.BaseDirectory, "setup-exit-code"); 69File.WriteAllText(Path.Combine(dcpDirectory.FullName, OperatingSystem.IsWindows() ? "dcp.exe" : "dcp"), ""); 70File.WriteAllText(Path.Combine(managedDirectory.FullName, OperatingSystem.IsWindows() ? "aspire-managed.exe" : "aspire-managed"), ""); 71File.WriteAllText(Path.Combine(dashboardDirectory.FullName, OperatingSystem.IsWindows() ? "Aspire.Dashboard.exe" : "Aspire.Dashboard"), ""); 77if (File.Exists(Path.Combine(AppContext.BaseDirectory, "fail-version"))) 96aspireHome = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspire");
dotnet-aot (45)
parent\dotnet\CommandFactory\CommandResolution\AppBaseDllCommandResolver.cs (1)
21var localPath = Path.Combine(SdkPaths.SdkDirectory,
parent\dotnet\CommandFactory\CommandResolution\DotnetToolsCommandResolver.cs (4)
21return new DotnetToolsCommandResolver(Path.Combine(sdkRoot, "DotnetTools")); 32_dotnetToolPath = dotnetToolPath ?? Path.Combine(SdkPaths.SdkDirectory, "DotnetTools"); 44var packageId = new DirectoryInfo(Path.Combine(_dotnetToolPath, arguments.CommandName)); 48packageId = new DirectoryInfo(Path.Combine(_dotnetToolPath, aggregatePackageId));
parent\dotnet\CommandFactory\CommandResolution\PublishedPathCommandResolver.cs (2)
38var depsFilePath = Path.Combine(publishDirectory, $"{applicationName}.deps.json"); 48var runtimeConfigPath = Path.Combine(publishDirectory, $"{applicationName}.runtimeconfig.json");
parent\dotnet\CommandFactory\CommandResolution\WindowsExePreferredCommandSpecFactory.cs (1)
51var comSpec = Environment.GetEnvironmentVariable("ComSpec") ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe");
parent\dotnet\Commands\MSBuild\MSBuildForwardingApp.cs (1)
55string loggerTypeLocation = Path.Combine(SdkPaths.SdkDirectory, "dotnet.dll");
parent\dotnet\Commands\Test\MTP\ArtifactPostProcessingManager.cs (2)
175string tempDirectory = Path.Combine( 184string manifestPath = Path.Combine(tempDirectory, "manifest.json");
parent\dotnet\Commands\Test\MTP\IPC\NamedPipeServer.cs (2)
225string path = Path.Combine(Path.GetFullPath(directory), name); 235string probePath = Path.Combine(directory, $"testingplatform.probe.{Guid.NewGuid():N}");
parent\dotnet\Commands\Test\MTP\Terminal\FileUtilities.cs (1)
22string pathWithUpperCase = Path.Combine(Path.GetTempPath(), "CASESENSITIVETEST" + Guid.NewGuid().ToString("N"));
parent\dotnet\Commands\Test\MTP\TestApplication.cs (1)
449string path = Path.Combine(Path.GetTempPath(), $"dotnet-test-http-{Guid.NewGuid():N}.rsp");
parent\dotnet\Commands\Test\MTP\TestResultsDirectoryResolver.cs (3)
133return Path.Combine(artifactsPath, ArtifactsTestDirectoryName); 137? Path.Combine(workingDirectory, DefaultResultsDirectoryName) 215return Path.Combine(firstRoot, string.Join(Path.DirectorySeparatorChar, firstSegments, 0, shared));
parent\dotnet\Commands\Test\VSTest\VSTestForwardingApp.cs (1)
38return Path.Combine(SdkPaths.SdkDirectory, VstestAppName);
parent\dotnet\Commands\Workload\Install\FileBasedManifestInstaller.cs (1)
56FileAccessRetrier.RetryOnMoveAccessFailure(() => DirectoryPath.MoveDirectory(Path.Combine(extractionPath, "data"), targetPath));
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"); 383private string GetAdvertisingManifestSentinelPath(SdkFeatureBand featureBand) => Path.Combine(_userProfileDir, $".workloadAdvertisingManifestSentinel{featureBand}"); 387internal static string GetAdvertisingWorkloadsFilePath(string userProfileDir, SdkFeatureBand featureBand) => Path.Combine(userProfileDir, $".workloadAdvertisingUpdates{featureBand}");
parent\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
21.Where(band => Directory.Exists(Path.Combine(band, InstalledWorkloadDir)) && Directory.GetFiles(Path.Combine(band, InstalledWorkloadDir)).Any())
parent\dotnet\Commands\Workload\Install\WorkloadInstallRecords\WindowsWorkloadInstallationRecordReader.cs (1)
41using RegistryKey? workloadKey = baseKey.OpenSubKey(Path.Combine(basePath, $"{sdkFeatureBand}"));
parent\dotnet\Commands\Workload\WorkloadInfoHelper.cs (1)
167var useWorkloadSets = InstallStateContents.FromPath(Path.Combine(WorkloadInstallType.GetInstallStateFolder(_currentSdkFeatureBand, UserLocalPath), "default.json")).ShouldUseWorkloadSets();
parent\dotnet\FirstRunExperience.cs (1)
76string toolPath = Path.Combine(CliFolderPathCalculator.DotnetUserProfileFolderPath, s_toolPathSentinelFileName);
parent\dotnet\Installer\Windows\TrustedMachinePath.cs (1)
58public static string ProgramDataDotnetRoot { get; } = Path.Combine(
parent\dotnet\NuGetForwardingApp.cs (1)
42return Path.Combine(
parent\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (2)
312return Path.Combine( 355string fullPath = Path.GetFullPath(Path.Combine(targetFolder.Value, fileAndPermission.Path));
parent\dotnet\SdkVulnerability\SdkReleaseMetadataCache.cs (5)
28Path.Combine(CliFolderPathCalculator.DotnetUserProfileFolderPath, CacheDirectoryName), 52var sentinelPath = Path.Combine(_cacheDirectory, SentinelFileName); 157var tempPath = Path.Combine(_cacheDirectory, Path.GetRandomFileName()); 174var sentinelPath = Path.Combine(_cacheDirectory, SentinelFileName); 192Path.Combine(_cacheDirectory, $"{SummaryFilePrefix}{sdkVersion}.json");
parent\dotnet\Telemetry\TelemetryCommonProperties.cs (1)
73{ MachineId, _userLevelCacheWriter.RunWithCacheInFilePath(Path.Combine(CliFolderPathCalculator.DotnetUserProfileFolderPath, $"{MachineIdCacheKey}.v1.dotnetUserLevelCache"), GetMachineId) },
parent\dotnet\ToolManifest\ToolManifestFinder.cs (1)
253string manifestFileLocation = Path.Combine(folderPath.Value, Constants.ToolManifestFileName);
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (1)
38return Path.Combine(homePath, DotnetProfileDirectoryName);
dotnet-build-cache (4)
src\runtime\src\tasks\Common\InvocationCache\InvocationCacheConfiguration.cs (2)
34: Path.Combine(localAppData, cacheDirectoryName); 42return Path.Combine(cacheHome, cacheDirectoryName);
src\runtime\src\tasks\Common\InvocationCache\InvocationCachePurge.cs (2)
20string entriesDirectory = Path.Combine(cacheDirectory, versionDirectory); 60string marker = Path.Combine(entry, InvocationCacheEntry.LastUsedFileName);
dotnet-dev-certs (8)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
377Path.Combine(MacOSUserHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem"); 242var certPath = Path.Combine(certDir, nickname) + ".pem"; 361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..]) 405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName); 471var certPath = Path.Combine(certDir, nickname) + ".pem"; 610if (File.Exists(Path.Combine(searchFolder, command))) 1056var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
dotnet-format (6)
Analyzers\CodeStyleInformationProvider.cs (3)
16private readonly string _featuresPath = Path.Combine(s_executingPath, "Microsoft.CodeAnalysis.Features.dll"); 17private readonly string _featuresCSharpPath = Path.Combine(s_executingPath, "Microsoft.CodeAnalysis.CSharp.Features.dll"); 18private readonly string _featuresVisualBasicPath = Path.Combine(s_executingPath, "Microsoft.CodeAnalysis.VisualBasic.Features.dll");
ReportWriter.cs (2)
41return Path.Combine(Environment.CurrentDirectory, defaultReportName); 45return Path.Combine(reportPath, defaultReportName);
Utilities\EditorConfigFinder.cs (1)
30var editorConfigPath = Path.Combine(directory.FullName, ".editorconfig");
dotnet-getdocument (5)
Commands\InvokeCommand.cs (5)
60toolsDirectory = Path.Combine( 64var executableSource = Path.Combine(toolsDirectory, InsideManName + ".exe"); 65executable = Path.Combine(targetDirectory, InsideManName + ".exe"); 84toolsDirectory = Path.Combine(thisPath, $"net{targetFramework.Version}"); 125args.Add(Path.Combine(toolsDirectory, InsideManName + ".dll"));
dotnet-Microsoft.XmlSerializer.Generator (1)
Sgen.cs (1)
337string codePath = Path.Combine(outputDirectory, serializerName + ".cs");
dotnet-openapi (2)
Commands\BaseCommand.cs (2)
354var filePath = Path.Combine(directory, fileName + extension); 368filePath = Path.Combine(directory, uniqueName + extension);
dotnet-razorpagegenerator (1)
Program.cs (1)
214var includeFileContent = File.ReadAllText(System.IO.Path.Combine(basePath, includeFileName));
dotnet-suggest (7)
DotnetMuxer.cs (1)
32var muxerCandidate = new FileInfo(System.IO.Path.Combine(muxerDir.FullName, muxerFileName));
DotnetProfileDirectory.cs (1)
30dotnetProfileDirectory = Path.Combine(home, DotnetProfileDirectoryName);
FileSuggestionRegistration.cs (2)
28_registrationConfigurationFilePath = Path.Combine(testDirectoryOverride, RegistrationFileName); 34_registrationConfigurationFilePath = Path.Combine(userProfile, RegistrationFileName);
GlobalToolsSuggestionRegistration.cs (2)
25? Path.Combine(directory, "tools") 44new Registration(Path.Combine(_nullableToolsShimPath, p)));
SuggestionShellScriptHandler.cs (1)
33string scriptContent = File.ReadAllText(Path.Combine(directory, scriptName));
dotnet-svcutil-lib (38)
Bootstrapper\SvcutilBootstrapper.cs (3)
117var svcutilPkgRef = ProjectDependency.FromAssembly(Path.Combine(Path.GetDirectoryName(Tool.FullPath), Tool.AssemblyName + ".dll")); 171string programFilePath = Path.Combine(this.MSBuildProj.DirectoryPath, "Program.cs"); 178var paramsFilePath = Path.Combine(this.MSBuildProj.DirectoryPath, s_bootstrapperParamsFileName);
CommandProcessorOptions.cs (4)
396Path.GetDirectoryName(this.OutputFile.FullName) : Path.GetDirectoryName(Path.Combine(Directory.GetCurrentDirectory(), this.OutputFile.OriginalPath())); 403new DirectoryInfo(Path.Combine(workingDirectory, this.UpdateServiceReferenceFolder)) : 416this.OutputDir = new DirectoryInfo(Path.Combine(workingDirectory, originalDirSpec)); 853string projFolder = Path.Combine(this.BootstrapPath.FullName, nameof(SvcutilBootstrapper));
FrameworkFork\Microsoft.CodeDom\Compiler\RedistVersionInfo.cs (1)
52dir = Path.Combine(comPlus_InstallRoot, comPlus_Version);
Metadata\MetadataDocumentLoader.cs (5)
271!isUrl && Uri.TryCreate(Path.Combine(basePath, uri), UriKind.Absolute, out serviceUri)) 490if (Uri.TryCreate(Path.Combine(basePath, schemaLocation), UriKind.Absolute, out Uri schemaFile)) 532fullFileName = Path.Combine(basePath, schemaUri.Segments[schemaUri.Segments.Length - 1]); 546fullFileName = Path.Combine(basePath, schemaLocation); 550fullFileName = Path.Combine(basePath, Path.GetFileName(schemaLocation));
Metadata\MetadataDocumentSaver.cs (2)
146var updatedLocation = Path.Combine(this.DirectoryPath, Path.GetFileName(location)); 285var filePath = Path.Combine(this.DirectoryPath, import.Location);
Metadata\MetadataFileNameManager.cs (2)
53filePath = Path.IsPathRooted(uniqueFileNameWithExtension) ? uniqueFileNameWithExtension : Path.Combine(basePath, uniqueFileNameWithExtension); 83var filePath = Path.IsPathRooted(fileNameWithExtension) ? fileNameWithExtension : Path.Combine(basePath, fileNameWithExtension);
OutputPathHelper.cs (1)
28string combinedPath = Path.Combine(directoryPath, outputFileWithExtension);
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));
Shared\Options\UpdateOptions.cs (1)
112this.OutputFile = new FileInfo(Path.Combine(optionsFileDirectory.FullName, this.OutputFile.OriginalPath()));
Shared\ProjectPropertyResolver.cs (2)
149while (dotnetDir != null && !(File.Exists(Path.Combine(dotnetDir, "dotnet")) || File.Exists(Path.Combine(dotnetDir, "dotnet.exe"))))
Shared\Utilities\PathHelper.cs (5)
61if (!isUrl && (Uri.TryCreate(Path.Combine(basePath, input), UriKind.Absolute, out var uri)) && uri.Scheme == "file") 85filePath = Path.Combine(directory.FullName, relPath); 178var directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName)); 198directory = new DirectoryInfo(Path.Combine(parentDirInfo.FullName, directoryName + nextIndex)); 215var dstFilePath = Path.Combine(destinationDir, fileName);
Shared\Utilities\RuntimeEnvironmentHelper.cs (2)
47if (!File.Exists(Path.Combine(destinationDirectory, "global.json"))) 53if (!File.Exists(Path.Combine(destinationDirectory, "nuget.config")))
Tool.cs (1)
314var paramsFile = Path.Combine(options.OutputDir.FullName, CommandProcessorOptions.SvcutilParamsFileName);
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)));
FileUtil.cs (2)
28string temppath = Path.Combine(destinationDirectory, file.Name); 34string temppath = Path.Combine(destinationDirectory, subdir.Name);
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");
ProjectUtils.cs (5)
24var srcProgramFile = Path.Combine(projectDir, "Program.cs"); 25var dstProgramFile = Path.Combine(projectDir, $"{Path.GetFileNameWithoutExtension(filePath)}.cs"); 33FileUtil.TryDeleteDirectory(Path.Combine(Path.GetDirectoryName(filePath), "obj")); 177var outputDir = Path.Combine(project.DirectoryPath, referenceFolderName); 180var dstParamsFile = Path.Combine(outputDir, Path.GetFileName(srcParamsFile));
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));
UnitTest.cs (6)
218var wsdlFilesDstDir = Path.Combine(this_TestGroupOutputDir, "wsdl"); 222FileUtil.CopyDirectory(wsdlFilesSrcDir.Replace("$testCasesDir$", g_TestCasesDir), Path.Combine(wsdlFilesDstDir, "WcfProjectNService"), overwrite: true); 224Directory.CreateDirectory(Path.Combine(this_TestGroupOutputDir, "wsdl")); 329var jsonFileSrcPath = Path.Combine(jsonFilesRoot, jsonFile); 330var jsonFileDstPath = Path.Combine(this_TestCaseOutputDir, Path.GetFileName(jsonFileSrcPath)); 353var outJsonFile = Path.Combine(outputDir, Path.GetFileName(jsonFileSrcPath));
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\OutputModule.cs (1)
41string combinedPath = Path.Combine(directoryPath, outputFileWithExtension);
dotnet-user-jwts (13)
Commands\ClearCommand.cs (1)
73var appsettingsFilePath = Path.Combine(Path.GetDirectoryName(project), appsettingsFile);
Commands\CreateCommand.cs (1)
267var appsettingsFilePath = Path.Combine(Path.GetDirectoryName(project), appsettingsFile);
Commands\RemoveCommand.cs (1)
64var appsettingsFilePath = Path.Combine(Path.GetDirectoryName(project), appsettingsFile);
Helpers\DevJwtCliHelpers.cs (3)
116else if (!File.Exists(Path.Combine(Path.GetDirectoryName(projectPath), appsettingsFile))) 118reporter.Error(Resources.FormatRemoveCommand_AppsettingsFileNotFound_Error(Path.Combine(Path.GetDirectoryName(projectPath), appsettingsFile))); 138var fileBasedAppLaunchSettingsFilePath = Path.Combine(projectDirectory, Path.GetFileNameWithoutExtension(project) + ".run.json");
Helpers\JwtStore.cs (1)
17_filePath = Path.Combine(Path.GetDirectoryName(PathHelper.GetSecretsPathFromSecretsId(userSecretsId)), FileName);
src\aspnetcore\src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
25projectPath = Path.Combine(_directory, projectPath);
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (5)
56var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 116var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 192Path.Combine(AppContext.BaseDirectory, "assets"), 203searchPaths.Insert(1, Path.Combine(assemblyDir, "assets")); 208var targetPath = searchPaths.Select(p => Path.Combine(p, "SecretManager.targets")).FirstOrDefault(File.Exists);
dotnet-user-secrets (6)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
25projectPath = Path.Combine(_directory, projectPath);
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (5)
56var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 116var outputFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 192Path.Combine(AppContext.BaseDirectory, "assets"), 203searchPaths.Insert(1, Path.Combine(assemblyDir, "assets")); 208var targetPath = searchPaths.Select(p => Path.Combine(p, "SecretManager.targets")).FirstOrDefault(File.Exists);
dotnet-watch (7)
Program.cs (4)
122project = new ProjectRepresentation(projectPath: null, entryPointFilePath: Path.GetFullPath(Path.Combine(workingDirectory, options.FilePath))); 170entryPointPath = Path.GetFullPath(Path.Combine(workingDirectory, firstArg)); 191projectPath = Path.GetFullPath(Path.Combine(workingDirectory, projectPath)); 384var loadedAssembly = context.LoadFromAssemblyPath(Path.Combine(roslynPath, assembly.Name + ".dll"));
Watch\MsBuildFileSetFactory.cs (3)
190Path.Combine(AppContext.BaseDirectory, "assets"), 191Path.Combine(assemblyDir, "assets"), 196var targetPath = searchPaths.Select(p => Path.Combine(p, WatchTargetsFileName)).FirstOrDefault(File.Exists);
DotnetTool.AppHost (1)
AppHost.cs (1)
84.WithWorkingDirectory(Path.Combine(Projects.DotnetTool_AppHost.ProjectPath, "IncompatibleSdk"));
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 (18)
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);
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
35editorconfigFilePath = Path.Combine(editorconfigFilePath, ".editorconfig");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
63? Path.Combine(thisAssemblyFolder, assemblySimpleName + ".dll")
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)
27var snapshot = Path.Combine(workDirectory, "template-inputs"); 34var destination = Path.Combine(snapshot, relativeRoot); 35Directory.CreateDirectory(Path.Combine(destination, ".template.config")); 46var output = Path.Combine(snapshot, relative); 48File.Copy(Path.Combine(processedDirectory, relative), output, overwrite: true); 50File.Copy(Path.Combine(processedDirectory, Path.GetRelativePath(sourceDirectory, configPath)), 58settingsLocation: Path.Combine(workDirectory, "template-hive")); 73var configPath = Path.Combine(snapshot, template.ConfigPlace.TrimStart('/', '\\').Replace('/', Path.DirectorySeparatorChar)); 203var referencedPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(path)!, relative)); 302var projectDirectory = Path.Combine(directory, project.Name); 304new XDocument(root).Save(Path.Combine(projectDirectory, $"{project.Name}.csproj")); 306var solutionPath = Path.Combine(directory, "TemplateDependencies.slnx");
GetDocument.Insider (1)
Commands\GetDocumentCommandWorker.cs (1)
437path = Path.Combine(outputDirectory, path);
ilasm (4)
OutputFileWriter.cs (1)
135Path.Combine(Path.GetDirectoryName(pdbPath)!, $"{Path.GetFileName(pdbPath)}.{Path.GetRandomFileName()}.tmp");
Program.cs (3)
207string fullPath = Path.Combine(baseDir, path); 216fullPath = Path.Combine(includePath, path); 235string fullPath = Path.Combine(baseDir, path);
ilc (2)
parent\parent\Common\CommandLineHelpers.cs (2)
223zipFileName = Path.Combine(makeReproPath, Path.ChangeExtension(zipFileName, ".zip")); 342reproPackagePath = Path.Combine(reproFileDir, Path.GetFileName(originalPath));
ILCompiler.Compiler (1)
parent\parent\Common\Compiler\CompilerTypeSystemContext.cs (1)
349candidatePath = Path.Combine(Path.GetDirectoryName(peFilePath), Path.GetFileName(candidatePath));
ILCompiler.Diagnostics (3)
PdbWriter.cs (3)
168_pdbFilePath = Path.Combine(_pdbPath, dllNameWithoutExtension + ".pdb"); 180_tempSourceDllName = Path.Combine(Path.GetDirectoryName(dllPath), dllNameWithoutExtension + ".ni" + Path.GetExtension(dllPath)); 183_pdbFilePath = Path.Combine(_pdbPath, dllNameWithoutExtension + ".ni.pdb");
ILCompiler.ReadyToRun (7)
Compiler\ReadyToRunCodegenCompilation.cs (1)
498string standaloneMsilOutputFile = Path.Combine(outputDirectory, relativeMsilPath);
ObjectWriter\SymbolFileBuilder.cs (2)
30Console.WriteLine("Emitting PDB file: {0}", Path.Combine(pdbPath, Path.GetFileNameWithoutExtension(dllFileName) + ".ni.pdb")); 60string perfMapFileName = Path.Combine(perfMapPath, Path.GetFileNameWithoutExtension(dllFileName) + perfMapExtension);
parent\parent\Common\Compiler\CompilerTypeSystemContext.cs (1)
349candidatePath = Path.Combine(Path.GetDirectoryName(peFilePath), Path.GetFileName(candidatePath));
PortableCallHelpers\PortableCallHelpersGenerator.cs (3)
130WriteIfDifferent(Path.Combine(options.OutputDirectory, PInvokeFileName), log, 133WriteIfDifferent(Path.Combine(options.OutputDirectory, ReversePInvokeFileName), log, 139WriteIfDifferent(Path.Combine(options.OutputDirectory, InterpToNativeFileName), log,
illink (11)
ILLink.Tasks (20)
LinkTask.cs (2)
371AddOptionalFile(Path.Combine(satelliteDirectory, satelliteName)); 381string filePath = Path.Combine(directory, metadata.GetString(file.Name));
src\runtime\src\tasks\Common\InvocationCache\InvocationCache.Configuration.cs (1)
63string fullPath = Path.GetFullPath(baseDirectory is null ? cacheDirectory : Path.Combine(baseDirectory, cacheDirectory));
src\runtime\src\tasks\Common\InvocationCache\InvocationCache.cs (13)
187stagingDirectory = Path.Combine(parentDirectory, inputHash + "." + Guid.NewGuid().ToString("N") + ".tmp"); 190string diagnosticsPath = Path.Combine(stagingDirectory, "diagnostics"); 197using (var manifest = new BinaryWriter(File.Create(Path.Combine(stagingDirectory, "manifest")))) 227File.WriteAllBytes(Path.Combine(stagingDirectory, "manifest.sha256"), HashFile(Path.Combine(stagingDirectory, "manifest"))); 229InvocationCacheEntry.WriteLastUsed(Path.Combine(stagingDirectory, InvocationCacheEntry.LastUsedFileName)); 274InvocationCacheEntry.WriteLastUsed(Path.Combine(entryDirectory, InvocationCacheEntry.LastUsedFileName)); 310if (!File.ReadAllBytes(Path.Combine(entryDirectory, "manifest.sha256")).SequenceEqual(HashFile(Path.Combine(entryDirectory, "manifest")))) 313using var manifest = new BinaryReader(File.OpenRead(Path.Combine(entryDirectory, "manifest"))); 327string outputsDirectory = Path.Combine(entryDirectory, "outputs"); 342string cachedFile = Path.Combine(outputsDirectory, relativePath); 352string diagnosticsPath = Path.Combine(entryDirectory, "diagnostics");
src\runtime\src\tasks\Common\InvocationCache\InvocationCache.Outputs.cs (2)
66string relativePath = Path.Combine(relativeDirectory, Path.GetFileName(path)); 76outputs.DirectoryPath is not null ? Path.Combine(outputs.DirectoryPath, name) : outputs.Files[index];
src\runtime\src\tasks\Common\InvocationCache\InvocationCacheConfiguration.cs (2)
34: Path.Combine(localAppData, cacheDirectoryName); 42return Path.Combine(cacheHome, cacheDirectoryName);
Infrastructure.Common (2)
CertificateManager.cs (2)
74return Path.Combine(Environment.CurrentDirectory, "wcfLocal.keychain"); 251string pemPath = Path.Combine(Path.GetTempPath(), "wcf-root-" + certificate.Thumbprint + ".pem");
Infrastructure.Tests (736)
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 (62)
33var selected = Path.Combine(workspace.Path, "selected payload"); 35var output = Path.Combine(workspace.Path, "layout"); 54File.Delete(Path.Combine(selected, sourceExecutable)); 57Assert.Contains(Path.Combine(selected, sourceExecutable), missingPayload.Message, StringComparison.Ordinal); 63Assert.True(File.Exists(Path.Combine(discovered, sourceExecutable))); 64Assert.True(File.Exists(Path.Combine(stale, sourceExecutable))); 80using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "linux-x64", "Debug", "1.0", false, 106var output = Path.Combine(workspace.Path, "layout"); 124var symbolDirectory = Path.Combine(source, "Aspire.Hosting.Native.Server.dSYM"); 126File.WriteAllText(Path.Combine(source, "Aspire.Hosting.Native.Server" + extension), "server"); 127File.WriteAllText(Path.Combine(source, "ats-contract.json"), "contract"); 128File.WriteAllText(Path.Combine(source, "sidecar.json"), "sidecar"); 129File.WriteAllText(Path.Combine(source, "Aspire.Hosting.Native.Server.pdb"), "symbols"); 130File.WriteAllText(Path.Combine(symbolDirectory, "symbols"), "symbols"); 131var output = Path.Combine(workspace.Path, "layout"); 137var destination = Path.Combine(output, "apphost-server"); 140Assert.Equal("server", File.ReadAllText(Path.Combine(destination, "aspire-apphost-server" + extension))); 141Assert.Equal("contract", File.ReadAllText(Path.Combine(destination, "ats-contract.json"))); 142Assert.Equal("sidecar", File.ReadAllText(Path.Combine(destination, "sidecar.json"))); 156File.WriteAllText(Path.Combine(source, "Aspire.Hosting.Native.Server"), "server"); 159File.WriteAllText(Path.Combine(source, "ats-contract.json"), contract); 161var output = Path.Combine(workspace.Path, "layout"); 168Assert.False(Directory.Exists(Path.Combine(output, "apphost-server"))); 187var path = Path.Combine(publish, file); 191File.WriteAllText(Path.Combine(publish, "Aspire.TerminalHost.pdb"), "symbols"); 192using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, rid, "Debug", "1.0", false, 199File.Delete(Path.Combine(publish, files[^1])); 213var path = Path.Combine(workspace.Path, file); 221File.WriteAllText(Path.Combine(workspace.Path, files[^1]), string.Empty); 234using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "win-x64", configuration, "1.0.0", verbose: false, 256using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "win-x64", "Debug", "1.0.0", verbose: false, 269var outputPath = Path.Combine(workspace.Path, "layout"); 288var explicitPath = Path.Combine(workspace.Path, "missing prepared Dashboard"); 289var outputPath = Path.Combine(workspace.Path, "layout"); 297Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard"))); 333var filePath = Path.Combine(publishPath, relativePath); 338var outputPath = Path.Combine(workspace.Path, "layout"); 344var dashboardPath = Path.Combine(outputPath, "dashboard"); 350Assert.Equal(File.ReadAllBytes(Path.Combine(publishPath, relativePath)), File.ReadAllBytes(Path.Combine(dashboardPath, relativePath))); 359var wwwrootPath = Path.Combine(publishPath, "wwwroot"); 361var outputPath = Path.Combine(workspace.Path, "layout"); 368Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard"))); 388var outputPath = Path.Combine(workspace.Path, "layout"); 395Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard"))); 409var sqliteLibraryPath = Path.Combine(publishPath, sqliteLibraryName); 419var outputPath = Path.Combine(workspace.Path, "layout"); 426Assert.False(Directory.Exists(Path.Combine(outputPath, "dashboard"))); 434var explicitPath = Path.Combine(workspace.Path, "prepared dashboard outside artifacts"); 436File.WriteAllText(Path.Combine(explicitPath, "Aspire.Dashboard.exe"), "explicit executable"); 437File.WriteAllText(Path.Combine(explicitPath, "Aspire.Dashboard.pdb"), "symbols"); 438Directory.CreateDirectory(Path.Combine(explicitPath, "nested.dSYM")); 440File.WriteAllText(Path.Combine(explicitPath, "Aspire.Dashboard.dbg"), "symbols"); 441var output = Path.Combine(workspace.Path, "layout"); 447var dashboard = Path.Combine(output, "dashboard"); 451Assert.Equal("explicit executable", File.ReadAllText(Path.Combine(dashboard, "Aspire.Dashboard.exe"))); 462using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, 475using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, 501var filePath = Path.Combine(path, file); 514File.WriteAllText(Path.Combine(publishPath, executableName), "executable"); 515File.WriteAllText(Path.Combine(publishPath, sqliteLibraryName), "sqlite"); 516File.WriteAllText(Path.Combine(frameworkPath, "blazor.web.js"), "static asset");
DownloadFailingJobLogs\DownloadFailingJobLogsFixture.cs (1)
20DotNetPath = Path.Combine(RepoRoot.Path, "dotnet.sh");
DownloadFailingJobLogs\DownloadFailingJobLogsToolTests.cs (4)
46var fixtureDirectory = Path.Combine(_workspace.Path, "fixtures-success"); 62var logPath = Path.Combine(_workspace.Path, "failed_job_0_Tests___Linux___Sample__Sample____Sample__linux-latest_.log"); 73var fixtureDirectory = Path.Combine(_workspace.Path, "fixtures-missing-artifact"); 205return Path.Combine(fixtureDirectory, $"{fileName}{extension}");
ExecutableFileTests.cs (2)
38var path = Path.Combine(_workspace.Path, $"stub-{i}"); 68var path = Path.Combine(_workspace.Path, "tool");
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");
ExtractTestPartitions\MockAssemblyBuilder.cs (2)
241var netstandardPath = Path.Combine( 250var runtimePath = Path.Combine(
GenerateTestSummary\GenerateTestSummaryToolTests.cs (20)
32var trxPath = Path.Combine(_workspace.Path, "sample.trx"); 54var trxPath = Path.Combine(_workspace.Path, "mixed.trx"); 61var jsonPath = Path.Combine(_workspace.Path, "failed.json"); 82var trxPath = Path.Combine(_workspace.Path, "aborted.trx"); 88var jsonPath = Path.Combine(_workspace.Path, "failed.json"); 105var trxPath = Path.Combine(_workspace.Path, "allpass.trx"); 111var jsonPath = Path.Combine(_workspace.Path, "failed.json"); 134var trxDir = Path.Combine(_workspace.Path, "corrupt"); 136await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<"); 138var jsonPath = Path.Combine(_workspace.Path, "failed.json"); 161var trxDir = Path.Combine(_workspace.Path, "partial"); 164Path.Combine(trxDir, "clean.trx"), 166await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<"); 168var jsonPath = Path.Combine(_workspace.Path, "failed.json"); 188var trxDir = Path.Combine(_workspace.Path, "partial-with-failure"); 191Path.Combine(trxDir, "failed.trx"), 193await File.WriteAllTextAsync(Path.Combine(trxDir, "broken.trx"), "this is not valid trx xml <<<"); 195var jsonPath = Path.Combine(_workspace.Path, "failed.json"); 217var trxPath = Path.Combine(_workspace.Path, "timestamped.trx"); 226var jsonPath = Path.Combine(_workspace.Path, "failed.json");
Hex1bNativePublishingTests.cs (29)
99$"-p:_ArtifactsLogDir={Path.Combine(_workspace.Path, "logs")}"]); 207var artifacts = Path.Combine(_workspace.Path, "artifacts"); 215WriteFile(Path.Combine(publish, file), file); 227WriteFile(Path.Combine(serverPublish, file), file); 236WriteFile(Path.Combine(terminalPublish, file), file); 252WriteFile(Path.Combine(dashboardPublish, file), file); 266var packages = Path.Combine(_workspace.Path, "packages"); 268var layout = Path.Combine(_workspace.Path, "layout"); 279var tray = Path.Combine(_workspace.Path, "windows-tray"); 289var tray = Path.Combine(_workspace.Path, "linux-tray"); 312var managed = Path.Combine(layout, "managed"); 317Assert.True(File.ReadAllBytes(Path.Combine(publish, file)).SequenceEqual(File.ReadAllBytes(Path.Combine(managed, file))), file); 321Assert.Equal(File.ReadAllBytes(Path.Combine(terminalPublish, file)), File.ReadAllBytes(Path.Combine(managed, file))); 324var terminal = Path.Combine(layout, "terminalhost"); 329Assert.Equal(File.ReadAllBytes(Path.Combine(terminalPublish, file)), File.ReadAllBytes(Path.Combine(terminal, file))); 332var server = Path.Combine(layout, "apphost-server"); 338Assert.Equal(File.ReadAllBytes(Path.Combine(serverPublish, file)), File.ReadAllBytes(Path.Combine(server, bundledFile))); 341var dashboard = Path.Combine(layout, "dashboard"); 346Assert.True(File.ReadAllBytes(Path.Combine(dashboardPublish, file)).SequenceEqual(File.ReadAllBytes(Path.Combine(dashboard, file))), file); 357var layout = Path.Combine(_workspace.Path, "layout"); 358var marker = Path.Combine(layout, "existing.txt"); 369"--output", layout, "--artifacts", Path.Combine(_workspace.Path, "missing-artifacts"), "--rid", rid, "--configuration", "Release"]); 448var projectPath = Path.Combine(_workspace.Path, "Publish.proj"); 474var resultPath = Path.Combine(_workspace.Path, $"msbuild-result-{Guid.NewGuid():N}.json");
MacTrayTestPayload.cs (2)
20var path = Path.Combine(source, file); 26File.SetUnixFileMode(Path.Combine(source, "Contents/MacOS/aspire-tray"),
MicrosoftTestingPlatformTests.cs (3)
21var script = Path.Combine(workspace.Path, "evaluate.ps1"); 22var resultPath = Path.Combine(workspace.Path, "evaluation_results.json"); 68var script = Path.Combine(workspace.Path, "runner-help.ps1");
Pipelines\BundleBuildWrapperTests.cs (12)
55var script = Path.Combine(scripts, "stabilization-smoke-init-restore.sh"); 60await File.WriteAllTextAsync(Path.Combine(feed, $"{package}.17.0.0.nupkg"), ""); 63var dotnet = Path.Combine(root, "dotnet.sh"); 97var sdk = Directory.CreateDirectory(Path.Combine(root, ".dotnet")).FullName; 104await File.WriteAllTextAsync(Path.Combine(common, "build.sh"), """ 108await File.WriteAllTextAsync(Path.Combine(common, "build.ps1"), """ 112await File.WriteAllTextAsync(Path.Combine(sdk, "dotnet"), """ 118foreach (var path in new[] { Path.Combine(common, "build.sh"), Path.Combine(sdk, "dotnet") }) 123var launcher = Path.Combine(root, "launch.ps1"); 124await File.WriteAllTextAsync(Path.Combine(root, "arguments.json"), JsonSerializer.Serialize(arguments)); 150File.ReadAllLines(Path.Combine(workspace.Path, name))
Pipelines\MacOSStaplerRetryTests.cs (6)
34await File.WriteAllTextAsync(Path.Combine(workspace.Path, "attempt"), "0\n"); 35await File.WriteAllTextAsync(Path.Combine(workspace.Path, "delays"), ""); 38var stub = Path.Combine(bin, name); 63var app = Path.Combine(workspace.Path, "Aspire app.app"); 81Assert.Equal(expectedDelays.Length + 1, int.Parse(await File.ReadAllTextAsync(Path.Combine(workspace.Path, "attempt")))); 82Assert.Equal(expectedDelays, (await File.ReadAllLinesAsync(Path.Combine(workspace.Path, "delays"))).Select(int.Parse));
Pipelines\NixCliPackageTests.cs (8)
28var outputPath = Path.Combine(_workspace.Path, "versions.json"); 29var fakeBinPath = Path.Combine(_workspace.Path, "bin"); 32var curlPath = Path.Combine(fakeBinPath, "curl"); 68var outputPath = Path.Combine(_workspace.Path, "versions.json"); 69var fakeBinPath = Path.Combine(_workspace.Path, "bin"); 74var curlPath = Path.Combine(fakeBinPath, "curl"); 125var outputPath = Path.Combine(_workspace.Path, "versions.json"); 183: File.ReadAllTextAsync(Path.Combine(RepoRoot.Path, relativePath));
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 (57)
61var source = Path.Combine(workspace.Path, "publish"); 63File.WriteAllText(Path.Combine(source, "aspire-tray.dbg"), "symbols"); 64var layout = Path.Combine(workspace.Path, rid); 80var original = Path.Combine(source, Path.GetFileName(entry.Name)); 125File.Delete(Path.Combine(source, missingFile)); 126using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "osx-arm64", "Debug", "test", false, 131Assert.Contains(Path.Combine(source, missingFile), error.Message); 141File.SetUnixFileMode(Path.Combine(source, "Contents/MacOS/aspire-tray"), UnixFileMode.UserRead); 142using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, "osx-arm64", "Debug", "test", false, 157var layout = Path.Combine(workspace.Path, "osx-arm64"); 170Assert.Equal(File.ReadAllBytes(Path.Combine(source, file)), File.ReadAllBytes(Path.Combine(destination, file))); 171Assert.Equal(File.GetUnixFileMode(Path.Combine(source, file)), File.GetUnixFileMode(Path.Combine(destination, file))); 189Assert.Equal(File.GetUnixFileMode(Path.Combine(source, relativePath)), entry.Mode); 192Assert.Equal(File.ReadAllBytes(Path.Combine(source, relativePath)), content.ToArray()); 207var scriptPath = Path.Combine(workspace.Path, "prepare-signing.ps1"); 232var file = Path.Combine(Path.GetDirectoryName(source)!, entry.FullName); 248Path.Combine(RepoRoot.Path, "eng/github-ci/test-trigger-map.yml"), 272var source = Path.Combine(workspace.Path, "publish with spaces"); 274File.WriteAllText(Path.Combine(source, "smoke.stdout.log"), "not runtime content"); 275var layout = Path.Combine(workspace.Path, rid); 295Assert.Equal(File.ReadAllBytes(Path.Combine(source, Path.GetFileName(entry.Name))), content.ToArray()); 310var source = Path.Combine(workspace.Path, "publish"); 314File.Delete(Path.Combine(source, "Aspire.ico")); 318File.Delete(Path.Combine(source, "aspire-tray.exe")); 322File.Copy(typeof(TrayBundleTests).Assembly.Location, Path.Combine(source, "aspire-tray.exe"), overwrite: true); 324using var builder = new LayoutBuilder(Path.Combine(workspace.Path, "layout"), workspace.Path, 351var source = Path.Combine(workspace.Path, "source"); 353File.Copy(Path.Combine(RepoRoot.Path, "src/Shared/Aspire.ico"), Path.Combine(source, "Aspire.ico"), overwrite: true); 354var layout = Path.Combine(workspace.Path, rid); 358var tray = Path.Combine(layout, "tray"); 363File.Copy(Path.Combine(source, "Aspire.ico"), Path.Combine(tray, "Aspire.ico"), overwrite: true); 366File.Delete(Path.Combine(tray, "Aspire.ico")); 369File.WriteAllText(Path.Combine(tray, "Aspire.ico"), "wrong icon"); 372File.WriteAllText(Path.Combine(tray, "smoke.log"), "unexpected runtime content"); 375File.Copy(typeof(TrayBundleTests).Assembly.Location, Path.Combine(tray, "aspire-tray.exe"), overwrite: true); 379using var command = new PowerShellCommand(Path.Combine(RepoRoot.Path, "tools/CreateLayout/verify-windows-tray-payload.ps1"), output) 408var source = Path.Combine(workspace.Path, "publish with spaces"); 410var layout = Path.Combine(workspace.Path, rid); 414var tray = Path.Combine(layout, "tray"); 421File.Delete(Path.Combine(tray, "Aspire.png")); 424File.WriteAllText(Path.Combine(tray, "Aspire.png"), "wrong icon"); 427File.SetUnixFileMode(Path.Combine(tray, "aspire-tray"), UnixFileMode.UserRead | UnixFileMode.UserWrite); 430File.WriteAllText(Path.Combine(tray, "smoke.log"), "unexpected runtime content"); 433Directory.CreateDirectory(Path.Combine(tray, "empty")); 438File.Delete(Path.Combine(tray, name)); 439File.CreateSymbolicLink(Path.Combine(tray, name), Path.Combine(source, name)); 443var script = Path.Combine(workspace.Path, "verify.ps1"); 453"-Verifier", $"\"{Path.Combine(RepoRoot.Path, "tools/CreateLayout/verify-linux-tray-payload.sh")}\"", 477var layout = Path.Combine(workspace.Path, "linux-x64"); 478var tray = Path.Combine(layout, "tray"); 480var executable = Path.Combine(tray, "aspire-tray"); 510using var command = new PowerShellCommand(Path.Combine(RepoRoot.Path, "eng/scripts/test-native-tray.ps1"), output)
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\CiResourceMonitorTests.cs (7)
25_outputDirectory = Path.Combine(_workspace.Path, "resource-monitor"); 26_summaryPath = Path.Combine(_workspace.Path, "step-summary.md"); 36File.WriteAllLines(Path.Combine(_outputDirectory, "resources.csv"), 67File.WriteAllLines(Path.Combine(_outputDirectory, "resources.csv"), 100var pidFile = Path.Combine(_outputDirectory, "sampler.pid"); 106var csvPath = Path.Combine(_outputDirectory, "resources.csv"); 107var processesPath = Path.Combine(_outputDirectory, "processes.log");
PowerShellScripts\DownloadNativeArchivesTests.cs (2)
185var dashboardArtifactsDir = Path.Combine(Path.GetDirectoryName(archivesDir)!, "dashboard-artifacts"); 431"-DashboardArtifactsTargetDir", $"\"{Path.Combine(Path.GetDirectoryName(archivesTargetDir)!, "dashboard-artifacts")}\"",
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\PowerShellStartupProfileTests.cs (2)
38var cacheRoot = Path.Combine(_workspace.Path, "cache"); 41var scriptPath = Path.Combine(_workspace.Path, "noop.ps1");
PowerShellScripts\ScanTestPartitionsFromSourceGuardTests.cs (1)
43var testsRoot = Path.Combine(RepoRoot.Path, "tests");
PowerShellScripts\SplitTestMatrixByDepsTests.cs (4)
25_githubOutputFile = Path.Combine(_workspace.Path, "github_output.txt"); 185var matrixFile = Path.Combine(_workspace.Path, "matrix.json"); 214var nonExistentFile = Path.Combine(_workspace.Path, "nonexistent.json"); 240var tempMatrixFile = Path.Combine(_workspace.Path, $"matrix_input_{Guid.NewGuid():N}.json");
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\StageCliStarterValidationDiagnosticsTests.cs (14)
32var sourceRoot = Path.Combine(_workspace.Path, "validation with spaces"); 33var destinationRoot = Path.Combine(_workspace.Path, "upload with spaces"); 70var sourceRoot = Path.Combine(_workspace.Path, "validation"); 71var destinationRoot = Path.Combine(_workspace.Path, "upload"); 72var outsideDirectory = Path.Combine(_workspace.Path, "outside"); 78Path.Combine(_workspace.Path, "missing.log")); 88using var archive = File.OpenRead(Path.Combine(destinationRoot, "starter-validation.tar")); 105var destinationRoot = Path.Combine(_workspace.Path, "upload"); 111"-SourceRoot", $"\"{Path.Combine(_workspace.Path, "missing")}\"", 124var sourceRoot = Path.Combine(_workspace.Path, "validation"); 125var destinationRoot = Path.Combine(_workspace.Path, "upload"); 131var wrapper = Path.Combine(_workspace.Path, "fail-tar.ps1"); 155var path = Path.Combine(root, relativePath); 168using var archive = File.OpenRead(Path.Combine(root, "starter-validation.tar"));
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 (21)
47var source = XDocument.Load(Path.Combine(RepoRoot.Path, "Directory.Build.targets")); 48var configuration = XDocument.Load(Path.Combine(projectDirectory, $"{projectName}.csproj")); 49var neutralResources = Directory.GetFiles(Path.Combine(projectDirectory, resourceDirectory), "*.resx") 53.Select(name => Path.Combine(resourceDirectory, name!)) 58Path.Combine(resourceDirectory, "NewResource.fr.resx"), 59Path.Combine(resourceDirectory, "NewResource.zh-Hans.resx"), 60Path.Combine(resourceDirectory, "WithoutDesigner.resx"), 61Path.Combine("Other", "Unrelated.resx"), 66var settingsDesignerPath = Path.Combine(resourceDirectory, "Settings.Designer.cs"); 69Path.Combine(resourceDirectory, "Unrelated.cs"), 70Path.Combine(resourceDirectory, "Unrelated.Designer.cs"), 72Path.Combine("Other", "Unrelated.Designer.cs"), 78Directory.CreateDirectory(Path.Combine(workspace.Path, resourceDirectory)); 79foreach (var path in neutralResources.Concat(designers).Append(Path.Combine(resourceDirectory, "WithoutDesigner.resx")) 80.Append(settingsDesignerPath).Append(Path.Combine(resourceDirectory, "Settings.settings"))) 82await File.WriteAllTextAsync(Path.Combine(workspace.Path, path), string.Empty); 103linkedResource.Add(new XElement("Link", Path.Combine(resourceDirectory, "Linked.resx"))); 105var projectPath = Path.Combine(workspace.Path, "Resources.proj"); 107var script = Path.Combine(workspace.Path, "evaluate.ps1"); 110var resultPath = Path.Combine(workspace.Path, "evaluation_results.json"); 144Assert.Equal(Path.Combine(resourceDirectory, "Linked.resx"), resources[^1].GetProperty("Link").GetString());
Shared\MSBuildServerFallbackDiagnostic.cs (2)
26var wrapper = Path.Combine(directory, "dotnet-with-diagnostic.cmd"); 37var script = Path.Combine(directory, "dotnet-with-diagnostic.sh");
Shared\ProcessRunnerTests.cs (4)
18File.WriteAllText(Path.Combine(workspace.Path, "marker.txt"), "working directory"); 74var file = Path.Combine(workspace.Path, "artifact.zip"); 95.First(path => File.Exists(Path.Combine(path, executable))); 116.First(path => File.Exists(Path.Combine(path, executable)));
Shared\RepoRoot.cs (1)
27if (File.Exists(System.IO.Path.Combine(directory.FullName, "Aspire.slnx")))
Shared\TestTrxBuilder.cs (1)
64var trxPath = Path.Combine(tempDirectory, Path.GetFileName(trxEntryPath));
src\Shared\PathLookupHelper.cs (1)
194path = Path.Combine(directory, fileName);
TemplateManifest\TemplateManifestBuildTargetTests.cs (6)
21var restore = Directory.CreateDirectory(Path.Combine(intermediate, "template-cg-restore")).FullName; 22File.WriteAllText(Path.Combine(restore, "project.assets.json"), "{}"); 23var sibling = Path.Combine(intermediate, "keep.txt"); 32var projectPath = Path.Combine(root, "cleanup.proj"); 33var generator = Path.Combine(root, "generator.ps1"); 56var runner = Path.Combine(root, "run.ps1");
TemplateManifest\TemplateManifestCacheTests.cs (3)
26File.WriteAllText(Path.Combine(environment.TemplateDirectory, $"Project{i}.csproj"), $$""" 72var solution = XDocument.Load(Path.Combine(restoreDirectory, "TemplateDependencies.slnx")); 78var directory = Path.GetDirectoryName(Path.Combine(restoreDirectory, path))!;
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"), """ 116ExecutableFile.Write(Path.Combine(root, "dotnet.sh"), """
TemplateManifest\TemplateManifestNpmTests.cs (5)
41var lockPath = Path.Combine(environment.TemplateDirectory, "package-lock.json"); 77var lockPath = Path.Combine(environment.TemplateDirectory, "package-lock.json"); 101File.WriteAllText(Path.Combine(environment.TemplateDirectory, "App.csproj"), """ 107File.WriteAllText(Path.Combine(environment.TemplateDirectory, "package.json"), PackageJson); 108File.WriteAllText(Path.Combine(environment.TemplateDirectory, "package-lock.json"), PackageLockJson);
TemplateManifest\TemplateManifestNuGetTests.cs (1)
23File.WriteAllText(Path.Combine(environment.TemplateDirectory, "App.csproj"), """
TemplateManifest\TemplateManifestTestEnvironment.cs (8)
30TemplateDirectory = Directory.CreateDirectory(Path.Combine(SourceDirectory, "template")).FullName; 34RestoreDirectory = Path.Combine(workspace.Path, "restore"); 35ManifestPath = Path.Combine(workspace.Path, "cgmanifest.json"); 36ConfigPath = Path.Combine(workspace.Path, "nuget.config"); 38Directory.CreateDirectory(Path.Combine(TemplateDirectory, ".template.config")); 93var script = Path.Combine(_workspace.Path, scriptName); 103.WithEnvironmentVariable("NUGET_HTTP_CACHE_PATH", Path.Combine(_workspace.Path, "http-cache")) 118var path = Path.Combine(feed, $"{name}.{version}.nupkg");
TemplateManifest\TemplateRestorePlanTests.cs (6)
160var path = Path.Combine(directory, "App.csproj"); 196var path = Path.Combine(workspace.Path, "normalized.proj"); 198var script = Path.Combine(workspace.Path, "evaluate.ps1"); 323var directory = Path.Combine(source, identity); 324Directory.CreateDirectory(Path.Combine(directory, ".template.config")); 325File.WriteAllText(Path.Combine(directory, "App.csproj"), project);
TemporaryStorageTests.cs (3)
23var directory = Path.Combine(AppContext.BaseDirectory, "BannedApiAnalyzers"); 24Assembly.LoadFrom(Path.Combine(directory, "Microsoft.CodeAnalysis.BannedApiAnalyzers.dll")); 25var assembly = Assembly.LoadFrom(Path.Combine(directory, "Microsoft.CodeAnalysis.CSharp.BannedApiAnalyzers.dll"));
tests\Shared\LinuxTrayTestPayload.cs (2)
18var executable = Path.Combine(directory, "aspire-tray"); 24File.WriteAllBytes(Path.Combine(directory, "Aspire.png"),
tests\Shared\TemporaryWorkspace.cs (2)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire"); 219var settingsPath = IOPath.Combine(aspireDir, "settings.json");
tests\Shared\WindowsTrayTestPayload.cs (2)
13File.WriteAllText(Path.Combine(directory, "Aspire.ico"), "test icon"); 14using var stream = File.Create(Path.Combine(directory, "aspire-tray.exe"));
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\PathRuleExclusionTests.cs (3)
21var path = Path.Combine(_workspace.Path, "map.yml"); 50var path = Path.Combine(_workspace.Path, "map.yml"); 73var path = Path.Combine(_workspace.Path, "map.yml");
TestTriggerMap\PrComparisonBaseTests.cs (7)
32checkout = Path.Combine(workspace.Path, "checkout"); 86Directory.CreateDirectory(Path.Combine(repo, "src")); 107Directory.CreateDirectory(Path.Combine(repo, "docs")); 133var checkout = Path.Combine(workspace.Path, "checkout"); 171var checkout = Path.Combine(workspace.Path, "checkout"); 192var productionFile = Path.Combine(repo, "Production.cs"); 328File.WriteAllText(Path.Combine(repo, path), path);
TestTriggerMap\SelectTestsAcceptanceTests.cs (8)
124var path = Path.Combine(NewMapDir(), "map.yml"); 809var mapPath = Path.Combine(NewMapDir(), "map.yml"); 973var mapPath = Path.Combine(NewMapDir(), "map.yml"); 1273var srcDir = Path.Combine(RepoRoot.Path, "src"); 1289if (File.Exists(baseline) && Directory.Exists(Path.Combine(polyglotRoot, name))) 1344var testsDir = Path.Combine(RepoRoot.Path, "tests"); 1354var testsDir = Path.Combine(RepoRoot.Path, "tests"); 1364var slnx = File.ReadAllText(Path.Combine(RepoRoot.Path, "Aspire.slnx"));
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));
TestTriggerMap\TestTriggerMapTests.cs (3)
186var slnx = File.ReadAllText(Path.Combine(RepoRoot.Path, "Aspire.slnx")); 1138Path.Combine(RepoRoot.Path, "tests"), "*.csproj", SearchOption.AllDirectories) 1212var solutionPath = Path.Combine(RepoRoot.Path, "Aspire.slnx");
TypeScriptApiCompat\TypeScriptApiCompatTests.cs (14)
126var baselineRoot = Path.Combine(workspace.Path, "baseline"); 127var currentRoot = Path.Combine(workspace.Path, "current"); 197var suppressionPath = Path.Combine(workspace.Path, "Pkg.tscompat.suppression.txt"); 240var currentSuppressions = ApiCompatSuppressionLoader.Load(Path.Combine(workspace.Path, "current")); 241var baselineSuppressions = ApiCompatSuppressionLoader.Load(Path.Combine(workspace.Path, "baseline")); 253var baselineRoot = Path.Combine(workspace.Path, "baseline"); 254var currentRoot = Path.Combine(workspace.Path, "current"); 255var reportPath = Path.Combine(workspace.Path, "report.md"); 289var baselineRoot = Path.Combine(workspace.Path, "baseline"); 290var currentRoot = Path.Combine(workspace.Path, "current"); 291var reportPath = Path.Combine(workspace.Path, "report.md"); 292var excludedPackagesPath = Path.Combine(workspace.Path, "excluded-packages.txt"); 293var suppressionPath = Path.Combine(workspace.Path, "Excluded.tscompat.suppression.txt"); 330File.WriteAllText(Path.Combine(apiDirectory, $"{packageName}.ats.txt"), content);
WorkflowScripts\AutoRerunTransientCiFailuresTests.cs (2)
3596string inputPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json"); 3708=> File.ReadAllTextAsync(Path.Combine(_repoRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
WorkflowScripts\AutoSecWorkflowTests.cs (6)
4281["nugetConfigText"] = File.ReadAllText(Path.Combine(RepoRoot.Path, "NuGet.config")), 4390["nugetConfigText"] = File.ReadAllText(Path.Combine(RepoRoot.Path, "NuGet.config")), 4632ReadWorkflow(Path.Combine("auto-sec", "collect-prs.js")), StringComparison.Ordinal); 4634ReadWorkflow(Path.Combine("auto-sec", "collect.sh")), StringComparison.Ordinal); 4850var requestPath = Path.Combine(workspace.Path, "request.json"); 4851var resultPath = Path.Combine(workspace.Path, "result.json");
WorkflowScripts\BackportWorkflowTests.cs (2)
19var scriptPath = Path.Combine(workspace.Path, "cleanup-script.js"); 41using var reader = File.OpenText(Path.Combine(RepoRoot.Path, WorkflowRelativePath));
WorkflowScripts\CreateFailingTestIssueWorkflowTests.cs (1)
270var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\CreatePullRequestActionTests.cs (3)
50var outputPath = Path.Combine(workingDirectory, $"github-output-{Guid.NewGuid():N}.txt"); 51var editArgumentsPath = Path.Combine(workingDirectory, $"edit-arguments-{Guid.NewGuid():N}.txt"); 52var editBodyPath = Path.Combine(workingDirectory, $"edit-body-{Guid.NewGuid():N}.txt");
WorkflowScripts\DeploymentTestScriptTests.cs (4)
31var outputFile = Path.Combine(_workspace.Path, "github-output.txt"); 32var argumentsFile = Path.Combine(_workspace.Path, "dotnet-arguments.txt"); 33var fakeDotnetScript = Path.Combine(_workspace.Path, "dotnet.sh"); 42var resultsDirectory = Path.Combine(_workspace.Path, "test results");
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\ExtensionReleaseWorkflowTests.cs (7)
305var bodyPath = Path.Combine(tempDirectory.FullName, "pr_body.md"); 324var bodyPath = Path.Combine(tempDirectory.FullName, "pr_body.md"); 345var commitsPath = Path.Combine(tempDirectory.FullName, "commits.txt"); 346var outputPath = Path.Combine(tempDirectory.FullName, "release_notes.md"); 469var binDirectory = Path.Combine(rootDirectory, "bin"); 472var callLogPath = Path.Combine(rootDirectory, "gh-call-log.txt"); 473var fakeGhPath = Path.Combine(binDirectory, "gh");
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");
WorkflowScripts\LabelerPredictPullsWorkflowTests.cs (2)
133var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json"); 134var outputPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.result.json");
WorkflowScripts\LintHandwrittenWorkflowsScriptTests.cs (4)
74private string ArgumentsPath => Path.Combine(_workspace.Path, "actionlint-arguments.txt"); 92var binDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "bin")).FullName; 93var fakeActionlint = Path.Combine(binDirectory, "actionlint"); 106Path.Combine(_workspace.Path, "repo"),
WorkflowScripts\MonitorScheduledWorkflowsIntegrationTests.cs (1)
392var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\MonitorScheduledWorkflowsTests.cs (1)
245var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\ReportCiFailureIntegrationTests.cs (1)
284var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\ReportCiFailureTests.cs (1)
81var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\ReportPipelineFailureIntegrationTests.cs (1)
290var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\ReportPipelineFailureTests.cs (1)
139var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\ReportSpecializedTestFailuresTests.cs (1)
228var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\SpecializedTestFailureRunnerTests.cs (1)
228var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\TestReportReaderTests.cs (6)
15var file = Path.Combine(workspace.Path, "mocha.json"); 60var file = Path.Combine(workspace.Path, "mocha.json"); 70var file = Path.Combine(workspace.Path, "mocha.json"); 85var file = Path.Combine(workspace.Path, "results.trx"); 121var file = Path.Combine(workspace.Path, "results.trx"); 133var file = Path.Combine(workspace.Path, "results.trx");
WorkflowScripts\TrackingIssueTests.cs (1)
286var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\UpdateActionlintTests.cs (5)
264var pinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, ".github")); 265var pinPath = Path.Combine(pinDirectory.FullName, "actionlint-version.json"); 292var pinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, ".github")); 293var pinPath = Path.Combine(pinDirectory.FullName, "actionlint-version.json"); 344var requestPath = Path.Combine(_workspace.Path, $"{Guid.NewGuid():N}.json");
WorkflowScripts\UpdateDependenciesVersionPropertiesTests.cs (3)
168var originalPath = Path.Combine(_workspace.Path, "original.props"); 170await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "Directory.Packages.props"), updatedPackagesProps); 171Directory.CreateDirectory(Path.Combine(_workspace.Path, "eng"));
installer.tasks (1)
GenerateTestSharedFrameworkDepsFile.cs (1)
101using (var depsFileStream = File.Create(Path.Combine(SharedFrameworkDirectory, $"{sharedFxName}.deps.json")))
Microsoft.Agents.AI.ProjectTemplates.Tests (12)
test\ProjectTemplates\Infrastructure\Project.cs (1)
28StartupProjectFullPath = Path.Combine(rootPath, field);
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (5)
42_sandboxInstallPath = Path.Combine(_sandboxOutput, "install"); 43_sandboxProjectsPath = Path.Combine(_sandboxOutput, "projects"); 84file.CopyTo(Path.Combine(testSandbox, file.Name)); 89CopySandboxDirectory(subDir.FullName, Path.Combine(testSandbox, subDir.Name)); 95var outputFolderPath = Path.Combine(_sandboxProjectsPath, projectName);
test\ProjectTemplates\Infrastructure\TemplateExecutionTestConfiguration.cs (2)
14public string TemplateSandboxPackages => Path.Combine(TemplateSandboxRoot, "packages"); 15public string TemplateSandboxOutput => Path.Combine(TemplateSandboxRoot, TemplateName);
test\ProjectTemplates\Infrastructure\TemplateSnapshotTestBase.cs (2)
35string templateLocation = Path.Combine(WellKnownPaths.LocalShippingPackagesPath, $"{templatePackageName}.*.nupkg"); 45SnapshotsDirectory = Path.Combine("Snapshots", templateName),
test\ProjectTemplates\Infrastructure\WellKnownPaths.cs (2)
35TemplateTestNuGetConfigPath = Path.Combine(TemplateSandboxSource, "nuget.config"); 46var gitPath = Path.Combine(directory, ".git");
Microsoft.Analyzers.Extra.Tests (3)
Resources\FileVisibleToAnalyzer.cs (1)
24public override string Path => System.IO.Path.Combine(Directory.GetCurrentDirectory(), _fileName);
Resources\RoslynTestUtils.cs (2)
42refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 43refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Analyzers.Local.Tests (3)
Resources\FileVisibleToAnalyzer.cs (1)
24public override string Path => System.IO.Path.Combine(Directory.GetCurrentDirectory(), _fileName);
Resources\RoslynTestUtils.cs (2)
42refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 43refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Arcade.Common (2)
CommandFactory.cs (1)
75var candidate = Path.Combine(path, executable + ".exe");
FileSystem.cs (1)
31public string PathCombine(string path1, string path2) => Path.Combine(path1, path2);
Microsoft.AspNetCore (1)
HostingPathResolver.cs (1)
27return Path.GetFullPath(Path.Combine(Path.GetFullPath(basePath), contentRootPath));
Microsoft.AspNetCore.Components.Testing (11)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\StartupHook.g.cs (1)
16var candidatePath = Path.Combine(testBinDirectory, assemblyName.Name + ".dll");
Infrastructure\E2EManifest.cs (1)
22var manifestPath = Path.Combine(AppContext.BaseDirectory, $"{assemblyName}.e2e-manifest.json");
Infrastructure\ServerInstance.cs (5)
152var stdoutPath = Path.Combine(directory, $"{AppName}-{Id}.stdout.log"); 153var stderrPath = Path.Combine(directory, $"{AppName}-{Id}.stderr.log"); 168var startupPath = Path.Combine(directory, $"{AppName}-{Id}.startup.log"); 275workingDir = Path.Combine(AppContext.BaseDirectory, appEntry.WorkingDirectory); 280executable = Path.Combine(workingDir, executable);
Infrastructure\TestArtifactDirectory.cs (3)
53return Path.Combine(s_root, sanitizedTestName); 69: Path.Combine(AppContext.BaseDirectory, configuredPath); 72return Path.Combine(AppContext.BaseDirectory, DefaultFolderName);
Infrastructure\TracingSession.cs (1)
85var tracePath = Path.Combine(_artifactDir, "trace.zip");
Microsoft.AspNetCore.Components.Testing.Tasks (6)
GenerateE2EManifest.cs (6)
112entry.WorkingDirectory = Path.Combine(E2EAppsRelativeDir, name); 127? Path.Combine("publish", name) 129var relativeDir = Path.Combine(E2EAppsRelativeDir, subPath); 130var absoluteDir = Path.Combine(E2EAppsOutputDir, subPath); 135var appHostPath = Path.Combine(absoluteDir, name + exeSuffix); 136var appDllPath = Path.Combine(absoluteDir, name + ".dll");
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
TargetPickerUi.cs (2)
402var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug"); 428var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug");
Microsoft.AspNetCore.Components.WebView (1)
WebViewManager.cs (1)
308return Path.Combine(Path.GetDirectoryName(assembly.Location)!, $"{name}.staticwebassets.runtime.json");
Microsoft.AspNetCore.Components.WebView.Maui (1)
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
118 return (ApplicationAssemblyName, Path.Combine(appContentRoot, requestPath).Replace('\\', '/'));
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
BlazorWebView.cs (1)
186 var hostPageFullPath = Path.GetFullPath(Path.Combine(appRootDir, HostPage!)); // HostPage is nonnull because RequiredStartupPropertiesSet is checked above
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
118 return (ApplicationAssemblyName, Path.Combine(appContentRoot, requestPath).Replace('\\', '/'));
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
415 var result = Path.Combine(
Microsoft.AspNetCore.Components.WebView.Wpf (3)
BlazorWebView.cs (1)
269 var hostPageFullPath = Path.GetFullPath(Path.Combine(appRootDir, HostPage));
src\BlazorWebView\src\SharedSource\StaticContentHotReloadManager.cs (1)
118 return (ApplicationAssemblyName, Path.Combine(appContentRoot, requestPath).Replace('\\', '/'));
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (1)
415 var result = Path.Combine(
Microsoft.AspNetCore.DataProtection (2)
Repositories\FileSystemXmlRepository.cs (2)
140var tempFilename = Path.Combine(Directory.FullName, Guid.NewGuid().ToString() + ".tmp"); 141var finalFilename = Path.Combine(Directory.FullName, filename + ".xml");
Microsoft.AspNetCore.DeveloperCertificates.XPlat (8)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
377Path.Combine(MacOSUserHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem"); 242var certPath = Path.Combine(certDir, nickname) + ".pem"; 361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..]) 405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName); 471var certPath = Path.Combine(certDir, nickname) + ".pem"; 610if (File.Exists(Path.Combine(searchFolder, command))) 1056var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
Microsoft.AspNetCore.Hosting (6)
Internal\HostingEnvironmentExtensions.cs (4)
30var wwwroot = Path.Combine(hostingEnvironment.ContentRootPath, "wwwroot"); 38hostingEnvironment.WebRootPath = Path.Combine(hostingEnvironment.ContentRootPath, webRoot); 81var wwwroot = Path.Combine(hostingEnvironment.ContentRootPath, "wwwroot"); 89hostingEnvironment.WebRootPath = Path.Combine(hostingEnvironment.ContentRootPath, webRoot);
StaticWebAssets\StaticWebAssetsLoader.cs (1)
78return Path.Combine(basePath!, $"{environment.ApplicationName}.staticwebassets.runtime.json");
WebHostBuilder.cs (1)
374return Path.Combine(Path.GetFullPath(basePath), contentRootPath);
Microsoft.AspNetCore.HttpLogging (1)
FileLoggerProcessor.cs (1)
329return Path.Combine(_path, FormattableString.Invariant($"{_fileName}{date.Year:0000}{date.Month:00}{date.Day:00}.{_fileNumber:0000}.txt"));
Microsoft.AspNetCore.InternalTesting (13)
AssemblyTestLog.cs (4)
120logOutputDirectory = Path.Combine(_baseDirectory, className); 140var testOutputFile = Path.Combine(logOutputDirectory, $"{testName}{LogFileExtension}"); 148testOutputFile = Path.Combine(logOutputDirectory, $"{testName}.{i}{LogFileExtension}"); 191var globalLogFileName = Path.Combine(baseDirectory, "global.log");
CollectDumpAttribute.cs (1)
30var path = Path.Combine(context.FileOutput.TestClassOutputDirectory, context.FileOutput.GetUniqueFileName(context.FileOutput.TestName, ".dmp"));
HelixHelper.cs (2)
20? Path.Combine(Path.GetTempPath(), uploadFileName) 21: Path.Combine(uploadRoot, uploadFileName);
TestFileOutputContext.cs (3)
43TestClassOutputDirectory = Path.Combine(AssemblyOutputDirectory, TestClassName); 64var path = Path.Combine(TestClassOutputDirectory, $"{prefix}{extension}"); 69path = Path.Combine(TestClassOutputDirectory, $"{prefix}{i++}{extension}");
TestPathUtilities.cs (3)
19var projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, $"{solution}.slnf")); 25projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "AspNetCore.slnx")); 29directoryInfo = new DirectoryInfo(Path.Combine(directoryInfo.FullName, "src"));
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationParts\RelatedAssemblyAttribute.cs (1)
90var relatedAssemblyLocation = Path.Combine(assemblyDirectory, attribute.AssemblyFileName + ".dll");
Microsoft.AspNetCore.Mvc.Testing (3)
WebApplicationFactory.cs (3)
484var contentRootCandidate = Path.Combine( 488var contentRootMarker = Path.Combine( 593var depsFile = new FileInfo(Path.Combine(AppContext.BaseDirectory, depsFileName));
Microsoft.AspNetCore.Razor.Utilities.Shared (1)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\FileUtilities.cs (1)
104uniquePath = Path.Combine(directoryName, $"{baseFileName}{identifier}{extension}");
Microsoft.AspNetCore.Server.IntegrationTesting (17)
CachingApplicationPublisher.cs (1)
70var destFileName = Path.Combine(target.FullName, fileInfo.Name);
Common\DotNetCommands.cs (4)
27var result = Path.Combine(Directory.GetCurrentDirectory(), _dotnetFolderName); 50result = Path.Combine(userProfile, _dotnetFolderName); 63var archSpecificDir = Path.Combine(dotnetDir, arch.ToString()); 83return Path.Combine(dotnetDir, dotnetFile);
Deployers\NginxDeployer.cs (3)
126var pidFile = Path.Combine(DeploymentParameters.ApplicationPath, $"{Guid.NewGuid()}.nginx.pid"); 127var errorLog = Path.Combine(DeploymentParameters.ApplicationPath, "nginx.error.log"); 128var accessLog = Path.Combine(DeploymentParameters.ApplicationPath, "nginx.access.log");
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (8)
91_deployedFolderPathInFileShare = Path.Combine(_deploymentParameters.RemoteServerFileSharePath, folderId); 153var webConfigFilePath = Path.Combine(_deploymentParameters.PublishedApplicationRootPath, "web.config"); 163Path.Combine(_deploymentParameters.DotnetRuntimePath, "dotnet.exe")); 204executableParameters = Path.Combine(_deployedFolderPathInFileShare, applicationName + ".dll"); 208executablePath = Path.Combine(_deployedFolderPathInFileShare, applicationName + ".exe"); 289var temppath = Path.Combine(destDirName, file.Name); 297var temppath = Path.Combine(destDirName, subdir.Name); 318var physicalFilePath = Path.Combine(Path.GetTempPath(), embeddedFileName);
Deployers\SelfHostDeployer.cs (1)
103var executable = Path.Combine(workingDirectory, DeploymentParameters.ApplicationName + executableExtension);
Microsoft.AspNetCore.Server.Kestrel.Core (17)
Internal\CertificatePathWatcher.cs (2)
115var path = Path.Combine(_contentRootDir, certificateConfig.Path); 218var path = Path.Combine(_contentRootDir, certificateConfig.Path);
Internal\Certificates\CertificateConfigLoader.cs (3)
40var certificatePath = Path.Combine(HostEnvironment.ContentRootPath, certInfo.Path!); 46var certificateKeyPath = Path.Combine(HostEnvironment.ContentRootPath, certInfo.KeyPath); 75return (new X509Certificate2(Path.Combine(HostEnvironment.ContentRootPath, certInfo.Path!), certInfo.Password), fullChain);
ListenOptionsHttpsExtensions.cs (3)
43return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName))); 57return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName), password)); 72return listenOptions.UseHttps(new X509Certificate2(Path.Combine(env.ContentRootPath, fileName), password), configureOptions);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
377Path.Combine(MacOSUserHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem"); 242var certPath = Path.Combine(certDir, nickname) + ".pem"; 361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..]) 405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName); 471var certPath = Path.Combine(certDir, nickname) + ".pem"; 610if (File.Exists(Path.Combine(searchFolder, command))) 1056var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
TlsConfigurationLoader.cs (1)
194path = basePath != null ? Path.Combine(basePath, $"{applicationName}.pfx") : null;
Microsoft.AspNetCore.SpaProxy (5)
SpaHostingStartup.cs (1)
20var spaProxyConfigFile = Path.Combine(AppContext.BaseDirectory, "spa.proxy.json");
SpaProxyLaunchManager.cs (4)
197WorkingDirectory = Path.Combine(AppContext.BaseDirectory, _options.WorkingDirectory) 244WorkingDirectory = Path.Combine(AppContext.BaseDirectory, _options.WorkingDirectory) 269var scriptPath = Path.Combine(AppContext.BaseDirectory, fileName); 307WorkingDirectory = Path.Combine(AppContext.BaseDirectory, _options.WorkingDirectory)
Microsoft.AspNetCore.SpaServices.Extensions (1)
StaticFiles\DefaultSpaStaticFileProvider.cs (1)
31var absoluteRootPath = Path.Combine(
Microsoft.AspNetCore.StaticAssets (3)
Infrastructure\StaticAssetsEndpointDataSourceHelper.cs (2)
60return Path.Combine(AppContext.BaseDirectory, $"{environment.ApplicationName}.staticwebassets.endpoints.json"); 63return Path.IsPathRooted(staticAssetsManifestPath) ? staticAssetsManifestPath : Path.Combine(AppContext.BaseDirectory, staticAssetsManifestPath);
StaticAssetsEndpointRouteBuilderExtensions.cs (1)
34Path.Combine(AppContext.BaseDirectory, staticAssetsManifestPath) :
Microsoft.AspNetCore.StaticFiles (1)
StaticFileMiddleware.cs (1)
49_logger.WebRootPathNotFound(Path.GetFullPath(Path.Combine(hostingEnv.ContentRootPath, hostingEnv.WebRootPath ?? "wwwroot")));
Microsoft.AspNetCore.TestHost (1)
WebHostBuilderExtensions.cs (1)
199builder.UseContentRoot(Path.GetFullPath(Path.Combine(directoryInfo.FullName, solutionRelativePath)));
Microsoft.AspNetCore.WebUtilities (2)
FileBufferingReadStream.cs (1)
238_tempFileName = Path.Combine(_tempFileDirectory, "ASPNETCORE_" + Guid.NewGuid().ToString() + ".tmp");
FileBufferingWriteStream.cs (1)
270var tempFileName = Path.Combine(tempFileDirectory, "ASPNETCORE_" + Guid.NewGuid() + ".tmp");
Microsoft.Build (80)
BackEnd\BuildManager\BuildManager.cs (1)
1820submission.BuildRequestData.ProjectFullPath = Path.Combine(
BackEnd\BuildManager\CoordinatorClient.cs (2)
545string coordinatorDll = Path.Combine(msbuildDir, "MSBuild.Coordinator.dll"); 546string coordinatorExe = Path.Combine(msbuildDir, "MSBuild.Coordinator.exe");
BackEnd\BuildManager\MultiThreadedStrictModeScope.cs (1)
78string sentinelDirectory = Path.Combine(temporaryDirectory, SentinelDirectoryName);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
161_debugDumpFilePath = Path.Combine(_debugDumpDirectory, $"EngineTrace_{EnvironmentUtilities.CurrentProcessId}.txt");
BackEnd\Components\Communications\CurrentHost.cs (2)
31string dotnetExe = Path.Combine( 51dotnetExe = Path.Combine(
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
282msbuildLocation = Path.Combine(msbuildExeName, ".exe"); 643string dllPath = Path.Combine(Path.GetDirectoryName(msbuildLocation), Constants.MSBuildAssemblyName);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (8)
768? Path.Combine(GetOrInitializeX64Clr2Path(toolName, basePath64), toolName) 769: Path.Combine(GetOrInitializeX32Clr2Path(toolName, basePath), toolName); 774return Path.Combine(s_pathToX64Clr4 ??= basePath64, toolName); 779return Path.Combine(s_pathToArm64Clr4 ??= basePathArm64, toolName); 782return Path.Combine(s_pathToX32Clr4 ??= basePath, toolName); 894string fullPath = Path.Combine(envPath, toolName); 1282string appHostPath = Path.Combine(msbuildAssemblyPath, Constants.MSBuildExecutableName); 1285: (Path.Combine(msbuildAssemblyPath, Constants.MSBuildAssemblyName), false);
BackEnd\Components\Communications\RarNodeLauncher.cs (1)
64return pipeNames.Contains(Path.Combine(NamedPipeRoot, _pipeName));
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
187string pluginPath = FileUtilities.NormalizePath(Path.Combine(item.Project.Directory, item.EvaluatedInclude));
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
684outputItemFromTarget.ItemSpec = Path.Combine(projectDirectory[i], outputItemFromTarget.ItemSpec);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
362projectFiles[i] = Path.Combine(_requestEntry.ProjectRootDirectory, projectFiles[i]);
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (5)
993string oldestOutputFullPath = Path.Combine(projectDirectory, oldestOutput); 1018string candidateOutputFullPath = Path.Combine(projectDirectory, candidateOutput); 1053string unescapedInputFullPath = Path.Combine(projectDirectory, unescapedInput); 1208path1 = Path.Combine(_project.Directory, path1); 1211path2 = Path.Combine(_project.Directory, path2);
BackEnd\Components\Scheduler\Scheduler.cs (2)
274_debugDumpTraceFilePath = Path.Combine(_debugDumpDirectory, $"SchedulerTrace_{EnvironmentUtilities.CurrentProcessId}.txt"); 275_debugDumpStateFilePath = Path.Combine(_debugDumpDirectory, $"SchedulerState_{EnvironmentUtilities.CurrentProcessId}.txt");
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (4)
69Path.Combine(BuildEnvironmentHelper.Instance.MSBuildToolsDirectory32, "SdkResolvers"), location); 96Path.Combine(BuildEnvironmentHelper.Instance.MSBuildToolsDirectoryRoot, "SdkResolvers"), location); 132var manifest = Path.Combine(subfolder.FullName, $"{subfolder.Name}.xml"); 133var assembly = Path.Combine(subfolder.FullName, $"{subfolder.Name}.dll");
BackEnd\Components\SdkResolution\SdkResolverManifest.cs (1)
86manifest.Path = System.IO.Path.Combine(manifestFolder, manifest.Path);
BackEnd\Shared\BuildRequestConfiguration.cs (1)
1132string filename = Path.Combine(FileUtilities.GetCacheDirectory(), String.Format(CultureInfo.InvariantCulture, "Configuration{0}.cache", _configId));
BackEnd\Shared\TargetResult.cs (2)
282string filename = Path.Combine(FileUtilities.GetCacheDirectory(), String.Format(CultureInfo.InvariantCulture, Path.Combine("Results{0}", "{1}.cache"), configId, targetToCache));
BuildCheck\Checks\DoubleWritesCheck.cs (1)
104CheckWrite(context, Path.Combine(destinationFolderPath, Path.GetFileName(sourceFilePath)));
BuildCheck\Checks\UntrustedLocationCheck.cs (1)
104return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");
BuildCheck\Utilities\BuildCheckUtilities.cs (1)
15path = Path.Combine(Path.GetDirectoryName(projectFilePath)!, path);
Construction\Solution\ProjectInSolution.cs (1)
183_absolutePath = Path.Combine(ParentSolution.SolutionFileDirectory, _relativePath);
Construction\Solution\SolutionFile.cs (2)
1162string fullPathToEtpProj = Path.Combine(SolutionFileDirectory, etpProj.RelativePath); 1216RelativePath = Path.Combine(etpProjectRelativeDir, fileElementValue)
Construction\Solution\SolutionProjectGenerator.cs (4)
1085string localFile = Path.Combine(escapedSolutionDirectory, $"before.{escapedSolutionFileName}.targets"); 1089localFile = Path.Combine(escapedSolutionDirectory, $"after.{escapedSolutionFileName}.targets"); 1364baseName = Path.Combine(_solutionFile.SolutionFileDirectory, MakeIntoSafeItemName(project.GetUniqueProjectName())); 2363globalProperties.AddProperty(SolutionPathPropertyName, EscapingUtilities.Escape(Path.Combine(_solutionFile.SolutionFileDirectory, Path.GetFileName(_solutionFile.FullPath))));
Definition\ToolsetLocalReader.cs (1)
40System.IO.Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, "Roslyn"),
Definition\ToolsetReader.cs (3)
205var xbuildToolsetsDir = Path.Combine(libraryPath, $"xbuild{Path.DirectorySeparatorChar}"); 212var binPath = Path.Combine(d, "bin"); 636Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, trimmedValue));
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
174list.Add(Path.GetFullPath(Path.Combine(state.EvaluationDirectory, item.ItemSpec)));
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);
Evaluation\Expander.ItemExpander.Transforms.cs (4)
188rootedPath = Path.Combine(baseDirectoryToUse, unescapedPath); 226string combinedPath = Path.Combine(unescapedPath, relativePath); 278rootedPath = Path.Combine(baseDirectoryToUse, unescapedPath); 363rootedPath = Path.Combine(baseDirectoryToUse, unescapedPath);
Evaluation\Expander\WellKnownFunctions.cs (3)
35var logFile = Path.Combine(Directory.GetCurrentDirectory(), fileName); 66returnVal = Path.Combine(arg0, arg1); 106? Path.GetFullPath(Path.Combine(FileUtilities.CurrentThreadWorkingDirectory, arg0))
Evaluation\IntrinsicFunctions.cs (1)
296return Path.Combine(NativeMethodsShared.FrameworkBasePath, m.Groups[0].Value) + Path.DirectorySeparatorChar;
Globbing\MSBuildGlob.cs (2)
143var rootedInput = Path.Combine(_state.Value.GlobRoot, stringToMatch); 237var parentedFixedPart = Path.Combine(globRoot, fixedDirPart);
Graph\GraphBuilder.cs (1)
325solutionGlobalPropertiesBuilder[SolutionProjectGenerator.SolutionPathPropertyName] = EscapingUtilities.Escape(Path.Combine(Solution.SolutionFileDirectory, Path.GetFileName(Solution.FullPath)));
Instance\TaskRegistry.UsingTaskInfo.cs (6)
75Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, TasksV4Filename); 81Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, TasksV12Filename); 99Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, TasksCoreFilename); 403assemblyFile = Strings.WeakIntern(Path.Combine(directoryOfImportingFile, assemblyFile)); 516string replacedAssemblyFile = Path.Combine(Path.GetDirectoryName(assemblyFile)!, TasksCoreFilename); 569string replacedAssemblyFile = Path.Combine(Path.GetDirectoryName(assemblyFile)!, TasksCoreFilename);
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
596Path.Combine(FileUtilities.TempFileDirectory, Path.GetRandomFileName()),
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
1329: FileUtilities.GetFullPathNoThrow(Path.Combine(projectDirectory, itemSpec));
Logging\BinaryLogger\ProjectImportsCollector.cs (1)
70_archiveFilePath = Path.Combine(
Logging\TerminalLogger\TerminalLogger.cs (1)
980projectDisplayPathSpan = Path.Combine(relativePathFromWorkingDirToSourceRoot.ToString(), outputPathSpan.Slice(sourceRootSpan.Length).ToString()).AsSpan();
Utilities\FileSpecMatchTester.cs (2)
69fileToMatch = FileUtilities.GetFullPathNoThrow(Path.Combine(_currentDirectory, fileToMatch)); 129var absoluteFixedDirPart = Path.Combine(currentDirectory, fixedDirPart);
Utilities\Utilities.cs (1)
577string userExtensionsPath = Path.Combine(localAppData, ReservedPropertyNames.UserExtensionsPathSuffix);
Microsoft.Build.Framework (105)
BackEnd\CommunicationsUtilities.cs (1)
810string filePath = Path.Combine(s_debugDumpPath, fileName);
BackEnd\NamedPipeUtil.cs (1)
31return Path.Combine("/tmp", pipeName);
BuildEnvironmentHelper.cs (9)
165return TryFromStandaloneMSBuildExe(Path.Combine(sdkRoot, Constants.MSBuildExecutableName)) 166?? TryFromStandaloneMSBuildExe(Path.Combine(sdkRoot, Constants.MSBuildAssemblyName)); 240var msBuildExecutableCandidate = Path.Combine(Path.GetDirectoryName(buildAssembly), Constants.MSBuildExecutableName); 368return TryFromStandaloneMSBuildExe(Path.Combine(appContextBaseDirectory, Constants.MSBuildExecutableName)) 370?? TryFromStandaloneMSBuildExe(Path.Combine(appContextBaseDirectory, Constants.MSBuildAssemblyName)); 656MSBuildToolsDirectory64 = existsCheck(potentialAmd64FromX86) ? Path.Combine(MSBuildToolsDirectoryRoot, "amd64") : CurrentMSBuildToolsDirectory; 660MSBuildToolsDirectoryArm64 = existsCheck(potentialARM64FromX86) ? Path.Combine(MSBuildToolsDirectoryRoot, "arm64") : CurrentMSBuildToolsDirectory; 667? Path.Combine(VisualStudioInstallRootDirectory, "MSBuild") 725defaultSdkPath = Path.Combine(CurrentMSBuildToolsDirectory, "Sdks");
Debugging\DebugUtils.cs (6)
93debugDirectory = Path.Combine(debugDirectory, ".MSBuild_Logs"); 97debugDirectory = Path.Combine(Directory.GetCurrentDirectory(), ".MSBuild_Logs"); 101debugDirectory = Path.Combine(FileUtilities.TempFileDirectory, ".MSBuild_Logs"); 211var fullPath = Path.Combine(DebugPath, fileName); 217fullPath = Path.Combine(DebugPath, fileName); 272s_dumpFileName = Path.Combine(DebugDumpPath, $"MSBuild_pid-{pid}_{guid:n}.failure.txt");
Debugging\PrintLineDebuggerWriters.cs (2)
27var file = Path.Combine(LogFileRoot, string.IsNullOrEmpty(id) ? "NoId" : id) + ".csv"; 32var errorFile = Path.Combine(LogFileRoot, $"LoggingException_{Guid.NewGuid()}");
FileUtilities_TempFiles.cs (4)
194string file = Path.Combine(directory, $"{fileName}{extension}"); 218string destFile = Path.Combine(dest, fileInfo.Name); 223string destDir = Path.Combine(dest, subdirInfo.Name); 236: System.IO.Path.Combine(TempFileDirectory, name);
FileUtilities.cs (8)
126cacheDirectory = Path.Combine(TempFileDirectory, string.Format(CultureInfo.CurrentUICulture, "MSBuild{0}-{1}", EnvironmentUtilities.CurrentProcessId, AppDomain.CurrentDomain.Id)); 443string testFilePath = Path.Combine(directory, $"MSBuild_{Guid.NewGuid():N}_testFile.txt"); 687return NormalizePath(Path.Combine(directory, file)); 844return (shouldCheckDirectory && DefaultFileSystem.DirectoryExists(Path.Combine(baseDirectory, directory.ToString()))) 944string fullPath = NormalizePath(Path.Combine(currentDirectory, fileSpec)); 1022var fullPath = GetFullPathNoThrow(Path.Combine(currentDirectory, normalizedPath)); 1487return paths.Aggregate(root, Path.Combine); 1661string possibleFileDirectory = Path.Combine(lookInDirectory, fileName);
ItemSpecModifiers.cs (2)
86Directory = Path.Combine(rootDir, directory); 679_ = Path.GetFullPath(Path.Combine(currentDirectory, itemSpec));
Loader\MSBuildLoadContext.cs (1)
108var assemblyNameInExecutableDirectory = Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory,
Loader\TypeLoader.cs (1)
84microsoftBuildFrameworkPath = Path.Combine(msbuildDirectory, "Microsoft.Build.Framework.dll");
MultiThreadedTaskEnvironmentDriver.cs (1)
113systemTempDirectory = Path.Combine(GetWindowsDirectory(), "SystemTemp");
PathHelpers\AbsolutePath.cs (2)
112string combined = Path.Combine(basePath.Value, path); 156return Path.Combine(basePath, combined.Substring(2));
Utilities\FileMatcher.cs (9)
594longPath = Path.Combine(longPath, parts[i]); 1850fixedDirectoryPart = Path.Combine(projectDirectoryUnescaped, fixedDirectoryPart); 2218fixedDirectoryPart = Path.Combine(projectRoot, fixedDirectoryPart); 2421includeBaseDirectory = Path.Combine(projectDirectory, includeBaseDirectory); 2422excludeBaseDirectory = Path.Combine(projectDirectory, excludeBaseDirectory); 2531: Path.Combine(projectDirectory, includeBaseDirectory.ToString()); 2534: Path.Combine(projectDirectory, excludeBaseDirectory.ToString()); 2868: Path.Combine(parentRelativeDirectory, directoryName); 3132Path.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\PlatformManifest.cs (1)
95string platformManifestPath = Path.Combine(_pathToManifest, "Platform.xml");
Utilities\SDKManifest.cs (1)
290string sdkManifestPath = Path.Combine(_pathToSdk, "SDKManifest.xml");
Utilities\TaskFactoryUtilities.cs (2)
270path = Path.Combine(directory, assemblyName.Name + ".dll"); 304return Path.Combine(projectDirectory, path);
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);
Utilities\ToolLocationHelper_InstalledFrameworks.cs (6)
220string frameworkIdentifierPath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier); 278string frameworkProfilePath = Path.Combine(frameworkReferenceRoot, frameworkIdentifier); 279frameworkProfilePath = Path.Combine(frameworkProfilePath, frameworkVersion); 280frameworkProfilePath = Path.Combine(frameworkProfilePath, "Profiles"); 325string dotNextFx30RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV30); 332string dotNextFx35RefPath = Path.Combine(frameworkReferenceRoot, FrameworkLocationHelper.dotNetFrameworkVersionFolderPrefixV35);
Utilities\ToolLocationHelper_ReferenceAssemblies.cs (6)
68if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll"))) 142if (legacyMsCorlib20Path != null && FileSystems.Default.FileExists(Path.Combine(legacyMsCorlib20Path, "mscorlib.dll"))) 159if (FileSystems.Default.FileExists(Path.Combine(referenceAssemblyDirectory, "mscorlib.dll"))) 608string redistListFolder = Path.Combine(path, "RedistList"); 609string redistFilePath = Path.Combine(redistListFolder, "FrameworkList.xml"); 693pathToReturn = Path.Combine(pathToReturn, includeFramework);
Utilities\ToolLocationHelper_SDKDiscovery.cs (10)
165string pathToSDKManifest = Path.Combine(sdkVersionDirectory.FullName, "SDKManifest.xml"); 241string platformSDKDirectory = Path.Combine(rootPathWithIdentifier.FullName, version); 242string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml"); 265string sdkFolderPath = Path.Combine(platformSDKDirectory, "ExtensionSDKs"); 361string platformSDKManifest = Path.Combine(platformSDKDirectory, "SDKManifest.xml"); 439string sdkManifestFileLocation = Path.Combine(directoryName, "SDKManifest.xml"); 517string localAppdataFolder = Path.Combine(userLocalAppData, "Microsoft SDKs"); 524string defaultProgramFilesLocation = Path.Combine( 644string platformsRoot = Path.Combine(sdk.Path, platformsFolderName); 672string pathToPlatformManifest = Path.Combine(platformVersion.FullName, "Platform.xml");
Utilities\ToolLocationHelper_SDKFolders.cs (3)
50string legacyWindowsMetadataLocation = Path.Combine(sdkRoot, "Windows Metadata"); 179return Path.Combine(sdkLocation, folderName); 193: Path.Combine(matchingSdk.Path, folderName);
Utilities\ToolLocationHelper_VisualStudio.cs (2)
53var folders = string.IsNullOrEmpty(subFolder) ? vsInstallFolders : vsInstallFolders.Select(i => Path.Combine(i, subFolder)); 118string fullPath = Path.Combine(root, file);
Microsoft.Build.NuGetSdkResolver (5)
GlobalJsonReader.cs (1)
140candidatePath = new FileInfo(Path.Combine(currentDirectory.FullName, file));
NuGetSdkResolver.cs (2)
305installedPath = Path.Combine(packageInfo.PathResolver.GetInstallPath(packageInfo.Id, packageInfo.Version), "Sdk"); 311installedPath = Path.Combine(packageInfo.PathResolver.GetInstallPath(packageInfo.Id, packageInfo.Version), "sdk");
RestoreRunnerEx.cs (2)
48var projectDirectory = Path.Combine(Path.GetTempPath(), $"NuGet-{Guid.NewGuid():N}"); 53var projectFullPath = Path.Combine(projectDirectory, $"{projectName}.proj");
Microsoft.Build.Tasks.CodeAnalysis (13)
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (5)
75internal string PathToBuiltInTool => Path.Combine(GetToolDirectory(), ToolName); 86_useAppHost = useAppHost = TaskEnvironment.FileExists(Path.Combine(GetToolDirectory(), AppHostToolName)); 179return Path.Combine(ToolPath ?? "", ToolExe); 268return Path.Combine(buildTaskDirectory, "bincore"); 309return Path.Combine(sdkDirectory, "Roslyn");
src\roslyn\src\Compilers\Core\MSBuildTask\Utilities.cs (1)
117combined = Path.Combine(path1, path2);
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (4)
462var processFilePath = Path.Combine(clientDir, $"VBCSCompiler{PlatformInformation.ExeExtension}"); 819var result = Path.Combine(tempPath, ".roslyn"); 827FilePath = Path.Combine(mutexDirectory, name); 828GuardPath = Path.Combine(mutexDirectory, ".guard");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
182loggingFilePath = Path.Combine(loggingFilePath, $"server.{processId}.log");
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (1)
36return Path.Combine("/tmp", pipeName);
Microsoft.Build.Tasks.Core (101)
AddToWin32Manifest.cs (1)
183string originalPath = Path.Combine(OutputDirectory, manifestName);
AssemblyDependency\Reference.cs (1)
573_fullPathWithoutExtension = Path.Combine(DirectoryName, FileNameWithoutExtension);
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));
AssemblyDependency\Resolver.cs (2)
337fullPath = Path.Combine(fullPathToDirectory, baseName); 393string fullPath = Path.Combine(fullPathToDirectory, weakNameBase);
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(
BootstrapperUtil\Util.cs (1)
225string msbuildExtensionPackagesPath = Path.Combine(BuildEnvironmentHelper.Instance.MSBuildExtensionsPath, BOOTSTRAPPER_MSBUILD_ADDITIONAL_PACKAGES_PATH);
CombinePath.cs (1)
70combinedPath.ItemSpec = Path.Combine(BasePath, path.ItemSpec);
Copy.cs (2)
819() => Path.Combine(DestinationFolder.ItemSpec, Path.GetFileName(SourceFiles[i].ItemSpec)), 858() => Path.Combine(src, file),
CreateManifestResourceName.cs (2)
197AbsolutePath dependentPath = TaskEnvironment.GetAbsolutePath(Path.Combine(Path.GetDirectoryName(fileName), conventionDependentUpon)); 222AbsolutePath pathToDependent = TaskEnvironment.GetAbsolutePath(Path.Combine(Path.GetDirectoryName(fileName), dependentUpon));
Culture.cs (1)
79info.cultureNeutralFilename = Path.Combine(baseFolder, fileName);
DownloadFile.cs (1)
186var destinationFile = new FileInfo(Path.Combine(destinationDirectory.FullName, filename));
FileIO\WriteLinesToFile.cs (1)
180temporaryFilePath = Path.Combine(directoryPath, Path.GetRandomFileName() + "~");
GenerateLauncher.cs (1)
106string outputEntryPoint = Path.Combine(Path.GetDirectoryName(EntryPoint.ItemSpec), results.KeyFile);
GenerateResource.cs (6)
578commandLineBuilder.AppendFileNameIfNotNull(Path.Combine(_resgenPath, "resgen.exe")); 2751string priDirectory = Path.Combine(outFileOrDir ?? String.Empty, 2753currentOutputDirectory = Path.Combine(priDirectory, 2761currentOutputFile = Path.Combine(currentOutputDirectory, currentOutputFileNoPath); 2925string shorterPath = Path.Combine(outputDirectory ?? String.Empty, cultureName ?? String.Empty); 2930currentOutputFile = Path.Combine(shorterPath, currentOutputFileNoPath);
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");
LC.cs (1)
180outputPath = Path.Combine(OutputDirectory, outputPath);
ManifestUtil\AssemblyIdentity.cs (2)
534string path = Path.Combine(searchPath, file); 541path = Path.Combine(searchPath, file);
ManifestUtil\DeployManifest.cs (3)
182string redistListPath = Path.Combine(referenceAssemblyPath, _redistListFolder); 183return Path.Combine(redistListPath, _redistListFile); 588manifestPath = Path.Combine(Path.GetDirectoryName(SourcePath), _entryPoint.TargetPath);
ManifestUtil\LauncherBuilder.cs (2)
71Path.Combine(outputPath, launcherFilename), 72Path.Combine(outputPath.OriginalValue, launcherFilename),
ManifestUtil\Manifest.cs (4)
225defaultDir = Path.Combine(Directory.GetCurrentDirectory(), defaultDir); 334string resolvedPath = Path.Combine(searchPath, path); 523f.ResolvedPath = Path.Combine(Path.GetDirectoryName(f.ResolvedPath), f.TargetPath); 527f.ResolvedPath = Path.Combine(Path.GetDirectoryName(f.ResolvedPath), AssemblyName);
ManifestUtil\ManifestWriter.cs (1)
147File.Copy(temp, Path.Combine(Util.logPath, n + ".trust-file.xml"), true);
ManifestUtil\SecurityUtil.cs (2)
917toolPath = Path.Combine(Directory.GetCurrentDirectory(), ToolName); 982return versionIndependentToolPath != null ? Path.Combine(versionIndependentToolPath, toolName) : null;
ManifestUtil\Util.cs (4)
267string logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"Microsoft\VisualStudio\8.0\VSPLOG"); 482s_logFileWriter = new StreamWriter(Path.Combine(logPath, "Microsoft.Build.Tasks.log"), false); 513string path = Path.Combine(logPath, filename); 543string path = Path.Combine(logPath, filename);
Move.cs (1)
131destinationFile = Path.Combine(DestinationFolder.ItemSpec, Path.GetFileName(SourceFiles[i].ItemSpec));
MSBuild.cs (1)
626outputItemFromTarget.ItemSpec = Path.Combine(projectDirectory[i], outputItemFromTarget.ItemSpec);
NativeMethods.cs (2)
230private static readonly string s_gacPath = Path.Combine(NativeMethodsShared.FrameworkBasePath, "gac"); 489var path = Path.Combine(s_gacPath, assemblyNameVersion.Name);
RedistList.cs (3)
306string redistDirectory = Path.Combine(frameworkDirectory, RedistListFolder); 1103string subsetDirectory = Path.Combine(frameworkDirectory, subsetListFolder); 1110string subsetFilePath = Path.Combine(subsetDirectory, subsetName + ".xml");
ResolveCodeAnalysisRuleSet.cs (3)
90string fullName = Path.Combine(MSBuildProjectDirectory, CodeAnalysisRuleSet); 103string fullName = Path.Combine(directory, CodeAnalysisRuleSet); 117string fullName = Path.Combine(MSBuildProjectDirectory, CodeAnalysisRuleSet);
ResolveManifestFiles.cs (2)
390targetPath = Path.Combine(itemCulture.ToString(), targetPath); 878fusionName = Path.Combine(destSubDir, Path.GetFileNameWithoutExtension(item.ItemSpec));
ResolveSDKReference.cs (1)
1015_sdkManifestPath = Path.Combine(ResolvedPath, "SDKManifest.xml");
ResourceHandling\MSBuildResXReader.cs (1)
237fileName = Path.Combine(
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (3)
655Path.Combine(ThisAssemblyDirectoryLazy.Value, ReferenceAssemblyDirectoryName), 658.FirstOrDefault(p => FileSystems.Default.FileExists(Path.Combine(p, assemblyFileName))); 662resolvedAssemblyReferences.Add(Path.Combine(resolvedDir, assemblyFileName));
SdkToolsPathUtility.cs (5)
60pathToTool = Path.Combine(processorSpecificToolDirectory, toolName); 67pathToTool = Path.Combine(sdkToolsPath, toolName); 126ProcessorArchitecture.ARM => Path.Combine(sdkToolsPath, "arm"), 127ProcessorArchitecture.AMD64 => Path.Combine(sdkToolsPath, "x64"), 128ProcessorArchitecture.IA64 => Path.Combine(sdkToolsPath, "ia64"),
SystemState.cs (2)
468string pathFromRedistList = Path.Combine(a.FrameworkDirectory, filename); 622AbsolutePath fullPath = taskEnvironment.GetAbsolutePath(Path.Combine(stateFileDirectory, relativePath)).GetCanonicalForm();
Untar.cs (1)
288AbsolutePath fullDestinationPath = TaskEnvironment.GetAbsolutePath(Path.Combine(destinationDirectory.FullName, entryName)).GetCanonicalForm();
Unzip.cs (1)
192AbsolutePath fullDestinationPath = TaskEnvironment.GetAbsolutePath(Path.Combine(destinationDirectory.FullName, zipArchiveEntry.FullName)).GetCanonicalForm();
WriteCodeFragment.cs (2)
117OutputFile = new TaskItem(Path.Combine(OutputDirectory.ItemSpec, OutputFile.ItemSpec)); 128OutputFile = new TaskItem(Path.Combine(OutputDirectory.ItemSpec, Path.GetFileName(outputFilePath)));
Microsoft.Build.Tasks.Git (23)
GitDataReader\GitConfig.Reader.cs (6)
103return Path.Combine(xdgConfigHome, "git"); 130var systemConfig = Path.Combine(systemDir, "gitconfig"); 141var xdgConfig = Path.Combine(xdgDir, "config"); 151var globalConfig = Path.Combine(_environment.HomeDirectory, ".gitconfig"); 159var localConfig = Path.Combine(_commonDirectory, "config"); 288return Path.GetFullPath(Path.Combine(root, relativePath));
GitDataReader\GitEnvironment.cs (1)
121return Path.Combine(gitInstallDir, "etc");
GitDataReader\GitReferenceResolver.cs (6)
71var packedRefsPath = Path.Combine(commonDirectory, PackedRefsFileName); 187var refTableDirectory = Path.Combine(commonDirectory, RefTableDirectoryName); 188var tablesFilePath = Path.Combine(refTableDirectory, TablesListFileName); 199var path = Path.Combine(refTableDirectory, fileName); 312ReferenceStorageFormat.LooseFiles => ParseObjectNameOrReference(ReadReferenceFromFile(Path.Combine(_gitDirectory, GitRepository.GitHeadFileName))), 355path = Path.Combine(_commonDirectory, referenceName);
GitDataReader\GitRepository.cs (9)
139return Path.GetFullPath(Path.Combine(location.GitDirectory, value)); 182var dotGitPath = Path.Combine(submoduleWorkingDirectoryFullPath, GitDirName); 244fullPath = Path.GetFullPath(Path.Combine(workingDirectory, path)); 281var submodulesConfigFile = Path.Combine(workingDirectory, GitModulesFileName); 391var dotGitPath = Path.Combine(directory, GitDirName); 449return Path.GetFullPath(Path.Combine(Path.GetDirectoryName(path)!, link)); 460if (!File.Exists(Path.Combine(directory, GitHeadFileName))) 467var commonLinkPath = Path.Combine(directory, CommonDirFileName); 472commonDirectory = Path.Combine(directory, File.ReadAllText(commonLinkPath).TrimEnd(CharUtils.AsciiWhitespace));
GitOperations.cs (1)
376var fullPath = Path.GetFullPath(Path.Combine(projectDirectory, file.ItemSpec));
Microsoft.Build.Utilities.Core (3)
ToolTask.cs (3)
527pathToTool = Path.Combine(ToolPath, ToolExe); 540pathToTool = Path.Combine(directory, ToolExe); 1435.Select(folderPath => Path.Combine(folderPath, filename))
Microsoft.CodeAnalysis (27)
AssemblyUtilities.cs (1)
38string satelliteAssemblyPath = Path.Combine(subDirectory, resourcesNameWithExtension);
CommandLine\CommandLineArguments.cs (2)
345return Path.Combine(OutputDirectory, outputFileName); 365return PdbPath ?? Path.Combine(OutputDirectory, Path.ChangeExtension(outputFileName, ".pdb"));
CommandLine\CommandLineParser.cs (2)
469pdbPath = Path.ChangeExtension(Path.Combine(outputDirectory, outputFileName), ".pdb"); 494genericPath = Path.Combine(outputDirectory!, outputFileName);
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
81var newFilePath = Path.Combine(Path.GetDirectoryName(_filePath)!, Guid.NewGuid().ToString() + "_" + Path.GetFileName(_filePath));
CommandLine\CommonCompiler.cs (1)
1829var filePath = Path.Combine(Arguments.OutputDirectory, Arguments.OutputFileName + ".key");
Compilation.EmitStream.cs (1)
148tempFilePath = Path.Combine(signingDirectory, $"legacy-sign.{Guid.NewGuid():N}.dll");
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (3)
118var assemblyPath = Path.Combine(directory, simpleName + ".dll"); 135var analyzerFilePath = Path.Combine(directory, analyzerFileName); 204var assemblyPath = Path.Combine(Directory, unmanagedDllName + ".dll");
DiagnosticAnalyzer\ProgramFilesAnalyzerPathResolver.cs (1)
35DotNetPath = Path.Combine(programFilesPath, "dotnet");
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (7)
123var versionDirectory = Path.Combine(baseDirectory, DirectoryVersion); 124ShadowDirectory = Path.Combine(versionDirectory, "shadow"); 125CacheDirectory = Path.Combine(versionDirectory, "cache"); 128SessionDirectory = Path.Combine(ShadowDirectory, sessionDirectoryName); 306var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 334return Path.Combine(SessionDirectory, shadowDirName); 399? Path.Combine(@this.CacheDirectory, cacheKey)
DiaSymReader\SymUnmanagedFactory.cs (1)
120var moduleHandle = LoadLibrary(Path.Combine(dir, DiaSymReaderModuleName));
FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
MetadataReference\AssemblyMetadata.cs (1)
170return new AssemblyMetadata(manifestModule, moduleName => ModuleMetadata.CreateFromFile(Path.Combine(Path.GetDirectoryName(path) ?? "", moduleName)));
SourceGeneration\GeneratorDriver.cs (2)
518var tree = ParseGeneratedSourceText(source, Path.Combine(prefix, source.HintName), cancellationToken); 564var tree = ParseGeneratedSourceText(source, Path.Combine(prefix, source.HintName), cancellationToken);
Microsoft.CodeAnalysis.Analyzers (6)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
35editorconfigFilePath = Path.Combine(editorconfigFilePath, ".editorconfig");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
63? Path.Combine(thisAssemblyFolder, assemblySimpleName + ".dll")
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
35editorconfigFilePath = Path.Combine(editorconfigFilePath, ".editorconfig");
Microsoft.CodeAnalysis.BuildClient.Package (8)
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (4)
462var processFilePath = Path.Combine(clientDir, $"VBCSCompiler{PlatformInformation.ExeExtension}"); 819var result = Path.Combine(tempPath, ".roslyn"); 827FilePath = Path.Combine(mutexDirectory, name); 828GuardPath = Path.Combine(mutexDirectory, ".guard");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
182loggingFilePath = Path.Combine(loggingFilePath, $"server.{processId}.log");
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (1)
36return Path.Combine("/tmp", pipeName);
src\roslyn\src\Compilers\Shared\StandardBuildEnvironment.cs (1)
21public string GetFullyQualifiedPath(string path) => Path.Combine(CurrentDirectory, path);
Microsoft.CodeAnalysis.CodeStyle (4)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
63? Path.Combine(thisAssemblyFolder, assemblySimpleName + ".dll")
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCommandLineParser.cs (1)
1459metadataReferences.Insert(0, new CommandLineReference(Path.Combine(sdkDirectory, "mscorlib.dll"), MetadataReferenceProperties.Assembly));
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
SyncedSource\FileBasedPrograms\FileLevelDirectiveHelpers.cs (2)
1079var resolvedProjectPath = Path.Combine(sourceDirectory, resolvedName.Replace('\\', '/')); 1207var resolvedFilePath = Path.GetFullPath(Path.Combine(sourceDirectory, Name.Replace('\\', '/')));
SyncedSource\FileBasedPrograms\VirtualProjectBuilder.cs (3)
178return Path.Combine(GetTempSubdirectory(dotNetSubdirectory), name); 260var fullPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(includeOrExcludeDirective.Info.SourceFile.Path)!, expandedPath)); 411var compilePath = Path.GetFullPath(Path.Combine(
Microsoft.CodeAnalysis.Features (13)
EditAndContinue\TraceLog.cs (5)
44path = Path.Combine(_logDirectory, _traceLog._name + ".log"); 74var directory = CreateSessionDirectory(updateId.SessionId, Path.Combine(document.Project.Name, relativeDir)); 75return Path.Combine(directory, $"{fileName}.{updateId.Ordinal}.{generation?.ToString() ?? "-"}.{suffix}{extension}"); 83path = Path.Combine(CreateSessionDirectory(sessionId, directory), fileName); 97path = Path.Combine(CreateSessionDirectory(sessionId, directory), fileName);
Emit\CompilationOutputFilesWithImplicitPdbPath.cs (1)
75TryOpenFileStream(Path.Combine(Path.GetDirectoryName(AssemblyFilePath)!, PathUtilities.GetFileName(pdbPath)));
MetadataAsSource\MetadataAsSourceFileService.cs (3)
54private readonly string _rootTemporaryPath = Path.Combine(TempPathUtilities.GetTempPath(), MetadataAsSource); 64_rootTemporaryPathWithGuid = Path.Combine(_rootTemporaryPath, guidString); 109var providerTempPath = Path.Combine(_rootTemporaryPathWithGuid, provider.GetType().Name);
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
81dllPath = Path.Combine(basePath, $"{assemblyName}.dll");
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (1)
46var filePath = Path.Combine(tempFilePath, Path.GetFileName(sourceDocument.FilePath));
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
230var tempFilePath = Path.Combine(tempPath, projectId.Id.ToString());
SemanticSearch\SemanticSearchWorkspace.cs (1)
21public static readonly string ReferenceAssembliesDirectory = Path.Combine(Path.GetDirectoryName(typeof(SemanticSearchWorkspace).Assembly.Location)!, "SemanticSearchRefs");
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
34editorconfigFilePath = Path.Combine(editorconfigFilePath, ".editorconfig");
Microsoft.CodeAnalysis.Razor.DotNetFormat (5)
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\FormattingLogger.cs (1)
32var filePath = Path.Combine(_logFolder, fileName);
src\roslyn\src\Razor\src\Razor\src\Microsoft.CodeAnalysis.Razor.Formatting\FormattingLoggerFactory.cs (1)
35var logFolder = Path.Combine(logDirectory, folder);
src\roslyn\src\Razor\src\Razor\src\Microsoft.VisualStudioCode.RazorExtension\ExternalAccess\Razor\RazorAnalyzerAssemblyResolver.cs (3)
60var onDiskName = Path.Combine(directory, $"{fileName}.dll"); 85var serviceHubCoreDirectory = Path.Combine(directory, ServiceHubCoreFolderName); 94var assemblyPath = Path.Combine(directory, assemblyFileName);
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
35editorconfigFilePath = Path.Combine(editorconfigFilePath, ".editorconfig");
Microsoft.CodeAnalysis.Scripting (12)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (2)
329string pathWithoutExtension = Path.Combine(directory, simpleName); 344string pathWithoutExtension = Path.Combine(directory, identity.Name);
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (7)
87_baseDirectory = Path.Combine(TempPathUtilities.GetTempPath(), Guid.NewGuid().ToString()); 410string shadowCopyPath = Path.Combine(assemblyCopyDir, Path.GetFileName(originalPath)); 472originalPath: Path.Combine(originalDirectory, moduleName), 473shadowCopyPath: Path.Combine(shadowCopyDirectory, moduleName)); 512string dir = Path.Combine(basePath, Guid.NewGuid().ToString()); 560Directory.CreateDirectory(Path.Combine(assemblyCopyDirectory, xmlSubdirectory)); 603if (File.Exists(Path.Combine(assemblyDirectory, docFileName)))
src\roslyn\src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (3)
45var corlibFriendPath = Path.Combine(s_corlibDirectory, fileName); 70var gacAssemblyRootDir = new DirectoryInfo(Path.Combine(gacPath, name)); 88var assemblyPath = Path.Combine(assemblyDir.ToString(), fileName);
Microsoft.CodeAnalysis.Workspaces (21)
Rename\ConflictEngine\MutableConflictResolution.cs (2)
106var newDocumentFilePath = Path.Combine(directory, newName); 121newDocumentFilePath = Path.Combine(directory, newName);
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (3)
118var assemblyPath = Path.Combine(directory, simpleName + ".dll"); 135var analyzerFilePath = Path.Combine(directory, analyzerFileName); 204var assemblyPath = Path.Combine(Directory, unmanagedDllName + ".dll");
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ProgramFilesAnalyzerPathResolver.cs (1)
35DotNetPath = Path.Combine(programFilesPath, "dotnet");
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (7)
123var versionDirectory = Path.Combine(baseDirectory, DirectoryVersion); 124ShadowDirectory = Path.Combine(versionDirectory, "shadow"); 125CacheDirectory = Path.Combine(versionDirectory, "cache"); 128SessionDirectory = Path.Combine(ShadowDirectory, sessionDirectoryName); 306var analyzerShadowPath = Path.Combine(analyzerShadowDir, Path.GetFileName(originalAnalyzerPath)); 334return Path.Combine(SessionDirectory, shadowDirName); 399? Path.Combine(@this.CacheDirectory, cacheKey)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
63? Path.Combine(thisAssemblyFolder, assemblySimpleName + ".dll")
Workspace\CommandLineProject.cs (1)
153: Path.GetFullPath(Path.Combine(projectDirectory, fileArg.Path));
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (1)
192? Path.Combine(_commandLineArgumentsForCommandLine.OutputDirectory, _commandLineArgumentsForCommandLine.OutputFileName)
Workspace\ProjectSystem\ReferenceFileChangeTracker.cs (1)
74referenceDirectories.Add(Path.Combine(dotnetRoot, "packs"));
Microsoft.CodeAnalysis.Workspaces.MSBuild (5)
MSBuild\BuildHostProcessManager.cs (1)
166dotnetPath = Path.GetFullPath(Path.Combine(msbuildLocation.Path, $"../../{DotnetExecutable}"));
MSBuild\MSBuildProjectLoader.cs (2)
379? Path.Combine(_directory, _filename + _extension) 380: Path.Combine(_directory, $"{_filename}-{suffix}{_extension}");
MSBuild\MSBuildWorkspace.cs (1)
501? Path.Combine(Path.Combine([.. info.Folders]), fileName)
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (1)
36return Path.Combine("/tmp", pipeName);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (1)
36return Path.Combine("/tmp", pipeName);
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (3)
MonoMSBuildDiscovery.cs (3)
77.Select(p => Path.Combine(p, "mono")) 141var monoMSBuildDirPath = Path.Combine(monoLibDirPath, "msbuild"); 178var monoMSBuildPath = Path.Combine(monoMSBuildDirectory, "Microsoft.Build.dll");
Microsoft.Data.Analysis.Tests (2)
parent\Microsoft.ML.TestFramework\BaseTestClass.cs (2)
57OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput"); 108return Path.GetFullPath(Path.Combine(DataDir, name));
Microsoft.Diagnostics.NETCore.Client (2)
DiagnosticsClient\DiagnosticsClient.cs (1)
517string crossNsDir = Path.Combine(PidIpcEndpoint.GetProcessRootPath(hostPid), targetTmpDir.TrimStart(Path.DirectorySeparatorChar));
DiagnosticsIpc\IpcTransport.cs (1)
692searchDirectory = Path.Combine(GetProcessRootPath(pid), targetTmpDir.TrimStart(Path.DirectorySeparatorChar));
Microsoft.DiaSymReader (1)
SymUnmanagedFactory.cs (1)
135var moduleHandle = LoadLibraryW(Path.Combine(dir, DiaSymReaderModuleName));
Microsoft.DotNet.ApiCompat.Task (3)
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\RoslynResolver.cs (3)
50Assembly asm = loadFromPath(Path.Combine(_roslynAssembliesPath!, $"{name.Name}.dll")); 60loadFromPath(Path.Combine(_roslynAssembliesPath!, $"{codeAnalysisCSharpName}.dll")); 62loadFromPath(Path.Combine(_roslynAssembliesPath!, $"{codeAnalysisName}.dll"));
Microsoft.DotNet.ApiSymbolExtensions (3)
AssemblySymbolLoader.cs (3)
310string possiblePath = Path.Combine(directory, name); 456using FileStream resolvedStream = File.OpenRead(Path.Combine(fullReferencePath, assemblyReferenceName)); 467string potentialPath = Path.Combine(referencePathDirectory, assemblyReferenceName);
Microsoft.DotNet.Arcade.Sdk (5)
src\ExtractNgenMethodList.cs (1)
88var outputFilePath = Path.Combine(outputDirectory, outputFileName);
src\InstallDotNetCore.cs (1)
297dotnetRoot = Path.Combine(dotnetRoot, architecture.ToLowerInvariant());
src\LocateDotNet.cs (3)
41var globalJsonPath = TaskEnvironment.GetAbsolutePath(Path.Combine(RepositoryRoot, "global.json")); 78var dotNetDir = paths.Split(new[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault(p => File.Exists(TaskEnvironment.GetAbsolutePath(Path.Combine(p, fileName)))); 89DotNetPath = TaskEnvironment.GetAbsolutePath(Path.Combine(dotNetDir, fileName)).GetCanonicalForm();
Microsoft.DotNet.Build.Tasks.Installers (30)
src\CreateLightCommandPackageDrop.cs (2)
34string packageDropOutputFolder = Path.Combine(LightCommandWorkingDir, Path.GetFileName(InstallerFile)); 56AbsolutePath destinationPath = TaskEnvironment.GetAbsolutePath(Path.Combine(packageDropDir, Path.GetFileName(WixProjectFile)));
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)
HarvestPackage.cs (1)
252version = VersionUtility.GetAssemblyVersion(Path.Combine(packagePath, refAssm))?.ToString() ?? version;
NuGetPack.cs (2)
263return Path.Combine(nupkgOutputDirectory, $"{id}.{version}{nupkgExtension}"); 394string packedPackageSourcePath = Path.Combine(Path.GetDirectoryName(fileName), string.Join(".", _packageNamePrefix, Path.GetFileName(fileName)));
PackageItem.cs (1)
52TargetPath = Path.Combine(TargetPath, sourceFile);
Microsoft.DotNet.Build.Tasks.VisualStudio (6)
OptProf\GenerateTrainingInputFiles.cs (4)
86var jsonManifest = ReadVsixJsonManifest(TaskEnvironment.GetAbsolutePath(Path.Combine(insertionDirectory, product.Name))); 126WriteEntries(ibcEntries, Path.Combine(configurationsDir, fullyQualifiedName)); 136WriteEntries(filteredIbcEntries, Path.Combine(configurationsDir, fullyQualifiedName)); 151string basePath = Path.Combine(outDirPath, entry.RelativeDirectoryPath.Replace("\\", "") + Path.GetFileNameWithoutExtension(entry.RelativeInstallationPath));
OptProf\GenerateTrainingPropsFile.cs (1)
59File.WriteAllText(Path.Combine(outputDirectory, outputFileNameNoExt + ".props"),
OptProf\IbcEntry.cs (1)
48ngenApplicationPath: Path.Combine(VSInstallationRootVar, args.InstrumentationExecutable.Replace("/", "\\")));
Microsoft.DotNet.Build.Tasks.Workloads (14)
EmbeddedTemplates.cs (1)
41string destinationPath = Path.Combine(destinationFolder, destinationFilename);
Swix\ComponentSwixProject.cs (1)
63Path.Combine(base.GetRelativePackagePath(), "_package.json");
Swix\SwixProjectBase.cs (1)
59SourcePath = Path.Combine(SourcePath, "swix");
Wix\WixToolTask.cs (1)
101public string GetWixCommandLine() => Path.Combine(ToolPath, ToolExe) + " " +
Wix\WixToolTaskBase.cs (1)
60protected override string GenerateFullPathToTool() => Path.Combine(ToolPath, ToolName);
WorkloadPackageBase.cs (7)
216DestinationDirectory = Path.Combine(destinationBaseDirectory, Path.GetRandomFileName()); 252File.Copy(PackagePath, Path.Combine(DestinationDirectory, Path.GetFileName(PackagePath)), overwrite: true); 260Utils.DeleteDirectory(Path.Combine(DestinationDirectory, "_rels")); 261Utils.DeleteDirectory(Path.Combine(DestinationDirectory, "package")); 263Utils.DeleteFile(Path.Combine(DestinationDirectory, ".signature.p7s")); 264Utils.DeleteFile(Path.Combine(DestinationDirectory, "[Content_Types].xml")); 265Utils.DeleteFile(Path.Combine(DestinationDirectory, $"{Id}.nuspec"));
WorkloadTemplateBase.cs (2)
78SourcePath = Path.Combine(OutputPath, "src"); 79IntermediateOutputPath = Path.Combine(OutputPath, "obj");
Microsoft.DotNet.Cli.CoreUtils (1)
DotnetFiles.cs (1)
18public static string VersionFile => Path.GetFullPath(Path.Combine(SdkPaths.SdkDirectory, ".version"));
Microsoft.DotNet.Cli.Definitions (5)
Commands\Test\TestCommandDefinition.cs (1)
112string globalJsonPath = Path.Combine(directory, "global.json");
Common\TargetPlatformOptions.cs (3)
115var sdkPath = dotnetRootPath is not null ? Path.Combine(dotnetRootPath, "sdk") : "sdk"; 142.Where(sdk => sdk.Version is not null && File.Exists(Path.Combine(sdk.Path, ridFileName))) 147return latestSdkPath is null ? productVersionPath : Path.Combine(latestSdkPath, ridFileName);
src\sdk\src\Resolvers\Microsoft.DotNet.NativeWrapper\EnvironmentProvider.cs (1)
46.Select(p => Path.Combine(p, commandNameWithExtension))
Microsoft.DotNet.Cli.InternalMicrosoft (2)
Internal\InternalMicrosoftDetectionContext.cs (1)
285var candidate = Path.Combine(directory.Trim(), command);
InternalMicrosoftDetector.cs (1)
438temporaryPath = Path.Combine(directory, $".{Path.GetFileName(_cacheFilePath)}.{Guid.NewGuid():N}.tmp");
Microsoft.DotNet.Cli.Utils (11)
DependencyProvider.cs (1)
127using RegistryKey dependentsKey = BaseKey.CreateSubKey(Path.Combine(DependentsKeyPath, dependent), writable: true);
EnvironmentProvider.cs (3)
63return Path.Combine(_userHomeDirectory.Value, path.Substring(tildeSlash.Length)); 81(p, s) => Path.Combine(p, commandName + s)) 94var commandPath = extensions.Select(e => Path.Combine(rootPath, commandName + e))
MSBuildForwardingAppWithoutLogging.cs (2)
319return Path.Combine( 338return Path.Combine(
Muxer.cs (2)
46string muxerPathMaybe = Path.Combine(rootPath, muxerFileName); 75processPath = Path.Combine(root, muxerFileName);
NuGetSourceConfiguration.cs (1)
153=> Path.GetFullPath(Path.IsPathRooted(path) ? path : Path.Combine(basePath, path));
PathUtility.cs (2)
301result = Path.Combine(result, component); 382var filePath = Path.Combine(directory.FullName, relativeFilePath);
Microsoft.DotNet.CMake.Sdk (9)
src\CMakeBuildMutex.cs (4)
59string directory = Path.Combine(taskEnvironment.GetAbsolutePath(path).GetCanonicalForm().Value, ".cmake"); 61string identityDirectory = Path.Combine(directory, "Microsoft.DotNet.CMake.Sdk.mutex"); 63AbsolutePath identityFile = taskEnvironment.GetAbsolutePath(Path.Combine(identityDirectory, "identity")); 70AbsolutePath temporaryFile = taskEnvironment.GetAbsolutePath(Path.Combine(temporaryDirectory, "identity"));
src\CreateCMakeFileApiQuery.cs (1)
34string queryFile = Path.Combine(queryDir, "codemodel-v2");
src\GetCMakeArtifactsFromFileApi.cs (4)
103string codeModelFile = Path.Combine(replyDir, index.Reply.ClientReply.CodemodelV2.JsonFile); 170dirSource = Path.Combine(sourceRoot, dirSource); 197string targetFile = Path.Combine(replyDir, target.JsonFile); 217string fullPath = Path.Combine(CMakeOutputDir, artifact.Path);
Microsoft.DotNet.Configurer (10)
AspNetCertificateSentinel.cs (1)
16private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL);
CliFolderPathCalculator.cs (5)
18Path.Combine(new DirectoryInfo(AppContext.BaseDirectory).Parent?.FullName ?? string.Empty, "NuGetFallbackFolder"); 20public static string ToolsShimPath => Path.Combine(DotnetUserProfileFolderPath, ToolsShimFolderName); 28Path.Combine(DotnetProfileDirectoryName, ToolsShimFolderName)); 41Path.Combine(DotnetHomePath, DotnetProfileDirectoryName); 43public static string ToolsResolverCachePath => Path.Combine(DotnetUserProfileFolderPath, ToolsResolverCacheFolderName);
FirstTimeUseNoticeSentinel.cs (1)
16private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL);
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (1)
38return Path.Combine(homePath, DotnetProfileDirectoryName);
ToolPackageFolderPathCalculator.cs (1)
11return Path.Combine(toolsShimPath, NestedToolPackageFolderName);
UserLevelCacheWriter.cs (1)
72return Path.Combine(_dotnetUserProfileFolderPath, $"{Product.Version}_{cacheKey}.dotnetUserLevelCache");
Microsoft.DotNet.GenFacades (3)
RoslynBuildTask.cs (3)
45Assembly asm = loadFromPath(Path.Combine(RoslynAssembliesPath!, $"{name.Name}.dll")); 55loadFromPath(Path.Combine(RoslynAssembliesPath!, $"{codeAnalysisCsharpName}.dll")) : 56loadFromPath(Path.Combine(RoslynAssembliesPath!, $"{codeAnalysisName}.dll"));
Microsoft.DotNet.HotReload.Watch (15)
AppModels\MobileAppModel.cs (1)
22var keyDirectory = Path.Combine(
Build\EvaluationResult.cs (2)
178StaticWebAssetsManifest.TryParseFile(Path.Combine(outputDir, StaticWebAsset.ManifestFileName), logger) is { } manifest) 211var filePath = Path.GetFullPath(Path.Combine(projectDirectory, relativePath));
Build\ProjectGraphUtilities.cs (2)
59=> project.GetPropertyValue(PropertyNames.TargetPath) is { Length: >0 } path ? Path.GetDirectoryName(Path.Combine(project.Directory, NormalizeSeparators(path))) : null; 68=> project.GetPropertyValue(PropertyNames.IntermediateOutputPath) is { Length: >0 } path ? Path.Combine(project.Directory, NormalizeSeparators(path)) : null;
Context\EnvironmentOptions.cs (1)
100? $"{Path.Combine(WorkingDirectory, options.BinaryLogPath)[..^".binlog".Length]}-dotnet-watch.{operationName}.{Path.GetFileName(projectPath)}.{Interlocked.Increment(ref _uniqueLogId)}.binlog"
FileWatcher\EventBasedDirectoryWatcher.cs (1)
68var oldLocation = Path.Combine(e.OldFullPath, newLocation.Substring(e.FullPath.Length + 1));
HotReload\HotReloadDotNetWatcher.cs (2)
720var outputDir = Path.Combine(Path.GetDirectoryName(projectPath)!, relativeOutputDir); 727var targetPath = Path.Combine(outputDir, item.GetMetadata(MetadataNames.TargetPath));
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\SharedSecretBuildOutputs.cs (4)
50_publicKeyPath = Path.Combine(directory, publicKeyFileName); 51_privateKeyPath = Path.Combine(directory, privateKeyFileName); 58=> new(Path.Combine(intermediateOutputDirectory, DirectoryName), PublicKeyFileName, PrivateKeyFileName); 89return new SharedSecretBuildOutputs(Path.Combine(intermediateOutputDirectory, DirectoryName), PublicKeyFileName, PrivateKeyFileName);
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAsset.cs (1)
87var webRootDir = Path.Combine(Path.GetDirectoryName(containingProjectFilePath)!, webRoot);
Utilities\TemporaryFileManager.cs (1)
68var path = Path.Combine(_directory, Interlocked.Increment(ref _uniqueFileId) + extension);
Microsoft.DotNet.InternalAbstractions (3)
DirectoryPath.cs (3)
35return new FilePath(Path.Combine(Value, fileName)); 93CopyDirectoryAcrossMounts(dir, Path.Combine(destPath, Path.GetFileName(dir))); 98new FileInfo(file).CopyTo(Path.Combine(destPath, Path.GetFileName(file)), true);
Microsoft.DotNet.MacOsPkg.Core (4)
AppBundle.cs (1)
28bool containsAppBundleContents = Directory.Exists(Path.Combine(path, "Contents")) &&
Package.cs (3)
60var xml = XElement.Load(Path.Combine(dstPath, "Distribution")); 67string packageName = Path.Combine(dstPath, package.Value.Substring(1)); 68string tempDest = Path.Combine(dstPath, Path.GetRandomFileName());
Microsoft.DotNet.NativeWrapper (2)
EnvironmentProvider.cs (1)
46.Select(p => Path.Combine(p, commandNameWithExtension))
src\sdk\src\Common\HostFxrPathResolver.cs (1)
77string hostfxrPath = Path.Combine(latestFxr, hostfxrName);
Microsoft.DotNet.NuGetRepack.Tasks (5)
src\NuGetVersionUpdater.cs (2)
107tempPathOpt = new FileInfo(Path.Combine(tempDirectoryOpt.FullName, Guid.NewGuid().ToString())); 361string finalPath = Path.Combine(outDirectory.FullName, package.Id + "." + package.NewVersion + ".nupkg");
src\ReplacePackageParts.cs (2)
117string tempPackagePath = Path.Combine(tempDirectory.FullName, "package.nupkg"); 232NewPackage = Path.Combine(DestinationFolder, packageId + "." + packageVersion + ".nupkg");
src\UpdatePackageVersionTask.cs (1)
87File.WriteAllLines(Path.Combine(outputDirectory.FullName, "PreReleaseDependencies.txt"), preReleaseDependencies.Distinct());
Microsoft.DotNet.ProjectTools (6)
LaunchSettings\ExecutableLaunchProfileParser.cs (1)
72workingDirectory = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(launchSettingsPath)!, expandedValue));
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\FileLevelDirectiveHelpers.cs (2)
1079var resolvedProjectPath = Path.Combine(sourceDirectory, resolvedName.Replace('\\', '/')); 1207var resolvedFilePath = Path.GetFullPath(Path.Combine(sourceDirectory, Name.Replace('\\', '/')));
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\VirtualProjectBuilder.cs (3)
178return Path.Combine(GetTempSubdirectory(dotNetSubdirectory), name); 260var fullPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(includeOrExcludeDirective.Info.SourceFile.Path)!, expandedPath)); 411var compilePath = Path.GetFullPath(Path.Combine(
Microsoft.DotNet.SdkResolver (1)
NETCoreSdkResolver.cs (1)
137string minimumVersionFilePath = Path.Combine(netcoreSdkDir, "minimumMSBuildVersion");
Microsoft.DotNet.SharedFramework.Sdk (3)
src\CreateFrameworkListFile.cs (1)
128string path = Path.Combine(f.TargetPath, f.Filename).Replace('\\', '/');
src\GenerateSharedFrameworkDepsFile.cs (2)
72resourceAssemblies.Add(new ResourceAssembly(Path.Combine(cultureMaybe, fileName), cultureMaybe)); 124var depsFilePath = Path.Combine(IntermediateOutputPath, depsFileName);
Microsoft.DotNet.SourceBuild.Tasks (3)
src\UsageReport\WritePackageUsageData.cs (2)
171using (var stream = File.OpenRead(Path.Combine(AbsoluteRootDir, relativePath))) 192using (var file = File.OpenRead(Path.Combine(AbsoluteRootDir, assetFile)))
src\UsageReport\WriteUsageReports.cs (1)
176Path.Combine(outputDirectory, "annotated-usage.xml"),
Microsoft.DotNet.TemplateLocator (19)
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");
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\TempDirectoryWorkloadManifestProvider.cs (1)
23string? workloadManifestPath = Path.Combine(workloadManifestDirectory, "WorkloadManifest.json");
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (2)
26var catalog = Path.Combine(localizationDir, $"WorkloadManifest.{culture.Name}.json"); 65string localizationDir = Path.Combine(manifestDir, "localize");
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (1)
100if (File.Exists(Path.Combine(path, "baseline.workloadset.json")))
src\sdk\src\Cli\dotnet\Installer\Windows\TrustedMachinePath.cs (1)
58public static string ProgramDataDotnetRoot { get; } = Path.Combine(
Microsoft.DotNet.XliffTasks (15)
Model\Document.cs (1)
70string tempPath = Path.Combine(path.Directory.FullName, Path.GetRandomFileName());
Model\ResxDocument.cs (1)
67string absolutePath = Path.Combine(Path.GetDirectoryName(sourceFullPath), resourceRelativePath);
Model\VsctDocument.cs (1)
87string absolutePath = Path.Combine(Path.GetDirectoryName(sourceFullPath), resourceRelativePath);
Tasks\GatherTranslatedSource.cs (3)
70relativePath = Path.Combine(language, relativePath); 80link = Path.Combine(linkDirectory, relativePath); 115dependentUpon = TaskEnvironment.GetAbsolutePath(Path.Combine(sourceDirectory, dependentUpon)).GetCanonicalForm();
Tasks\GatherXlf.cs (1)
72Path.Combine(TranslatedOutputDirectory, $"{translatedFileName}.{language}{extension}");
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)
Contents\DataContent.cs (1)
233path = path.Length == 0 ? name! : Path.Combine(path, name);
Files\HostedFileClientExtensions.cs (1)
123finalPath = destinationPath.Length == 0 ? fileName! : Path.Combine(destinationPath, fileName);
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); 181var tempDir = Path.Combine(Path.GetTempPath(), $"dldir2-{Guid.NewGuid()}"); 193Assert.Equal(Path.Combine(tempDir, $"file-id-fallback{extension}"), savedPath); 216string expectedAbsolute = Path.Combine(cwdBefore, fileName); 238var tempFile = Path.Combine(Path.GetTempPath(), $"existing-{Guid.NewGuid()}.bin");
Microsoft.Extensions.AI.Evaluation.Console (3)
Telemetry\DeviceIdHelper.cs (3)
91string cacheFilePath = Path.Combine(cacheFileDirectoryPath, CacheFileName); 123string cacheFilePath = Path.Combine(cacheFileDirectoryPath, CacheFileName); 141cacheFileDirectoryPath = Path.Combine(userProfilePath, ".cache");
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
ResultsTests.cs (1)
31Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()),
Microsoft.Extensions.AI.Evaluation.Reporting (10)
Storage\DiskBasedResponseCache.cs (4)
288=> Path.Combine(storageRootPath, "cache"); 291=> Path.Combine(keyPath, "entry.json"); 294=> Path.Combine(keyPath, "contents.data"); 300string keyPath = PathValidation.EnsureWithinRoot(_iterationPath, Path.Combine(_iterationPath, key));
Storage\DiskBasedResultStore.cs (6)
49_resultsRootPath = Path.Combine(storageRootPath, "results"); 106var resultFile = new FileInfo(Path.Combine(resultDir.FullName, $"{result.IterationName}.json")); 139Path.Combine(_resultsRootPath, executionName))); 293Path.Combine(_resultsRootPath, executionName))); 326var scenarioDir = new DirectoryInfo(Path.Combine(executionDir.FullName, scenarioName)); 362var resultFile = new FileInfo(Path.Combine(scenarioDir.FullName, $"{iterationName}.json"));
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (14)
DiskBased\PathValidationTests.cs (14)
113string root = Path.Combine(Path.GetTempPath(), "testroot"); 124string root = Path.Combine(Path.GetTempPath(), "testroot"); 135string root = Path.Combine(Path.GetTempPath(), "testroot") + Path.DirectorySeparatorChar; 136string child = Path.Combine(root, "file.txt"); 150string root = Path.Combine(Path.GetTempPath(), "testroot"); 170string root = Path.Combine(Path.GetTempPath(), "testroot"); 181string root = Path.Combine(Path.GetTempPath(), "testroot"); 191string root = Path.Combine(Path.GetTempPath(), "testroot"); 338string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting"); 349string longChild = Path.Combine(longRoot, "file.txt"); 386string longRoot = Path.Combine(Path.GetTempPath(), "LongDirectoryName_ForTesting"); 398string child = Path.Combine(shortRoot, "file.txt"); 399File.WriteAllText(Path.Combine(longRoot, "file.txt"), string.Empty); 432string root = Path.Combine(Path.GetTempPath(), "TestRoot");
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIHostedFileClientIntegrationTests.cs (1)
241tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
OpenAIResponseClientIntegrationTests.cs (1)
182string tempPath = Path.Combine(Path.GetTempPath(), $"image_gen_test_{imageModel}{extension}");
Microsoft.Extensions.AI.Templates.Tests (12)
test\ProjectTemplates\Infrastructure\Project.cs (1)
28StartupProjectFullPath = Path.Combine(rootPath, field);
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (5)
42_sandboxInstallPath = Path.Combine(_sandboxOutput, "install"); 43_sandboxProjectsPath = Path.Combine(_sandboxOutput, "projects"); 84file.CopyTo(Path.Combine(testSandbox, file.Name)); 89CopySandboxDirectory(subDir.FullName, Path.Combine(testSandbox, subDir.Name)); 95var outputFolderPath = Path.Combine(_sandboxProjectsPath, projectName);
test\ProjectTemplates\Infrastructure\TemplateExecutionTestConfiguration.cs (2)
14public string TemplateSandboxPackages => Path.Combine(TemplateSandboxRoot, "packages"); 15public string TemplateSandboxOutput => Path.Combine(TemplateSandboxRoot, TemplateName);
test\ProjectTemplates\Infrastructure\TemplateSnapshotTestBase.cs (2)
35string templateLocation = Path.Combine(WellKnownPaths.LocalShippingPackagesPath, $"{templatePackageName}.*.nupkg"); 45SnapshotsDirectory = Path.Combine("Snapshots", templateName),
test\ProjectTemplates\Infrastructure\WellKnownPaths.cs (2)
35TemplateTestNuGetConfigPath = Path.Combine(TemplateSandboxSource, "nuget.config"); 46var gitPath = Path.Combine(directory, ".git");
Microsoft.Extensions.DataIngestion.MarkItDown (1)
MarkItDownReader.cs (1)
106string inputFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.Extensions.DataIngestion.Tests (5)
IngestionPipelineTests.cs (2)
34_withTable = new(Path.Combine("TestFiles", "withTable.md")); 55_withImage = new(Path.Combine("TestFiles", "withImage.md"));
Readers\DocumentReaderConformanceTests.cs (2)
48string filePath = Path.Combine(Path.GetTempPath(), Path.GetTempFileName() + ".txt"); 192FileInfo file = new(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + extension));
Readers\MarkItDownMcpReaderTests.cs (1)
45var nonExistentFile = new FileInfo(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()));
Microsoft.Extensions.DependencyModel (7)
Resolution\AppBaseCompilationAssemblyResolver.cs (2)
61string refsPath = Path.Combine(_basePath, RefsDirectoryName); 87string sharedRefs = Path.Combine(sharedDirectory, RefsDirectoryName);
Resolution\ReferenceAssemblyPathResolver.cs (2)
69string relativeToReferenceAssemblies = Path.Combine(_defaultReferenceAssembliesPath, path); 81string fallbackFile = Path.Combine(fallbackPath, name);
Resolution\ResolverUtils.cs (3)
15path = Path.Combine(library.Name, library.Version); 18packagePath = Path.Combine(basePath, path); 29fullName = Path.Combine(basePath, assemblyPath);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Linux\LinuxUtilizationParserCgroupV2.cs (1)
319FileInfo memoryUsageInBytesFile = new(Path.Combine(path, "memory.current"));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Linux\OSFileSystemTests.cs (1)
26Path.Combine(Directory.GetCurrentDirectory(), "fixtures"), "*.slice");
Linux\Resources\HardcodedValueFileSystem.cs (1)
41.Select(x => Path.Combine(directory, x.Value))
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\StartupHook.cs (1)
61var path = Path.Combine(processDir, args.Name + ".dll");
Microsoft.Extensions.FileProviders.Physical (6)
PhysicalFileProvider.cs (1)
232fullPath = Path.GetFullPath(Path.Combine(Root, path));
PhysicalFilesWatcher.cs (4)
233var pollingChangeToken = new PollingFileChangeToken(new FileInfo(Path.Combine(_root, filePath))); 357string oldLocation = Path.Combine(e.OldFullPath, newLocation.Substring(e.FullPath.Length + 1)); 987while (Path.Combine(watchDir, _expectedName) is var childPath && Directory.Exists(childPath)) 1023string nextDir = Path.Combine(watchDir, _expectedName);
PollingWildCardChangeToken.cs (1)
182string filePath = Path.Combine(_directoryInfo.FullName, path);
Microsoft.Extensions.FileSystemGlobbing (6)
Abstractions\DirectoryInfoWrapper.cs (2)
79new DirectoryInfo(Path.Combine(_directoryInfo.FullName, name)), 89=> new FileInfoWrapper(new FileInfo(Path.Combine(_directoryInfo.FullName, name)));
InMemoryDirectoryInfo.cs (3)
75fileList.Add(Path.GetFullPath(Path.Combine(normalizedRoot, fileWithNormalSeparators))); 165string combinedPath = Path.Combine(FullName, path); 179string combinedPath = Path.Combine(FullName, path);
MatcherExtensions.cs (1)
67result.Add(Path.GetFullPath(Path.Combine(directoryPath, match.Path)));
Microsoft.Extensions.Hosting (1)
HostBuilder.cs (1)
263return Path.Combine(Path.GetFullPath(basePath), contentRootPath);
Microsoft.Extensions.Http.Resilience.Tests (2)
BuildTransitive\GrpcNetClientFactoryVersionTargetTests.cs (2)
230var tempDirectory = Path.Combine(Path.GetTempPath(), $"GrpcNetClientFactoryTargetTests_{Guid.NewGuid():N}"); 235var projectPath = Path.Combine(tempDirectory, "test.proj");
Microsoft.Extensions.Logging.AzureAppServices (2)
FileLoggerProvider.cs (1)
66return Path.Combine(_path, $"{_fileName}{group.Year:0000}{group.Month:00}{group.Day:00}.txt");
SiteConfigurationProvider.cs (1)
14var settingsFile = Path.Combine(settingsFolder, "settings.json");
Microsoft.Extensions.ML.Tests (4)
FileLoaderTests.cs (1)
48loaderUnderTest.Start(Path.Combine("TestModels", "SentimentModel.zip"), false);
PredictionEnginePoolTests.cs (3)
35.FromFile(modelName: "model1", filePath: Path.Combine("TestModels", "SentimentModel.zip"), watchForChanges: false); 85using var stream = File.OpenRead(Path.Combine("TestModels", "SentimentModel.zip")); 113using var stream = File.OpenRead(Path.Combine("TestModels", "SentimentModel.zip"));
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsSrvServiceEndpointProviderFactory.cs (3)
19private static readonly string s_resolveConfPath = Path.Combine($"{Path.DirectorySeparatorChar}etc", "resolv.conf"); 133var tokenPath = Path.Combine(s_serviceAccountPath, "token"); 139var certPath = Path.Combine(s_serviceAccountPath, "ca.crt");
Microsoft.Gen.BuildMetadata (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
165? Path.Combine(currentProjectPath!, compilationOutputPath!)
Microsoft.Gen.BuildMetadata.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Gen.ComplianceReports (2)
ComplianceReportsGenerator.cs (1)
112File.WriteAllText(Path.Combine(_directory, _fileName), report, Encoding.UTF8);
src\Generators\Shared\GeneratorUtilities.cs (1)
165? Path.Combine(currentProjectPath!, compilationOutputPath!)
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
GeneratorTests.cs (2)
141var fullReportPath = Path.Combine(projectDir, outputPath); 155Assert.True(File.Exists(Path.Combine(fullReportPath, "ComplianceReport.json")));
test\Generators\Shared\RoslynTestUtils.cs (2)
65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
165? Path.Combine(currentProjectPath!, compilationOutputPath!)
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Gen.Logging (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
165? Path.Combine(currentProjectPath!, compilationOutputPath!)
Microsoft.Gen.Logging.Unit.Tests (7)
AttributeParserTests.cs (1)
117.UseDirectory(Path.Combine("..", "Verified"));
CompilationHelper.cs (2)
30refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 31refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
ParserTests.cs (1)
684.UseDirectory(Path.Combine("..", "Verified"));
ParserTests.LogProperties.cs (1)
619.UseDirectory(Path.Combine("..", "Verified"));
test\Generators\Shared\RoslynTestUtils.cs (2)
65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Gen.MetadataExtractor (4)
MetadataReportsGenerator.cs (1)
110File.WriteAllText(Path.Combine(path, _fileName), reportStringBuilder.ToString(), Encoding.UTF8);
src\Generators\Microsoft.Gen.ComplianceReports\ComplianceReportsGenerator.cs (1)
112File.WriteAllText(Path.Combine(_directory, _fileName), report, Encoding.UTF8);
src\Generators\Microsoft.Gen.MetricsReports\MetricsReportsGenerator.cs (1)
86File.WriteAllText(Path.Combine(path, _fileName), report, Encoding.UTF8);
src\Generators\Shared\GeneratorUtilities.cs (1)
165? Path.Combine(currentProjectPath!, compilationOutputPath!)
Microsoft.Gen.MetadataExtractor.Unit.Tests (7)
GeneratorTests.cs (5)
80var goldenReportPath = Path.Combine("GoldenReports", goldenFileName); 82var generatedReportPath = Path.Combine(Directory.GetCurrentDirectory(), ReportFilename); 133Assert.False(File.Exists(Path.Combine(Path.GetTempPath(), ReportFilename))); 169var fullReportPath = Path.Combine(projectDir, outputPath); 183Assert.True(File.Exists(Path.Combine(fullReportPath, ReportFilename)));
test\Generators\Shared\RoslynTestUtils.cs (2)
65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
165? Path.Combine(currentProjectPath!, compilationOutputPath!)
Microsoft.Gen.Metrics.Unit.Tests (2)
test\Generators\Shared\RoslynTestUtils.cs (2)
65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Gen.MetricsReports (2)
MetricsReportsGenerator.cs (1)
86File.WriteAllText(Path.Combine(path, _fileName), report, Encoding.UTF8);
src\Generators\Shared\GeneratorUtilities.cs (1)
165? Path.Combine(currentProjectPath!, compilationOutputPath!)
Microsoft.Gen.MetricsReports.Unit.Tests (7)
GeneratorTests.cs (5)
45var goldenReportPath = Path.Combine("GoldenReports", goldenFileName); 47var generatedReportPath = Path.Combine(Directory.GetCurrentDirectory(), ReportFilename); 93Assert.False(File.Exists(Path.Combine(Path.GetTempPath(), ReportFilename))); 122var fullReportPath = Path.Combine(projectDir, outputPath); 136Assert.True(File.Exists(Path.Combine(fullReportPath, ReportFilename)));
test\Generators\Shared\RoslynTestUtils.cs (2)
65refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "netstandard.dll"))); 66refs.Add(MetadataReference.CreateFromFile(Path.Combine(runtimeDir, "System.Runtime.dll")));
Microsoft.Maui (1)
Fonts\FileSystemEmbeddedFontLoader.cs (1)
56 var filePath = Path.Combine(rootPath, font.FontName!);
Microsoft.Maui.Controls.Build.Tasks (1)
XamlCTask.cs (1)
116 xamlFilePath = IOPath.Combine(prefix, xamlFilePath);
Microsoft.Maui.Resizetizer (32)
AndroidAdaptiveIconGenerator.cs (7)
66 var dir = Path.Combine(fullIntermediateOutputPath.FullName, dpi.Path); 67 var destination = Path.Combine(dir, backgroundDestFilename); 110 var dir = Path.Combine(fullIntermediateOutputPath.FullName, dpi.Path); 111 var destination = Path.Combine(dir, foregroundDestFilename); 143 var dir = Path.Combine(fullIntermediateOutputPath.FullName, "mipmap-anydpi-v26"); 144 var adaptiveIconDestination = Path.Combine(dir, AppIconName + ".xml"); 145 var adaptiveIconRoundDestination = Path.Combine(dir, AppIconName + "_round.xml");
AppleIconAssetsGenerator.cs (4)
29 var outputAppIconSetDir = Path.Combine(IntermediateOutputPath, DpiPath.Ios.AppIconPath.Replace("{name}", AppIconName)); 30 var outputAssetsDir = Path.Combine(outputAppIconSetDir, ".."); 36 var assetContentsFile = Path.Combine(outputAssetsDir, "Contents.json"); 37 var appIconSetContentsFile = Path.Combine(outputAppIconSetDir, "Contents.json");
CreatePartialInfoPlistTask.cs (1)
34 var plistFilename = Path.Combine(IntermediateOutputPath, PlistName ?? "PartialInfo.plist");
GeneratePackageAppxManifest.cs (1)
51 var filename = Path.Combine(IntermediateOutputPath, GeneratedFilename ?? "Package.appxmanifest");
GenerateSplashAndroidResources.cs (6)
86 var dir = Path.Combine(IntermediateOutputPath, "values"); 89 var colorsFile = Path.Combine(dir, "maui_colors.xml"); 110 var dir = Path.Combine(IntermediateOutputPath, "drawable"); 113 var drawableFile = Path.Combine(dir, "maui_splash_image.xml"); 136 var dir = Path.Combine(IntermediateOutputPath, "drawable-v31"); 139 var drawableFile = Path.Combine(dir, "maui_splash_image.xml");
GenerateSplashStoryboard.cs (2)
78 var storyboardFile = Path.Combine(IntermediateOutputPath, "MauiSplash.storyboard"); 99 var storyboardFile = Path.Combine(IntermediateOutputPath, "MauiSplash.storyboard");
GenerateTizenManifest.cs (2)
61 _tizenManifestFilePath = Path.Combine(Environment.CurrentDirectory, TizenManifestFile); 63 var targetFilename = Path.Combine(IntermediateOutputPath, GeneratedFilename);
GetMauiAssetPath.cs (1)
63 path = Path.Combine(FolderName, path);
Resizer.cs (2)
48 var destination = Path.Combine(dpi.Path, info.OutputName + (includeScale ? dpi.FileSuffix : dpi.NameSuffix) + info.OutputExtension); 53 destination = Path.Combine(fullIntermediateOutputPath.FullName, destination);
TizenResourceXmlGenerator.cs (3)
56 string outputResourceDir = Path.Combine(IntermediateOutputPath, "res"); 57 string outputContentsDir = Path.Combine(outputResourceDir, "contents"); 58 string destination = Path.Combine(outputResourceDir, "res.xml");
TizenSplashUpdater.cs (2)
30 var splashFullPath = Path.Combine(IntermediateOutputPath, splashDirectoryName); 55 UpdateColorAndMoveFile(splashInfo, GetScreenSize(resolution, orientation), destination, Path.Combine(splashFullPath, newImage));
WindowsIconGenerator.cs (1)
28 string destination = Path.Combine(destinationFolder, $"{fileName}.ico");
Microsoft.ML.AutoML (3)
API\AutoMLExperimentExtension.cs (1)
328var csvFilePath = Path.Combine(folder, csvFileName);
Experiment\Runners\RunnerUtil.cs (1)
58new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}_{foldNum}.zip"));
Experiment\Runners\TrainValidateRunner.cs (1)
66new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}.zip"));
Microsoft.ML.AutoML.Samples (2)
Cifar10.cs (2)
11public static string cifar10FolderPath = Path.Combine(Path.GetTempPath(), "cifar10"); 12public static string cifar10ZipPath = Path.Combine(Path.GetTempPath(), "cifar10.zip");
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");
DatasetUtil.cs (7)
27public static string TrivialMulticlassDatasetPath = Path.Combine("TestData", "TrivialMulticlassDataset.txt"); 139string fullImagesetFolderPath = Path.Combine( 191UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 203string relativeFilePath = Path.Combine(destDir, destFileName); 228if (File.Exists(Path.Combine(destFolder, flag))) 232File.Create(Path.Combine(destFolder, flag)); 236Path.Combine(new FileInfo(typeof(
TrialResultManagerTest.cs (1)
52var tempFilePath = Path.Combine(OutDir, Path.GetRandomFileName() + ".txt");
Microsoft.ML.CodeGenerator (9)
CodeGenerator\CSharp\AzureCodeGenerator\AzureAttachCodeGenenrator.cs (1)
50var folder = Path.Combine(_settings.OutputBaseDir, _settings.OutputName);
CodeGenerator\CSharp\CodeGenerator.cs (3)
69var modelprojectDir = Path.Combine(_settings.OutputBaseDir, $"{_settings.OutputName}.Model"); 84var consoleAppProjectDir = Path.Combine(_settings.OutputBaseDir, $"{_settings.OutputName}.ConsoleApp"); 95var solutionPath = Path.Combine(_settings.OutputBaseDir, $"{_settings.OutputName}.sln");
CodeGenerator\CSharp\CSharpSolution.cs (2)
23project.WriteToDisk(Path.Combine(folder, project.Name)); 28var solutionPath = Path.Combine(folder, $"{Name}.sln");
Utils.cs (3)
196var projectPaths = projects.Select((name) => $"\"{Path.Combine(Path.GetDirectoryName(solutionPath), name).ToString()}\""); 225proc.StartInfo.Arguments = $"sln \"{solutionPath}\" add \"{Path.Combine(consoleAppProjectDir, consoleAppProjectName)}\" \"{Path.Combine(modelprojectDir, modelProjectName)}\"";
Microsoft.ML.Core (17)
ComponentModel\AssemblyLoadingUtils.cs (2)
113return Path.GetFullPath(Path.Combine(Path.GetTempPath(), "MLNET_" + guid.ToString())); 275path = Path.Combine(path, "AutoLoad");
Data\ModelLoading.cs (3)
60var dir = Path.Combine(Directory ?? "", name); 136return LoadModelOrNull<TRes, TSig>(env, out result, Repository, Path.Combine(Directory ?? "", name), extra); 308string path = Path.Combine(Directory, dir);
Data\ModelSaving.cs (2)
22SaveModel(Repository, value, Path.Combine(Directory ?? "", name)); 84using (var ctx = new ModelSaveContext(Repository, Path.Combine(Directory ?? "", dir), ModelLoadContext.ModelStreamName))
Data\Repository.cs (3)
131path = Path.Combine(Path.GetFullPath(tempPath), $"ml_dotnet_{Path.GetFileNameWithoutExtension(Path.GetRandomFileName())}"); 251string tempPath = Path.Combine(root, Path.GetRandomFileName()); 267_ectx.Check(entityPath == Path.Combine(root, pathEnt));
Utilities\PathUtils.cs (2)
92assemblyDir = Path.Combine(assemblyDir, customSearchDir); 105var candidate = Path.Combine(dir, fileName);
Utilities\ResourceManagerUtils.cs (5)
114if (!Uri.TryCreate(Path.Combine(MlNetResourcesUrl, relativeUrl), UriKind.Absolute, out var absoluteUrl)) 206var appDataDir = Path.Combine(appDataBaseDir, "mlnet-resources"); 207var absDir = Path.Combine(string.IsNullOrEmpty(envDir) ? appDataDir : envDir, dir); 208var filePath = Path.Combine(absDir, fileName); 263string tempPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(path), "temp-resource-" + guid.ToString()));
Microsoft.ML.Core.Tests (16)
UnitTests\FileSource.cs (7)
32var file1 = Path.Combine(dirName, "a.txt"); 33var file2 = Path.Combine(dirName, "b.txt"); 41fileSource = new MultiFileSource(Path.Combine(dirName, "...")); 57var fileDataA = Path.Combine(dataDir, "a.txt"); 58var fileDataB = Path.Combine(dataDir, "b.txt"); 67var fileDataSA = Path.Combine(subFolder1Dir, "a.txt"); 68var fileDataSB = Path.Combine(subFolder2Dir, "b.txt");
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=+",
UnitTests\TestModelLoad.cs (2)
27using (var modelStream = File.OpenRead(Path.Combine("TestModels", "BinaryLoader-v3.11.0.0.zip"))) 45using (var modelStream = File.OpenRead(Path.Combine("TestModels", "ConcatTransform.zip")))
UnitTests\TestResourceDownload.cs (4)
67if (File.Exists(Path.Combine(saveToDir, fileName))) 68Fail($"File '{Path.Combine(saveToDir, fileName)}' should have been deleted."); 96if (File.Exists(Path.Combine(saveToDir, fileName))) 97Fail($"File '{Path.Combine(saveToDir, fileName)}' should have been deleted.");
Microsoft.ML.Data (3)
Commands\CrossValidationCommand.cs (1)
581return Path.Combine(Path.GetDirectoryName(outputModelFile),
Commands\TrainTestCommand.cs (1)
191var tempFilePath = hasOutfile ? null : Path.Combine(((IHostEnvironmentInternal)Host).TempFilePath, Path.GetRandomFileName());
Utilities\ModelFileUtils.cs (1)
188ent = rep.OpenEntryOrNull(dir = Path.Combine(DirDataLoaderModel, "Loader"), ModelLoadContext.ModelStreamName);
Microsoft.ML.DnnImageFeaturizer.AlexNet (1)
AlexNetExtension.cs (1)
28return AlexNet(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet101 (1)
ResNet101Extension.cs (1)
28return ResNet101(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet18 (1)
ResNet18Extension.cs (1)
28return ResNet18(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.DnnImageFeaturizer.ResNet50 (1)
ResNet50Extension.cs (1)
28return ResNet50(dnnModelContext, env, outputColumnName, inputColumnName, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DnnImageModels"));
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (2)
472: Path.Combine(ctx.Directory, "PredictorModels"); 504var dir = Path.Combine(ctx.Directory, "PredictorModels");
Microsoft.ML.ImageAnalytics (2)
ImageLoader.cs (2)
248path = Path.Combine(_parent.ImageFolder, path); 279path = Path.Combine(_parent.ImageFolder, path);
Microsoft.ML.IntegrationTests (1)
IntegrationTestBaseClass.cs (1)
49OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput");
Microsoft.ML.Maml (2)
MAML.cs (2)
136var dumpFileDir = Path.Combine( 139var dumpFilePath = Path.Combine(dumpFileDir,
Microsoft.ML.OnnxTransformer (2)
OnnxUtils.cs (2)
412var tempModelFile = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName()); 437var tempModelFile = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName());
Microsoft.ML.PerformanceTests (11)
BenchmarkBase.cs (1)
35return Path.GetFullPath(Path.Combine(DataDir, name));
ImageClassificationBench.cs (6)
50string fullImagesetFolderPath = Path.Combine( 145UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 156string relativeFilePath = Path.Combine(destDir, destFileName); 197if (File.Exists(Path.Combine(destFolder, flag))) return; 201File.Create(Path.Combine(destFolder, flag)); 213string fullPath = Path.Combine(assemblyFolderPath, relativePath);
Numeric\Ranking.cs (1)
88_modelPathMslr = Path.Combine(Path.GetDirectoryName(typeof(RankingTest).Assembly.Location), "FastTreeRankingModel.zip");
Text\MultiClassClassification.cs (2)
105_modelPathWiki = Path.Combine(Path.GetDirectoryName(typeof(MulticlassClassificationTest).Assembly.Location), @"WikiModel.zip"); 123string modelpath = Path.Combine(Path.GetDirectoryName(typeof(MulticlassClassificationTest).Assembly.Location), @"WikiModel.fold000.zip");
TextPredictionEngineCreation.cs (1)
43_trainedModelOldFormat = _context.Model.Load(Path.Combine("TestModels", "SentimentModel.zip"), out inputSchema);
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)))
ResultProcessor\TestResultProcessor.cs (1)
33string outputDirectory = Path.Combine(SubDirectory, directory);
Microsoft.ML.Samples (30)
Dynamic\DataOperations\LoadingSvmLight.cs (1)
18var fileName = Path.Combine(dataDirectoryName, $"SVM_Data.csv");
Dynamic\DataOperations\LoadingText.cs (3)
22var fileName = Path.Combine(dataDirectoryName, $"Data_{i}.csv"); 69loader.Load(Path.Combine(dataDirectoryName, "Data_*.csv")); 120var sparseDataFileName = Path.Combine(dataDirectoryName, "saved_data.tsv");
Dynamic\TensorFlow\TextClassification.cs (1)
45var lookupMap = mlContext.Data.LoadFromTextFile(Path.Combine(
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (6)
32string fullImagesetFolderPath = Path.Combine( 249UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 262string relativeFilePath = Path.Combine(destDir, destFileName); 296if (File.Exists(Path.Combine(destFolder, flag))) return; 301File.Create(Path.Combine(destFolder, flag)); 314string fullPath = Path.Combine(assemblyFolderPath, relativePath);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (7)
34string fullImagesetFolderPathTrain = Path.Combine( 38string fullImagesetFolderPathTest = Path.Combine( 280UnZip(Path.Combine(imagesDownloadFolder, fileName), 294string relativeFilePath = Path.Combine(destDir, destFileName); 328if (File.Exists(Path.Combine(destFolder, flag))) return; 342File.Create(Path.Combine(destFolder, flag)); 355string fullPath = Path.Combine(assemblyFolderPath, relativePath);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (6)
32string fullImagesetFolderPath = Path.Combine( 237UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 250string relativeFilePath = Path.Combine(destDir, destFileName); 284if (File.Exists(Path.Combine(destFolder, flag))) return; 298File.Create(Path.Combine(destFolder, flag)); 311string fullPath = Path.Combine(assemblyFolderPath, relativePath);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (6)
32string fullImagesetFolderPath = Path.Combine( 258UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 271string relativeFilePath = Path.Combine(destDir, destFileName); 305if (File.Exists(Path.Combine(destFolder, flag))) return; 319File.Create(Path.Combine(destFolder, flag)); 332string fullPath = Path.Combine(assemblyFolderPath, relativePath);
Microsoft.ML.Samples.GPU (26)
parent\6a273e5f1a281752\LearningRateSchedulingCifarResnetTransferLearning.cs (7)
34string fullImagesetFolderPathTrain = Path.Combine( 38string fullImagesetFolderPathTest = Path.Combine( 280UnZip(Path.Combine(imagesDownloadFolder, fileName), 294string relativeFilePath = Path.Combine(destDir, destFileName); 328if (File.Exists(Path.Combine(destFolder, flag))) return; 342File.Create(Path.Combine(destFolder, flag)); 355string fullPath = Path.Combine(assemblyFolderPath, relativePath);
parent\Microsoft.ML.Samples\Dynamic\TensorFlow\TextClassification.cs (1)
45var lookupMap = mlContext.Data.LoadFromTextFile(Path.Combine(
parent\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (6)
32string fullImagesetFolderPath = Path.Combine( 249UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 262string relativeFilePath = Path.Combine(destDir, destFileName); 296if (File.Exists(Path.Combine(destFolder, flag))) return; 301File.Create(Path.Combine(destFolder, flag)); 314string fullPath = Path.Combine(assemblyFolderPath, relativePath);
parent\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (6)
32string fullImagesetFolderPath = Path.Combine( 237UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 250string relativeFilePath = Path.Combine(destDir, destFileName); 284if (File.Exists(Path.Combine(destFolder, flag))) return; 298File.Create(Path.Combine(destFolder, flag)); 311string fullPath = Path.Combine(assemblyFolderPath, relativePath);
parent\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (6)
32string fullImagesetFolderPath = Path.Combine( 258UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 271string relativeFilePath = Path.Combine(destDir, destFileName); 305if (File.Exists(Path.Combine(destFolder, flag))) return; 319File.Create(Path.Combine(destFolder, flag)); 332string fullPath = Path.Combine(assemblyFolderPath, relativePath);
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)
TestBase.cs (2)
41return Path.Combine(testDataDir.FullName, fileName).Replace(cwd, "."); 53return Path.Combine(testDataDir.FullName, folderName).Replace(cwd, ".");
Microsoft.ML.Sweeper (2)
ConfigRunner.cs (2)
94return Path.Combine(SweepCommand.LocalExePath, "../Win/maml.exe"); 96return Path.Combine(SweepCommand.LocalExePath, "../Linux/maml");
Microsoft.ML.TensorFlow (5)
TensorflowTransform.cs (4)
154var tempDirPath = Path.GetFullPath(Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, nameof(TensorFlowTransformer) + "_" + Guid.NewGuid())); 166string fullFilePath = Path.Combine(tempDirPath, relativeFile); 472Path.Combine(_savedModelPath, DefaultModelFileNames.Graph), 475modelFilePaths.AddRange(Directory.GetFiles(Path.Combine(_savedModelPath, DefaultModelFileNames.VariablesFolder), DefaultModelFileNames.Data, SearchOption.TopDirectoryOnly));
TensorflowUtils.cs (1)
642string tempDirectory = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, Path.GetRandomFileName());
Microsoft.ML.TensorFlow.Tests (20)
TensorflowTests.cs (20)
35tempFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 36assetsPath = Path.Combine(tempFolder, "assets"); 37parentWorkspacePath = Path.Combine(assetsPath, "cached"); 80_fullImagesetFolderPath = Path.Combine( 759var varDir = Path.Combine(modelLocation, "variables"); 1445if (Directory.Exists(workspacePath) && File.Exists(Path.Combine(workspacePath, trainSetBottleneckCachedValuesFileName)) 1446&& File.Exists(Path.Combine(workspacePath, validationSetBottleneckCachedValuesFileName))) 1461string workspacePath = Path.Combine(TensorFlowScenariosTestsFixture.parentWorkspacePath, finalImagesFolderName + "_" + (int)arch); 1746Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.TrainSetBottleneckCachedValuesFileName))); 1747Assert.True(File.Exists(Path.Combine(options.WorkspacePath, options.ValidationSetBottleneckCachedValuesFileName))); 1846string fullImagesetFolderPath = Path.Combine( 1954UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 1956if (!Directory.Exists(Path.Combine(imagesDownloadFolder, filenameAlias))) 1957Directory.Move(Path.Combine(imagesDownloadFolder, Path.GetFileNameWithoutExtension(fileName)), Path.Combine(imagesDownloadFolder, "FPTSUT")); 1967UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder); 1979string relativeFilePath = Path.Combine(destDir, destFileName); 1995if (File.Exists(Path.Combine(destFolder, flag))) 1999File.Create(Path.Combine(destFolder, flag)); 2022string tempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Microsoft.ML.TestFramework (9)
BaseTestBaseline.cs (5)
37private readonly string _logRootRelPath = Path.Combine("Logs", BuildString); // Relative to OutDir. 97_baselineCommonDir = Path.Combine(baselineRootDir, "Common"); 100string logDir = Path.Combine(OutDir, _logRootRelPath); 103string logPath = Path.Combine(logDir, FullTestName + LogSuffix); 414string relPath = Path.Combine(dir, name);
BaseTestClass.cs (2)
57OutDir = Path.Combine(currentAssemblyLocation.Directory.FullName, "TestOutput"); 108return Path.GetFullPath(Path.Combine(DataDir, name));
CopyAction.cs (2)
52var dir = new DirectoryInfo(Path.Combine(deploymentDirectory, copyfolder)); 54CopyAll(Path.Combine(deploymentDirectory, "AutoLoad"), testDirectory.FullName);
Microsoft.ML.TestFrameworkCommon (7)
TestCommon.cs (5)
18return Path.Combine(outDir, name); 34return Path.GetFullPath(Path.Combine(dataDir, name)); 77!Directory.Exists(Path.Combine(directory, ".git")) && 78!File.Exists(Path.Combine(directory, ".git"))) 295Directory.CreateDirectory(Path.Combine(outDir, subDir));
Utility\PathResolver.cs (2)
46yield return Path.Combine(AppContext.BaseDirectory, name); 97appLocalNativePath = Path.Combine(
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"));
DatabaseLoaderTests.cs (5)
362var databaseFile = Path.Combine(_temporaryDatabaseDirectory, $"{databaseName}.mdf"); 363File.Copy(Path.Combine(sourceDirectory, $"{databaseName}.mdf"), databaseFile); 366var logFile = Path.Combine(_temporaryDatabaseDirectory, $"{databaseName}_log.ldf"); 367File.Copy(Path.Combine(sourceDirectory, $"{databaseName}_log.ldf"), logFile); 375var databaseFile = Path.GetFullPath(Path.Combine("TestDatabases", $"{databaseName}.sqlite"));
ImagesTests.cs (2)
1149var imagePath = Path.Combine(imageFolder, fileName); 1282string imageTempPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + extension);
OnnxConversionTest.cs (2)
1172var subDir = Path.Combine("Onnx", "Transforms"); 1901var subDir = Path.Combine("Onnx", "Transforms");
TextLoaderTests.cs (1)
595var combinedPath = Path.Combine(directoryName, "*");
Transformers\ConcatTests.cs (2)
85var subdir = Path.Combine("Transform", "Concat"); 149var subdir = Path.Combine("Transform", "Concat");
Transformers\NormalizerTests.cs (1)
1005var modelPath = Path.Combine("TestModels", "normalizer_verwrit-00010001.zip");
Transformers\TextFeaturizerTests.cs (1)
779var modelPath = Path.Combine("TestModels", "SentimentModel.zip");
Microsoft.ML.TimeSeries.Tests (4)
TimeSeries.cs (3)
31TestCore(GetDataPath(Path.Combine("Timeseries", "real_1.csv")), 47TestCore(GetDataPath(Path.Combine("Timeseries", "real_11.csv")), 63TestCore(GetDataPath(Path.Combine("Timeseries", "A4Benchmark-TS2.csv")),
TimeSeriesDirectApi.cs (1)
536var dataPath = GetDataPath(Path.Combine("Timeseries", "anomaly_detection.csv"));
Microsoft.ML.Tokenizers.Data.Tests (1)
parent\Microsoft.ML.Tokenizers.Tests\Utils.cs (1)
53Path.Combine(Path.GetTempPath(), Path.ChangeExtension(Guid.NewGuid().ToString(), extension));
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"); 590using Stream vocabStream = File.OpenRead(Path.Combine(@"Gpt-2", "vocab.json")); 591using Stream mergesStream = File.OpenRead(Path.Combine(@"Gpt-2", "merges.txt")); 938BpeOptions options = new BpeOptions(Path.Combine(@"Gpt-2", "vocab.json"), Path.Combine(@"Gpt-2", "merges.txt")) 995using Stream jsonModelStream = File.OpenRead(Path.Combine(@"DeepSeek", "tokenizer-DeepSeek-R1.json"));
CodeGenTests.cs (4)
28using Stream vocabStream = File.OpenRead(Path.Combine(@"Codegen-350M-mono", "vocab.json")); 29using Stream mergesStream = File.OpenRead(Path.Combine(@"Codegen-350M-mono", "merges.txt")); 39using Stream vocabStream = File.OpenRead(Path.Combine(@"Phi-2", "vocab.json")); 40using Stream mergesStream = File.OpenRead(Path.Combine(@"Phi-2", "merges.txt"));
EnglishRobertaTests.cs (6)
91Path.Combine(@"Gpt-2", "vocab.json"), 92Path.Combine(@"Gpt-2", "merges.txt"), 93Path.Combine(@"Gpt-2", "dict.txt"), 109string vocabFile = Path.Combine(@"Gpt-2", "vocab.json"); 110string mergeFile = Path.Combine(@"Gpt-2", "merges.txt"); 111string translationFile = Path.Combine(@"Gpt-2", "dict.txt");
LlamaTests.cs (3)
32using Stream remoteStream = File.OpenRead(Path.Combine(@"Llama", "tokenizer.model")); 39using Stream remoteStream = File.OpenRead(Path.Combine(@"Mistral", "tokenizer.model")); 46using Stream remoteStream = File.OpenRead(Path.Combine(@"Llama", "tokenizer.model"));
SentencePieceTests.cs (7)
44using Stream stream = File.OpenRead(Path.Combine(@"Llama", "tokenizer.model")); 57byte[] modelBytes = File.ReadAllBytes(Path.Combine(@"Llama", "tokenizer.model")); 71using Stream stream = File.OpenRead(Path.Combine(@"Llama", "tokenizer.model")); 92using Stream stream = File.OpenRead(Path.Combine( 108using Stream stream = File.OpenRead(Path.Combine(@"Llama", "tokenizer.model")); 142using Stream bpeStream = File.OpenRead(Path.Combine(@"Llama", "tokenizer.model")); 146using Stream unigramStream = File.OpenRead(Path.Combine(
UnigramTests.cs (5)
26using Stream remoteStream = File.OpenRead(Path.Combine(@"Paraphrase-multilingual-MiniLM-L12-v2", "sentencepiece.bpe.model")); 58using Stream remoteStream = File.OpenRead(Path.Combine(@"Paraphrase-multilingual-MiniLM-L12-v2", "sentencepiece.bpe.model")); 616using Stream jsonStream = File.OpenRead(Path.Combine("Paraphrase-multilingual-MiniLM-L12-v2", "tokenizer.json")); 654using Stream jsonStream = File.OpenRead(Path.Combine("Paraphrase-multilingual-MiniLM-L12-v2", "tokenizer.json")); 1191using JsonDocument bundled = JsonDocument.Parse(File.ReadAllText(Path.Combine("Paraphrase-multilingual-MiniLM-L12-v2", "tokenizer.json")));
Utils.cs (1)
53Path.Combine(Path.GetTempPath(), Path.ChangeExtension(Guid.NewGuid().ToString(), extension));
Microsoft.ML.TorchSharp (6)
AutoFormerV2\ObjectDetectionTrainer.cs (2)
275var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet"); 280string relativeFilePath = Path.Combine(destDir, destFileName);
Roberta\QATrainer.cs (2)
252var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet"); 257string relativeFilePath = Path.Combine(destDir, destFileName);
TorchSharpBaseTrainer.cs (2)
182var destDir = Path.Combine(((IHostEnvironmentInternal)Parent.Host).TempFilePath, "mlnet"); 187string relativeFilePath = Path.Combine(destDir, destFileName);
Microsoft.ML.Transforms (2)
Text\TextFeaturizingEstimator.cs (1)
757var mapperDirName = Path.Combine(dirName, "Mapper");
Text\WordEmbeddingsExtractor.cs (1)
632string dir = kind == WordEmbeddingEstimator.PretrainedModelKind.SentimentSpecificWordEmbedding ? Path.Combine("Text", "Sswe") : "WordVectors";
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)
560_resourcePath = Path.Combine(((IHostEnvironmentInternal)env).TempFilePath, "MLNET"); 593_checkpointPath = Path.Combine(_options.WorkspacePath, _options.FinalModelPrefix + 595_sizeFile = Path.Combine(_options.WorkspacePath, "TrainingSetSize.txt"); 691string trainSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath, 694string validationSetBottleneckCachedValuesFilePath = Path.Combine(_options.WorkspacePath, 879Path.Combine(_options.WorkspacePath, _options.ValidationSetBottleneckCachedValuesFileName), 977trainWriter = tf.summary.FileWriter(Path.Combine(_options.WorkspacePath, "train"), 1172var evalGraph = LoadMetaGraph(Path.Combine(_resourcePath, ModelFileName[_options.Arch])); 1336var modelFilePath = Path.Combine(_resourcePath, modelFileName);
Microsoft.NET.Build.Containers (5)
ContentStore.cs (1)
40string descriptorPath = Path.Combine(ContentRoot, digestValue) + extension;
LocalDaemons\ArchiveFileRegistry.cs (1)
66fullPath = Path.Combine(fullPath, repository + ".tar.gz");
LocalDaemons\ContainerRuntimeOperations.cs (2)
97string archivePath = Path.Combine(temporaryDirectory.FullName, "image.tar"); 161string fullPath = Path.Combine(
LocalDaemons\DockerCli.cs (1)
58string fullPath = Path.Combine(directory, RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? $"{command}.exe" : command);
Microsoft.NET.Build.Extensions.Tasks (1)
parent\Common\ItemUtilities.cs (1)
148return Path.Combine(destinationSubDirectory, fileName);
Microsoft.NET.Build.Tasks (63)
AssetsFileResolver.cs (3)
57string sourcePath = Path.Combine(libraryPath, runtimeTarget.Path); 76string sourcePath = Path.Combine(libraryPath, resourceAssembly.Path); 98string srcpath = Path.Combine(libraryPath, item.Path);
DependencyContextBuilder.cs (2)
656string libraryPath = !string.IsNullOrWhiteSpace(library.Path) ? Path.Combine(mainProjectDirectory, library.Path) : null; 859string fullProjectPath = Path.GetFullPath(Path.Combine(mainProjectDirectory, projectPath));
FrameworkPackages\FrameworkPackages.cs (3)
128var packsFolder = Path.Combine(targetingPackRoot, frameworkName + ".Ref"); 129var originalPacksFolder = Path.Combine(targetingPackRoot.OriginalValue, frameworkName + ".Ref"); 135log.LogMessage("Pack directories found: {0}", string.Join(Environment.NewLine, packDirectories.Select(d => Path.Combine(originalPacksFolder, Path.GetFileName(d)))));
GenerateDepsFile.cs (1)
270string destinationSubPath = string.IsNullOrEmpty(destinationSubDir) ? null : Path.Combine(destinationSubDir, Path.GetFileName(i.ItemSpec));
GenerateShims.cs (2)
83var packagedShimOutputDirectoryAndRid = Path.Combine( 87var appHostDestinationFilePath = Path.Combine(
GetEmbeddedApphostPaths.cs (2)
40var packagedShimOutputDirectoryAndRid = Path.Combine( 44var appHostDestinationFilePath = Path.Combine(
NugetContentAssetPreprocessor.cs (2)
19_preprocessedOutputDirectory = Path.Combine(outputDirectoryBase, BuildPreprocessedContentHash(_preprocessorValues)); 31pathToFinalAsset = Path.Combine(_preprocessedOutputDirectory, relativeOutputPath);
NuGetPackageResolver.cs (1)
54return Path.Combine(packagePath, NormalizeRelativePath(relativePath));
parent\Common\ItemUtilities.cs (1)
148return Path.Combine(destinationSubDirectory, fileName);
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");
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\TempDirectoryWorkloadManifestProvider.cs (1)
23string? workloadManifestPath = Path.Combine(workloadManifestDirectory, "WorkloadManifest.json");
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (2)
26var catalog = Path.Combine(localizationDir, $"WorkloadManifest.{culture.Name}.json"); 65string localizationDir = Path.Combine(manifestDir, "localize");
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSet.cs (1)
100if (File.Exists(Path.Combine(path, "baseline.workloadset.json")))
PrepareForReadyToRunCompilation.cs (5)
173var outputR2RImage = Path.Combine(OutputPath, outputR2RImageRelativePath); 258r2rFileToPublish.ItemSpec = Path.Combine(OutputPath, Path.GetFileName(outputR2RImageRelativePath)); 267r2rFileToPublish.ItemSpec = Path.Combine(OutputPath, Path.GetFileName(outputR2RImageRelativePath)); 396compilerOutputPath = Path.Combine(OutputPath, compilerOutputRelativePath); 397string publishOutputPath = Path.Combine(OutputPath, publishOutputRelativePath);
ProcessFrameworkReferences.cs (2)
1146yield return Path.Combine(packRoot, "packs"); 1156yield return Path.Combine(userProfileDir, "packs");
ReferenceInfo.cs (1)
169string destinationSubPath = string.IsNullOrEmpty(destinationSubDirectory) ? null : Path.Combine(destinationSubDirectory, Path.GetFileName(fullPath));
ResolveAppHosts.cs (1)
306appHostItem.SetMetadata(MetadataKeys.Path, Path.Combine(appHostPackPath, hostRelativePathInPackage));
ResolvedFile.cs (1)
42Path.Combine(DestinationSubDirectory, FileName);
ResolvePackageAssets.cs (1)
1971Path.Combine(destinationSubDirectory, assetsFileName));
ResolvePackageDependencies.cs (1)
465return Path.Combine(resolvedPackagePath, relativePath);
ResolveRuntimePackAssets.cs (4)
152AbsolutePath absoluteRuntimeListPath = new(Path.Combine("data", "RuntimeList.xml"), absoluteRuntimePackRoot); 233throw new BuildErrorException($"Culture not set in runtime manifest for {Path.GetFullPath(Path.Combine(runtimePack.GetMetadata(MetadataKeys.PackageDirectory), fileElement.Attribute("Path").Value))}"); 243throw new BuildErrorException($"Unrecognized file type '{typeAttributeValue}' in {Path.Combine(absoluteRuntimePackRoot.OriginalValue, absoluteRuntimeListPath.OriginalValue)}"); 285assetItem.SetMetadata(MetadataKeys.DestinationSubPath, Path.Combine(culture, Path.GetFileName(assetPath)));
ResolveTargetingPackAssets.cs (8)
223string targetingPackOriginalDataPath = Path.Combine(targetingPackRoot.OriginalValue, "data"); 226Path.Combine(targetingPackOriginalDataPath, "PlatformManifest.txt")); 229Path.Combine(targetingPackOriginalDataPath, "PackageOverrides.txt")); 232Path.Combine(targetingPackOriginalDataPath, "FrameworkList.xml")); 313string itemSpec = Path.Combine(targetingPackAssetPath.OriginalValue, Path.GetFileName(dll)); 410Path.Combine(definition.TargetingPackRoot.OriginalValue, fileElement.Attribute("Path").Value) : 467string dllPath = Path.Combine(targetingPackDllFolder, assemblyName + ".dll"); 477var dllPath = Path.Combine(targetingPackDllFolder, assemblyName + ".dll");
ResourceAssemblyInfo.cs (1)
26string relativePath = Path.Combine(destinationSubDirectory, Path.GetFileName(referenceSatellitePath.ItemSpec));
RunCsWinRTGenerator.cs (1)
192return Path.Combine(CsWinRTToolsDirectory!, ToolName);
src\sdk\src\Cli\dotnet\Installer\Windows\TrustedMachinePath.cs (1)
58public static string ProgramDataDotnetRoot { get; } = Path.Combine(
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (1)
38return Path.Combine(homePath, DotnetProfileDirectoryName);
Microsoft.NET.HostModel (1)
Bundle\Bundler.cs (1)
315string bundlePath = Path.Combine(_outputDir, _hostName);
Microsoft.NET.ProjectData (19)
CachePathResolver.cs (3)
226 string objDir = Path.Combine(projectDirectory, "obj"); 236 return Path.Combine(objDir, "NuGet"); 315 string candidate = Path.Combine(hashDir, nativeSuffix);
Donor\ProjectDataDonorIndex.cs (4)
198 string gitPath = Path.Combine(currentDirectory, ".git"); 234 : Path.GetFullPath(Path.Combine(Path.GetDirectoryName(gitFilePath)!, value)); 245 string commonDirFilePath = Path.Combine(gitDirectory, "commondir"); 253 : Path.GetFullPath(Path.Combine(gitDirectory, commonDir));
Donor\ProjectDataDonorIndex.Git.cs (5)
42 string gitPath = Path.Combine(workspaceRoot, ".git"); 63 string headPath = Path.Combine(gitDirectory, "HEAD"); 80 AppendFileFingerprint(fingerprint, Path.Combine(commonGitDirectory, "packed-refs"), gitQueryContext); 269 string worktreeRefPath = Path.Combine(gitDirectory, relativePath); 274 : Path.Combine(commonGitDirectory, relativePath),
Donor\ProjectDataDonorIndex.Reader.cs (1)
76 string donorProjectFilePath = Path.GetFullPath(Path.Combine(entry.Path, relativeProjectPath));
ProjectDataBuildAttemptManifest.cs (1)
34 return Path.Combine(receiptDirectory, FileName);
ProjectDataBuildReceipt.cs (2)
29 return Path.Combine(receiptDirectory, fileName); 35 return Path.Combine(receiptDirectory, AggregateCompletionFileName);
SdkKnownFrameworkReferenceResolver.cs (1)
63 string propsPath = Path.Combine(sdkPath, "Microsoft.NETCoreSdk.BundledVersions.props");
UnsupportedProjectDataMarker.cs (1)
172 string candidate = Path.Combine(directory, fileName);
UserFolderCachePath.cs (1)
109 return Path.Combine(xdgCacheHome!, CacheDirectoryName);
Microsoft.NET.ProjectData.Tasks (14)
CachePathResolver.cs (3)
81 : Path.GetFullPath(Path.Combine(this.projectDir, inputPath)); 320 if (!string.IsNullOrEmpty(programFiles)) Add(Path.Combine(programFiles, "dotnet")); 329 if (!string.IsNullOrEmpty(userHome)) Add(Path.Combine(userHome, ".dotnet"));
ProjectDataWriter.cs (2)
539 string tempPath = Path.Combine(tempDir, Path.GetFileName(outputPath) + "." + Guid.NewGuid().ToString("N") + ".tmp"); 702 : Path.GetFullPath(Path.Combine(projectDirectory, item.ItemSpec));
src\roslyn\src\ProjectData\Microsoft.NET.ProjectData\Donor\ProjectDataDonorIndex.cs (4)
198 string gitPath = Path.Combine(currentDirectory, ".git"); 234 : Path.GetFullPath(Path.Combine(Path.GetDirectoryName(gitFilePath)!, value)); 245 string commonDirFilePath = Path.Combine(gitDirectory, "commondir"); 253 : Path.GetFullPath(Path.Combine(gitDirectory, commonDir));
src\roslyn\src\ProjectData\Microsoft.NET.ProjectData\ProjectDataBuildAttemptManifest.cs (1)
34 return Path.Combine(receiptDirectory, FileName);
src\roslyn\src\ProjectData\Microsoft.NET.ProjectData\ProjectDataBuildReceipt.cs (2)
29 return Path.Combine(receiptDirectory, fileName); 35 return Path.Combine(receiptDirectory, AggregateCompletionFileName);
src\roslyn\src\ProjectData\Microsoft.NET.ProjectData\UnsupportedProjectDataMarker.cs (1)
172 string candidate = Path.Combine(directory, fileName);
src\roslyn\src\ProjectData\Microsoft.NET.ProjectData\UserFolderCachePath.cs (1)
109 return Path.Combine(xdgCacheHome!, CacheDirectoryName);
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (4)
BrotliCompress.cs (1)
87var outputRelativePath = Path.Combine(OutputDirectory, CalculateTargetPath(inputFullPath, ".br"));
GZipCompress.cs (2)
50var outputRelativePath = Path.Combine(OutputDirectory, targetFileName); 51var outputFullPath = Path.Combine(outputDirectory.Value, targetFileName);
parent\parent\StaticWebAssetsSdk\Tasks\Data\StaticWebAsset.cs (1)
1237var destPath = Path.Combine(fxDir, Normalize(fileSystemRelativePath));
Microsoft.NET.Sdk.Publish.Tasks (24)
AppSettingsTransform.cs (1)
13string tempFileFullPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
MsDeploy\CommonUtility.cs (1)
1747return Path.Combine(sourceRootPath, source);
MsDeploy\VSMSDeployHostObject.cs (1)
54srcSkipRuleItem.SetMetadata("AbsolutePath", Regex.Escape(Path.Combine(rootFolderOfFileToPublish, p.SourceFilePath)) + "$");
Tasks\GenerateEnvTransform.cs (1)
43string generatedTransformFileName = Path.Combine(PublishTempDirectory, Path.GetFileName(envTransformTemplatePath));
Tasks\Kudu\KuduDeploy.cs (1)
152string zipFileFullPath = Path.Combine(tempSubdirectory, "Publish.zip");
Tasks\MsDeploy\MSDeploy.cs (6)
266string msdeployExePath = Path.Combine("IIS", "Microsoft Web Deploy V3"); 267m_exePath = Path.Combine(programFiles, msdeployExePath); 268if (!File.Exists(Path.Combine(m_exePath, ToolName))) 275m_exePath = Path.Combine(programFiles, msdeployExePath); 281m_exePath = Path.Combine(programFiles, msdeployExePath); 1039string result = ExePath is null ? string.Empty : Path.Combine(ExePath, ToolName);
Tasks\OneDeploy\CreatePackageFile.cs (1)
49var packageFilePath = Path.Combine(IntermediateTempPath, packageFileName);
Tasks\TransformAppSettings.cs (2)
65sourceAppSettingsFilePath = Path.Combine(ProjectDirectory, SourceAppSettingsName); 74destinationAppSettingsFilePath = Path.Combine(PublishDirectory, DestinationAppSettingsName);
Tasks\TransformWebConfig.cs (3)
83publishWebConfigPath = Path.Combine(PublishDir, defaultWebConfigPath); 90publishWebConfigPath = Path.Combine(PublishDir, Path.GetFileName(projectWebConfigPath)); 166var projectWebConfigPath = Path.Combine(projectDirectory, webConfigFileName);
Tasks\WebJobs\GenerateRunCommandFile.cs (2)
27bool isRunCommandFilePresent = ProjectDirectory is not null && File.Exists(Path.Combine(ProjectDirectory, runCmdFileName)); 33File.WriteAllText(Path.Combine(WebJobsDirectory, runCmdFileName), command);
Tasks\ZipDeploy\CreateZipFile.cs (1)
30CreatedZipPath = Path.Combine(PublishIntermediateTempPath, zipFileName);
WebConfigTelemetry.cs (1)
107string projectFullPathConstructed = Path.Combine(solutionFileDirectory, projectRelativePath);
WebConfigTransform.cs (3)
93var appPath = Path.Combine(".", appName).Replace("/", "\\"); 131var logPath = Path.Combine(configureForAzure ? @"\\?\%home%\LogFiles" : @".\logs", "stdout").Replace("/", "\\"); 152projectWebConfigPath = Path.Combine(projectFolder, "web.config");
Microsoft.NET.Sdk.Razor.Tasks (6)
parent\Tool\ServerProtocol\ServerConnection.cs (4)
73return Path.Combine(workingDir, tmp); 78return Path.Combine(workingDir, temp); 304var dotnetPath = Path.Combine(path, exeName); 320var expectedCompilerPath = Path.Combine(clientDir, ServerName);
parent\Tool\ServerProtocol\ServerLogger.cs (1)
48loggingFileName = Path.Combine(loggingFileName, $"razorserver.{GetCurrentProcessId()}.log");
SdkRazorGenerate.cs (1)
122var outputPath = Path.Combine(ProjectRoot, input.GetMetadata(GeneratedOutput));
Microsoft.NET.Sdk.StaticWebAssets.Tasks (13)
CollectStaticWebAssetsToCopy.cs (1)
48fileOutputPath = Path.Combine(normalizedOutputPath, asset.ComputeTargetPath("", Path.DirectorySeparatorChar, StaticWebAssetTokenResolver.Instance));
Compression\ResolveCompressedAssets.cs (1)
196return Path.Combine(outputPath, $"{pathHash}-{{0}}-{asset.Fingerprint}");
Data\StaticWebAsset.cs (1)
1237var destPath = Path.Combine(fxDir, Normalize(fileSystemRelativePath));
DefineStaticWebAssetEndpoints.cs (2)
233var finalRoute = asset.IsProject() || asset.IsPackage() ? StaticWebAsset.Normalize(Path.Combine(asset.BasePath, route)) : route; 352var finalRoute = asset.IsProject() || asset.IsPackage() ? StaticWebAsset.Normalize(Path.Combine(asset.BasePath, route)) : route;
DefineStaticWebAssets.cs (2)
285identity = Path.Combine(Path.GetDirectoryName(identity) ?? string.Empty, expanded); 436var assetIdentity = Path.GetFullPath(Path.Combine(normalizedContentRoot, stem));
FingerprintPatternMatcher.cs (2)
60var result = Path.Combine(directoryName.ToString(), $"{fileNamePrefix}{DefaultFingerprintExpression}{extension}"); 79var simpleExtensionResult = Path.Combine(directoryName.ToString(), $"{stem}{expression}{matchExtension}");
Legacy\ValidateStaticWebAssetsUniquePaths.cs (1)
70private static string GetWebRootPath(string webRoot, string basePath, string relativePath) => $"{webRoot}/{Path.Combine(basePath, relativePath.TrimStart('.').TrimStart('/')).Replace("\\", "/").Trim('/')}";
OverrideHtmlAssetPlaceholders.cs (1)
95string outputPath = Path.Combine(OutputPath, FileHasher.HashString(item.ItemSpec) + item.GetMetadata("Extension"));
ReadPackageAssetsManifest.cs (1)
194return Path.GetFullPath(Path.Combine(packageRoot, relativePath.Replace('/', Path.DirectorySeparatorChar)));
ScopedCss\ConcatenateCssFiles.cs (1)
70var importPath = NormalizePath(Path.Combine(prefix, ProjectBundles[i].ItemSpec));
Microsoft.NET.Sdk.WorkloadManifestReader (19)
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");
src\sdk\src\Cli\dotnet\Installer\Windows\TrustedMachinePath.cs (1)
58public static string ProgramDataDotnetRoot { get; } = Path.Combine(
TempDirectoryWorkloadManifestProvider.cs (1)
23string? workloadManifestPath = Path.Combine(workloadManifestDirectory, "WorkloadManifest.json");
WorkloadManifestReader.Localization.cs (2)
26var catalog = Path.Combine(localizationDir, $"WorkloadManifest.{culture.Name}.json"); 65string localizationDir = Path.Combine(manifestDir, "localize");
WorkloadSet.cs (1)
100if (File.Exists(Path.Combine(path, "baseline.workloadset.json")))
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (9)
CachingWorkloadResolver.cs (5)
75string sentinelPath = Path.Combine(SdkPaths.SdkDirectory, "DisableWorkloadResolver.sentinel"); 182string sdkPackSdkFolder = Path.Combine(sdkPackInfo.Path, "Sdk"); 183string autoImportPath = Path.Combine(sdkPackSdkFolder, "AutoImport.props"); 200var workloadManifestTargetPath = Path.Combine(manifestDirectory, "WorkloadManifest.targets"); 216return new SinglePathResolutionResult(Path.Combine(packInfo.Path, "Sdk"));
parent\parent\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\FileBasedInstallationRecordInstaller.cs (2)
21.Where(band => Directory.Exists(Path.Combine(band, InstalledWorkloadDir)) && Directory.GetFiles(Path.Combine(band, InstalledWorkloadDir)).Any())
parent\parent\Cli\dotnet\Commands\Workload\Install\WorkloadInstallRecords\WindowsWorkloadInstallationRecordReader.cs (1)
41using RegistryKey? workloadKey = baseKey.OpenSubKey(Path.Combine(basePath, $"{sdkFeatureBand}"));
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (1)
38return Path.Combine(homePath, DotnetProfileDirectoryName);
Microsoft.TemplateEngine.Cli (10)
Alias\AliasRegistry.cs (1)
20_aliasesFilePath = Path.Combine(_environmentSettings.Paths.HostVersionSettingsDir, "aliases.json");
CliTemplateEngineHost.cs (1)
32OutputPath = outputPath != null ? Path.Combine(workingPath, outputPath) : workingPath;
Commands\CliPathInfo.cs (2)
29HostSettingsDir = Path.Combine(GlobalSettingsDir, host.HostIdentifier); 44? Path.Combine(CliFolderPathCalculator.DotnetHomePath, ".templateengine")
PostActionProcessors\AddJsonPropertyPostActionProcessor.cs (4)
50if (fileSystem.FileExists(Path.Combine(currentDirectory, "global.json")) || 51fileSystem.FileExists(Path.Combine(currentDirectory, ".git")) || 52fileSystem.DirectoryExists(Path.Combine(currentDirectory, ".git"))) 136string newJsonFilePath = Path.Combine(repoRoot ?? outputBasePath, jsonFileName);
PostActionProcessors\ProcessStartPostActionProcessor.cs (1)
100string executableCombinedFileName = Path.Combine(Path.GetFullPath(outputBasePath), executableFileName);
TemplateInvoker.cs (1)
126Path.Combine(_cliTemplateEngineHost.OutputPath, targetPath),
Microsoft.TemplateEngine.Core (3)
Util\Orchestrator.cs (3)
130string targetPath = Path.Combine(targetDir, targetRel); 170string targetPath = Path.Combine(targetDir, targetRel); 279string targetPath = Path.Combine(targetDir, targetRel);
Microsoft.TemplateEngine.Edge (16)
BuiltInManagedProvider\GlobalSettingsTemplatePackageProvider.cs (2)
27string packagesFolder = Path.Combine(settings.Paths.GlobalSettingsDir, "packages"); 44string globalSettingsFilePath = Path.Combine(environmentSettings.Paths.GlobalSettingsDir, "packages.json");
DefaultPathInfo.cs (2)
103return Path.Combine(userDir, ".templateengine"); 116return Path.Combine(globalDir ?? GetDefaultGlobalSettingsDir(userDir!), host.HostIdentifier);
Installers\NuGet\NugetApiPackageManager.cs (1)
113string filePath = Path.Combine(downloadPath, packageMetadata.Identity.Id + "." + packageMetadata.Identity.Version + ".nupkg");
Installers\NuGet\NuGetInstaller.cs (1)
410string targetPackageLocation = Path.Combine(_installPath, packageInfo.PackageIdentifier + "." + packageInfo.PackageVersion + ".nupkg");
Mount\FileSystem\FileSystemMountPoint.cs (3)
43string fullPath = Path.Combine(MountPointRootPath, path.TrimStart('/')); 55string fullPath = Path.Combine(MountPointRootPath, path.TrimStart('/')); 61string fullPath = Path.Combine(MountPointRootPath, path.TrimStart('/'));
ReflectionLoadProbingPath.cs (3)
215DirectoryInfo info = new DirectoryInfo(Path.Combine(selector._path, stringName)); 231else if (File.Exists(Path.Combine(selector._path, stringName + ".dll"))) 233FileInfo f = new FileInfo(Path.Combine(selector._path, stringName + ".dll"));
Settings\Scanner.cs (1)
203string targetPath = Path.Combine(targetBasePath, Path.GetFileName(sourceLocation));
Settings\SettingsFilePaths.cs (3)
56string wholeTargetPath = Path.Combine(targetPath, localPath); 139current = Path.Combine(current, parts[i]); 156return Path.Combine(_environmentSettings.Paths.UserProfileDir, path.Substring(1));
Microsoft.TemplateEngine.IDE (1)
Bootstrapper.cs (1)
53string hostSettingsDir = Path.Combine(hostSettingsLocation, host.HostIdentifier);
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (4)
RunnableProjectGenerator.cs (4)
146string target = Path.Combine(targetDirectory, source.Target); 158Path.Combine(source.Source, fileChange.SourceRelativePath), 159Path.Combine(source.Target, fileChange.TargetRelativePath), 321string target = Path.Combine(targetDirectory, source.Target);
Microsoft.TemplateEngine.Utils (14)
FileSystemInfoExtensions.cs (2)
16using Stream f = source.MountPoint.EnvironmentSettings.Host.FileSystem.CreateFile(Path.Combine(target, file.Name)); 24dir.CopyTo(Path.Combine(target, dir.Name));
IFileSystemInfoExtensions.cs (1)
26result = Path.Combine(fileSystemInfo.MountPoint.MountPointUri, fileSystemInfo.FullPath.Trim('/', '\\'));
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);
InstallRequestPathResolution.cs (1)
63string searchTarget = Path.Combine(environmentSettings.Host.FileSystem.GetCurrentDirectory(), baseDir.Trim());
Microsoft.TemplateSearch.Common (2)
Providers\NuGetMetadataSearchProvider.cs (1)
105string preferredMetadataLocation = Path.Combine(_environmentSettings.Paths.HostVersionSettingsDir, TemplateDiscoveryMetadataFile);
TemplateDiscoveryMetadata\LegacySearchCacheReader.cs (1)
57string pathToConfig = Path.Combine(environmentSettings.Paths.HostVersionSettingsDir, filePath);
Microsoft.TestPlatform.CoreUtilities (7)
Helpers\DotnetHostHelper.cs (7)
116string exeFullPath = Path.Combine(path.Trim(), executableBaseName); 198muxerPath = Path.Combine(envVar, _muxerName); 281? Path.Combine("/usr/local/share/dotnet/x64", _muxerName) 282: Path.Combine("/usr/local/share/dotnet", _muxerName); 286muxerPath = Path.Combine("/usr/share/dotnet", _muxerName); 339string path = Path.Combine(installLocation.Trim(), _muxerName); 368string path = Path.Combine(content, _muxerName);
Microsoft.TestPlatform.CrossPlatEngine (13)
Constants.cs (1)
26internal static string DefaultAdapterLocation = Path.Combine(new ProcessHelper().GetCurrentProcessLocation(), "Extensions");
DataCollection\DefaultDataCollectionLauncher.cs (1)
68: Path.Combine(dataCollectorDirectory, dataCollectorProcessName);
DataCollection\DotnetDataCollectionLauncher.cs (3)
67var dataCollectorAssemblyPath = Path.Combine(dataCollectorDirectory, DataCollectorProcessName); 73var runtimeConfigPath = Path.Combine(dataCollectorDirectory, string.Concat(dataCollectorFileName, ".runtimeconfig.json")); 87var depsFilePath = Path.Combine(dataCollectorDirectory, string.Concat(dataCollectorFileName, ".deps.json"));
DataCollection\InProcDataCollectionExtensionManager.cs (1)
255var assemblyPath = Path.Combine(extensionPath, codeBase);
DataCollection\ProxyDataCollectionManager.cs (1)
350var extensionsFolder = Path.Combine(Path.GetDirectoryName(typeof(ITestPlatform).Assembly.GetAssemblyLocation())!, "Extensions");
Discovery\DiscoveryManager.cs (2)
257string src = !Path.IsPathRooted(source) ? Path.Combine(Directory.GetCurrentDirectory(), source) : source; 275src = !Path.IsPathRooted(source) ? Path.Combine(Path.GetDirectoryName(package)!, source) : source;
PostProcessing\ArtifactProcessingManager.cs (4)
86_processArtifactFolder = Path.Combine(_artifactsDirectory, _testSessionCorrelationId); 94_testSessionProcessArtifactFolder = Path.Combine(_processArtifactFolder, $"{pid}_{Guid.NewGuid()}"); 272_fileHelper.WriteAllTextToFile(Path.Combine(_testSessionProcessArtifactFolder, RunsettingsFileName), runSettingsXml); 275_fileHelper.WriteAllTextToFile(Path.Combine(_testSessionProcessArtifactFolder, ExecutionCompleteFileName), serializedExecutionComplete);
Microsoft.TestPlatform.Extensions.BlameDataCollector (10)
BlameCollector.cs (3)
166var dumpPath = Path.Combine(dumpDirectory, $"%e_%p_%t_crashdump.dmp"); 516var filepath = Path.Combine(GetTempDirectory(), Constants.AttachmentFileName + "_" + _attachmentGuid); 714_tempDirectory = Path.Combine(temp, Guid.NewGuid().ToString());
NetClientHangDumper.cs (1)
67var outputFile = Path.Combine(outputDirectory, $"{p.ProcessName}_{p.Id}_{DateTime.Now:yyyyMMddTHHmmss}_hangdump.dmp");
ProcDumpDumper.cs (2)
120var outputFile = Path.Combine(outputDirectory, $"{_outputFilePrefix}.dmp"); 292var outputFile = Path.Combine(outputDirectory, $"{process.ProcessName}_{processId}_{DateTime.Now:yyyyMMddTHHmmss}_hangdump.dmp");
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
WindowsHangDumper.cs (1)
89var outputFile = Path.Combine(outputDirectory, $"{p.ProcessName}_{p.Id}_{DateTime.Now:yyyyMMddTHHmmss}_hangdump.dmp");
Microsoft.TestPlatform.PlatformAbstractions (5)
common\System\ProcessHelper.cs (1)
362: Path.Combine(GetCurrentProcessLocation(), GetFormattedCurrentProcessArchitecture());
common\Tracing\PlatformEqtTrace.cs (3)
342LogFile ??= Path.Combine(logsDirectory, runnerLogFileName); 356runnerLogFileName = Path.Combine(LogFile, runnerLogFileName); 357LogFile = Path.Combine(LogFile, $"{Path.GetFileNameWithoutExtension(process.MainModule.FileName)}_{process.Id}.diag");
common\Tracing\RollingFileTraceListener.cs (1)
197string archiveFileName = Path.Combine(directory, fileNameBuilder.ToString());
Microsoft.TestPlatform.TestHostRuntimeProvider (15)
Hosting\DefaultTestHostManager.cs (4)
186var testhostProcessPath = Path.Combine(currentWorkingDirectory, testHostProcessName); 195testHostProcessName = Path.Combine("TestHostNetFramework", originalTestHostProcessName); 343actualSources.Add(Path.Combine(Path.GetDirectoryName(uwpSource)!, GetUwpSources(uwpSource)!)); 598appxManifestPath = Path.Combine(Path.GetDirectoryName(uwpSource)!, appxManifestPath);
Hosting\DotnetTestHostManager.cs (11)
269var dotnetExeArchitecture = GetExecutableArchitecture(Path.Combine(dotnetRoot, "dotnet.exe")); 310var runtimeConfigPath = Path.Combine(sourceDirectory, string.Concat(sourceFile, ".runtimeconfig.json")); 325var depsFilePath = Path.Combine(sourceDirectory, string.Concat(sourceFile, ".deps.json")); 337var runtimeConfigDevPath = Path.Combine(sourceDirectory, string.Concat(sourceFile, ".runtimeconfig.dev.json")); 361var fullExePath = Path.Combine(sourceDirectory, exeName); 411var testHostNextToRunner = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, "testhost.dll"); 434var testhostDeps = Path.Combine(Path.GetDirectoryName(testHostNextToRunner)!, "testhost.deps.json"); 463var testhostRuntimeConfig = Path.Combine(Path.GetDirectoryName(testHostNextToRunner)!, "testhost-latest.runtimeconfig.json"); 1015testHostPath = Path.Combine(testhostPackage.Path, testHostPath); 1056testHostFullPath = Path.Combine(x.GetString()!, testHostPath); 1123var testHostNextToTestProject = Path.Combine(sourceDirectory, "testhost.dll");
Microsoft.TestPlatform.Utilities (2)
ClientUtilities.cs (1)
71fileName = Path.Combine(root, fileName);
CodeCoverageDataAttachmentsHandler.cs (1)
179var assemblyPath = Path.Combine(Path.GetDirectoryName(dataAttachmentAssemblyLocation)!, CodeCoverageIoAssemblyName + ".dll");
Microsoft.VisualStudio.TestPlatform.Client (1)
TestPlatform.cs (1)
270string extensionsFolder = Path.Combine(
Microsoft.VisualStudio.TestPlatform.Common (9)
DataCollection\DataCollectionAttachmentManager.cs (3)
115SessionOutputDirectory = Path.Combine(absolutePath, id.Id.ToString()); 249var directoryPath = Path.Combine( 252var localFilePath = Path.Combine(directoryPath, Path.GetFileName(fileTransferInfo.FileName));
Utilities\AssemblyResolver.cs (1)
136var assemblyPath = Path.Combine(dir, requestedName.Name + extension);
Utilities\InstallationContext.cs (4)
30var pathToDevenv = Path.Combine(vsInstallPath, DevenvExe); 45return Path.Combine(visualStudioDirectory, DevenvExe); 53Path.Combine(visualStudioDirectory, PrivateAssembliesDirName), 54Path.Combine(visualStudioDirectory, PublicAssembliesDirName),
Utilities\RunSettingsProviderExtensions.cs (1)
188var defaultResultsDirectory = Path.Combine(Directory.GetCurrentDirectory(), Constants.ResultsDirectoryName);
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (3)
HtmlLogger.cs (3)
294HtmlFilePath = Path.Combine(TestResultsDirPath!, logFilePrefixValue); 300HtmlFilePath = Path.Combine(TestResultsDirPath!, logFileNameValue); 354var fullFilePath = Path.Combine(TestResultsDirPath!, $"TestResult_{fileNameWithIter}.{fileExtension}");
Microsoft.VisualStudio.TestPlatform.Extensions.TestIds.TestLogger (4)
TestIdsLogger.cs (4)
433return Path.IsPathRooted(logFileNameValue) ? logFileNameValue! : Path.Combine(_testResultsDirPath!, logFileNameValue!); 476? Path.Combine(directory, fileName) 477: Path.Combine(directory, stem + "(" + iteration.ToString(CultureInfo.InvariantCulture) + ")" + extension); 504return Path.Combine(directory, fileName);
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (17)
ObjectModel\TestRun.cs (1)
166return Path.Combine(GetResultsDirectory(), result.RelativeTestResultsDirectory);
ObjectModel\TestRunConfiguration.cs (1)
82return Path.Combine(_runDeploymentRoot, DeploymentInDirectorySuffix);
TrxLogger.cs (2)
187testRunDirectory = Path.Combine(testRunDirectory, logFileDir); 589filePath = Path.Combine(_testResultsDirPath, Path.GetFileName(logFileNameValue!));
Utility\Converter.cs (10)
440string runDirectoryName = Path.Combine(trxFileDirectory, testRun.RunConfiguration!.RunDeploymentRootDirectory); 441string inDirectory = Path.Combine(runDirectoryName, "In"); 446targetDirectory = Path.Combine(inDirectory, testResultExecutionId.ToString()); 449targetDirectory = Path.Combine(targetDirectory, Environment.MachineName); 474string fileName = Path.Combine(Environment.MachineName, Path.GetFileName(targetFileName)); 497string runDirectoryName = Path.Combine(trxFileDirectory, testRun.RunConfiguration!.RunDeploymentRootDirectory); 498string testResultDirectory = Path.Combine(runDirectoryName, "In"); 502testResultDirectory = Path.Combine(testResultDirectory, testResultExecutionId.ToString()); 505testResultDirectory = Path.Combine(testResultDirectory, Environment.MachineName); 529string fileName = Path.Combine(Environment.MachineName, Path.GetFileName(targetFileName));
Utility\TrxFileHelper.cs (3)
150string tryMePath = Path.Combine(directoryName, tryMe); 181path = Path.Combine(basePath, path); 316string tryMePath = Path.Combine(baseDirectoryName, tryMe);
Microsoft.VisualStudio.TestPlatform.ObjectModel (4)
Constants.cs (1)
206public static readonly string DefaultResultsDirectory = Path.Combine(Directory.GetCurrentDirectory(), ResultsDirectoryName);
Navigation\DiaSession.cs (1)
119? Path.Combine(Directory.GetCurrentDirectory(), Path.GetFileName(pdbFilePath)!)
Navigation\FullSymbolReader.cs (1)
131filename = Path.Combine(Directory.GetCurrentDirectory(), filename);
Navigation\NativeMethods.cs (1)
562IntPtr modHandle = LoadLibraryEx(Path.Combine(nativeDllDirectory, "msdia140.dll"), IntPtr.Zero, 0);
Microsoft.Web.XmlTransform (1)
NamedTypeFactory.cs (1)
39path = Path.Combine(Path.GetDirectoryName(relativePathRoot), path);
Mono.Cecil (2)
Mono.Cecil\AssemblyReader.cs (1)
686 return Path.Combine (path, name);
Mono.Cecil\BaseAssemblyResolver.cs (1)
215 string file = Path.Combine (directory, name.Name + extension);
MSBuild (9)
CommandLine\CommandLineParser.cs (1)
663string autoResponseFile = Path.Combine(path, autoResponseFileName);
FilteredBinlogReplay.cs (2)
152string assemblyPath = Path.Combine(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, "dotnet.dll"); 191output.StagingPath = Path.Combine(directory, $".msbuild-filter-{Guid.NewGuid():N}.binlog");
OutOfProcTaskHostNode.cs (1)
1503? File.CreateText(string.Format(CultureInfo.CurrentCulture, Path.Combine(FileUtilities.TempFileDirectory, @"MSBuild_NodeShutdown_{0}.txt"), EnvironmentUtilities.CurrentProcessId))
PerformanceLogEventListener.cs (1)
84string logFilePath = Path.Combine(logDirectory, $"perf-{_processIDStr}-{Guid.NewGuid():N}.log");
XMake.cs (4)
2847Console.WriteLine($"{Path.Combine(s_exePath, s_exeName)} {equivalentCommandLine} {projectFile}"); 3799string rebasedProjectFile = Path.GetFullPath(Path.Combine(logicalCurrentDirectory, projectFile)); 4288$"logFile={Path.Combine(Directory.GetCurrentDirectory(), logFileName)}"); 4305fileParameters += $"logFile={Path.Combine(Directory.GetCurrentDirectory(), msbuildLogFileName)}";
MSBuild.Coordinator (1)
CoordinatorServer.DefaultDebugOutput.cs (1)
38_debugDumpTraceFilePath = Path.Combine(_debugDumpDirectory, $"MSBuild_CoordinatorTrace_PID_{EnvironmentUtilities.CurrentProcessId}.txt");
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)
Program.cs (2)
28var web = builder.AddExecutable("web", Environment.ProcessPath!, Path.Combine(builder.AppHostDirectory, "web")) 49var artifact = Path.Combine(context.PublishingContext.OutputPath, "compose.yaml");
NuGet.Build.Tasks (11)
BuildTasksUtility.cs (4)
252FileUtility.Delete(Path.Combine(project.RestoreMetadata.OutputPath, LockFileFormat.AssetsFileName)); 264FileUtility.Delete(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))); 733string packagesConfigPath = Path.Combine(projectDirectory, NuGetConstants.PackageReferenceFile); 740packagesConfigPath = Path.Combine(projectDirectory, "packages." + projectName + ".config");
GetRestoreProjectReferencesTask.cs (1)
74var combinedPath = Path.Combine(parentDirectory, project.ItemSpec);
GetRestoreSolutionProjectsTask.cs (1)
62var combinedPath = Path.Combine(parentDirectory, project.ItemSpec);
RestoreSettingsUtils.cs (1)
31var solutionSettingsFile = Path.Combine(
RestoreTask.cs (2)
319restoredProjectOutputPaths.Add(new TaskItem(Path.Combine(project.RestoreMetadata.OutputPath, LockFileFormat.AssetsFileName))); 326restoredProjectOutputPaths.Add(new TaskItem(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))));
StaticGraphRestoreTaskBase.cs (2)
247yield return Path.Combine(ThisAssemblyLazy.Value.DirectoryName, Path.ChangeExtension(ThisAssemblyLazy.Value.Name, ".Console.dll")); 256yield return Path.Combine(MSBuildBinPath, "MSBuild.dll");
NuGet.Build.Tasks.Console (5)
MSBuildStaticGraphRestore.cs (5)
637return outputPath == null ? null : Path.GetFullPath(Path.Combine(project.Directory, outputPath)); 644return outputPath == null ? null : Path.GetFullPath(Path.Combine(projectDirectory, outputPath)); 932outputPath ??= Path.Combine(projectDirectory, "obj"); 1499LoggingQueue.Enqueue(new ConsoleOutLogEmbedInBinlog(Path.Combine(project.RestoreMetadata.OutputPath, LockFileFormat.AssetsFileName))); 1506LoggingQueue.Enqueue(new ConsoleOutLogEmbedInBinlog(Path.Combine(project.RestoreMetadata.OutputPath, DependencyGraphSpec.GetDGSpecFileName(Path.GetFileName(project.RestoreMetadata.ProjectPath)))));
NuGet.Build.Tasks.Pack (15)
GetPackOutputItemsTask.cs (4)
61outputs.Add(new TaskItem(Path.Combine(PackageOutputPath, nupkgFileName))); 62outputs.Add(new TaskItem(Path.Combine(NuspecOutputPath, nuspecFileName))); 68outputs.Add(new TaskItem(Path.Combine(PackageOutputPath, nupkgSymbolsFileName))); 69outputs.Add(new TaskItem(Path.Combine(NuspecOutputPath, nuspecSymbolsFileName)));
GetProjectReferencesFromAssetsFileTask.cs (2)
43assetsFilePath = Path.Combine(RestoreOutputAbsolutePath, LockFileFormat.AssetsFileName); 71.Select(library => new TaskItem(Path.GetFullPath(Path.Combine(
PackTaskLogic.cs (9)
108var assetsFilePath = Path.Combine(request.RestoreOutputPath, LockFileFormat.AssetsFileName); 344string assetsFilePath = Path.Combine(request.RestoreOutputPath, LockFileFormat.AssetsFileName); 620packArgs.CurrentDirectory = Path.Combine( 645packArgs.PackTargetArgs.NuspecOutputPath = Path.Combine( 724: Path.Combine(targetPath, recursiveDir)); 785var newTargetPath = Path.Combine(targetPath, identity); 807currentPath = Path.Combine(targetPath, fileName); 829sourcePath = Path.Combine(sourceProjectFile.Replace(Path.GetFileName(sourceProjectFile), string.Empty), identity); 923library => Path.GetFullPath(Path.Combine(
NuGet.CommandLine.XPlat (3)
Commands\Package\Update\PackageUpdateIO.cs (1)
603var assetsFilePath = Path.Combine(packageSpec.RestoreMetadata.OutputPath, LockFileFormat.AssetsFileName);
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (1)
378var nuspecFilePath = Path.GetFullPath(Path.Combine(packageDirectory, nuspecFile));
Commands\Why\DependencyGraphFinder.cs (1)
110.ToDictionary(l => Path.GetFullPath(Path.Combine(projectDirectory, l.Path)), l => l, StringComparer.OrdinalIgnoreCase);
NuGet.Commands (28)
CommandRunners\PackCommandRunner.cs (4)
87var result = BuildPackage(Path.GetFullPath(Path.Combine(_packArgs.CurrentDirectory, _packArgs.Path))); 204string resolvedNuSpecOutputPath = Path.Combine( 883return Path.Combine(finalOutputDirectory, outputFile); 994return Path.Combine(packArgs.CurrentDirectory, result);
MSBuildProjectFactory.cs (6)
148Target = IsTool ? Path.Combine(targetFolders[i], targetPath) : Path.Combine(targetFolders[i], tfm, targetPath) 196? Path.Combine(target, Path.GetFileName(sourcePath)) 210includePath = Path.Combine(includePath, Path.GetFileName(sourcePath)); 259var targetPath = Path.Combine(SourcesFolder, projectName); 282targetPath = Path.Combine(targetPath, relativePath); 285var finalTargetPath = Path.Combine(targetPath, Path.GetFileName(sourcePath));
RestoreCommand\ContentFiles\ContentFileUtils.cs (1)
131absolutePaths.Add(Path.Combine(MatcherRoot, key));
RestoreCommand\RequestFactory\RestoreArgs.cs (2)
117return Path.GetFullPath(Path.Combine(rootDirectory, globalPath)); 191request.LockFilePath = Path.Combine(request.RestoreOutputPath, LockFileFormat.AssetsFileName);
RestoreCommand\RestoreCommand.cs (1)
1812projectLockFilePath = Path.Combine(_request.RestoreOutputPath, LockFileFormat.AssetsFileName);
RestoreCommand\Utility\BuildAssetsUtils.cs (4)
434path = Path.Combine(project.RestoreMetadata.OutputPath, $"{projFileName}.nuget.g{extension}"); 440path = Path.Combine(dir, $"{project.Name}.nuget{extension}"); 450return Path.Combine(project.RestoreMetadata.OutputPath, $"{projFileName}.nuget.g{extension}"); 846return Path.Combine(package.Value.Package.ExpandedPath, LockFileUtils.ToDirectorySeparator(item.Path));
RestoreCommand\Utility\MSBuildRestoreUtility.cs (2)
314pcRestoreMetadata.RepositoryPath = Path.Combine( 355outputPath = Path.Combine(Path.GetDirectoryName(projectPath), "obj");
RestoreCommand\Utility\NoOpRestoreUtilities.cs (4)
43return cacheRoot == null ? null : Path.Combine(cacheRoot, NoOpCacheFileName); 69return Path.Combine( 152var metadataFile = Path.Combine(packageDirectory, PackagingCoreConstants.NupkgMetadataFileExtension); 211return Path.Combine(outputRoot, dgFileName);
RestoreCommand\Utility\PackageSpecFactory.cs (3)
440string packagesConfigPath = Path.Combine(projectDirectory, NuGetConstants.PackageReferenceFile); 447packagesConfigPath = Path.Combine(projectDirectory, "packages." + projectName + ".config"); 940return outputPath == null ? null : Path.GetFullPath(Path.Combine(project.Directory, outputPath));
SignCommand\SignCommandRunner.cs (1)
127outputPath = Path.Combine(outputDirectory, Path.GetFileName(packagePath));
NuGet.Common (27)
ConcurrencyUtilities.cs (2)
264return Path.Combine(NuGetEnvironment.GetFolderPath(folder), "lock"); 273return Path.Combine(BasePath, FilePathToLockName(filePath));
LocalResourceUtils.cs (1)
104var filePath = Path.Combine(folderPath, Path.GetFileName(file));
Migrations\Migration1.cs (4)
21string nugetPath = Path.Combine(localAppDataPath, "NuGet"); 37var v3cachePath = Path.Combine(nugetBaseDirectory, "v3-cache"); 43var pluginsCachePath = Path.Combine(nugetBaseDirectory, "plugins-cache"); 111return Path.Combine(xdgConfigHome, "NuGet");
Migrations\MigrationRunner.cs (1)
31var expectedMigrationFilename = Path.Combine(migrationsDirectory, MaxMigrationFilename);
PathUtil\FileUtility.cs (1)
26return Path.GetFullPath(Path.Combine(directory, fileName));
PathUtil\NuGetEnvironment.cs (8)
68nuGetScratch = Path.Combine(tempPath, 113return Path.Combine(machineWideBaseDir, 117return Path.Combine( 122return Path.Combine( 127return Path.Combine( 238return Path.Combine(_getHome.Value, ".nuget"); 363var fullPath = Path.Combine(dir, executable); 397var fullPath = Path.Combine(localBin, DotNet);
PathUtil\PathResolver.cs (5)
70return Path.Combine(basePath, wildcard); 133Regex searchRegex = WildcardToRegex(Path.Combine(basePath, searchPath)); 186basePathToEnumerate = Path.Combine(basePath, searchRoot); 201basePathToEnumerate = Path.Combine(basePath, nonWildcardPortion); 220basePath = Path.Combine(basePath, parentDirectoryPath);
PathUtil\ProjectJsonPathUtilities.cs (4)
39var configPath = Path.Combine(directoryPath, GetProjectConfigWithProjectName(projectName)); 44configPath = Path.Combine(directoryPath, ProjectConfigFileName); 96lockFilePath = Path.Combine(dir, ProjectLockFileName); 101lockFilePath = Path.Combine(dir, lockFileWithProject);
UriUtility.cs (1)
131: Path.GetFullPath(Path.Combine(rootDirectory, local));
NuGet.Configuration (15)
Settings\ConfigurationDefaults.cs (1)
38if (File.Exists(Path.Combine(directory, configFile)))
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);
Settings\SettingsFile.cs (1)
108ConfigFilePath = Path.GetFullPath(Path.Combine(DirectoryPath, FileName));
Utility\FileSystemUtility.cs (2)
62return File.Exists(Path.Combine(root, file)); 67path = EnsureTrailingSlash(Path.Combine(root, path));
Utility\SettingsUtility.cs (1)
303path = Path.Combine(NuGetEnvironment.GetFolderPath(NuGetFolderPath.NuGetHome), DefaultGlobalPackagesFolderPath);
NuGet.PackageManagement (27)
BuildIntegration\DependencyGraphRestoreUtility.cs (1)
289var persistedDGSpecPath = Path.Combine(outputPath, dgFileName);
NuGetPackageManager.cs (2)
3582readmeFilePath = Path.Combine(packageFolderPath, Constants.ReadmeFileName); 3591readmeFilePath = Path.Combine(Path.GetDirectoryName(packagePath), Constants.ReadmeFileName);
Projects\FolderNuGetProject.cs (3)
432var installPath = Path.GetFullPath(Path.Combine(packageDirectory, packageName)); 488var installPath = Path.GetFullPath(Path.Combine(packageDirectory, manifestName)); 517var filePath = Path.GetFullPath(Path.Combine(packageDirectory, fileName));
Projects\MSBuildNuGetProject.cs (3)
320var referenceItemFullPath = Path.Combine(packageInstallPath, referenceItem); 362var fullImportFilePath = Path.Combine(packageInstallPath, buildImportFile); 565var fullImportFilePath = Path.Combine(FolderNuGetProject.GetInstalledPath(packageIdentity), buildImportFile);
Projects\PackagesConfigNuGetProject.cs (2)
76PackagesConfigPath = Path.Combine(folderPath, "packages.config"); 79PackagesProjectNameConfigPath = Path.Combine(folderPath, "packages." + projectName + ".config");
Utility\FileSystemUtility.cs (5)
46return Path.Combine(root, path); 170path = PathUtility.EnsureTrailingSlash(Path.Combine(root, path)); 285var dirPath = Path.Combine(packagesDir, directory); 294var path = Path.Combine(packagesDir, file); 303DeleteDirectorySafe(Path.Combine(packagesDir, dirPath), recursive: false, nuGetProjectContext: nuGetProjectContext);
Utility\MSBuildNuGetProjectSystemUtility.cs (5)
27if (File.Exists(Path.Combine(msBuildNuGetProjectSystem.ProjectFullPath, path))) 31return Shared.XmlUtility.Load(Path.Combine(msBuildNuGetProjectSystem.ProjectFullPath, path), LoadOptions.PreserveWhitespace); 246if (!Directory.Exists(Path.Combine(projectFullPath, directory))) 394var fullPath = Path.Combine(projectSystem.ProjectFullPath, path); 434var fullPath = Path.Combine(projectSystem.ProjectFullPath, path);
Utility\PackagesConfigContentHashProvider.cs (2)
49var metadataPath = Path.Combine(Path.GetDirectoryName(nupkgPath), PackagingCoreConstants.NupkgMetadataFileExtension); 61return Path.Combine(Path.GetDirectoryName(nupkgPath), PackagingCoreConstants.NupkgMetadataFileExtension);
Utility\PackagesConfigLockFileUtility.cs (1)
80return Path.Combine(projectPath, nuGetLockFilePath);
Utility\PackagesFolderPathUtility.cs (1)
53return Path.Combine(solutionDirectory, string.IsNullOrEmpty(path) ? DefaultRepositoryPath : path);
Utility\XmlUtility.cs (2)
15if (File.Exists(Path.Combine(root, path))) 19return Shared.XmlUtility.Load(Path.Combine(root, path), LoadOptions.PreserveWhitespace);
NuGet.Packaging (31)
PackageArchiveReader.cs (1)
387var packageFileFullPath = Path.Combine(packageDirectory, packageFile);
PackageCreation\Authoring\EmptyFrameworkFolderFile.cs (1)
25TargetPath = System.IO.Path.Combine(directoryPathInPackage, PackagingConstants.PackageEmptyFileName);
PackageCreation\Authoring\PackageBuilder.cs (1)
1072return Path.Combine(targetPath ?? string.Empty, packagePath);
PackageExtraction\PackagePathHelper.cs (2)
22path = PathUtility.EnsureTrailingSlash(Path.Combine(root, path)); 49path = PathUtility.EnsureTrailingSlash(Path.Combine(root, path));
PackageExtractor.cs (11)
97var targetNuspecPath = Path.Combine( 127var nupkgFilePath = Path.Combine( 224var nupkgFilePath = Path.Combine(packageDirectory, packagePathResolver.GetPackageFileName(packageIdentityFromNuspec)); 333var nupkgFilePath = Path.Combine(packageDirectory, packagePathResolver.GetPackageFileName(packageIdentityFromNuspec)); 450var targetTempNupkg = Path.Combine(targetPath, Path.GetRandomFileName()); 451var tempHashPath = Path.Combine(targetPath, Path.GetRandomFileName()); 452var tempNupkgMetadataPath = Path.Combine(targetPath, Path.GetRandomFileName()); 726var targetTempNupkg = Path.Combine(targetPath, Path.GetRandomFileName()); 727var tempHashPath = Path.Combine(targetPath, Path.GetRandomFileName()); 728var tempNupkgMetadataFilePath = Path.Combine(targetPath, Path.GetRandomFileName()); 801var tempNuspecFilePath = Path.Combine(packageDirectoryPath, Path.GetRandomFileName());
PackageFolderReader.cs (3)
98var fullPath = Path.GetFullPath(Path.Combine(_rootPath, path)); 125searchFolder = new DirectoryInfo(Path.Combine(_root.FullName, folder)); 212var targetPath = Path.Combine(destination, packageFile);
PackagePathResolver.cs (1)
85return Path.Combine(_rootDirectory, GetPackageDirectoryName(packageIdentity));
PackageReaderBase.cs (1)
566var fullPath = Path.GetFullPath(Path.Combine(normalizedDestination, normalizedFilePath));
PackagesConfigWriter.cs (2)
526var configFileCopyPath = Path.Combine(directorypath, 554var configFileNewPath = Path.Combine(directorypath,
Rules\PathTooLongRule.cs (1)
26if (Path.Combine(installedPath, file).Length > _pathLenghtWarningThreshold)
VersionFolderPathResolver.cs (7)
53return Path.Combine( 65return Path.Combine( 78return Path.Combine( 92return Path.Combine( 105return Path.Combine( 129return Path.Combine( 152return Path.Combine(
NuGet.ProjectModel (6)
ProjectLockFile\PackagesLockFileUtilities.cs (3)
43return Path.Combine(project.BaseDirectory, path); 54var path = Path.Combine(baseDirectory, "packages." + projectName.Replace(' ', '_') + ".lock.json"); 62return Path.Combine(baseDirectory, PackagesLockFileFormat.LockFileName);
ToolPathResolver.cs (3)
34return Path.Combine(toolDirectory, LockFileFormat.AssetsFileName); 74return Path.Combine( 103var toolBasePath = Path.Combine(GetPackagesToolsBasePath(), _isLowercase ? packageId.ToLowerInvariant() : packageId);
NuGet.Protocol (20)
HttpSource\HttpCacheUtility.cs (4)
30var cacheFolder = Path.Combine(httpCacheDirectory, baseFolderName); 31var cacheFile = Path.Combine(cacheFolder, baseFileName); 41var temporaryFile = Path.Combine(context.RootTempFolder!, Path.GetRandomFileName()); 42var newTemporaryFile = Path.Combine(context.RootTempFolder!, Path.GetRandomFileName());
LocalRepositories\FindLocalPackagesResourceUnzipped.cs (2)
119var nupkgPath = Path.Combine(rootDirInfo.FullName, $"{name}{PackagingCoreConstants.NupkgExtension}"); 147var nupkgPath = Path.Combine(root.FullName, $"{name}{PackagingCoreConstants.NupkgExtension}");
LocalRepositories\LocalPackageInfo.cs (1)
53var directoryName = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Path)!, System.IO.Path.GetFileNameWithoutExtension(Path));
PackagesFolder\LocalPackageFileCache.cs (1)
231var runtimeGraphFile = Path.Combine(expandedPath, RuntimeGraph.RuntimeGraphFileName);
Plugins\Logging\PluginLogger.cs (1)
164var filePath = Path.Combine(logDirectoryPath, fileName);
Plugins\PluginCacheEntry.cs (2)
25RootFolder = Path.Combine(rootCacheFolder, CachingUtility.RemoveInvalidFileNameChars(CachingUtility.ComputeHash(pluginFilePath, addIdentifiableCharacters: false))); 26CacheFileName = Path.Combine(RootFolder, CachingUtility.RemoveInvalidFileNameChars(CachingUtility.ComputeHash(requestKey, addIdentifiableCharacters: false)) + ".dat");
Plugins\PluginDiscoveryUtility.cs (2)
57Path.Combine( 91var expectedPluginName = Path.Combine(pluginDirectory, Path.GetFileName(pluginDirectory) + ".dll");
Plugins\PluginPackageReader.cs (1)
1109var filePath = Path.Combine(directory, fileName);
Resources\PackageUpdateResource.cs (3)
416return Path.Combine(packageDir, symbolPath); 696var fullPath = Path.Combine(root, packageFileName); 806var nupkgFilePath = Path.Combine(root, packageFileName);
Utility\GetDownloadResultUtility.cs (1)
188var directDownloadPath = Path.Combine(downloadContext.DirectDownloadDirectory!, fileName);
Utility\LocalFolderUtility.cs (2)
473var nupkgPath = Path.Combine( 1291var tempNupkgMetadataFilePath = Path.Combine(installPath, Path.GetRandomFileName());
Pipelines.Library (2)
DistributedApplicationPipelineExtensions.cs (2)
75var publishDir = Path.Combine(Path.GetTempPath(), $"aspire-publish-{Guid.NewGuid()}"); 119var zipPath = Path.Combine(Path.GetTempPath(), $"aspire-deploy-{Guid.NewGuid()}.zip");
PresentationBuildTasks (4)
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (1)
861return Path.Combine(OutputPath, fileName);
Microsoft\Build\Tasks\Windows\MergeLocalizationDirectives.cs (1)
55string absoluteFilePath = Path.Combine(
Microsoft\Build\Tasks\Windows\UidManager.cs (2)
358return Path.Combine(_backupPath, Path.ChangeExtension(Path.GetFileName(fileName), "uidtemp")); 363return Path.Combine(_backupPath, Path.ChangeExtension(Path.GetFileName(fileName), "uidbackup"));
PresentationCore (4)
MS\Internal\FontCache\FamilyCollection.cs (1)
238FontSource fontSource = new FontSource(new Uri(Path.Combine(FamilyCollection.SxSFontsResourcePrefix, _systemCompositeFontsFileNames[index] + Util.CompositeFontExtension), UriKind.RelativeOrAbsolute),
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\IO\FileHelper.cs (2)
101string subFolderPath = Path.Combine(folderPath, subFolder); 115string path = Path.Combine(folderPath, Path.GetRandomFileName());
System\Windows\Media\ColorContext.cs (1)
579profilePath = new Uri(Path.Combine(buffer.ToString(), profilePathString));
PresentationFramework (2)
MS\Internal\AppModel\ContentFilePart.cs (1)
68_fullPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(location), filePath);
MS\Internal\WindowsRuntime\Generated\WinRT.cs (1)
123_moduleHandle = Platform.LoadLibraryExW(System.IO.Path.Combine(_currentModuleDirectory, fileName), IntPtr.Zero, /* LOAD_WITH_ALTERED_SEARCH_PATH */ 8);
PresentationUI (2)
MS\Internal\Documents\RightsManagementManager.cs (1)
860string msdrmdllPath = Path.Combine(systemPath, msdrmDLLName);
MS\Internal\Documents\RightsManagementProvider.cs (1)
1353string applicationManifestFileLocation = Path.Combine( Path.GetDirectoryName(fileName),
ProjectResourceExtensions.AppHost (1)
AppHost.cs (1)
58var projectPath = Path.GetFullPath(Path.Combine(builder.AppHostDirectory, relativeProjectPath));
RepoTasks (14)
BatchHelixWorkItems.cs (6)
51var batchRoot = Path.Combine(OutputDirectory, "batched"); 78File.WriteAllText(Path.Combine(payloadDirectory, "targets.txt"), testAssembly); 102var batchDirectory = Path.Combine(batchRoot, $"batch_{batchNumber}"); 117var destPath = Path.Combine(batchDirectory, Path.GetFileName(file)); 131var targetDirectory = Path.Combine(batchDirectory, assemblyName); 147File.WriteAllLines(Path.Combine(batchDirectory, "targets.txt"), targets);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
377Path.Combine(MacOSUserHttpsCertificateLocation, $"aspnetcore-localhost-{certificate.Thumbprint}.pfx");
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (7)
114var certPath = Path.Combine(sslCertDir, certificateNickname + ".pem"); 242var certPath = Path.Combine(certDir, nickname) + ".pem"; 361? Path.Combine("$HOME", certDir[homeDirectoryWithSlash.Length..]) 405Log.UnixSuggestSettingEnvironmentVariable(prettyCertDir, Path.Combine(openSslDir, "certs"), OpenSslCertificateDirectoryVariableName); 471var certPath = Path.Combine(certDir, nickname) + ".pem"; 610if (File.Exists(Path.Combine(searchFolder, command))) 1056var linkPath = Path.Combine(certificateDirectory, $"{hash}.{i}");
Roslyn.Diagnostics.Analyzers (6)
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (3)
105var path = Path.Combine(parentPath, directoryName); 475/// Combines paths with the same semantics as <see cref="Path.Combine(string, string)"/> 484/// Relative and absolute paths treated the same as <see cref="Path.Combine(string, string)"/>.
src\roslyn\src\Compilers\Core\Portable\FileSystem\TempPathUtilities.cs (1)
124return Path.Combine(home, ".cache");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (1)
35editorconfigFilePath = Path.Combine(editorconfigFilePath, ".editorconfig");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Helpers\MefHostServicesHelpers.cs (1)
63? Path.Combine(thisAssemblyFolder, assemblySimpleName + ".dll")
rzc (19)
DiscoverCommand.cs (4)
138extensionFilePaths.Values[i] = Path.Combine(currentDirectory, RazorCompilerFileName); 174outputFilePath = Path.Combine(projectDirectory, outputFilePath); 204outputFilePath = Path.Combine(projectDirectory, outputFilePath); 212var syntheticPath = Path.Combine(projectDirectory, "__rzc_discover__.cshtml");
GenerateCommand.cs (1)
191tagHelperManifest = Path.Combine(projectDirectory, tagHelperManifest);
Program.cs (1)
71var loadedAssembly = context.LoadFromAssemblyPath(Path.Combine(roslynPath, assembly.Name + ".dll"));
ServerCommand.cs (1)
153var path = Path.Combine(directoryPath, fileName);
ServerProtocol\ServerConnection.cs (4)
73return Path.Combine(workingDir, tmp); 78return Path.Combine(workingDir, temp); 304var dotnetPath = Path.Combine(path, exeName); 320var expectedCompilerPath = Path.Combine(clientDir, ServerName);
ServerProtocol\ServerLogger.cs (1)
48loggingFileName = Path.Combine(loggingFileName, $"razorserver.{GetCurrentProcessId()}.log");
ShadowCopyManager.cs (6)
24BaseDirectory = baseDirectory ?? GetBaseDirectory(Path.Combine("Razor", "ShadowCopy")); 27UniqueDirectory = Path.Combine(BaseDirectory, guid); 55return Path.Combine(root, relativePath); 62var destination = Path.Combine(assemblyDirectory, Path.GetFileName(filePath)); 73var resourcesPath = Path.Combine(directory, resourcesNameWithExtension); 105var directory = Path.Combine(UniqueDirectory, id.ToString(CultureInfo.InvariantCulture));
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (1)
38return Path.Combine(homePath, DotnetProfileDirectoryName);
sdk-tasks (23)
CopyPreservingRelativeSymlinks.cs (1)
110var resolvedTarget = Path.GetFullPath(Path.Combine(sourceDir, sourceInfo.LinkTarget));
Crossgen.cs (3)
46string tempDirPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 48TempOutputPath = Path.Combine(tempDirPath, Path.GetFileName(DestinationPath)); 59File.Copy(file, Path.Combine(destination, Path.GetFileName(file)), overwrite: true);
ExtractArchiveToDirectory.cs (2)
93string destinationPath = Path.GetFullPath(Path.Combine(DestinationDirectory, entry.FullName)); 128string destinationPath = Path.GetFullPath(Path.Combine(DestinationDirectory, entryName));
GenerateMSBuildExtensionsSWR.cs (4)
42string sourceFolder = Path.Combine(MSBuildExtensionsLayoutDirectory, relativeSourcePath); 55sb.Append(Path.Combine(relativeSourcePath, Path.GetFileName(file))); 72string newRelativeSourcePath = Path.Combine(relativeSourcePath, subfolderName); 73string newSwrInstallDir = Path.Combine(swrInstallDir, subfolderName);
GenerateRuntimeAnalyzersSWR.cs (5)
59string sourceFolder = Path.Combine(RuntimeAnalyzersLayoutDirectory, relativeSourcePath); 66var path = Path.Combine(sourceFolder, file); 95sb.Append(Path.Combine(relativeSourcePath, fileName)); 118string newRelativeSourcePath = Path.Combine(relativeSourcePath, subfolderName); 119string newSwrInstallDir = Path.Combine(swrInstallDir, subfolderName);
GetDnxShimLayout.cs (3)
47string destination = Path.Combine(root, name); 57.Select(name => Path.Combine(root, name)) 63LayoutPathValidation.RejectDirectory(Path.Combine(root, name));
GetRuntimePackRids.cs (1)
20string runtimeJsonPath = Path.Combine(MetapackagePath, "runtime.json");
ReplaceFilesWithSymbolicLinks.cs (1)
83string targetFile = Path.Combine(LinkToFilesFrom, fileName);
WorkloadManifestLayout.cs (2)
135string flippedPath = Path.Combine(parent, flipped); 192string baseline = Path.Combine(version, BaselineFileName);
WorkloadMetadataLayout.cs (1)
63string marker = Path.Combine(directory, "userlocal");
SelectTests (4)
ChangedFileFilter.cs (1)
47var patternsPath = Path.Combine(repoRoot, prefilter.PatternsFile);
GraphAffectedProjects.cs (2)
179var normalizedTestsDir = NormalizeFullPath(Path.Combine(repoRoot, "tests")); 508NormalizeFullPath(Path.Combine(repoRoot, rel.Replace('/', Path.DirectorySeparatorChar)))))
Program.cs (1)
104?? Path.Combine(repoRoot, "Aspire.slnx");
Stress.ApiService (2)
Program.cs (2)
394var xmlLarge = File.ReadAllText(Path.Combine("content", "books.xml")); 401var jsonLarge = File.ReadAllText(Path.Combine("content", "example.json"));
Stress.AppHost (12)
CommandResources.cs (12)
501var processCommandScriptsDirectory = Path.Combine(builder.AppHostDirectory, "process-command-scripts"); 502var processCommandStdinScriptPath = Path.Combine(processCommandScriptsDirectory, "stdin.js"); 503var processCommandEnvironmentScriptPath = Path.Combine(processCommandScriptsDirectory, "environment.js"); 504var processCommandWorkingDirectoryScriptPath = Path.Combine(processCommandScriptsDirectory, "working-directory.js"); 505var processCommandStderrFailureScriptPath = Path.Combine(processCommandScriptsDirectory, "stderr-failure.js"); 506var processCommandOutputLimitScriptPath = Path.Combine(processCommandScriptsDirectory, "output-limit.js"); 507var processCommandBackupRestoreScriptPath = Path.Combine(processCommandScriptsDirectory, "backup-restore.js"); 508var processCommandContainerExecScriptPath = Path.Combine(processCommandScriptsDirectory, "container-exec.js"); 509var processCommandSampleBackupPath = Path.Combine(processCommandScriptsDirectory, "sample-backup.dump"); 511var processCommandCSharpArgumentsAndStdinAppPath = Path.Combine(processCommandFileAppsDirectory, "arguments-and-stdin.cs"); 512var processCommandCSharpWorkingDirectoryFailureAppPath = Path.Combine(processCommandFileAppsDirectory, "working-directory-failure.cs"); 513var processCommandIssueToolAppPath = Path.Combine(processCommandFileAppsDirectory, "issue-tool.cs");
SuperFileCheck (3)
Program.cs (3)
51Directory.EnumerateFiles(Path.Combine(superFileCheckDir, "runtimes/"), "FileCheck*", SearchOption.AllDirectories) 59FileCheckPath = Path.Combine(superFileCheckDir, "FileCheck"); 727tmpFilePath = Path.Combine(tmpDirName, tmpFileName);
System.CodeDom (1)
src\runtime\src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
132_basePath = Path.Combine(
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (1)
90var path = Path.Combine(location, probingPath);
System.Configuration.ConfigurationManager (12)
src\runtime\src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
132_basePath = Path.Combine(
System\Configuration\AppSettingsSection.cs (1)
102: Path.Combine(Path.GetDirectoryName(configFile), File);
System\Configuration\ClientConfigPaths.cs (4)
67ApplicationUri = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, exeAssembly.ManifestModule.Name); 102externalConfigPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, externalConfigPath); 226return Path.Combine(path1, path2); 263else if (Uri.TryCreate(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, assembly.ManifestModule.Name), UriKind.Absolute, out Uri codeBase))
System\Configuration\ClientConfigurationHost.cs (2)
49s_machineConfigFilePath = Path.Combine(Path.Combine(directory, MachineConfigSubdirectory),
System\Configuration\Internal\InternalConfigHost.cs (1)
201string result = Path.Combine(dirStream, configSource);
System\Configuration\LocalFileSettingsProvider.cs (1)
327file = Path.Combine(previousDirectory.FullName, ConfigurationManagerInternalFactory.Instance.UserConfigFilename);
System\Configuration\NameValueFileSectionHandler.cs (1)
41string sourceFileFullPath = Path.Combine(directory, filename);
System\Diagnostics\TraceUtils.cs (1)
83initializeData = Path.Combine(dirPath, initializeData);
System.Diagnostics.EventLog (4)
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (1)
230dllDir = Path.Combine(installRoot, version);
System\Diagnostics\EventLog.cs (3)
699string dllPath = Path.Combine(NetFrameworkUtils.GetLatestBuildDllDirectory(machineName), DllName); 707dllPath = Path.Combine(Path.GetDirectoryName(assmLocation)!, AltDllName); 711dllPath = Path.Combine(AppContext.BaseDirectory, AltDllName);
System.Diagnostics.PerformanceCounter (1)
src\runtime\src\libraries\Common\src\System\Diagnostics\NetFrameworkUtils.cs (1)
230dllDir = Path.Combine(installRoot, version);
System.Diagnostics.Process (1)
System\Diagnostics\ProcessUtils.Unix.cs (1)
239string filenameInWorkingDirectory = Path.Combine(workingDirectory, filename);
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\TextWriterTraceListener.cs (1)
242fullPath = Path.Combine(dirPath, fileNameOnly);
System.Formats.Tar (2)
System\Formats\Tar\TarEntry.cs (1)
456string resolvedPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(linkFullPath)!, linkTarget));
System\Formats\Tar\TarHelpers.Unix.cs (1)
41string filename = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
System.IO.Compression.ZipFile (1)
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
194fileDestinationPath = Path.GetFullPath(Path.Combine(fullDestination, sanitizedEntryPath));
System.IO.IsolatedStorage (2)
System\IO\IsolatedStorage\Helper.NonMobile.cs (1)
26dataDirectory = Path.Combine(dataDirectory, IsolatedStorageDirectoryName);
System\IO\IsolatedStorage\IsolatedStorageFile.cs (1)
556return Path.Combine(RootDirectory, partialPath);
System.IO.MemoryMappedFiles (1)
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
310string path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString("N"));
System.IO.Packaging (1)
System\IO\Packaging\PackUriHelper.cs (1)
275path = Path.Combine(path, partNameWithoutExtension); // Adding the last segment without ".rels" extension
System.IO.Pipes (1)
System\IO\Pipes\PipeStream.Unix.cs (1)
33private static readonly string s_pipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_");
System.Net.Mail (1)
System\Net\Mail\SmtpClient.cs (1)
439pathAndFilename = Path.Combine(pickupDirectory, filename);
System.Net.Ping (2)
src\runtime\src\libraries\Common\src\System\Net\NetworkInformation\UnixCommandLinePing.cs (2)
30string pathv4v6 = Path.Combine(folder, s_ipv4v6PingFile); 31string path = Path.Combine(folder, fileName);
System.Net.Quic (1)
System\Net\Quic\Internal\MsQuicApi.cs (1)
103path = System.IO.Path.Combine(path, Interop.Libraries.MsQuic);
System.Private.CoreLib (20)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Environment.GetFolderPathCore.Unix.cs (4)
142return Path.Combine(home, ".fonts"); 160config = Path.Combine(home, ".config"); 184string userDirsPath = Path.Combine(GetXdgConfig(homeDir), "user-dirs.dirs"); 248return Path.Combine(homeDir, fallback);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (1)
83string newPath = Path.GetFullPath(Path.Combine(FullPath, path));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (1)
62path = Combine(Interop.Sys.GetCwd(), path);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\SharedMemoryManager.Unix.cs (4)
168string sharedMemoryFilePath = Path.Combine(sessionDirectoryPath, id.Name); 451Path.Combine(ApplicationContainerPath, UserRuntimeTempDirectoryName), 879string runtimeDirectoryPath = Path.Combine( 894Path.Combine(runtimeDirectoryPath, SharedMemoryHelpers.SharedMemorySharedMemoryDirectoryName),
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
345string requestedAssemblyPath = Path.Combine(Path.GetDirectoryName(requestorPath)!, requestedAssemblyName.Name + ".dll");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
71string path = Path.Combine(_mediator.ModuleDir, fileName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\NamedMutex.Unix.cs (1)
472Path.Combine(lockFilesDirectoryPath, sessionDirectoryName),
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (6)
88string timeZoneFilePath = Path.Combine(timeZoneDirectory, id); 162var fileName = Path.Combine(GetTimeZoneDirectory(), TimeZoneFileName); 314string localtimeFilePath = Path.Combine(timeZoneDirectory, "localtime"); 315string posixrulesFilePath = Path.Combine(timeZoneDirectory, "posixrules"); 436TryLoadTzFile(Path.Combine(GetTimeZoneDirectory(), "localtime"), ref rawData, ref id); 453tzFilePath = Path.Combine(GetTimeZoneDirectory(), tzVariable);
System\Runtime\InteropServices\NativeLibrary.NativeAot.cs (1)
106ret = LoadLibraryHelper(Path.Combine(AppContext.BaseDirectory, currLibNameVariation), flags, ref errorTracker);
System.Private.Xml (3)
System\Xml\Serialization\Compilation.cs (3)
237path = Path.Combine(Path.GetDirectoryName(type.Assembly.Location)!, $"{assemblyName}.dll"); 242path = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!, $"{assemblyName}.dll"); 247path = Path.Combine(Path.GetDirectoryName(AppContext.BaseDirectory)!, $"{assemblyName}.dll");
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.Modules.cs (1)
45string modulePath = Path.Combine(directoryPath!, moduleName);
testhost (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
testhost.arm64 (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
testhost.x86 (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
vbc (7)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (4)
462var processFilePath = Path.Combine(clientDir, $"VBCSCompiler{PlatformInformation.ExeExtension}"); 819var result = Path.Combine(tempPath, ".roslyn"); 827FilePath = Path.Combine(mutexDirectory, name); 828GuardPath = Path.Combine(mutexDirectory, ".guard");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
182loggingFilePath = Path.Combine(loggingFilePath, $"server.{processId}.log");
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (1)
36return Path.Combine("/tmp", pipeName);
src\roslyn\src\Compilers\Shared\StandardBuildEnvironment.cs (1)
21public string GetFullyQualifiedPath(string path) => Path.Combine(CurrentDirectory, path);
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);
src\roslyn\src\Compilers\Server\VBCSCompiler\CSharpCompilerServer.cs (1)
24: this(metadataProvider, Path.Combine(buildPaths.ClientDirectory, ResponseFileName), args, buildPaths, libDirectory, analyzerLoader, driverCache, logger)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (4)
462var processFilePath = Path.Combine(clientDir, $"VBCSCompiler{PlatformInformation.ExeExtension}"); 819var result = Path.Combine(tempPath, ".roslyn"); 827FilePath = Path.Combine(mutexDirectory, name); 828GuardPath = Path.Combine(mutexDirectory, ".guard");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (1)
182loggingFilePath = Path.Combine(loggingFilePath, $"server.{processId}.log");
src\roslyn\src\Compilers\Shared\NamedPipeUtil.cs (1)
36return Path.Combine("/tmp", pipeName);
src\roslyn\src\Compilers\Shared\StandardBuildEnvironment.cs (1)
21public string GetFullyQualifiedPath(string path) => Path.Combine(CurrentDirectory, path);
vbi (1)
Vbi.vb (1)
26responseFile:=Path.Combine(vbiDirectory, InteractiveResponseFileName),
vstest.console (8)
Internal\FilePatternParser.cs (2)
55filePattern = Path.Combine(_fileHelper.GetCurrentDirectory(), filePattern); 87matchingFiles.Add(Path.Combine(splitPattern.Item1, match.Path));
Processors\AeDebuggerArgumentProcessor.cs (1)
145procDumpPath = Path.Combine(procDumpToolDirectoryPath.FullName, ProcDumpExecutableHelper.ProcDumpFileName(_environment.Architecture));
Processors\CollectArgumentProcessor.cs (1)
128string collectorPath = Path.Combine(adapterPath, CoverletConstants.CoverletDataCollectorCodebase);
Publisher\TextFileTelemetryPublisher.cs (1)
63string path = Path.Combine(resultDirectory, resultFileName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
vstest.console.arm64 (8)
parent\vstest.console\Internal\FilePatternParser.cs (2)
55filePattern = Path.Combine(_fileHelper.GetCurrentDirectory(), filePattern); 87matchingFiles.Add(Path.Combine(splitPattern.Item1, match.Path));
parent\vstest.console\Processors\AeDebuggerArgumentProcessor.cs (1)
145procDumpPath = Path.Combine(procDumpToolDirectoryPath.FullName, ProcDumpExecutableHelper.ProcDumpFileName(_environment.Architecture));
parent\vstest.console\Processors\CollectArgumentProcessor.cs (1)
128string collectorPath = Path.Combine(adapterPath, CoverletConstants.CoverletDataCollectorCodebase);
parent\vstest.console\Publisher\TextFileTelemetryPublisher.cs (1)
63string path = Path.Combine(resultDirectory, resultFileName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (1)
107var path = Path.Combine(p, exeName);
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\ProcDumpExecutableHelper.cs (2)
88var candidatePath = Path.Combine(procdumpDirectory!, filename); 117string exeFullPath = Path.Combine(path.Trim(), executable);
Yarp.AppHost (1)
AppHost.cs (1)
21.WithStaticFiles(Path.Combine("..", "static-content"))