81 references to ProjectReferences
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
286Assert.True(snapshot.GetProject(id1).ProjectReferences.Contains(reference), "ProjectReferences did not contain project2"); 325Assert.Equal(0, snapshot.GetProject(id1).ProjectReferences.Count());
Microsoft.CodeAnalysis.EditorFeatures (2)
Preview\AbstractPreviewFactoryService.cs (2)
229var oldProjectReferences = projectChanges.OldProject.ProjectReferences.ToDictionary(r => r.ProjectId); 230var newProjectReferences = projectChanges.NewProject.ProjectReferences.ToDictionary(r => r.ProjectId);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
Diagnostics\AbstractUserDiagnosticTest_GenerateTypeDialog.cs (1)
160Assert.True(triggeredProject.ProjectReferences.Any(pr => pr.ProjectId == testState.ProjectToBeModified.Id));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\AddImport\AddImportCrossLanguageTests.vb (2)
583Dim oldProjectReferences = From r In oldProject.ProjectReferences 588Dim newProjectReferences = From r In newProject.ProjectReferences
Microsoft.CodeAnalysis.Features (4)
AddImport\AbstractAddImportFeatureService.cs (1)
441viableProjects.RemoveAll(project.ProjectReferences.Select(r => solution.GetRequiredProject(r.ProjectId)));
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
82nonGlobalAliasedProjectReferencesSet.AddRange(currentProject.ProjectReferences.Where(pr => !HasGlobalAlias(pr.Aliases)).Select(pr => pr.ProjectId));
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
383if (!triggeringProject.ProjectReferences.Any(pr => pr.ProjectId == projectToBeUpdated.Id))
Rename\SymbolicRenameInfo.cs (1)
235if (solution.Projects.Any(p => p.IsSubmission && p.ProjectReferences.Any(r => r.ProjectId == projectIdOfLocation)))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
LineCommit\CommitBufferManager.vb (1)
299For Each reference In project.ProjectReferences
Microsoft.CodeAnalysis.Workspaces (10)
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
93foreach (var projectReference in project.ProjectReferences)
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
269return project.ProjectReferences.Any(p => p.ProjectId == symbolOrigination.sourceProject.Id);
Workspace\Solution\ProjectChanges.cs (4)
29var oldRefs = new HashSet<ProjectReference>(_oldProject.ProjectReferences); 30foreach (var reference in _newProject.ProjectReferences) 41var newRefs = new HashSet<ProjectReference>(_newProject.ProjectReferences); 42foreach (var reference in _oldProject.ProjectReferences)
Workspace\Workspace.cs (4)
1230if (!project.ProjectReferences.Contains(newProjRef)) 1762project.ProjectReferences, 2094if (!this.CurrentSolution.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference)) 2107if (this.CurrentSolution.GetProject(fromProjectId)!.ProjectReferences.Contains(projectReference))
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (25)
NetCoreTests.cs (6)
125var projectReference = Assert.Single(project.ProjectReferences); 172var projectReference = Assert.Single(project.ProjectReferences); 355var projectReference = Assert.Single(project.ProjectReferences); 397Assert.Empty(project.ProjectReferences); 427Assert.Empty(project.ProjectReferences); 492var projectReference = Assert.Single(project.ProjectReferences);
VisualStudioMSBuildWorkspaceTests.cs (19)
209Assert.True(projects[0].ProjectReferences.Any(r => r.ProjectId == projects[1].Id) || 210projects[1].ProjectReferences.Any(r => r.ProjectId == projects[0].Id)); 728Assert.Empty(project.ProjectReferences); 1213Assert.Empty(project.ProjectReferences); // no resolved project references 1242Assert.Empty(project.ProjectReferences); // no resolved project references 1275Assert.Empty(project.ProjectReferences); // no resolved project references 1313Assert.Empty(project.ProjectReferences); 1337Assert.Empty(project.ProjectReferences); 1360Assert.Empty(project.ProjectReferences); 1382var projRefs = project.ProjectReferences.ToList(); 1403var projRefs = project.ProjectReferences.ToList(); 1426Assert.Empty(vbProject.ProjectReferences); 1434Assert.Single(vbProject.ProjectReferences); 2437Assert.Empty(project.ProjectReferences); 2487Assert.InRange(project.ProjectReferences.Count(), 0, 1); 2929var pref = project.ProjectReferences.First(); 2933Assert.Empty(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences); 2940Assert.Single(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences); 3150Assert.Single(project.ProjectReferences);
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
SolutionTests\ProjectDependencyGraphTests.cs (5)
511var aToB = a.ProjectReferences.Single(reference => reference.ProjectId == b.Id); 539var aToB = a.ProjectReferences.Single(reference => reference.ProjectId == b.Id); 569var aToB = a.ProjectReferences.Single(reference => reference.ProjectId == b.Id); 618var firstBToC = b.ProjectReferences.First(reference => reference.ProjectId == c.Id); 623var remainingBToC = b.ProjectReferences.Single(reference => reference.ProjectId == c.Id);
SolutionTests\SolutionTests.cs (3)
1388Assert.Empty(newSolution1.GetProject(projectId)!.ProjectReferences); 1416AssertEx.Equal(new[] { projectRef2 }, solution3.GetProject(projectId)!.ProjectReferences); 2210foreach (var referenced in project.ProjectReferences)
WorkspaceTests\AdhocWorkspaceTests.cs (2)
145Assert.Equal(1, project2.ProjectReferences.Count()); 146Assert.Equal(id1, project2.ProjectReferences.First().ProjectId);
Microsoft.VisualStudio.LanguageServices (2)
ProjectSystem\VisualStudioWorkspaceImpl.AddProjectReferenceUndoUnit.cs (1)
36!fromProject.ProjectReferences.Any(p => p.ProjectId == _toProjectId))
ProjectSystem\VisualStudioWorkspaceImpl.RemoveProjectReferenceUndoUnit.cs (1)
34fromProject.ProjectReferences.Any(p => p.ProjectId == _toProjectId))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
Interactive\Commands\ResetInteractiveTests.cs (1)
146var projectReferences = project.ProjectReferences.SelectMany(p => GetProjectReferences(
ProjectSystemShim\CPS\CSharpReferencesTests.cs (1)
52.CurrentSolution.GetProject(project3.Id).ProjectReferences;
Microsoft.VisualStudio.LanguageServices.UnitTests (20)
ProjectSystemShim\VisualStudioProjectTests\MetadataToProjectReferenceConversionTests.vb (20)
32Assert.Single(getProject2().ProjectReferences) 39Assert.Empty(getProject2().ProjectReferences) 47Assert.Empty(getProject2().ProjectReferences) 69Assert.Single(getProject2().ProjectReferences) 76Assert.Empty(getProject2().ProjectReferences) 84Assert.Empty(getProject2().ProjectReferences) 104Assert.Equal(project1.Id, Assert.Single(getReferencingProject().ProjectReferences).ProjectId) 113Assert.Empty(getReferencingProject().ProjectReferences) 119Assert.Equal(project2.Id, Assert.Single(getReferencingProject().ProjectReferences).ProjectId) 140Assert.Equal(project1.Id, Assert.Single(getReferencingProject().ProjectReferences).ProjectId) 150Assert.Empty(getReferencingProject().ProjectReferences) 156Assert.Equal(project2.Id, Assert.Single(getReferencingProject().ProjectReferences).ProjectId) 206Assert.Equal("alias1", Assert.Single(Assert.Single(getReferencingProject().ProjectReferences).Aliases)) 210Assert.Equal(2, getReferencingProject().ProjectReferences.Count()) 215Assert.Equal("alias1", Assert.Single(Assert.Single(getReferencingProject().ProjectReferences).Aliases)) 219Assert.Empty(getReferencingProject().ProjectReferences) 250Assert.Single(getReferencingProject().ProjectReferences) 284Assert.Single(getReferencingProject().ProjectReferences) 302Assert.Single(getReferencingProject().ProjectReferences) 311Assert.Single(getReferencingProject().ProjectReferences)