56 references to FilePath
dotnet-format (5)
Analyzers\AnalyzerFormatter.cs (1)
157: solution.Projects.Where(project => project.FilePath == options.WorkspaceFilePath);
CodeFormatter.cs (3)
184if (project?.FilePath is null) 190if (!string.IsNullOrEmpty(projectPath) && !project.FilePath.Equals(projectPath, StringComparison.OrdinalIgnoreCase)) 199logger.LogWarning(Resources.Could_not_format_0_Format_currently_supports_only_CSharp_and_Visual_Basic_projects, project.FilePath);
Logging\MSBuildIssueFormatter.cs (1)
9=> $"{document.FilePath ?? document.Name}({lineNumber},{charNumber}): {severity} {issueId}: {message} [{document.Project.FilePath}]";
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 75var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 75var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 75var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Api\HotReloadMSBuildWorkspace.cs (2)
76var oldProjectIdsByPath = oldSolution.Projects.ToDictionary(keySelector: static p => (p.FilePath!, p.Name), elementSelector: static p => p.Id); 180Debug.Assert(project?.FilePath != null);
Microsoft.CodeAnalysis.Features (15)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
308if (project?.FilePath?.StartsWith(analyzerConfigDirectory) == true)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (2)
49if (!string.IsNullOrEmpty(_project.FilePath)) 51var fullPath = Path.GetFullPath(_project.FilePath);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (2)
357!PathUtilities.PathsEqual(arg.solution.GetRequiredDocument(id).Project.FilePath!, arg.document.Project.FilePath!), (solution, document)))
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (1)
157var projectRoot = PathUtilities.GetDirectoryName(document.Project.FilePath);
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (1)
76Logger.Log(FunctionId.Diagnostics_ProjectDiagnostic, p => $"Failed to Load Successfully ({p.FilePath ?? p.Name})", project);
EditAndContinue\RunningProjectOptions.cs (2)
46if (project.FilePath == null) 54if (runningProjectsByPathAndTfm.TryGetValue((project.FilePath, project.State.NameAndFlavor.flavor), out var restartAutomatically))
EditAndContinue\TraceLog.cs (2)
64Debug.Assert(document.Project.FilePath != null); 66var projectDir = PathUtilities.GetDirectoryName(document.Project.FilePath)!;
EditAndContinue\Utilities\Extensions.cs (3)
77if (!PathUtilities.IsAbsolute(project.FilePath)) 96=> project.FilePath != null 97? $"'{project.FilePath}'" + (project.State.NameAndFlavor.flavor is { } flavor ? $" ('{flavor}')" : "")
UnusedReferences\UnusedReferencesRemover.cs (1)
32.Where(project => projectFilePath.Equals(project.FilePath, StringComparison.OrdinalIgnoreCase));
Microsoft.CodeAnalysis.Workspaces (8)
Classification\SemanticClassificationCacheUtilities.cs (1)
23var projectKey = new ProjectKey(SolutionKey.ToSolutionKey(project.Solution), project.Id, project.FilePath, project.Name, Checksum.Null);
Diagnostics\DiagnosticData.cs (1)
224location: new DiagnosticDataLocation(new FileLinePositionSpan(project.FilePath ?? project.Solution.FilePath ?? "", span: default)),
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
32=> "_Source_" + project.FilePath;
Log\WorkspaceStructureLogger.cs (3)
120projectElement.SetAttributeValue("path", SanitizePath(project.FilePath)); 131if (project.FilePath == null) 134var msbuildProject = XDocument.Load(project.FilePath, LoadOptions.None);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 75var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
MSBuild\MSBuildWorkspace.cs (7)
349var projectPath = project.FilePath; 477var fullPath = GetAbsolutePath(relativePath, Path.GetDirectoryName(project.FilePath)!); 606var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(CurrentSolution.GetRequiredProject(projectId).FilePath)!, peRef.FilePath); 662if (project?.FilePath is not null) 665var reference = new ProjectFileReference(project.FilePath, [.. projectReference.Aliases], referenceOutputAssembly: true); 677if (project?.FilePath is not null) 679_applyChangesProjectFile.RemoveProjectReferenceAsync(project.Name, project.FilePath, CancellationToken.None).Wait();
MSBuild\ProjectMap.cs (1)
77Add(project.Id, project.FilePath, project.OutputFilePath, project.OutputRefFilePath);
Microsoft.DotNet.HotReload.Watch (10)
HotReload\CompilationHandler.cs (10)
335if (project.FilePath == projectPath) 395builder.ProjectsToRebuild.AddRange(updates.ProjectsToRebuild.Select(id => currentSolution.GetProject(id)!.FilePath!)); 396builder.ProjectsToRedeploy.AddRange(updates.ProjectsToRedeploy.Select(id => currentSolution.GetProject(id)!.FilePath!)); 402builder.ProjectsToRestart.AddRange(await TerminatePeripheralProcessesAsync(updates.ProjectsToRestart.Select(e => currentSolution.GetProject(e.Key)!.FilePath!), cancellationToken)); 959if (project.FilePath == null || !runningProjects.TryGetValue(project.FilePath, out var projectsWithPath)) 988Debug.Assert(project.FilePath != null); 990if (!_projectInstances.TryGetValue(project.FilePath, out var instances)) 992throw new InvalidOperationException($"Project '{project.FilePath}' (id = '{project.Id}') not found in project graph"); 1044Logger.LogDebug(" Project: {Path}", project.FilePath);
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 75var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;