1564 references to FullName
aspire (295)
Agents\ClaudeCode\ClaudeCodeAgentEnvironmentScanner.cs (14)
45_logger.LogDebug("Starting Claude Code environment scan in directory: {WorkingDirectory}", context.WorkingDirectory.FullName);
46_logger.LogDebug("Workspace root: {RepositoryRoot}", context.RepositoryRoot.FullName);
56_logger.LogDebug("Inferred workspace root from .claude folder parent: {WorkspaceRoot}", workspaceRoot.FullName);
63_logger.LogDebug("Adding Claude Code applicator for .mcp.json at: {WorkspaceRoot}", workspaceRoot.FullName);
104_logger.LogDebug("Adding Claude Code applicator for .mcp.json at workspace root: {WorkspaceRoot}", context.RepositoryRoot.FullName);
155var claudeCodePath = Path.Combine(currentDirectory.FullName, ClaudeCodeFolderName);
156if (Directory.Exists(claudeCodePath) && !string.Equals(currentDirectory.FullName, homeDirectory.FullName, StringComparison.OrdinalIgnoreCase))
163if (string.Equals(currentDirectory.FullName, repositoryRoot.FullName, StringComparison.OrdinalIgnoreCase))
181var configFilePath = Path.Combine(repoRoot.FullName, McpConfigFileName);
217var configFilePath = Path.Combine(repoRoot.FullName, McpConfigFileName);
263var configFilePath = Path.Combine(repoRoot.FullName, McpConfigFileName);
304var configFilePath = Path.Combine(repoRoot.FullName, McpConfigFileName);
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (15)
45_logger.LogDebug("Starting VS Code environment scan in directory: {WorkingDirectory}", context.WorkingDirectory.FullName);
46_logger.LogDebug("Workspace root: {RepositoryRoot}", context.RepositoryRoot.FullName);
53_logger.LogDebug("Found .vscode folder at: {VsCodeFolder}", vsCodeFolder.FullName);
59_logger.LogDebug("Adding VS Code applicator for .vscode folder at: {VsCodeFolder}", vsCodeFolder.FullName);
92var targetVsCodeFolder = new DirectoryInfo(Path.Combine(context.RepositoryRoot.FullName, VsCodeFolderName));
93_logger.LogDebug("Adding VS Code applicator for new .vscode folder at: {VsCodeFolder}", targetVsCodeFolder.FullName);
169var vsCodePath = Path.Combine(currentDirectory.FullName, VsCodeFolderName);
170if (Directory.Exists(vsCodePath) && !string.Equals(currentDirectory.FullName, homeDirectory.FullName, StringComparison.OrdinalIgnoreCase))
177if (string.Equals(currentDirectory.FullName, repositoryRoot.FullName, StringComparison.OrdinalIgnoreCase))
207var mcpConfigPath = Path.Combine(vsCodeFolder.FullName, McpConfigFileName);
243var mcpConfigPath = Path.Combine(vsCodeFolder.FullName, McpConfigFileName);
296var mcpConfigPath = Path.Combine(vsCodeFolder.FullName, McpConfigFileName);
344var mcpConfigPath = Path.Combine(vsCodeFolder.FullName, McpConfigFileName);
Caching\DiskCache.cs (12)
24_cacheDirectory = new DirectoryInfo(Path.Combine(executionContext.CacheDirectory.FullName, "nuget-search"));
33_logger.LogDebug(ex, "Failed to create cache directory {CacheDirectory}", _cacheDirectory.FullName);
94_logger.LogDebug(ex, "Failed to create cache directory {CacheDirectory}", _cacheDirectory.FullName);
106var fullPath = Path.Combine(_cacheDirectory.FullName, fileName);
145_logger.LogDebug(ex, "Failed to delete cache file {CacheFile}", file.FullName);
152_logger.LogDebug(ex, "Failed to clear disk cache at {CacheDirectory}", _cacheDirectory.FullName);
216valid = file.FullName;
273_logger.LogDebug("Deleted expired cache file: {CacheFile}", file.FullName);
277_logger.LogDebug("Deleted old cache file during global cleanup: {CacheFile}", file.FullName);
281_logger.LogDebug("Deleted invalid cache file: {CacheFile}", file.FullName);
285_logger.LogDebug("Deleted cache file: {CacheFile}", file.FullName);
290_logger.LogDebug(ex, "Failed to delete cache file {CacheFile}", file.FullName);
Commands\RunCommand.cs (23)
176await extensionInteractionService.StartDebugSessionAsync(ExecutionContext.WorkingDirectory.FullName, passedAppHostProjectFile?.FullName, startDebugSession);
267ExecutionContext.HomeDirectory.FullName,
283var appHostRelativePath = Path.GetRelativePath(ExecutionContext.WorkingDirectory.FullName, effectiveAppHostFile.FullName);
289logFile.FullName,
530using var streamWriter = new StreamWriter(logFile.FullName, append: true)
633_logger.LogDebug("Starting AppHost in background: {AppHostPath}", effectiveAppHostFile.FullName);
639effectiveAppHostFile.FullName,
640ExecutionContext.HomeDirectory.FullName);
649effectiveAppHostFile.FullName,
650ExecutionContext.HomeDirectory.FullName);
668effectiveAppHostFile.FullName
708_logger.LogDebug("Working directory: {WorkingDirectory}", ExecutionContext.WorkingDirectory.FullName);
719WorkingDirectory = ExecutionContext.WorkingDirectory.FullName
847ExecutionContext.HomeDirectory.FullName,
879expectedLogFile.FullName));
892ExecutionContext.HomeDirectory.FullName,
901effectiveAppHostFile.FullName,
905logFile.FullName);
912var appHostRelativePath = Path.GetRelativePath(ExecutionContext.WorkingDirectory.FullName, effectiveAppHostFile.FullName);
918logFile.FullName,
DotNet\DotNetCliRunner.cs (31)
123projectFile.FullName,
338cliArgsList.Add(projectFile.FullName);
408false => [watchOrRunCommand, nonInteractiveSwitch, verboseSwitch, noBuildSwitch, noProfileSwitch, "--project", projectFile.FullName, "--", .. args],
409true => ["run", noProfileSwitch, "--file", projectFile.FullName, "--", .. args]
705string[] cliArgs = ["build", projectFilePath.FullName];
735cliArgsList.AddRange(["package", "--file", projectFilePath.FullName]);
741cliArgsList.AddRange([projectFilePath.FullName, "package"]);
760logger.LogInformation("Adding package {PackageName} with version {PackageVersion} to project {ProjectFilePath}", packageName, packageVersion, projectFilePath.FullName);
773logger.LogError("Failed to add package {PackageName} with version {PackageVersion} to project {ProjectFilePath}. See debug logs for more details.", packageName, packageVersion, projectFilePath.FullName);
777logger.LogInformation("Package {PackageName} with version {PackageVersion} added to project {ProjectFilePath}", packageName, packageVersion, projectFilePath.FullName);
787string[] cliArgs = ["sln", solutionFile.FullName, "add", projectFile.FullName];
789logger.LogInformation("Adding project {ProjectFilePath} to solution {SolutionFilePath}", projectFile.FullName, solutionFile.FullName);
802logger.LogError("Failed to add project {ProjectFilePath} to solution {SolutionFilePath}. See debug logs for more details.", projectFile.FullName, solutionFile.FullName);
806logger.LogInformation("Project {ProjectFilePath} added to solution {SolutionFilePath}", projectFile.FullName, solutionFile.FullName);
849: Path.Combine(workingDirectory.FullName, configPath);
938cliArgs.Add(nugetConfigFile.FullName);
1009nugetConfigFile?.FullName ?? "(default)",
1088string[] cliArgs = ["sln", solutionFile.FullName, "list"];
1142: Path.Combine(solutionFile.Directory!.FullName, line);
1154string[] cliArgs = ["add", projectFile.FullName, "reference", referencedProject.FullName];
1156logger.LogInformation("Adding project reference from {ProjectFile} to {ReferencedProject}", projectFile.FullName, referencedProject.FullName);
1169logger.LogError("Failed to add project reference from {ProjectFile} to {ReferencedProject}. See debug logs for more details.", projectFile.FullName, referencedProject.FullName);
1173logger.LogInformation("Project reference added from {ProjectFile} to {ReferencedProject}", projectFile.FullName, referencedProject.FullName);
Projects\GuestAppHostProject.cs (29)
178var config = AspireJsonConfiguration.LoadOrCreate(directory.FullName, effectiveSdkVersion);
181var appHostServerProject = _appHostServerProjectFactory.Create(directory.FullName);
206directory.FullName,
238_logger.LogDebug("AppHost file {File} does not exist", appHostFile.FullName);
253_logger.LogDebug("Validated {Language} AppHost: {File}", _resolvedLanguage.DisplayName, appHostFile.FullName);
263_logger.LogDebug("Running {Language} AppHost: {AppHostFile}", DisplayName, appHostFile.FullName);
283var config = AspireJsonConfiguration.LoadOrCreate(directory.FullName, effectiveSdkVersion);
286var appHostServerProject = _appHostServerProjectFactory.Create(directory.FullName);
300return (Success: true, Output: buildOutput, Error: (string?)null, ChannelName: channelName, NeedsCodeGen: NeedsGeneration(directory.FullName, packages));
307config.Save(directory.FullName);
394directory.FullName,
406["ASPIRE_PROJECT_DIRECTORY"] = directory.FullName,
407["ASPIRE_APPHOST_FILEPATH"] = appHostFile.FullName
481var apphostRunPath = Path.Combine(directory.FullName, "apphost.run.json");
482var launchSettingsPath = Path.Combine(directory.FullName, "Properties", "launchSettings.json");
488_logger.LogDebug("No apphost.run.json or launchSettings.json found in {Path}", directory.FullName);
565_logger.LogDebug("Publishing guest AppHost: {AppHostFile}", appHostFile.FullName);
571var config = AspireJsonConfiguration.LoadOrCreate(directory.FullName, effectiveSdkVersion);
574var appHostServerProject = _appHostServerProjectFactory.Create(directory.FullName);
593var needsCodeGen = NeedsGeneration(directory.FullName, packages);
654directory.FullName,
664["ASPIRE_PROJECT_DIRECTORY"] = directory.FullName,
665["ASPIRE_APPHOST_FILEPATH"] = appHostFile.FullName
820var config = AspireJsonConfiguration.LoadOrCreate(directory.FullName, effectiveSdkVersion);
824config.Save(directory.FullName);
843var config = AspireJsonConfiguration.LoadOrCreate(directory.FullName, effectiveSdkVersion);
938config.Save(directory.FullName);
962var appHostServerProject = _appHostServerProjectFactory.Create(directory.FullName);
966var matchingSockets = AppHostHelper.FindMatchingSockets(genericAppHostPath, homeDirectory.FullName);
Projects\ProjectLocator.cs (36)
47logger.LogDebug("Searching for project files in {SearchDirectory}", searchDirectory.FullName);
76logger.LogDebug("Checking candidate file {CandidateFile}", candidateFile.FullName);
82logger.LogTrace("No handler found for {CandidateFile}", candidateFile.FullName);
91logger.LogDebug("Found {Language} apphost {CandidateFile}", handler.DisplayName, candidateFile.FullName);
92var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName);
101var relativePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, candidateFile.FullName);
110logger.LogTrace("File {CandidateFile} is not a valid Aspire host", candidateFile.FullName);
117appHostProjects.Sort((x, y) => x.FullName.CompareTo(y.FullName));
129var settingsFile = new FileInfo(ConfigurationHelper.BuildPathToSettingsJsonFile(searchDirectory.FullName));
138var qualifiedAppHostPath = Path.IsPathRooted(appHostPath) ? appHostPath : Path.Combine(settingsFile.Directory!.FullName, appHostPath);
149interactionService.DisplayMessage("warning", string.Format(CultureInfo.CurrentCulture, ErrorStrings.AppHostWasSpecifiedButDoesntExist, settingsFile.FullName, qualifiedAppHostPath));
173if (Directory.Exists(projectFile.FullName))
175logger.LogDebug("Provided path {Path} is a directory, searching for project files recursively", projectFile.FullName);
176var directory = new DirectoryInfo(projectFile.FullName);
186logger.LogError("No AppHost project files found in directory {Directory}", directory.FullName);
191logger.LogDebug("Found single AppHost project file {ProjectFile} in directory {Directory}", appHostProjects[0].FullName, directory.FullName);
198logger.LogDebug("Multiple AppHost project files found in directory {Directory}, prompting user to select", directory.FullName);
202file => $"{file.Name} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, file.FullName)})",
208logger.LogDebug("Multiple AppHost project files found in directory {Directory}, selecting none", directory.FullName);
213logger.LogError("Multiple AppHost project files found in directory {Directory}, throwing exception", directory.FullName);
224logger.LogError("Project file {ProjectFile} does not exist.", projectFile.FullName);
232logger.LogDebug("Using {Language} apphost {ProjectFile}", handler.DisplayName, projectFile.FullName);
240return await UseOrFindAppHostProjectFileAsync(new FileInfo(parentDirectory.FullName), multipleAppHostProjectsFoundBehavior, createSettingsFile, cancellationToken);
280MultipleAppHostProjectsFoundBehavior.Prompt => await interactionService.PromptForSelectionAsync(InteractionServiceStrings.SelectAppHostToUse, results.BuildableAppHost, projectFile => $"{projectFile.Name} ({Path.GetRelativePath(executionContext.WorkingDirectory.FullName, projectFile.FullName)})", cancellationToken),
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, '/');
327var relativeSettingsFilePath = Path.GetRelativePath(executionContext.WorkingDirectory.FullName, settingsFile.FullName).Replace(Path.DirectorySeparatorChar, '/');
Projects\ProjectUpdater.cs (30)
30logger.LogDebug("Fetching '{AppHostPath}' items and properties.", projectFile.FullName);
36logger.LogInformation("No updates required for project: {ProjectFile}", projectFile.FullName);
46.GroupBy(step => step.ProjectFile.FullName)
88var fallbackNuGetConfigDirectory = executionContext.WorkingDirectory.FullName;
175var cacheKey = $"{ItemsAndPropertiesCacheKeyPrefix}_{projectFile.FullName}_{itemsKey}_{propertiesKey}";
184throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedFetchItemsAndPropertiesFormat, projectFile.FullName));
205logger.LogWarning("Falling back to parsing for '{ProjectFile}'. Reason: {Message}", projectFile.FullName, ex.Message);
219return string.Equals(projectFile.FullName, context.AppHostProjectFile.FullName, StringComparison.OrdinalIgnoreCase);
227var appHostProjectAnalyzeStep = new AnalyzeStep(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, context.AppHostProjectFile.FullName), () => AnalyzeProjectAsync(context.AppHostProjectFile, context, cancellationToken));
252logger.LogDebug("Analyzing App Host SDK for: {AppHostFile}", context.AppHostProjectFile.FullName);
293projectDocument.Load(projectFile.FullName);
402projectDocument.Load(projectFile.FullName);
407throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindRootProjectElementFormat, projectFile.FullName));
425throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindSdkElementFormat, projectFile.FullName));
448projectDocument.Save(projectFile.FullName);
514var fileContent = await File.ReadAllTextAsync(projectFile.FullName);
522"Could not find '#:sdk Aspire.AppHost.Sdk@<version>' directive in single-file AppHost: {0}", projectFile.FullName));
529await File.WriteAllTextAsync(projectFile.FullName, updatedContent);
537if (!context.VisitedProjects.Add(projectFile.FullName))
577context.AnalyzeSteps.Enqueue(new AnalyzeStep(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.AnalyzeProjectFormat, referencedProjectFile.FullName), () => AnalyzeProjectAsync(referencedProjectFile, context, cancellationToken)));
637var directoryPackagesPropsPath = Path.Combine(current.FullName, "Directory.Packages.props");
704doc.Load(directoryPackagesPropsFile.FullName);
748logger.LogInformation(ex, "Ignoring parsing error in Directory.Packages.props '{DirectoryPackagesPropsFile}' for project '{ProjectFile}'", directoryPackagesPropsFile.FullName, projectFile.FullName);
789logger.LogWarning(ex, "Exception while resolving MSBuild property '{PropertyName}' for project '{ProjectFile}'", propertyName, projectFile.FullName);
802doc.Load(directoryPackagesPropsFile.FullName);
807throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.CouldNotFindPackageVersionInDirectoryPackagesProps, packageId, directoryPackagesPropsFile.FullName));
811doc.Save(directoryPackagesPropsFile.FullName);
828throw new ProjectUpdaterException(string.Format(CultureInfo.InvariantCulture, UpdateCommandStrings.FailedUpdatePackageReferenceFormat, package.Id, projectFile.FullName));
Aspire.Cli.EndToEnd.Tests (10)
Aspire.Cli.Tests (663)
Caching\DiskCacheTests.cs (4)
20var hives = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "hives"));
21var cacheDir = new DirectoryInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache"));
72var diskPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache", "nuget-search");
118var diskPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cache", "nuget-search");
Commands\ConfigCommandTests.cs (5)
71var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
94var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
119var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
153var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
273var settingsPath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json");
Commands\RunCommandTests.cs (17)
395var appHostDirectoryPath = Path.Combine(workspace.WorkspaceRoot.FullName, "src", "MyApp.AppHost");
397var appHostProjectPath = Path.Combine(appHostDirectory.FullName, "MyApp.AppHost.csproj");
399File.WriteAllText(appHostProjectFile.FullName, "<Project></Project>");
858var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
859await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
907var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
908await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
952var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
953await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
1001var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1002await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
1045var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1046await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
1090var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1091await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
1135var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1136await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
Commands\UpdateCommandTests.cs (19)
84var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
85var oldBackup1 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
86var oldBackup2 = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.9876543210");
87var otherFile = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.something");
110var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
111var oldBackup = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe.old.1234567890");
151var targetExePath = Path.Combine(workspace.WorkspaceRoot.FullName, "aspire.exe");
221return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
294return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
380var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
427var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
468var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
502return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
569return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
636return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
696return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
774return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
819return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
921var archivePath = Path.Combine(workspace.WorkspaceRoot.FullName, "test-cli.tar.gz");
DotNet\DotNetCliRunnerTests.cs (66)
24var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache"));
32var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
33await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
71var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
72await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
100var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
101await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
139var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
140await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
176var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
177await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
216var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
217await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
293var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
294await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
332var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
333await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
373var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
374await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
419var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
420await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
466var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
467await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
484Assert.Contains(appHostFile.FullName, args);
492var filePathIndex = Array.IndexOf(args, appHostFile.FullName);
518var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
519await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
535Assert.Contains(projectFile.FullName, args);
544var projectIndex = Array.IndexOf(args, projectFile.FullName);
578var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
579await File.WriteAllTextAsync(projectFile.FullName, "<Project></Project>");
595Assert.Contains(projectFile.FullName, args);
603var projectIndex = Array.IndexOf(args, projectFile.FullName);
642var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
643await File.WriteAllTextAsync(solutionFile.FullName, "Not a real solution file.");
647var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj"));
648await File.WriteAllTextAsync(project1File.FullName, "Not a real project file.");
651var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj"));
652await File.WriteAllTextAsync(project2File.FullName, "Not a real project file.");
689var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
690await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
692var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj"));
693await File.WriteAllTextAsync(referencedProject.FullName, "Not a real project file.");
707Assert.Contains(projectFile.FullName, args);
709Assert.Contains(referencedProject.FullName, args);
722var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
723await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
744arg => Assert.Equal(appHostFile.FullName, arg),
767var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
768await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
788arg => Assert.Equal(appHostFile.FullName, arg),
811var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
812await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
855var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
856await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
882arg => Assert.Equal(appHostFile.FullName, arg),
905var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
906await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
930arg => Assert.Equal(projectFile.FullName, arg),
953var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
954await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
977arg => Assert.Equal(projectFile.FullName, arg),
1000var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
1001await File.WriteAllTextAsync(appHostFile.FullName, "// Single-file AppHost");
1036var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
1037await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
Packaging\NuGetConfigMergerSnapshotTests.cs (16)
47var path = Path.Combine(dir.FullName, "nuget.config");
65var cacheDir = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
87var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
93var hivePath = Path.Combine(hivesDir.FullName, channelName);
114var cacheDir2 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
149var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
155var hivePath = Path.Combine(hivesDir.FullName, channelName);
176var cacheDir3 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
210var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
216var hivePath = Path.Combine(hivesDir.FullName, channelName);
237var cacheDir4 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
269var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
275var hivePath = Path.Combine(hivesDir.FullName, channelName);
296var cacheDir5 = new DirectoryInfo(Path.Combine(root.FullName, ".aspire", "cache"));
333var updated = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
339var hivePath = Path.Combine(hivesDir.FullName, channelName);
Packaging\NuGetConfigMergerTests.cs (19)
24var path = Path.Combine(dir.FullName, "nuget.config");
66var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
70var expected = await File.ReadAllTextAsync(tempConfig.ConfigFile.FullName);
90var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
134var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
173var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
213var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
323var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
373var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
442var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
508var xml = XDocument.Load(Path.Combine(root.FullName, "nuget.config"));
581var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
583Assert.Equal(targetConfigPath, callbackTargetFile.FullName);
611var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
661var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
663Assert.Equal(targetConfigPath, callbackTargetFile.FullName);
683var originalContent = await File.ReadAllTextAsync(Path.Combine(root.FullName, "nuget.config")).DefaultTimeout();
704var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
726var targetConfigPath = Path.Combine(root.FullName, "nuget.config");
Packaging\PackagingServiceTests.cs (26)
46var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
47var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
81var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
82var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
125var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
126var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
158var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
159var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
191var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
192var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
223var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
224var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
254var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
255var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
285var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
286var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
316var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
317var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
370var nugetConfigPath = Path.Combine(tempDir.FullName, "nuget.config");
394var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
395var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
399Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-10167"));
400Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-11832"));
451var hivesDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "hives"));
452var cacheDir = new DirectoryInfo(Path.Combine(tempDir.FullName, ".aspire", "cache"));
456Directory.CreateDirectory(Path.Combine(hivesDir.FullName, "pr-12345"));
Projects\FallbackProjectParserTests.cs (14)
25var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
47var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
72var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
97var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
122var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
148var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
187var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.csproj");
209var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
233var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
263var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
286var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
310var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
333var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.cs");
355var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "Test.txt");
Projects\ProjectLocatorTests.cs (169)
28var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache"));
37var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
55var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
56await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
59var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
60await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
63var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
68appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
77Assert.Equal(targetAppHostProjectFile.FullName, foundAppHost?.FullName);
89var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
90await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
93var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj"));
94await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
97var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
102appHostPath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName)
111Assert.Equal(targetAppHostProjectFile.FullName, foundAppHost?.FullName);
120var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj"));
121await File.WriteAllTextAsync(realAppHostProjectFile.FullName, "Not a real apphost project");
125var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
138if (projectFile.FullName == realAppHostProjectFile.FullName)
152Assert.Equal(realAppHostProjectFile.FullName, foundAppHost?.FullName);
161var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj"));
162await File.WriteAllTextAsync(targetAppHostProjectFile.FullName, "Not a real apphost");
165var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json"));
168var relativePath = Path.GetRelativePath(aspireSettingsFile.Directory!.FullName, targetAppHostProjectFile.FullName);
184Assert.Equal(targetAppHostProjectFile.FullName, foundAppHost?.FullName);
191var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj"));
192await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file.");
194var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj"));
195await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file.");
202Assert.Equal(projectFile1.FullName, selectedProjectFile!.FullName);
209var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
210await File.WriteAllTextAsync(appHostProject.FullName, "Not a real apphost project.");
212var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj"));
213await File.WriteAllTextAsync(webProject.FullName, "Not a real web project.");
219if (projectFile.FullName == appHostProject.FullName)
230Assert.Equal(appHostProject.FullName, foundAppHost?.FullName);
255var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectFileExtension}"));
256await 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.");
277Assert.Equal(projectFile.FullName, returnedProjectFile!.FullName);
287var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj"));
288await File.WriteAllTextAsync(appHostProjectFile.FullName, "Not a real project file.");
296var globalSettingsFilePath = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.global.json");
307var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "settings.json"));
310var settingsJson = await File.ReadAllTextAsync(settingsFile.FullName);
325var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
327appHostFile.FullName,
338var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
341Assert.Equal(appHostFile.FullName, foundFiles[0].FullName);
350var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
352appHostFile.FullName,
363var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
366Assert.Equal(appHostFile.FullName, foundFiles[0].FullName);
376var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs"));
378appHostFile.FullName,
386var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj"));
387await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
391var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs"));
393validAppHostFile.FullName,
405if (projectFile.FullName == csprojFile.FullName)
412var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
419var foundPaths = foundFiles.Select(f => f.FullName).ToHashSet();
420Assert.Contains(validAppHostFile.FullName, foundPaths);
421Assert.Contains(csprojFile.FullName, foundPaths);
422Assert.DoesNotContain(appHostFile.FullName, foundPaths);
431var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
432await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting
439var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
451var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj"));
452await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
456var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs"));
458appHostFile.FullName,
469if (projectFile.FullName == csprojFile.FullName)
476var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
480Assert.True(foundFiles[0].FullName.CompareTo(foundFiles[1].FullName) < 0);
482var foundPaths = foundFiles.Select(f => f.FullName).ToHashSet();
483Assert.Contains(csprojFile.FullName, foundPaths);
484Assert.Contains(appHostFile.FullName, foundPaths);
492var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
494appHostFile.FullName,
507Assert.Equal(appHostFile.FullName, result!.FullName);
516var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
517await File.WriteAllTextAsync(appHostFile.FullName, @"using Aspire.Hosting;
537var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs"));
539appHostFile.FullName,
548var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj"));
549await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
563var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt"));
564await File.WriteAllTextAsync(txtFile.FullName, "Some text file");
583var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
584await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
588var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs"));
590appHostFile.FullName,
601if (projectFile.FullName == csprojFile.FullName)
614Assert.True(result.FullName == csprojFile.FullName || result.FullName == appHostFile.FullName);
697var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj"));
698await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
704if (file.FullName == projectFile.FullName)
716var directoryAsFileInfo = new FileInfo(projectDirectory.FullName);
719Assert.Equal(projectFile.FullName, returnedProjectFile!.FullName);
734var directoryAsFileInfo = new FileInfo(projectDirectory.FullName);
751var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj"));
752await File.WriteAllTextAsync(projectFile1.FullName, "Not a real project file.");
753var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj"));
754await File.WriteAllTextAsync(projectFile2.FullName, "Not a real project file.");
761if (file.FullName == projectFile1.FullName || file.FullName == projectFile2.FullName)
773var directoryAsFileInfo = new FileInfo(projectDirectory.FullName);
778Assert.Equal(projectFile1.FullName, returnedProjectFile!.FullName);
788var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs"));
790appHostFile.FullName,
802var directoryAsFileInfo = new FileInfo(projectDirectory.FullName);
805Assert.Equal(appHostFile.FullName, returnedProjectFile!.FullName);
816var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj"));
817await File.WriteAllTextAsync(projectFile.FullName, "Not a real project file.");
823if (file.FullName == projectFile.FullName)
835var directoryAsFileInfo = new FileInfo(topDirectory.FullName);
838Assert.Equal(projectFile.FullName, returnedProjectFile!.FullName);
855var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
856await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
860var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.cs"));
861await File.WriteAllTextAsync(appHostCsFile.FullName, """
878var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
882Assert.Equal(csprojFile.FullName, foundFiles[0].FullName);
898var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj"));
899await File.WriteAllTextAsync(csprojFile.FullName, "<Project Sdk=\"Microsoft.NET.Sdk\"></Project>");
902var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
903await File.WriteAllTextAsync(appHostCsFile.FullName, """
922var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
926Assert.Equal(csprojFile.FullName, foundFiles[0].FullName);
940var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs"));
941await File.WriteAllTextAsync(appHostCsFile.FullName, """
951var foundFiles = await projectLocator.FindAppHostProjectFilesAsync(workspace.WorkspaceRoot.FullName, CancellationToken.None).DefaultTimeout();
955Assert.Equal(appHostCsFile.FullName, foundFiles[0].FullName);
Projects\ProjectUpdaterTests.cs (156)
30var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
33var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
36var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
39appHostProjectFile.FullName,
73if (projectFile.FullName == appHostProjectFile.FullName)
78itemsAndProperties.WithProjectReference(webAppProjectFile.FullName);
80else if (projectFile.FullName == webAppProjectFile.FullName)
83itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
85else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
140var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
143var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
146var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
149appHostProjectFile.FullName,
184if (projectFile.FullName == appHostProjectFile.FullName)
189itemsAndProperties.WithProjectReference(webAppProjectFile.FullName);
191else if (projectFile.FullName == webAppProjectFile.FullName)
194itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
196else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
251Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
258Assert.Equal(webAppProjectFile.FullName, item.ProjectFile.FullName);
271var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
274var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj"));
277var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
280appHostProjectFile.FullName,
322if (projectFile.FullName == appHostProjectFile.FullName)
328itemsAndProperties.WithProjectReference(webAppProjectFile.FullName);
330else if (projectFile.FullName == webAppProjectFile.FullName)
333itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
335else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
390Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
397Assert.Equal(appHostProjectFile.FullName, item.ProjectFile.FullName);
404Assert.Equal(webAppProjectFile.FullName, item.ProjectFile.FullName);
421var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj"));
424var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj"));
427var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj"));
430var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj"));
433appHostProjectFile.FullName,
465if (projectFile.FullName == appHostProjectFile.FullName)
470itemsAndProperties.WithProjectReference(projectAFile.FullName);
471itemsAndProperties.WithProjectReference(projectBFile.FullName);
473else if (projectFile.FullName == projectAFile.FullName)
478itemsAndProperties.WithProjectReference(sharedProjectFile.FullName);
480else if (projectFile.FullName == projectBFile.FullName)
485itemsAndProperties.WithProjectReference(sharedProjectFile.FullName);
487else if (projectFile.FullName == sharedProjectFile.FullName)
494throw new InvalidOperationException($"Unexpected project file: {projectFile.FullName}");
534var sharedProjectUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == sharedProjectFile.FullName).ToList();
542var appHostUpdates = packagesAddsExecuted.Where(p => p.ProjectFile.FullName == appHostProjectFile.FullName).ToList();
554var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj"));
557var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
559var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
563appHostProjectFile.FullName,
572serviceDefaultsProjectFile.FullName,
586directoryPackagesPropsFile.FullName,
626if (projectFile.FullName == appHostProjectFile.FullName)
629itemsAndProperties.WithProjectReference(serviceDefaultsProjectFile.FullName);
631else if (projectFile.FullName == serviceDefaultsProjectFile.FullName)
677var updatedContent = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
690var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
692var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
696appHostProjectFile.FullName,
708directoryPackagesPropsFile.FullName,
782var updatedContent = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
792var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
794var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
798appHostProjectFile.FullName,
810directoryPackagesPropsFile.FullName,
885var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
895var cacheDirectory = new DirectoryInfo(Path.Combine(workingDirectory.FullName, ".aspire", "cache"));
925var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
927var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
931appHostProjectFile.FullName,
943directoryPackagesPropsFile.FullName,
1028var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
1038var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1040var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1044appHostProjectFile.FullName,
1057directoryPackagesPropsFile.FullName,
1151var content = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
1162var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1164var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1168appHostProjectFile.FullName,
1180directoryPackagesPropsFile.FullName,
1276var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1278var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1282appHostProjectFile.FullName,
1294directoryPackagesPropsFile.FullName,
1387var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1391appHostProjectFile.FullName,
1425if (projectFile.FullName == appHostProjectFile.FullName)
1481var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1483var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
1487appHostProjectFile.FullName,
1499directoryPackagesPropsFile.FullName,
1533if (projectFile.FullName == appHostProjectFile.FullName)
1583var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1587appHostProjectFile.FullName,
1617if (projectFile.FullName == appHostProjectFile.FullName)
1662var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1665appHostProjectFile.FullName,
1696if (projectFile.FullName == appHostProjectFile.FullName)
1744var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
1748appHostFile.FullName,
1816var updatedContent = await File.ReadAllTextAsync(appHostFile.FullName);
1827var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs"));
1831appHostFile.FullName,
1899var updatedContent = await File.ReadAllTextAsync(appHostFile.FullName);
1909var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1912appHostProjectFile.FullName,
1995var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
1999appHostProjectFile.FullName,
2062var updatedContent = await File.ReadAllTextAsync(appHostProjectFile.FullName);
2073var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2077appHostProjectFile.FullName,
2141var updatedContent = await File.ReadAllTextAsync(appHostProjectFile.FullName);
2151var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2154appHostProjectFile.FullName,
2258var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj"));
2260var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props"));
2264appHostProjectFile.FullName,
2281directoryPackagesPropsFile.FullName,
2370Assert.Equal(appHostProjectFile.FullName, packageUpdate.ProjectFile.FullName);
2373var directoryPackagesContent = await File.ReadAllTextAsync(directoryPackagesPropsFile.FullName);
2382var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2410var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2437var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2469var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2500var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
2528var projectFile = Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj");
Templating\DotNetTemplateFactoryTests.cs (17)
55var path = Path.Combine(dir.FullName, "nuget.config");
80var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
112var nugetConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
125var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
150var parentConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
156var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
169var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
192var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
206var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
219var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
223var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
236var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
245var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
246var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
257var outputDir = Directory.CreateDirectory(Path.Combine(workingDir.FullName, "MyProject"));
266var workingConfigPath = Path.Combine(workingDir.FullName, "nuget.config");
267var outputConfigPath = Path.Combine(outputDir.FullName, "nuget.config");
Utils\AppHostHelperTests.cs (13)
209var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
215var prefix = AppHostHelper.ComputeAuxiliarySocketPrefix(appHostPath, workspace.WorkspaceRoot.FullName);
228var sockets = AppHostHelper.FindMatchingSockets(appHostPath, workspace.WorkspaceRoot.FullName);
240var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
246var prefix = AppHostHelper.ComputeAuxiliarySocketPrefix(appHostPath, workspace.WorkspaceRoot.FullName);
257var sockets = AppHostHelper.FindMatchingSockets(appHostPath, workspace.WorkspaceRoot.FullName);
269var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
275var prefix = AppHostHelper.ComputeAuxiliarySocketPrefix(appHostPath, workspace.WorkspaceRoot.FullName);
282var sockets = AppHostHelper.FindMatchingSockets(appHostPath, workspace.WorkspaceRoot.FullName);
292var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
301var sockets = AppHostHelper.FindMatchingSockets(appHostPath, workspace.WorkspaceRoot.FullName);
310var backchannelsDir = Path.Combine(workspace.WorkspaceRoot.FullName, ".aspire", "cli", "backchannels");
316var prefix = AppHostHelper.ComputeAuxiliarySocketPrefix(appHostPath, workspace.WorkspaceRoot.FullName);
Utils\FileSystemHelperTests.cs (35)
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;");
24FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);
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");
54FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);
75var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "empty_destination");
78FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);
91var nonExistentSource = Path.Combine(workspace.WorkspaceRoot.FullName, "nonexistent");
92var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
104var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
120FileSystemHelper.CopyDirectory(sourceDir.FullName, null!));
128var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
144FileSystemHelper.CopyDirectory(sourceDir.FullName, string.Empty));
153var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
156var binaryFilePath = Path.Combine(sourceDir.FullName, "binary.dat");
162FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);
178var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
185File.WriteAllText(Path.Combine(current.FullName, $"file{i}.txt"), $"content at level {i}");
189FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir);
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");
225File.WriteAllText(Path.Combine(destSubDir.FullName, "project.assets.json"), "old assets");
226File.WriteAllText(Path.Combine(destSubDir.FullName, "project.csproj.nuget.dgspec.json"), "old dgspec");
229FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir, overwrite: true);
244var destDir = Path.Combine(workspace.WorkspaceRoot.FullName, "destination");
247File.WriteAllText(Path.Combine(sourceDir.FullName, "file1.txt"), "new content");
255FileSystemHelper.CopyDirectory(sourceDir.FullName, destDir, overwrite: false));
Aspire.Dashboard.Tests (6)
Aspire.Deployment.EndToEnd.Tests (8)
Aspire.EndToEnd.Tests (6)
Aspire.Hosting (9)
Aspire.Hosting.Azure (4)
Aspire.Hosting.Azure.Tests (23)
AzureEnvironmentResourceTests.cs (14)
21output.WriteLine($"Temp directory: {tempDir.FullName}");
22using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish, 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, tempDir.FullName);
71var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
85output.WriteLine($"Temp directory: {tempDir.FullName}");
87tempDir.FullName);
122var mainBicepPath = Path.Combine(tempDir.FullName, "main.bicep");
133output.WriteLine($"Temp directory: {tempDir.FullName}");
135tempDir.FullName);
170var mainBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "main.bicep"));
171var storageBicep = File.ReadAllText(Path.Combine(tempDir.FullName, "storage", "storage.bicep"));
Aspire.Hosting.Containers.Tests (3)
Aspire.Hosting.Docker.Tests (6)
Aspire.Hosting.JavaScript.Tests (1)
Aspire.Hosting.Kubernetes.Tests (5)
Aspire.Hosting.Maui.Tests (1)
Aspire.Hosting.MySql.Tests (1)
Aspire.Hosting.Nats.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)
csc (1)
dotnet-dev-certs (5)
dotnet-openapi (2)
dotnet-svcutil.xmlserializer (3)
dotnet-svcutil-lib (33)
CommandProcessorOptions.cs (10)
217await ProcessOutputFileOptionAsync(this.OutputDir.FullName, cancellationToken);
396Path.GetDirectoryName(this.OutputFile.FullName) : Path.GetDirectoryName(Path.Combine(Directory.GetCurrentDirectory(), this.OutputFile.OriginalPath()));
657if (this.Project != null && PathHelper.GetRelativePath(this.OutputDir.FullName, new DirectoryInfo(this.Project.DirectoryPath), out var relPath))
704var projectFullPath = Path.Combine(this.BootstrapPath.FullName, "TFMResolver", "TFMResolver.csproj");
742var inputFiles = Metadata.MetadataFileNameManager.ResolveFiles(metadataUri.LocalPath).Select(f => f.FullName);
853string projFolder = Path.Combine(this.BootstrapPath.FullName, nameof(SvcutilBootstrapper));
858assembly = Assembly.LoadFrom(assemblyFile.FullName);
1029if (!Directory.Exists(this.BootstrapPath.FullName))
1031Directory.CreateDirectory(this.BootstrapPath.FullName);
1035await 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.ShadowCopy.Tests (13)
IISExpress.FunctionalTests (14)
illink (4)
Microsoft.Agents.AI.ProjectTemplates.Tests (2)
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.Core.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Tests (5)
Microsoft.AspNetCore.Shared.Tests (5)
Microsoft.AspNetCore.TestHost (2)
Microsoft.AspNetCore.Tests (1)
Microsoft.Build.Tasks.CodeAnalysis (3)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (3)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Features (1)
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.Test.Utilities (6)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.Build.Tasks.Feed (5)
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 (2)
Microsoft.Extensions.ApiDescription.Tool.Tests (36)
Microsoft.Extensions.DataIngestion (6)
Microsoft.Extensions.DataIngestion.Abstractions (2)
Microsoft.Extensions.DataIngestion.Markdig (1)
Microsoft.Extensions.DataIngestion.MarkItDown (6)
Microsoft.Extensions.DataIngestion.Tests (11)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (7)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.FileSystemGlobbing (6)
Microsoft.Extensions.SecretManager.Tools.Tests (6)
Microsoft.Maui.Resizetizer (10)
Microsoft.McpServer.ProjectTemplates.Tests (2)
Microsoft.ML.AutoML (4)
Microsoft.ML.AutoML.Tests (1)
Microsoft.ML.Core.Tests (5)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.PerformanceTests (3)
Microsoft.ML.Samples (4)
Microsoft.ML.Samples.GPU (4)
Microsoft.ML.SamplesUtils (1)
Microsoft.ML.SearchSpace.Tests (2)
Microsoft.ML.TestFramework (7)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.VisualBasic.Core (6)
Microsoft.VisualBasic.Tests (3)
PresentationCore (1)
PresentationUI (1)
Replay (1)
RepoTasks (5)
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)
vbc (1)
VBCSCompiler (1)