1 write to TargetFile
aspire (1)
DotNet\DotNetAppHostNuGetConfigMergerCandidate.cs (1)
18
TargetFile
= targetFile;
22 references to TargetFile
aspire (15)
Commands\AddCommand.cs (2)
543
[PathNormalizer.ResolveToFilesystemPath(candidate.
TargetFile
.FullName)] = candidate.OriginalContent?.ToArray()
547
await transaction.ApplyPreparedAsync(candidate.
TargetFile
, candidate.ProposedContent,
DotNet\DotNetAppHostNuGetConfigMerger.cs (4)
35
candidate.
TargetFile
,
326
candidate.
TargetFile
.Directory!.Create();
330
await using var stream = candidate.
TargetFile
.Open(
341
string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.UpdateCandidateFileChangedFormat, candidate.
TargetFile
.FullName));
DotNet\DotNetAppHostRestorePreview.cs (5)
38
if (!BundleNuGetService.IsAncestorDirectory(candidate.
TargetFile
.DirectoryName!, rootProject.DirectoryName!))
42
candidate.
TargetFile
.FullName, rootProject.DirectoryName));
46
candidate.
TargetFile
, candidate.ProposedContent, cancellationToken);
77
if (!BundleNuGetService.IsAncestorDirectory(candidate.
TargetFile
.DirectoryName!, Path.GetDirectoryName(path)!))
83
candidate.
TargetFile
, replacement.ConfigFile, cancellationToken);
Projects\ProjectUpdater.cs (4)
236
PathNormalizer.ResolveToFilesystemPath(configurationCandidate.
TargetFile
.FullName),
252
configurationCandidate.
TargetFile
, configurationCandidate.ProposedContent, cancellationToken)
257
projectFile.Directory!, configurationCandidate!.
TargetFile
, repairReplacement.ConfigFile, cancellationToken);
353
await transaction.ApplyPreparedAsync(configurationCandidate.
TargetFile
, configurationCandidate.ProposedContent,
Aspire.Cli.Tests (7)
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (5)
332
Assert.Empty(XDocument.Load(candidate.
TargetFile
.FullName).Descendants("packageSource"));
1576
Assert.Equal(target.FullName, update.
TargetFile
.FullName);
1596
Assert.Equal(XDocument.Parse(update.GetProposedDocument().OuterXml).ToString(), XDocument.Load(update.
TargetFile
.FullName).ToString());
2210
await File.WriteAllTextAsync(update.
TargetFile
.FullName, createdContent);
2215
Assert.Equal(createdContent, await File.ReadAllTextAsync(update.
TargetFile
.FullName));
NuGet\BundleNuGetServiceTests.cs (2)
108
new XElement("persisted", XDocument.Load(candidate.
TargetFile
.FullName).Root)).ToString(), "xml")
316
Assert.False(candidate.
TargetFile
.Exists);