1 write to TargetFile
aspire (1)
DotNet\DotNetAppHostNuGetConfigMergerCandidate.cs (1)
18TargetFile = targetFile;
22 references to TargetFile
aspire (15)
Commands\AddCommand.cs (2)
552[PathNormalizer.ResolveToFilesystemPath(candidate.TargetFile.FullName)] = candidate.OriginalContent?.ToArray() 556await transaction.ApplyPreparedAsync(candidate.TargetFile, candidate.ProposedContent,
DotNet\DotNetAppHostNuGetConfigMerger.cs (4)
35candidate.TargetFile, 327candidate.TargetFile.Directory!.Create(); 331await using var stream = candidate.TargetFile.Open( 342string.Format(CultureInfo.CurrentCulture, UpdateCommandStrings.UpdateCandidateFileChangedFormat, candidate.TargetFile.FullName));
DotNet\DotNetAppHostRestorePreview.cs (5)
63if (candidate is not null && !BundleNuGetService.IsAncestorDirectory(candidate.TargetFile.DirectoryName!, rootProject.DirectoryName!)) 67candidate.TargetFile.FullName, rootProject.DirectoryName)); 72: await TemporaryNuGetConfigFile.CreatePreviewAsync(candidate.TargetFile, candidate.ProposedContent, cancellationToken); 103if (!BundleNuGetService.IsAncestorDirectory(candidate!.TargetFile.DirectoryName!, Path.GetDirectoryName(path)!)) 109candidate.TargetFile, replacement!.ConfigFile, cancellationToken);
Projects\ProjectUpdater.cs (4)
249PathNormalizer.ResolveToFilesystemPath(configurationCandidate.TargetFile.FullName), 271configurationCandidate.TargetFile, configurationCandidate.ProposedContent, cancellationToken) 276projectFile.Directory!, configurationCandidate!.TargetFile, repairReplacement.ConfigFile, cancellationToken); 407await transaction.ApplyPreparedAsync(configurationCandidate.TargetFile, configurationCandidate.ProposedContent,
Aspire.Cli.Tests (7)
DotNet\DotNetAppHostNuGetConfigMergerTests.cs (5)
332Assert.Empty(XDocument.Load(candidate.TargetFile.FullName).Descendants("packageSource")); 1576Assert.Equal(target.FullName, update.TargetFile.FullName); 1596Assert.Equal(XDocument.Parse(update.GetProposedDocument().OuterXml).ToString(), XDocument.Load(update.TargetFile.FullName).ToString()); 2210await File.WriteAllTextAsync(update.TargetFile.FullName, createdContent); 2215Assert.Equal(createdContent, await File.ReadAllTextAsync(update.TargetFile.FullName));
NuGet\BundleNuGetServiceTests.cs (2)
108new XElement("persisted", XDocument.Load(candidate.TargetFile.FullName).Root)).ToString(), "xml") 316Assert.False(candidate.TargetFile.Exists);