302 references to GetProject
AnalyzerRunner (4)
DiagnosticAnalyzerRunner.cs (4)
45var project = solution.GetProject(projectId)!; 107var project = solution.GetProject(projectId); 138Console.WriteLine($" {solution.GetProject(projectGroup.Key).Name}"); 153var project = solution.GetProject(projectId);
Microsoft.Analyzers.Extra.Tests (2)
Resources\RoslynTestUtils.cs (2)
363var changedProj = solution.GetProject(proj.Id); 457var changedProj = solution.GetProject(proj.Id);
Microsoft.Analyzers.Local.Tests (2)
Resources\RoslynTestUtils.cs (2)
364var changedProj = solution.GetProject(proj.Id); 458var changedProj = solution.GetProject(proj.Id);
Microsoft.AspNetCore.Analyzer.Testing (3)
CodeFixRunner.cs (1)
36var updatedProject = updatedSolution.GetProject(document.Project.Id);
DiagnosticProject.cs (1)
83return solution.GetProject(testProject);
DiagnosticVerifier.cs (1)
184return Solution.GetProject(projectId);
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
167return solution.GetProject(projectId);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
167return solution.GetProject(projectId);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
40var project = solution.GetProject(projectId);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (34)
ExtractMethod\ExtractMethodTests.cs (1)
11215var project = solution.AddProject(projectId, "Project", "Project.dll", LanguageNames.CSharp).GetProject(projectId);
Formatting\CodeCleanupTests.cs (1)
813project = project.Solution.WithProjectFilePath(project.Id, @$"z:\\{project.FilePath}").GetProject(project.Id);
Workspaces\WorkspaceTests_EditorFeatures.cs (32)
289Assert.True(snapshot.GetProject(id1).ProjectReferences.Contains(reference), "ProjectReferences did not contain project2"); 328Assert.Equal(0, snapshot.GetProject(id1).ProjectReferences.Count()); 414var compilation = await snapshot.GetProject(id1).GetCompilationAsync(); 437var compilation2 = await snapshot.GetProject(id2).GetCompilationAsync(); 465var compilation2 = await snapshot.GetProject(id2).GetCompilationAsync(); 498var compilation2 = await solutionY.GetProject(id2).GetCompilationAsync(); 517var compilation2Z = await solutionZ.GetProject(id2).GetCompilationAsync(); 552var compilation2y = await solutionY.GetProject(id2).GetCompilationAsync(); 578var newVersion = await cs.GetProject(project1.Id).GetDependentSemanticVersionAsync(); 620var compilation2y = await solutionY.GetProject(id2).GetCompilationAsync(); 766Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 787Assert.Equal(0, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1243Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1244Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1253Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1254Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1255Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1279Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1280Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1289Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1290Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1291Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1312Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1313Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1319Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1320Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Count()); 1321Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1340Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1341Assert.Equal(2, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1347Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).Documents.Count()); 1348Assert.Equal(1, workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Count()); 1349Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
44AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp)).GetProject(projectId). 463AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp)).GetProject(projectId).
Microsoft.CodeAnalysis.EditorFeatures (4)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (2)
295var oldProject = args.OldSolution.GetProject(args.ProjectId); 296var newProject = args.NewSolution.GetProject(args.ProjectId);
SolutionEvents\HostLegacySolutionEventsWorkspaceEventListener.cs (2)
74var project = e.OldSolution.GetProject(projectId) ?? e.NewSolution.GetProject(projectId);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Diagnostics\GenerateType\GenerateTypeTestState.cs (2)
37TriggeredProject = Workspace.CurrentSolution.GetProject(_testDocument.Project.Id); 42ProjectToBeModified = Workspace.CurrentSolution.GetProject(_testDocument.Project.Id);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
MetadataAsSource\AbstractMetadataAsSourceTests.cs (1)
78.AddProject(projectId, "Metadata", "Metadata", LanguageNames.CSharp).GetProject(projectId)
MetadataAsSource\MetadataAsSourceTests.cs (2)
1727var project = context.CurrentSolution.AddProject(projectId, "ProjectB", "ProjectB", LanguageNames.CSharp).GetProject(projectId) 1741var project = context.CurrentSolution.AddProject(projectId, "ProjectB", "ProjectB", LanguageNames.VisualBasic).GetProject(projectId)
SymbolFinder\DependentTypeFinderTests.cs (1)
697normalProject1 = solution.GetProject(normalProject1.Id);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\DefinitionPeekableItem.cs (1)
71var project = solution.GetProject(_peekableItem._projectId);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Simplification\ParameterSimplificationTests.vb (1)
21.GetProject(projId)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
LanguageServices\FSharpVisualStudioWorkspaceExtensions.cs (1)
50return workspace.CurrentSolution.GetProject(projectId)?.FilePath;
Microsoft.CodeAnalysis.Features (16)
CodeFixes\Configuration\ConfigurationUpdater.cs (3)
243currentProject = solution.GetProject(project.Id)!; 255currentProject = solution.GetProject(project.Id)!; 307var project = currentSolution.GetProject(projectId);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (2)
77var currentProject = currentSolution.GetProject(oldProject.Id); 105var currentProject = currentSolution.GetProject(oldProject.Id);
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (1)
99var project = solution.GetProject(projectId);
EditAndContinue\CommittedSolution.cs (1)
122=> _solution.GetProject(id);
EditAndContinue\EditSession.cs (2)
296var oldProject = oldSolution.GetProject(newProject.Id); 311var newProject = newSolution.GetProject(oldProject.Id);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (4)
567var project = solution.GetProject(projectId); 615var project = solution.GetProject(projectId); 659var project = solution.GetProject(projectId); 670var project = solution.GetProject(documentId.ProjectId);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
226var otherProject = solution.GetProject(projectId);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
69var project = solution.GetProject(ProjectId.CreateFromSerialized(Guid.Parse(projectIdGuid), projectDebugName));
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
354var project = solution.GetProject(fileInfo.SourceProjectId);
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\EditSessionActiveStatementsTests.cs (3)
177var project = solution.GetProject(projectId); 227var analyzer = solution.GetProject(projectId).Services.GetRequiredService<IEditAndContinueAnalyzer>(); 685var analyzer = solution.GetProject(project.Id).Services.GetRequiredService<IEditAndContinueAnalyzer>();
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\SourceGeneratedDocumentUri.cs (1)
59var projectId = solution.GetProject(projectIdGuidOnly)?.Id;
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (1)
59var project = Solution.GetProject(ProjectId);
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\RemoteWorkspace.SolutionCreator.cs (2)
501project = addDocuments(project.Solution, lazyDocumentsToAdd.ToImmutable()).GetProject(project.Id)!; 518project = removeDocuments(project.Solution, lazyDocumentsToRemove.ToImmutable()).GetProject(project.Id)!;
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
LineCommit\CommitBufferManager.vb (1)
311Dim refProject = project.Solution.GetProject(reference.ProjectId)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
29AddProject(ProjectInfo.Create(pid, VersionStamp.Create(), "proj", "proj", LanguageNames.VisualBasic)).GetProject(pid).
Microsoft.CodeAnalysis.Workspaces (18)
Editing\SymbolEditor.cs (2)
150var project = solution.GetProject(projectId); 153var comp = await solution.GetProject(projectId).GetCompilationAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
99var referencedProject = project.Solution.GetProject(projectReference.ProjectId);
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
127var project = solution.GetProject(projectId);
Shared\Extensions\ISolutionExtensions.cs (1)
26var project = solution.GetProject(projectId)!;
Shared\Extensions\ProjectExtensions.cs (1)
17=> project.Solution.WithOptions(options).GetProject(project.Id)!;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
40var project = solution.GetProject(projectId);
Workspace\Solution\Solution.cs (9)
125public IEnumerable<Project> Projects => ProjectIds.Select(id => GetProject(id)!); 198=> GetProject(GetOriginatingProjectId(symbol)); 238=> GetProject(documentId?.ProjectId)?.GetDocument(documentId!); 245var project = GetProject(documentId?.ProjectId); 260var project = GetProject(documentId?.ProjectId); 277return this.GetProject(documentId.ProjectId)!.GetAdditionalDocument(documentId); 290return this.GetProject(documentId.ProjectId)!.GetAnalyzerConfigDocument(documentId); 298var project = GetProject(documentId.ProjectId); 350return this.AddProject(id, name, assemblyName, language).GetProject(id)!;
Workspace\Workspace.cs (1)
1425var project = solution.GetProject(pid)!;
Workspace\Workspace_SourceGeneration.cs (1)
121var requestedProject = solution.GetProject(projectId);
Microsoft.CodeAnalysis.Workspaces.MSBuild (4)
MSBuild\MSBuildWorkspace.cs (4)
261var projectResult = this.CurrentSolution.GetProject(projects[0].Id); 627var project = this.CurrentSolution.GetProject(projectId); 652var project = this.CurrentSolution.GetProject(projectReference.ProjectId); 667var project = this.CurrentSolution.GetProject(projectReference.ProjectId);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (11)
NetCoreTests.cs (4)
130Assert.Equal(libraryProject.FilePath, workspace.CurrentSolution.GetProject(projectRefId).FilePath); 176Assert.Equal(projectRefFilePath, project.Solution.GetProject(projectRefId).FilePath); 353var referencedProject = workspace.CurrentSolution.GetProject(projectReference.ProjectId); 520Assert.Equal(projectRefFilePath, project.Solution.GetProject(projectRefId).FilePath);
VisualStudioMSBuildWorkspaceTests.cs (7)
1445vbProject = workspace.CurrentSolution.GetProject(vbProject.Id); 2209var xaml = workspace.CurrentSolution.GetProject(csProjectId).AdditionalDocuments.FirstOrDefault(d => d.Name == "XamlFile.xaml"); 2946workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).RemoveAnalyzerReference(aref).Solution); 2967workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).RemoveProjectReference(pref).Solution); 2968Assert.Empty(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences); 2974workspace.TryApplyChanges(workspace.CurrentSolution.GetProject(project.Id).AddProjectReference(pref).Solution); 2975Assert.Single(workspace.CurrentSolution.GetProject(project.Id).ProjectReferences);
Microsoft.CodeAnalysis.Workspaces.UnitTests (118)
CodeCleanup\AddMissingTokensTests.cs (1)
2730var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\CodeCleanupTests.cs (1)
418var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\FixIncorrectTokenTests.cs (1)
755var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
1031var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CodeCleanup\ReduceTokenTests.cs (1)
2018var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
CommandLineProject\CommandLineProjectWorkspaceTests.cs (2)
30var project = ws.CurrentSolution.GetProject(info.Id); 58var project = ws.CurrentSolution.GetProject(info.Id);
FindAllDeclarationsTests.cs (4)
144var csharpResult = await SymbolFinder.FindDeclarationsAsync(solution.GetProject(csharpId), "Console", ignoreCase: false); 147var vbResult = await SymbolFinder.FindDeclarationsAsync(solution.GetProject(vbId), "Console", ignoreCase: true); 184var actualSymbol = (await SymbolFinder.FindDeclarationsAsync(solution.GetProject(submission1Id), "Inner", ignoreCase: false)).SingleOrDefault(); 185var expectedSymbol = (await solution.GetProject(submission0Id).GetCompilationAsync()).GlobalNamespace.GetMembers("Outer").SingleOrDefault().GetMembers("Inner").SingleOrDefault();
FindReferencesTests.cs (3)
177var prj = sln.GetProject(prj1Id).WithCompilationOptions(new VisualBasic.VisualBasicCompilationOptions(OutputKind.ConsoleApplication, embedVbCoreRuntime: true)); 216var prj = sln.GetProject(prj1Id).WithCompilationOptions(new VisualBasic.VisualBasicCompilationOptions(OutputKind.ConsoleApplication, embedVbCoreRuntime: true)); 280var prj = sln.GetProject(prj1Id).WithCompilationOptions(new CSharp.CSharpCompilationOptions(OutputKind.ConsoleApplication));
GeneratedCodeRecognitionTests.cs (1)
103.GetProject(projectId);
SemanticModelReuse\SemanticModelReuseTests.cs (1)
27var project = solution.AddProject(projectId, "Project", "Project.dll", language).GetProject(projectId);
SolutionTests\SolutionTests.cs (98)
336var project = solution.GetProject(projectId)!; 1445Assert.Equal(assemblyName, newSolution.GetProject(projectId)!.AssemblyName); 1922opt => opt.GetProject(projectId)!.AllProjectReferences, 1932Assert.Same(projectRefs, solution2.GetProject(projectId)!.AllProjectReferences); 1952Assert.Same(projectRefs, newSolution1.GetProject(projectId)!.AllProjectReferences); 1955Assert.Empty(newSolution1.GetProject(projectId)!.ProjectReferences); 1983AssertEx.Equal((ProjectReference[])[projectRef2], solution3.GetProject(projectId)!.ProjectReferences); 1984AssertEx.Equal((ProjectReference[])[projectRef2, externalProjectRef], solution3.GetProject(projectId)!.AllProjectReferences); 2016AssertEx.Equal((ProjectReference[])[projectRef2], solution2.GetProject(projectId)!.AllProjectReferences); 2020AssertEx.Equal((ProjectReference[])[externalProjectRef], solution3.GetProject(projectId)!.AllProjectReferences); 2023Assert.Empty(solution4.GetProject(projectId)!.AllProjectReferences); 2081opt => opt.GetProject(projectId)!.MetadataReferences, 2103AssertEx.Equal((MetadataReference[])[metadataRef1, metadataRef2], solution3.GetProject(projectId)!.MetadataReferences); 2126AssertEx.Equal((MetadataReference[])[metadataRef2], solution2.GetProject(projectId)!.MetadataReferences); 2129Assert.Empty(solution3.GetProject(projectId)!.MetadataReferences); 2151opt => opt.GetProject(projectId)!.AnalyzerReferences, 2173AssertEx.Equal((AnalyzerReference[])[analyzerRef1, analyzerRef2], solution3.GetProject(projectId)!.AnalyzerReferences); 2199AssertEx.Equal((AnalyzerReference[])[analyzerRef2], solution2.GetProject(projectId)!.AnalyzerReferences); 2202Assert.Empty(solution3.GetProject(projectId)!.AnalyzerReferences); 2534var project = solution.GetProject(pid); 2546var project = solution.GetProject(project1); 2575var project = solution.GetProject(pid); 2579Assert.Equal(project, solution.GetProject(pid)); 2595var project2 = solution.GetProject(pid2); 2644var project1 = solution.GetProject(projectId1); 2645var project2 = solution.GetProject(projectId2); 2740Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveDocuments(ImmutableArray.Create(documentInfo1.Id))); 2759Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAdditionalDocuments(ImmutableArray.Create(documentInfo1.Id))); 2778Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAnalyzerConfigDocuments(ImmutableArray.Create(documentInfo1.Id))); 2839Assert.Equal(project, solution.GetProject(project.Id)); 2934await solution.GetProject(projectIds[0]).GetCompilationAsync(CancellationToken.None); 2935await solution.GetProject(projectIds[2]).GetCompilationAsync(CancellationToken.None); 2949var assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference); 2956assemblyReference = (IAssemblySymbol)solution.GetProject(project1).GetCompilationAsync().Result.GetAssemblyOrModuleSymbol(mefReference); 3045var oldParseOptions = solution.GetProject(project1).ParseOptions; 3048var newUpdatedParseOptions = solution.GetProject(project1).ParseOptions; 3063var project = sol.GetProject(pid); 3093Assert.True(sol2.GetProject(pid2).AllProjectReferences.Any(r => r.ProjectId == pid), "sol2 project pid2 was expected to contain project reference " + pid); 3118Assert.True(sol2.GetProject(pid2).AllProjectReferences.Any(r => r.ProjectId == pid), "sol2 pid2 was expected to contain " + pid); 3480var proj = sol.GetProject(pid); 3731var observed = solution.GetProject(projectId).GetCompilationAsync().Result; 3756var observed = solution.GetProject(projectId).GetCompilationAsync().Result; 3971var project3 = solution.GetProject(pid3); 3979project3 = solution2.GetProject(pid3); 4241Assert.True(await frozenSolution.GetProject(project1.Id).HasSuccessfullyLoadedAsync(CancellationToken.None)); 4242Assert.True(await frozenSolution.GetProject(project2.Id).HasSuccessfullyLoadedAsync(CancellationToken.None)); 4566VersionStamp GetVersion() => solution.GetProject(pid).Version; 4567ImmutableArray<DocumentId> GetDocumentIds() => [.. solution.GetProject(pid).DocumentIds]; 4570return solution.GetProject(pid).GetCompilationAsync().Result.SyntaxTrees.ToImmutableArray(); 4680var originalCompilation = await solution.GetProject(projectId).GetCompilationAsync(); 4691var project = solution.GetProject(projectId); 4725var project = solution.GetProject(projectId); 4732project = solution.GetProject(projectId); 4766var project = solution.GetProject(projectId); 4779project = solution.GetProject(projectId); 4801var originalProvider = solution.GetProject(projectId).CompilationOptions.SyntaxTreeOptionsProvider; 4812var newProvider = solution.GetProject(projectId).CompilationOptions.SyntaxTreeOptionsProvider; 4817var finalProvider = solution.GetProject(projectId).CompilationOptions.SyntaxTreeOptionsProvider; 4843var originalCompilation = await solution.GetProject(projectId).GetCompilationAsync(); 4859var newCompilation = await solution.GetProject(projectId).GetCompilationAsync(); 4972var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 4973var compilation2 = await solution.GetProject(projectId2).GetCompilationAsync(); 4996Assert.True(solution.GetProject(projectId1).ProjectReferences.Contains(p => p.ProjectId == projectId2)); 4998var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 4999var compilation2 = await solution.GetProject(projectId2).GetCompilationAsync(); 5024Assert.True(solution.GetProject(projectId2).ProjectReferences.Contains(p => p.ProjectId == projectId1)); 5026var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 5027var compilation2 = await solution.GetProject(projectId2).GetCompilationAsync(); 5043var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 5055var compilation1New = await solution.GetProject(projectId1).GetCompilationAsync(); 5073var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 5086var compilation1New = await solution.GetProject(projectId1).GetCompilationAsync(); 5105var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 5118var compilation1New = await solution.GetProject(projectId1).GetCompilationAsync(); 5123var compilation2 = await solution.GetProject(projectId2).GetCompilationAsync(); 5124var compilation3 = await solution.GetProject(projectId2).GetCompilationAsync(); 5170var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 5171var compilation2 = await solution.GetProject(projectId2).GetCompilationAsync(); 5172var compilation3 = await solution.GetProject(projectId2).GetCompilationAsync(); 5215var compilation1 = await solution.GetProject(projectId1).GetCompilationAsync(); 5216var compilation2 = await solution.GetProject(projectId2).GetCompilationAsync(); 5217var compilation3 = await solution.GetProject(projectId2).GetCompilationAsync(); 5616project1 = project2.Solution.GetProject(project1.Id).AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5617project2 = project1.Solution.GetProject(project2.Id).AddDocument("Doc2", SourceText.From("class Doc2 { }")).Project; 5618project1 = project2.Solution.GetProject(project1.Id); 5624var frozenProject1 = frozenSolution.GetProject(project1.Id); 5627var frozenProject2 = frozenSolution.GetProject(project2.Id); 5644project1 = project2.Solution.GetProject(project1.Id).AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5645project2 = project1.Solution.GetProject(project2.Id).AddDocument("Doc2", SourceText.From("class Doc2 { }")).Project; 5648project1 = project2.Solution.GetProject(project1.Id); 5654var frozenProject1 = frozenSolution.GetProject(project1.Id); 5661var frozenProject2 = frozenSolution.GetProject(project2.Id); 5674project1 = project2.Solution.GetProject(project1.Id).AddDocument("Doc1", SourceText.From("class Doc1 { }")).Project; 5675project2 = project1.Solution.GetProject(project2.Id).AddDocument("Doc2", SourceText.From("class Doc2 { }")).Project; 5678project1 = project2.Solution.GetProject(project1.Id); 5684var frozenProject1 = frozenSolution.GetProject(project1.Id); 5691var frozenProject2 = frozenSolution.GetProject(project2.Id); 5715var forkedProject1 = frozenSolution.WithDocumentText(project1.Documents.Single().Id, SourceText.From("class Doc2 { }")).GetProject(project1.Id);
WorkspaceTests\AdhocWorkspaceTests.cs (3)
131var project1 = solution.GetProject(id1); 137var project2 = solution.GetProject(id2); 382var proj = pws.CurrentSolution.GetProject(projid);
WorkspaceTests\WorkspaceTests.cs (1)
144return this.CurrentSolution.GetProject(projectInfo.Id);
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
498var changedProj = solution.GetProject(proj.Id);
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
498var changedProj = solution.GetProject(proj.Id);
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
498var changedProj = solution.GetProject(proj.Id);
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
498var changedProj = solution.GetProject(proj.Id);
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
498var changedProj = solution.GetProject(proj.Id);
Microsoft.Interop.ComInterfaceGenerator (2)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
114return AddUnsafe(updatedSolution, updatedSolution.GetProject(docProjectId));
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
40.Select(solution.GetProject)
Microsoft.Interop.LibraryImportGenerator (2)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
114return AddUnsafe(updatedSolution, updatedSolution.GetProject(docProjectId));
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (1)
40.Select(solution.GetProject)
Microsoft.ML.CodeAnalyzer.Tests (3)
Code\BestFriendTest.cs (1)
71projectA = projectA.WithMetadataReferences(solution.GetProject(projectId).MetadataReferences);
Code\RelaxTestNamingTest.cs (1)
24var compilationOptions = solution.GetProject(projectId).CompilationOptions;
Helpers\CSharpCodeFixVerifier`2.cs (1)
72var parseOptions = (CSharpParseOptions)solution.GetProject(projectId).ParseOptions;
Microsoft.VisualStudio.LanguageServices (33)
CallHierarchy\Finders\AbstractCallFinder.cs (2)
94var project = workspace.CurrentSolution.GetProject(_projectId); 126var currentProject = project.Solution.GetProject(activeDocument.ProjectId);
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
101var project = _workspace.CurrentSolution.GetProject(projectId);
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
356return _workspace.CurrentSolution.GetProject(projectId);
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
472var project = solution.GetProject(projectId); 601var project = solution.GetProject(projectId);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (2)
185=> this.Workspace.CurrentSolution.GetProject(projectId); 480var project = this.Workspace.CurrentSolution.GetProject(symbolListItem.ProjectId);
Library\ObjectBrowser\ObjectList.cs (3)
677var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(symbolListItem.ProjectId); 751var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(symbolItem.ProjectId); 909var project = this.LibraryManager.Workspace.CurrentSolution.GetProject(projectListItem.ProjectId);
Library\ObjectBrowser\ObjectListItem.cs (1)
74var project = workspace.CurrentSolution.GetProject(ProjectId);
Packaging\PackageInstallerServiceFactory.cs (1)
546var project = solution.GetProject(projectId);
Preview\ReferenceChange.cs (3)
33var projectName = oldSolution.GetProject(projectId).Name; 49.Select(r => new ProjectReferenceChange(r, newSolution.GetProject(r.ProjectId).Name, projectId, projectName, isAdded: true, engine: engine)); 54.Select(r => new ProjectReferenceChange(r, oldSolution.GetProject(r.ProjectId).Name, projectId, projectName, isAdded: false, engine: engine));
Progression\GraphBuilder.cs (1)
123var project = _solution.GetProject(projectId);
ProjectSystem\VisualStudioWorkspaceImpl.AbstractAddDocumentUndoUnit.cs (1)
31var fromProject = currentSolution.GetProject(FromProjectId);
ProjectSystem\VisualStudioWorkspaceImpl.AbstractRemoveDocumentUndoUnit.cs (1)
33var fromProject = currentSolution.GetProject(FromProjectId);
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
32var fromProject = currentSolution.GetProject(FromProjectId);
ProjectSystem\VisualStudioWorkspaceImpl.AddProjectReferenceUndoUnit.cs (3)
29var fromProject = currentSolution.GetProject(FromProjectId); 30var toProject = currentSolution.GetProject(_toProjectId); 44var toProject = currentSolution.GetProject(_toProjectId);
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
930if (PathUtilities.GetDirectoryName(CurrentSolution.GetProject(documentInfo.Id.ProjectId)?.FilePath) == solutionDirectory)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveMetadataReferenceUndoUnit.cs (1)
31var fromProject = currentSolution.GetProject(FromProjectId);
ProjectSystem\VisualStudioWorkspaceImpl.RemoveProjectReferenceUndoUnit.cs (3)
29var fromProject = currentSolution.GetProject(FromProjectId); 30var toProject = currentSolution.GetProject(_toProjectId); 44var toProject = currentSolution.GetProject(_toProjectId);
TaskList\ExternalErrorDiagnosticUpdateSource.cs (2)
200var project = GetProjectIdentifier(solution.GetProject(projectId), projectHierarchyGuid); 362var project = Solution.GetProject(projectId);
TaskList\ProjectExternalErrorReporter.cs (1)
88var project = _workspace.CurrentSolution.GetProject(_projectId);
Venus\ContainedDocument.cs (1)
184foreach (var document in _workspace.CurrentSolution.GetProject(_project.Id).Documents)
Workspace\VisualStudioDocumentNavigationService.cs (1)
195var project = solution.GetProject(documentId.ProjectId);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Interactive\Commands\ResetInteractiveTests.cs (1)
145workspace.CurrentSolution.GetProject(p.ProjectId)));
Roslyn.VisualStudio.Next.UnitTests (16)
Services\ServiceHubServicesTests.cs (9)
1483var project = solution.GetProject(projectIds[i]); 1590Assert.Equal(projectStateShouldSame, object.ReferenceEquals(solution1.GetProject(currentProjectId).State, solution2.GetProject(currentProjectId).State)); 1594SetEqual(solution1.GetProject(currentProjectId).DocumentIds, solution2.GetProject(currentProjectId).DocumentIds); 1596var documentIdsInProject = solution1.GetProject(currentProjectId).DocumentIds; 1736var current = solution.GetProject(projectId); 1742var current = solution.GetProject(projectId); 1748var current = solution.GetProject(projectId);
Services\SolutionServiceTests.cs (6)
310var project = s.GetProject(existingProjectId); 835solution = solution.GetProject(project1.Id).AddDocument("X.cs", SourceText.From("// X")).Project.Solution; 836solution = solution.GetProject(project2.Id).AddDocument("Y.vb", SourceText.From("' Y")).Project.Solution; 890solution = solution.GetProject(project1.Id).AddDocument("X.cs", SourceText.From("// X")).Project.Solution; 891solution = solution.GetProject(project2.Id).AddDocument("Y.cs", SourceText.From("// Y")).Project.Solution; 892solution = solution.GetProject(project1.Id).AddProjectReference(new ProjectReference(project2.Id)).Solution;
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
229var project = solution.GetProject(projectId);
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Analyzers\Verifiers\CSharpIncrementalSourceGeneratorVerifier.cs (1)
20var compilationOptions = solution.GetProject(projectId)!.CompilationOptions;