127 references to FilePath
GenerateDocumentationAndConfigFiles (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Metrics (2)
Program.cs (2)
343Console.WriteLine($" Computing code metrics for {Path.GetFileName(project.FilePath)}..."); 354builder.Add((project.FilePath!, metricData));
Metrics.Legacy (2)
src\RoslynAnalyzers\Tools\Metrics\Program.cs (2)
343Console.WriteLine($" Computing code metrics for {Path.GetFileName(project.FilePath)}..."); 354builder.Add((project.FilePath!, metricData));
Microsoft.CodeAnalysis.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\CodeCleanupTests.cs (1)
830project = project.Solution.WithProjectFilePath(project.Id, @$"z:\\{project.FilePath}").GetRequiredProject(project.Id);
Microsoft.CodeAnalysis.EditorFeatures (3)
EditAndContinue\EditAndContinueLanguageService.cs (1)
376return new ProjectInstanceId(project.FilePath!, project.State.NameAndFlavor.flavor ?? "");
EditorConfigSettings\Extensions\SolutionExtensions.cs (2)
44if (project.FilePath is null) 49var fileDirectoryInfo = new DirectoryInfo(project.FilePath);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (11)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (11)
221ProjectInstanceId = new DebuggerContracts.ProjectInstanceId(project.FilePath, "net9.0"), 232$"Error ENC1001: {project.FilePath}(0, 0, 0, 0): {string.Format(FeaturesResources.ErrorReadingFile, "proj", "error 2")}", 233$"Error ENC2012: {project.FilePath}(0, 0, 0, 0): {string.Format(FeaturesResources.EditAndContinueDisallowedByProject, "proj", "module error")}", 234$"Error ENC0033: {project.FilePath}(0, 0, 0, 0): {string.Format(FeaturesResources.Deleting_0_requires_restarting_the_application, "<deleted>")}", 237$"Error CS0005: {project.FilePath}(0, 0, 0, 0): Emit Error", 238$"Warning CS0004: {project.FilePath}(0, 0, 0, 0): Emit Warning", 244$"RestartRequired ENC1001: {project.FilePath}(0, 0, 0, 0): {string.Format(FeaturesResources.ErrorReadingFile, "proj", "error 2")}", 245$"RestartRequired ENC2012: {project.FilePath}(0, 0, 0, 0): {string.Format(FeaturesResources.EditAndContinueDisallowedByProject, "proj", "module error")}", 247$"RestartRequired ENC0033: {project.FilePath}(0, 0, 0, 0): {string.Format(FeaturesResources.Deleting_0_requires_restarting_the_application, "<deleted>")}", 250$"Error CS0005: {project.FilePath}(0, 0, 0, 0): Emit Error", 251$"Warning CS0004: {project.FilePath}(0, 0, 0, 0): Emit Warning",
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
SyncNamespaces\SyncNamespacesServiceTests.vb (3)
184Return Path.GetFileName(proj.FilePath) = "Test.csproj" 245Return Path.GetFileName(proj.FilePath) = "Test.csproj" 250Return Path.GetFileName(proj.FilePath) = "Test2.csproj"
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
LanguageServices\FSharpVisualStudioWorkspaceExtensions.cs (2)
44return workspace.CurrentSolution.Projects.FirstOrDefault(p => p.FilePath == filePath)?.Id ?? ProjectId.CreateNewId("ProjectNotFound"); 50return workspace.CurrentSolution.GetProject(projectId)?.FilePath;
Microsoft.CodeAnalysis.Features (16)
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\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (1)
75Logger.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)
46if (project.FilePath == null) 77=> project.FilePath != null 78? $"'{project.FilePath}'" + (project.State.NameAndFlavor.flavor is { } flavor ? $" ('{flavor}')" : "")
UnusedReferences\UnusedReferencesRemover.cs (1)
32.Where(project => projectFilePath.Equals(project.FilePath, StringComparison.OrdinalIgnoreCase));
Workspace\CompileTimeSolutionProvider.cs (1)
190var designTimeProjectDirectoryName = PathUtilities.GetDirectoryName(designTimeDocument.Project.FilePath)!;
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\Extensions.cs (1)
93? path : Path.Combine(Path.GetDirectoryName(solution.GetRequiredProject(projectId).FilePath!)!, path))
Microsoft.CodeAnalysis.LanguageServer (11)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (2)
66document.Project.FilePath is not null && await IsProjectLoadedAsync(document.Project.FilePath, cancellationToken);
LanguageServer\Handler\DebugConfiguration\WorkspaceDebugConfigurationHandler.cs (4)
36.Where(p => p.FilePath != null && p.OutputFilePath != null) 44return PathUtilities.IsSameDirectoryOrChildOf(project.FilePath!, workspacePath.GetRequiredParsedUri().LocalPath); 51return new ProjectDebugConfiguration(project.FilePath!, project.OutputFilePath!, GetProjectName(project), targetsDotnetCore, isExe, project.Solution.FilePath); 63var projectPath = project.FilePath!;
LanguageServer\Handler\Restore\RestorableProjectsHandler.cs (2)
40if (project.FilePath != null && projectTargetFrameworkManager.IsDotnetCoreProject(project.Id)) 42projects.Add(project.FilePath);
LanguageServer\Handler\Restore\RestoreHandler.cs (1)
123.Select(p => p.FilePath)
Testing\RunTestsHandler.cs (2)
124var workingDirectory = Path.GetDirectoryName(document.Project.FilePath); 127var projectFileName = Path.GetFileName(document.Project.FilePath);
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Extensions\Extensions.cs (3)
53Contract.ThrowIfNull(document.Project.FilePath); 55var projectDirectoryName = Path.GetDirectoryName(document.Project.FilePath); 192var projects = solution.Projects.Where(project => project.FilePath == projectIdentifier.DocumentUri.ParsedUri.LocalPath).ToImmutableArray();
Handler\CodeActions\CodeActionResolveHelper.cs (1)
245else if (newTextDoc.Project.FilePath != null)
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (2)
32=> !string.IsNullOrEmpty(Project.FilePath) 33? new VSTextDocumentIdentifier { ProjectContext = ProtocolConversions.ProjectToProjectContext(Project), DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(Project.FilePath) }
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
CodeActions\CodeActionResolveTests.cs (1)
302var newDocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(Path.Combine(Path.GetDirectoryName(project.FilePath)!, "ABC.cs"));
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (2)
34Assert.Equal(ProtocolConversions.CreateAbsoluteDocumentUri(testLspServer.GetCurrentSolution().Projects.First().FilePath!), results[1].Uri); 51Assert.Equal(ProtocolConversions.CreateAbsoluteDocumentUri(testLspServer.GetCurrentSolution().Projects.First().FilePath!), results[1].Uri);
FormatNewFile\FormatNewFileTests.cs (2)
67Contract.ThrowIfNull(project.FilePath); 73DocumentUri = ProtocolConversions.CreateAbsoluteDocumentUri(project.FilePath)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (1)
DeclarePublicApiFix.cs (1)
340if (uniqueProjectPaths.Add(project.FilePath ?? project.Name))
Microsoft.CodeAnalysis.Remote.Workspaces (1)
EditAndContinue\ManagedHotReloadLanguageService.cs (1)
297return new ProjectInstanceId(project.FilePath!, project.State.NameAndFlavor.flavor ?? "");
Microsoft.CodeAnalysis.Workspaces (5)
Classification\SemanticClassificationCacheUtilities.cs (1)
23var projectKey = new ProjectKey(SolutionKey.ToSolutionKey(project.Solution), project.Id, project.FilePath, project.Name, Checksum.Null);
Diagnostics\DiagnosticData.cs (1)
207location: new DiagnosticDataLocation(new FileLinePositionSpan(project.FilePath ?? project.Solution.FilePath ?? "", span: default)),
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
32=> "_Source_" + project.FilePath;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
MSBuild\MSBuildWorkspace.cs (7)
342var projectPath = project.FilePath; 470var fullPath = GetAbsolutePath(relativePath, Path.GetDirectoryName(project.FilePath)!); 599var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(CurrentSolution.GetRequiredProject(projectId).FilePath)!, peRef.FilePath); 655if (project?.FilePath is not null) 658var reference = new ProjectFileReference(project.FilePath, projectReference.Aliases, referenceOutputAssembly: true); 670if (project?.FilePath is not null) 672_applyChangesProjectFile.RemoveProjectReferenceAsync(project.Name, project.FilePath, CancellationToken.None).Wait();
MSBuild\ProjectMap.cs (1)
77Add(project.Id, project.FilePath, project.OutputFilePath, project.OutputRefFilePath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (14)
NetCoreTests.cs (9)
153Assert.Equal(libraryProject.FilePath, workspace.CurrentSolution.GetProject(projectRefId).FilePath); 199Assert.Equal(projectRefFilePath, project.Solution.GetProject(projectRefId).FilePath); 225projectPaths.Add(project.FilePath); 315projectPaths.Add(project.FilePath); 343var fileName = PathUtilities.GetFileName(project.FilePath); 358Assert.True(false, $"Encountered unexpected project: {project.FilePath}"); 371var projects = workspace.CurrentSolution.Projects.Where(p => p.FilePath.EndsWith("Project.csproj")); 541Assert.Equal(projectRefFilePath, project.Solution.GetProject(projectRefId).FilePath);
VisualStudioMSBuildWorkspaceTests.cs (5)
817var expectedOutputPath = Path.GetDirectoryName(project.FilePath); 835var expectedOutputPath = Path.Combine(Path.GetDirectoryName(project.FilePath), @"bin"); 2017var projectFileText = File.ReadAllText(project2.FilePath); 3201var project = solution.Projects.Single(p => p.FilePath.EndsWith("CSharpProject_ProjectReference.csproj")); 3294Assert.Equal("CSharpProject.csproj", Path.GetFileName(csharpProject.FilePath));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
Workspaces\TestWorkspace`1.cs (4)
452if (projectChanges.OldProject.FilePath != projectChanges.NewProject.FilePath) 457hostProject.OnProjectFilePathChanged(projectChanges.NewProject.FilePath); 458base.OnProjectNameChanged(projectChanges.NewProject.Id, projectChanges.NewProject.Name, projectChanges.NewProject.FilePath);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SolutionTests.cs (2)
1214Assert.Equal(newInfo.FilePath, newProject.FilePath); 1704s => s.GetRequiredProject(projectId).FilePath,
Microsoft.VisualStudio.LanguageServices (10)
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (2)
179static (otherProject, project) => otherProject.FilePath == project.FilePath && otherProject.State.NameAndFlavor.name == project.State.NameAndFlavor.name,
GenerateType\GenerateTypeDialogViewModel.cs (3)
252if (!TryGetImplicitFilePath(this.SelectedProject.FilePath ?? string.Empty, ServicesVSResources.Project_Path_is_illegal, out implicitFilePath)) 294if (this.SelectedProject.FilePath == null) 298else if (!TryGetImplicitFilePath(this.SelectedProject.FilePath, ServicesVSResources.Project_Path_is_illegal, out projectRootPath))
Library\ObjectBrowser\ObjectList.cs (1)
915data.bstrFile = project.FilePath;
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
899if (PathUtilities.GetDirectoryName(CurrentSolution.GetProject(documentInfo.Id.ProjectId)?.FilePath) == solutionDirectory)
SyncNamespaces\SyncNamespacesCommandHandler.cs (1)
120.Where(project => project.FilePath?.Equals(projectFilePath, StringComparison.OrdinalIgnoreCase) == true)
TaskList\ProjectExternalErrorReporter.cs (1)
102new FileLinePositionSpan(project.FilePath ?? "", span: default),
UnusedReferences\Dialog\UnusedReferencesTableProvider.DataSource.cs (1)
36var project = solution.Projects.First(project => projectFilePath.Equals(project.FilePath, StringComparison.OrdinalIgnoreCase));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\LegacyProject\SourceFileHandlingTests.cs (2)
66var projectFolder = Path.GetDirectoryName(environment.Workspace.CurrentSolution.Projects.Single().FilePath); 80var projectFolder = Path.GetDirectoryName(environment.Workspace.CurrentSolution.Projects.Single().FilePath);
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Extensions.cs (2)
34return document.Project.Solution.Projects.Single(p => p.SupportsCompilation && p.FilePath == document.Project.FilePath);
Roslyn.Diagnostics.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
271Assert.Equal("FilePath" + version, project.FilePath);
Text.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (2)
57var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 90var solutionOrProjectFilePath = project.Solution?.FilePath ?? project.FilePath;