942 references to FullName
aspire (102)
DotNet\DotNetCliRunner.cs (10)
170cliArgsList.Add(projectFile.FullName);
233string[] cliArgs = [watchOrRunCommand, noBuildSwitch, noProfileSwitch, "--project", projectFile.FullName, "--", ..args];
464WorkingDirectory = workingDirectory.FullName,
518projectFile.FullName,
693string[] cliArgs = ["build", projectFilePath.FullName];
717projectFilePath.FullName,
736logger.LogInformation("Adding package {PackageName} with version {PackageVersion} to project {ProjectFilePath}", packageName, packageVersion, projectFilePath.FullName);
749logger.LogError("Failed to add package {PackageName} with version {PackageVersion} to project {ProjectFilePath}. See debug logs for more details.", packageName, packageVersion, projectFilePath.FullName);
753logger.LogInformation("Package {PackageName} with version {PackageVersion} added to project {ProjectFilePath}", packageName, packageVersion, projectFilePath.FullName);
777cliArgs.Add(nugetConfigFile.FullName);
Projects\ProjectLocator.cs (36)
39logger.LogDebug("Searching for project files in {SearchDirectory}", searchDirectory.FullName);
50logger.LogDebug("Found {ProjectFileCount} project files in {SearchDirectory}", projectFiles.Length, searchDirectory.FullName);
60logger.LogDebug("Checking project file {ProjectFile}", projectFile.FullName);
65logger.LogDebug("Found AppHost project file {ProjectFile} in {SearchDirectory}", projectFile.FullName, searchDirectory.FullName);
66var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName);
75var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName);
81logger.LogTrace("Project file {ProjectFile} in {SearchDirectory} is not an Aspire host", projectFile.FullName, searchDirectory.FullName);
88logger.LogDebug("Searching for single-file apphosts in {SearchDirectory}", searchDirectory.FullName);
90logger.LogDebug("Found {CandidateFileCount} single-file apphost candidates in {SearchDirectory}", candidateAppHostFiles.Length, searchDirectory.FullName);
94logger.LogDebug("Checking single-file apphost candidate {CandidateFile}", candidateFile.FullName);
98logger.LogDebug("Found single-file apphost candidate {CandidateFile} in {SearchDirectory}", candidateFile.FullName, searchDirectory.FullName);
99var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName);
108logger.LogTrace("Single-file candidate {CandidateFile} in {SearchDirectory} is not a valid apphost", candidateFile.FullName, searchDirectory.FullName);
119appHostProjects.Sort((x, y) => x.FullName.CompareTo(y.FullName));
176var settingsFile = new FileInfo(ConfigurationHelper.BuildPathToSettingsJsonFile(searchDirectory.FullName));
186var qualifiedAppHostPath = Path.IsPathRooted(appHostPath) ? appHostPath : Path.Combine(settingsFile.Directory!.FullName, appHostPath);
196interactionService.DisplayMessage("warning", string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath));
222logger.LogError("Project file {ProjectFile} does not exist.", projectFile.FullName);
233logger.LogDebug("Using single-file apphost {ProjectFile}", projectFile.FullName);
249logger.LogDebug("Using project file {ProjectFile}", projectFile.FullName);
291projectFile => $"{projectFile.Name} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName)})",
302var settingsFilePath = ConfigurationHelper.BuildPathToSettingsJsonFile(executionContext.WorkingDirectory.FullName);
305logger.LogDebug("Creating settings file at {SettingsFilePath}", settingsFile.FullName);
307var relativePathToProjectFile = Path.GetRelativePath(settingsFile.Directory!.FullName, projectFile.FullName).Replace(Path.DirectorySeparatorChar, '/');
312var relativeSettingsFilePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, settingsFile.FullName).Replace(Path.DirectorySeparatorChar, '/');
Projects\ProjectUpdater.cs (26)
27logger.LogDebug("Fetching '{AppHostPath}' items and properties.", projectFile.FullName);
33logger.LogInformation("No updates required for project: {ProjectFile}", projectFile.FullName);
43.GroupBy(step => step.ProjectFile.FullName)
85var fallbackNuGetConfigDirectory = executionContext.WorkingDirectory.FullName;
172var cacheKey = $"{ItemsAndPropertiesCacheKeyPrefix}_{projectFile.FullName}_{itemsKey}_{propertiesKey}";
181throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.FailedFetchItemsAndPropertiesFormat, projectFile.FullName));
202logger.LogWarning("Falling back to XML parsing for '{ProjectFile}'. Reason: {Message}", projectFile.FullName, ex.Message);
216return string.Equals(projectFile.FullName, context.AppHostProjectFile.FullName, StringComparison.OrdinalIgnoreCase);
224var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken));
245logger.LogDebug("Analyzing App Host SDK for: {AppHostFile}", context.AppHostProjectFile.FullName);
274projectDocument.Load(projectFile.FullName);
279throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindRootProjectElementFormat, projectFile.FullName));
285throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindSdkElementFormat, projectFile.FullName));
290projectDocument.Save(projectFile.FullName);
297if (!context.VisitedProjects.Add(projectFile.FullName))
320context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken)));
367var directoryPackagesPropsPath = Path.Combine(current.FullName, "Directory.Packages.props");
430doc.Load(directoryPackagesPropsFile.FullName);
474logger.LogInformation(ex, "Ignoring parsing error in Directory.Packages.props '{DirectoryPackagesPropsFile}' for project '{ProjectFile}'", directoryPackagesPropsFile.FullName, projectFile.FullName);
515logger.LogWarning(ex, "Exception while resolving MSBuild property '{PropertyName}' for project '{ProjectFile}'", propertyName, projectFile.FullName);
536doc.Load(directoryPackagesPropsFile.FullName);
541throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName));
545doc.Save(directoryPackagesPropsFile.FullName);
562throw new ProjectUpdaterException(string.Format(System.Globalization.CultureInfo.InvariantCulture, UpdateCommandStrings.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName));
Aspire.Cli.Tests (325)
Commands\ConfigCommandTests.cs (5)
41var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
64var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
89var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
123var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
243var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
DotNet\DotNetCliRunnerTests.cs (21)
32var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
33await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
80var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
81await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
117var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
118await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
164var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
165await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
210var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
211await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
259var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
260await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
353var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
354await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
400var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
401await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
449var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
450await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
503var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
504await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
540args: ["run", "--project", projectFile.FullName],
Packaging\NuGetConfigMergerSnapshotTests.cs (11)
32var path = Path.Combine(dir.FullName, "NuGet.config");
71var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
77var hivePath = Path.Combine(hivesDir.FullName, channelName);
133var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
139var hivePath = Path.Combine(hivesDir.FullName, channelName);
194var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
200var hivePath = Path.Combine(hivesDir.FullName, channelName);
253var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
259var hivePath = Path.Combine(hivesDir.FullName, channelName);
317var updated = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
323var hivePath = Path.Combine(hivesDir.FullName, channelName);
Packaging\NuGetConfigMergerTests.cs (11)
22var path = Path.Combine(dir.FullName, "NuGet.config");
64var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
68var expected = await File.ReadAllTextAsync(tempConfig.ConfigFile.FullName);
88var targetConfigPath = Path.Combine(root.FullName, "NuGet.config");
132var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
171var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
211var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
321var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
371var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
440var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
506var xml = XDocument.Load(Path.Combine(root.FullName, "NuGet.config"));
Projects\ProjectLocatorTests.cs (114)
35var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
58var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
59await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
62var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
63await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
66var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
71appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
83Assert.Equal(targetAppHostProjectFile.FullName, foundAppHost?.FullName);
97var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
98await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
101var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
102await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
105var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
110appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
122Assert.Equal(targetAppHostProjectFile.FullName, foundAppHost?.FullName);
133var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
134await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost project");
138var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
149if (projectFile.FullName == realAppHostProjectFile.FullName)
167Assert.Equal(realAppHostProjectFile.FullName, foundAppHost?.FullName);
176var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
177await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file.");
179var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
180await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file.");
190Assert.Equal(projectFile1.FullName, selectedProjectFile!.FullName);
199var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
200await File.WriteAllTextAsync(appHostProject.FullName, "Not a real apphost project.");
202var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
203await File.WriteAllTextAsync(webProject.FullName, "Not a real web project.");
207if (projectFile.FullName == appHostProject.FullName)
223Assert.Equal(appHostProject.FullName, foundAppHost?.FullName);
251var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
252await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
270var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
271await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
281Assert.Equal(projectFile.FullName, returnedProjectFile!.FullName);
292var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
293await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real project file.");
304var globalSettingsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.global.json");
315var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json"));
318var settingsJson = await File.ReadAllTextAsync(settingsFile.FullName);
333var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
335appHostFile.FullName,
349var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None);
352Assert.Equal(appHostFile.FullName, foundFiles[0].FullName);
361var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
363appHostFile.FullName,
377var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None);
380Assert.Equal(appHostFile.FullName, foundFiles[0].FullName);
391var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs"));
393appHostFile.FullName,
401var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj"));
402await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
406var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs"));
408validAppHostFile.FullName,
423var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None);
430var foundPaths = foundFiles.Select(f => f.FullName).ToHashSet();
431Assert.Contains(validAppHostFile.FullName, foundPaths);
432Assert.Contains(csprojFile.FullName, foundPaths);
433Assert.DoesNotContain(appHostFile.FullName, foundPaths);
442var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
443await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting;
453var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None);
466var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj"));
467await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
471var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs"));
473appHostFile.FullName,
484if (projectFile.FullName == csprojFile.FullName)
498var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None);
502Assert.True(foundFiles[0].FullName.CompareTo(foundFiles[1].FullName) < 0);
504var foundPaths = foundFiles.Select(f => f.FullName).ToHashSet();
505Assert.Contains(csprojFile.FullName, foundPaths);
506Assert.Contains(appHostFile.FullName, foundPaths);
514var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
516appHostFile.FullName,
532Assert.Equal(appHostFile.FullName, result!.FullName);
542var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
543await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting;
567var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
569appHostFile.FullName,
578var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj"));
579await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
601var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt"));
602await File.WriteAllTextAsync(txtFile.FullName, "Some text file");
625var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
626await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
630var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
632appHostFile.FullName,
643if (projectFile.FullName == csprojFile.FullName)
663Assert.True(result.FullName == csprojFile.FullName || result.FullName == appHostFile.FullName);
730var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
732appHostFile.FullName,
748var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None);
760var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
762appHostFile.FullName,
Projects\ProjectUpdaterTests.cs (134)
29var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
32var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
35var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
38appHostProjectFile.FullName,
72if (projectFile.FullName == appHostProjectFile.FullName)
77itemsAndProperties.WithProjectReference(webAppProjectFile.FullName);
79else if (projectFile.FullName == webAppProjectFile.FullName)
82itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
84else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
139var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
142var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
145var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
148appHostProjectFile.FullName,
183if (projectFile.FullName == appHostProjectFile.FullName)
188itemsAndProperties.WithProjectReference(webAppProjectFile.FullName);
190else if (projectFile.FullName == webAppProjectFile.FullName)
193itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
195else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
249Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
256Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
263Assert.Equal(webAppProjectFile.FullName, item.ProjectFile.FullName);
270Assert.Equal(serviceDefaultsProjectFile.FullName, item.ProjectFile.FullName);
283var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
286var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
289var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
292appHostProjectFile.FullName,
334if (projectFile.FullName == appHostProjectFile.FullName)
340itemsAndProperties.WithProjectReference(webAppProjectFile.FullName);
342else if (projectFile.FullName == webAppProjectFile.FullName)
345itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
347else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
401Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
408Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
415Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
422Assert.Equal(webAppProjectFile.FullName, item.ProjectFile.FullName);
429Assert.Equal(serviceDefaultsProjectFile.FullName, item.ProjectFile.FullName);
446var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj"));
449var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj"));
452var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj"));
455var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj"));
458appHostProjectFile.FullName,
491if (projectFile.FullName == appHostProjectFile.FullName)
496itemsAndProperties.WithProjectReference(projectAFile.FullName);
497itemsAndProperties.WithProjectReference(projectBFile.FullName);
499else if (projectFile.FullName == projectAFile.FullName)
504itemsAndProperties.WithProjectReference(sharedProjectFile.FullName);
506else if (projectFile.FullName == projectBFile.FullName)
511itemsAndProperties.WithProjectReference(sharedProjectFile.FullName);
513else if (projectFile.FullName == sharedProjectFile.FullName)
520throw new InvalidOperationException($"Unexpected project file: {projectFile.FullName}");
560var sharedProjectUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == sharedProjectFile.FullName).ToList();
568var appHostUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == appHostProjectFile.FullName).ToList();
580var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
583var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
585var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
589appHostProjectFile.FullName,
598serviceDefaultsProjectFile.FullName,
612directoryPackagesPropsFile.FullName,
652if (projectFile.FullName == appHostProjectFile.FullName)
655itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
657else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
703var updatedContent = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
716var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
718var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
722appHostProjectFile.FullName,
734directoryPackagesPropsFile.FullName,
808var updatedContent = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
818var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
820var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
824appHostProjectFile.FullName,
836directoryPackagesPropsFile.FullName,
911var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
950var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
952var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
956appHostProjectFile.FullName,
968directoryPackagesPropsFile.FullName,
1053var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
1063var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1065var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1069appHostProjectFile.FullName,
1082directoryPackagesPropsFile.FullName,
1176var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
1187var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1189var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1193appHostProjectFile.FullName,
1205directoryPackagesPropsFile.FullName,
1301var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1303var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1307appHostProjectFile.FullName,
1319directoryPackagesPropsFile.FullName,
1412var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1416appHostProjectFile.FullName,
1450if (projectFile.FullName == appHostProjectFile.FullName)
1506var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1508var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1512appHostProjectFile.FullName,
1524directoryPackagesPropsFile.FullName,
1558if (projectFile.FullName == appHostProjectFile.FullName)
1608var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1612appHostProjectFile.FullName,
1642if (projectFile.FullName == appHostProjectFile.FullName)
1687var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1690appHostProjectFile.FullName,
1721if (projectFile.FullName == appHostProjectFile.FullName)
Templating\DotNetTemplateFactoryTests.cs (17)
44var path = Path.Combine(dir.FullName, "NuGet.config");
69var nugetConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
101var nugetConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
114var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
139var parentConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
145var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
158var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
181var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
195var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
208var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
212var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
225var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
234var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
235var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
246var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
255var workingConfigPath = Path.Combine(workingDir.FullName, "NuGet.config");
256var outputConfigPath = Path.Combine(outputDir.FullName, "NuGet.config");
Aspire.Dashboard.Tests (6)
Aspire.EndToEnd.Tests (6)
Aspire.Hosting (5)
Aspire.Hosting.Azure (4)
Aspire.Hosting.Azure.Tests (27)
AzureEnvironmentResourceTests.cs (14)
21output.WriteLine($"Temp directory: {tempDir.FullName}");
22using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName);
34var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
38var envBicepPath = Path.Combine(tempDir.FullName, "env", "env.bicep");
53output.WriteLine($"Temp directory: {tempDir.FullName}");
54using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, publisher: "default", outputPath: tempDir.FullName);
71var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
85output.WriteLine($"Temp directory: {tempDir.FullName}");
88outputPath: tempDir.FullName);
123var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
134output.WriteLine($"Temp directory: {tempDir.FullName}");
137outputPath: tempDir.FullName);
172var mainBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "main.bicep"));
173var storageBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "storage", "storage.bicep"));
Aspire.Hosting.Docker.Tests (6)
Aspire.Hosting.Kubernetes.Tests (5)
Aspire.Hosting.MySql.Tests (1)
Aspire.Hosting.Nats.Tests (1)
Aspire.Hosting.NodeJs.Tests (1)
Aspire.Hosting.Oracle.Tests (3)
Aspire.Hosting.RabbitMQ.Tests (1)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.Testing (2)
Aspire.Hosting.Testing.Tests (2)
Aspire.Hosting.Tests (5)
Aspire.Templates.Tests (5)
BuildValidator (5)
CodeStyleConfigFileGenerator (2)
dotnet-dev-certs (5)
dotnet-openapi (2)
dotnet-svcutil.xmlserializer (3)
dotnet-svcutil-lib (33)
CommandProcessorOptions.cs (10)
216await ProcessOutputFileOptionAsync(this.OutputDir.FullName, cancellationToken);
390Path.GetDirectoryName(this.OutputFile.FullName) : Path.GetDirectoryName(Path.Combine(Directory.GetCurrentDirectory(), this.OutputFile.OriginalPath()));
651if (this.Project != null && PathHelper.GetRelativePath(this.OutputDir.FullName, new DirectoryInfo(this.Project.DirectoryPath), out var relPath))
698var projectFullPath = Path.Combine(this.BootstrapPath.FullName, "TFMResolver", "TFMResolver.csproj");
736var inputFiles = Metadata.MetadataFileNameManager.ResolveFiles(metadataUri.LocalPath).Select(f => f.FullName);
836string projFolder = Path.Combine(this.BootstrapPath.FullName, nameof(SvcutilBootstrapper));
841assembly = Assembly.LoadFrom(assemblyFile.FullName);
1008if (!Directory.Exists(this.BootstrapPath.FullName))
1010Directory.CreateDirectory(this.BootstrapPath.FullName);
1014await RuntimeEnvironmentHelper.TryCopyingConfigFiles(workingDirectory, this.BootstrapPath.FullName, logger, cancellationToken).ConfigureAwait(false);
dotnet-svcutil-lib.Tests (3)
FilesWebSite (1)
GenerateDocumentationAndConfigFiles (10)
Program.cs (10)
433var fileWithPath = Path.Combine(directory.FullName, args.PropsFileName);
442fileWithPath = Path.Combine(directory.FullName, args.PropsFileToDisableNetAnalyzersInNuGetPackageName);
542var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerDocumentationFileName);
638var fileWithPath = Path.Combine(directory.FullName, args.AnalyzerSarifFileName);
732Validate(Path.Combine(directory.FullName, args.AnalyzerSarifFileName), stringWriter.ToString(), fileNamesWithValidationFailures);
774var fileWithPath = Path.Combine(directory.FullName, "RulesMissingDocumentation.md");
1110var rulesetFilePath = Path.Combine(directory.FullName, rulesetFileName);
1175var editorconfigFilePath = Path.Combine(directory.FullName, ".editorconfig");
1398var configFilePath = Path.Combine(directory.FullName, fileName.ToLowerInvariant());
1610var fileWithPath = Path.Combine(directory.FullName, targetsFileName);
GenerateRulesMissingDocumentation (1)
IIS.FunctionalTests (14)
IIS.LongTests (8)
IIS.NewHandler.FunctionalTests (8)
IIS.NewShim.FunctionalTests (8)
IIS.ShadowCopy.Tests (12)
IISExpress.FunctionalTests (14)
illink (4)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (11)
Microsoft.AspNetCore.DataProtection (13)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (6)
Microsoft.AspNetCore.DataProtection.Tests (15)
Repositories\FileSystemXmlRepositoryTests.cs (10)
21var expectedDir = new DirectoryInfo(Path.Combine(baseDir, "DataProtection-Keys")).FullName;
27Assert.Equal(expectedDir, defaultDirInfo.FullName);
82var parsedElement = XElement.Parse(File.ReadAllText(fileInfo.FullName));
116var parsedElement = XElement.Parse(File.ReadAllText(fileInfo.FullName));
205var filePath1 = Path.Combine(dirInfo.FullName, "friendly1.xml");
206var filePath2 = Path.Combine(dirInfo.FullName, "friendly2.xml");
207var filePath3 = Path.Combine(dirInfo.FullName, "friendly3.xml");
222fileLock2 = new FileStream(Path.Combine(dirInfo.FullName, "friendly2.xml"), FileMode.Open, FileAccess.ReadWrite, FileShare.None);
255var filePath = Path.Combine(dirInfo.FullName, "friendly1.xml");
290Assert.Contains(Resources.FormatFileSystem_EphemeralKeysLocationInContainer(dirInfo.FullName), loggerFactory.ToString());
Microsoft.AspNetCore.DeveloperCertificates.XPlat (5)
Microsoft.AspNetCore.FunctionalTests (2)
Microsoft.AspNetCore.Identity.Test (2)
Microsoft.AspNetCore.InternalTesting (3)
Microsoft.AspNetCore.Mvc.Testing (2)
Microsoft.AspNetCore.Server.IntegrationTesting (6)
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Microsoft.AspNetCore.Server.Kestrel.Tests (5)
Microsoft.AspNetCore.TestHost (2)
Microsoft.AspNetCore.Tests (1)
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
Microsoft.CodeAnalysis.Features (9)
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (8)
183Path.Combine(_cacheDirectoryInfo.FullName, ConvertToFileName(_source) + ".txt"));
344var tempFilePath = Path.Combine(_cacheDirectoryInfo.FullName, guidString + ".tmp");
366_service._ioService.Replace(tempFilePath, databaseFileInfo.FullName, destinationBackupFileName: null, ignoreMetadataErrors: true);
372_service._ioService.Move(tempFilePath, databaseFileInfo.FullName);
386=> new(Path.ChangeExtension(databaseFileInfo.FullName, ".bin"));
427getDatabaseBytes: () => isBinary ? _service._ioService.ReadAllBytes(databaseFileInfo.FullName) : databaseBytes,
442return (_service._ioService.ReadAllBytes(databaseBinaryFileInfo.FullName), isBinary: true);
449return (_service._ioService.ReadAllBytes(databaseFileInfo.FullName), isBinary: false);
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.Helix.JobSender (11)
Microsoft.DotNet.Helix.Sdk (7)
Microsoft.DotNet.Internal.SymbolHelper (2)
Microsoft.DotNet.Open.Api.Tools.Tests (2)
Microsoft.DotNet.SwaggerGenerator.CmdLine (2)
Microsoft.DotNet.SwaggerGenerator.MSBuild (4)
Microsoft.Extensions.AI.Evaluation.Console (4)
Microsoft.Extensions.AI.Evaluation.Reporting (4)
Microsoft.Extensions.AI.Templates.Tests (1)
Microsoft.Extensions.ApiDescription.Tool.Tests (36)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (7)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.FileSystemGlobbing (6)
Microsoft.Extensions.SecretManager.Tools.Tests (4)
Microsoft.Maui.Resizetizer (10)
Microsoft.ML.AutoML (4)
Microsoft.ML.PerformanceTests (3)
Microsoft.ML.Samples (4)
Microsoft.ML.Samples.GPU (4)
Microsoft.ML.SamplesUtils (1)
Microsoft.ML.TestFramework (2)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.VisualBasic.Core (6)
Microsoft.VisualBasic.Tests (3)
PresentationCore (1)
PresentationUI (1)
ResultsOfTGenerator (2)
Roslyn.Compilers.Extension (1)
RulesetToEditorconfigConverter.UnitTests (4)
ServerComparison.FunctionalTests (2)
StaticFilesAuth (4)
System.CodeDom (1)
System.Configuration.ConfigurationManager (2)
System.Formats.Tar (4)
System.IO.Compression.ZipFile (4)
System.IO.Packaging (1)
System.IO.Ports (4)
System.Private.CoreLib (7)
System.Security.Cryptography (1)
System.Windows.Forms.Design (1)
System.Windows.Forms.IntegrationTests.Common (2)
Templates.Blazor.Tests (5)
Templates.Blazor.WebAssembly.Auth.Tests (5)
Templates.Blazor.WebAssembly.Tests (5)
Templates.Mvc.Tests (5)
Templates.Tests (5)