100 references to GetRequiredProject
Microsoft.CodeAnalysis.CSharp.Features (1)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (1)
44
var project = solution.
GetRequiredProject
(projectId);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
NavigateTo\OmniSharpNavigateToSearchService.cs (1)
43
var project = solution.
GetRequiredProject
(result.NavigableItem.Document.Project.Id);
Microsoft.CodeAnalysis.Features (37)
AddImport\AbstractAddImportFeatureService.cs (2)
469
viableProjects.RemoveAll(projectsThatTransitivelyDependOnThisProject.Select(solution.
GetRequiredProject
));
472
viableProjects.RemoveAll(project.ProjectReferences.Select(r => solution.
GetRequiredProject
(r.ProjectId)));
AddImport\CodeActions\MetadataSymbolReferenceCodeAction.cs (1)
29
var projectWithReference = project.Solution.
GetRequiredProject
(FixData.PortableExecutableReferenceProjectId);
AddMissingReference\AddMissingReferenceCodeAction.cs (1)
52
var candidateProject = project.Solution.
GetRequiredProject
(candidateProjectId);
CodeLens\CodeLensReferencesService.cs (1)
87
return await solution.
GetRequiredProject
(projectId).GetDependentVersionAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
272
var project = document.Project.Solution.
GetRequiredProject
(projectId);
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
96
var referencedProjects = graph.GetProjectsThatThisProjectTransitivelyDependsOn(currentProject.Id).Select(solution.
GetRequiredProject
).Where(p => p.SupportsCompilation);
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.SymbolComputer.cs (1)
163
return [.. relevantProjectIds.Select(project.Solution.
GetRequiredProject
).Where(p => p.SupportsCompilation)];
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
461
var allProjects = dependentProjects.Select<ProjectId, Project>(solution.
GetRequiredProject
)
DesignerAttribute\DesignerAttributeDiscoveryService.cs (2)
125
if (!solution.
GetRequiredProject
(priorityDocumentId.ProjectId).SupportsCompilation)
172
await ProcessProjectAsync(frozenSolution.
GetRequiredProject
(projectId), callback, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (1)
125
builder.Add(solution.
GetRequiredProject
(projectId));
EditAndContinue\CommittedSolution.cs (1)
133
=> _solution.
GetRequiredProject
(id);
EditAndContinue\DebuggingSession.cs (3)
627
_editSessionTelemetry.LogUpdatedBaseline(solution.
GetRequiredProject
(projectId).State.ProjectInfo.Attributes.TelemetryId);
682
SessionLog.Write($"Baselines discarded: {solution.
GetRequiredProject
(projectId).GetLogDisplay()}.");
746
var newProject = solution.
GetRequiredProject
(projectId);
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (1)
85
var newProject = newDocument?.Project ?? newSolution.
GetRequiredProject
(oldProject.Id);
EditAndContinue\ProjectDiagnostics.cs (1)
22
var project = solution.
GetRequiredProject
(projectId);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (7)
262
await EnqueueFullProjectWorkItemAsync(solution.
GetRequiredProject
(projectId), invocationReasons, processSourceGeneratedDocuments).ConfigureAwait(false);
272
var oldProject = oldSolution.
GetRequiredProject
(projectId);
273
var newProject = newSolution.
GetRequiredProject
(projectId);
282
() => EnqueueFullProjectWorkItemAsync(solution.
GetRequiredProject
(projectId), invocationReasons, processSourceGeneratedDocuments));
290
var project = solution.
GetRequiredProject
(documentId.ProjectId);
301
var oldProject = oldSolution.
GetRequiredProject
(documentId.ProjectId);
302
var newProject = newSolution.
GetRequiredProject
(documentId.ProjectId);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
187
await _processor.EnqueueWorkItemAsync(solution.
GetRequiredProject
(documentId.ProjectId), documentId, document: null).ConfigureAwait(false);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
448
var compilation = await finalSolution.
GetRequiredProject
(documentWithMemberAdded.Project.Id).GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (2)
248
var project = solution.
GetRequiredProject
(projectId);
370
var project = solution.
GetRequiredProject
(projectId);
NavigateTo\NavigateToSearcher.cs (1)
493
selector: id => _solution.
GetRequiredProject
(id)));
NavigateTo\RoslynNavigateToItem.cs (1)
158
var additionalProject = solution.
GetRequiredProject
(additionalProjectId);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
258
var navigateProject = metadataWorkspace.CurrentSolution.
GetRequiredProject
(projectId);
272
navigateProject = metadataWorkspace.CurrentSolution.
GetRequiredProject
(projectId);
Shared\Utilities\SupportedPlatformData.cs (1)
30
var projects = CandidateProjects.Select(Solution.
GetRequiredProject
).OrderBy(p => p.Name);
src\roslyn\src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (1)
81
var currentProject = currentSolution.
GetRequiredProject
(projectId);
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
419
var currentProject = currentSolution.
GetRequiredProject
(fieldDocument.Project.Id);
ValueTracking\ValueTrackingService.cs (1)
63
var project = solution.
GetRequiredProject
(previousTrackedItem.DocumentId.ProjectId);
Microsoft.CodeAnalysis.Workspaces (59)
CodeFixesAndRefactorings\DefaultFixAllProviderHelpers.cs (1)
83
.Select(solution.
GetRequiredProject
)
FindSymbols\FindReferences\DependentProjectsFinder.cs (2)
213
var project = solution.
GetRequiredProject
(projectId);
249
dependentProjects.Add((solution.
GetRequiredProject
(pId), hasInternalsAccess: true));
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
510
return [.. projectsThatCouldReferenceType.Intersect(allProjectsThatTheseProjectsDependOn).Select(solution.
GetRequiredProject
)];
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
140
var currentProject = _solution.
GetRequiredProject
(projectId);
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (1)
64
var currentProject = _solution.
GetRequiredProject
(projectId);
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (1)
61
var project = solution.
GetRequiredProject
(projectId);
Remote\RemoteArguments.cs (1)
103
var project = solution.
GetRequiredProject
(projectId);
Rename\ConflictEngine\ConflictResolver.cs (1)
147
foreach (var language in projectIds.Select(p => solution.
GetRequiredProject
(p).Language).Distinct())
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
348
var currentProject = conflictResolution.CurrentSolution.
GetRequiredProject
(projectId);
Rename\Renamer.RenameDocumentActionSet.cs (1)
140
var project = solution.
GetRequiredProject
(_documentId.ProjectId);
Rename\RenameUtilities.cs (2)
140
return projectIdsOfRenameSymbolDeclaration.SelectMany(p => solution.
GetRequiredProject
(p).Documents);
148
return relevantProjects.SelectMany(p => solution.
GetRequiredProject
(p).Documents);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
82
var project = solution.
GetRequiredProject
(documentId.ProjectId);
Workspace\ProjectSystem\ProjectSystemProject.cs (7)
367
s => s.WithProjectCompilationOutputInfo(Id, s.
GetRequiredProject
(Id).CompilationOutputInfo.WithAssemblyPath(value)));
379
s => s.WithProjectCompilationOutputInfo(Id, s.
GetRequiredProject
(Id).CompilationOutputInfo.WithGeneratedFilesOutputDirectory(value)));
567
var projectBeforeMutations = solutionChanges.Solution.
GetRequiredProject
(Id);
775
var project = solution.
GetRequiredProject
(projectId);
1168
return _projectSystemProjectFactory.Workspace.CurrentSolution.
GetRequiredProject
(Id).AllProjectReferences.Contains(projectReference);
1176
var projectReferencesInWorkspace = _projectSystemProjectFactory.Workspace.CurrentSolution.
GetRequiredProject
(Id).AllProjectReferences;
1247
var project = w.CurrentSolution.
GetRequiredProject
(Id);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
403
project = Workspace.CurrentSolution.
GetRequiredProject
(projectId);
Workspace\Solution\Project.cs (26)
583
=> this.Solution.WithProjectAssemblyName(this.Id, assemblyName).
GetRequiredProject
(Id);
589
=> this.Solution.WithProjectDefaultNamespace(this.Id, defaultNamespace).
GetRequiredProject
(Id);
592
=> Solution.WithProjectOutputFilePath(Id, path).
GetRequiredProject
(Id);
595
=> Solution.WithProjectOutputRefFilePath(Id, path).
GetRequiredProject
(Id);
598
=> Solution.WithProjectCompilationOutputInfo(Id, info).
GetRequiredProject
(Id);
604
=> this.Solution.WithProjectCompilationOptions(this.Id, options).
GetRequiredProject
(Id);
610
=> this.Solution.WithProjectParseOptions(this.Id, options).
GetRequiredProject
(Id);
617
=> this.Solution.AddProjectReference(this.Id, projectReference).
GetRequiredProject
(Id);
624
=> this.Solution.AddProjectReferences(this.Id, projectReferences).
GetRequiredProject
(Id);
630
=> this.Solution.RemoveProjectReference(this.Id, projectReference).
GetRequiredProject
(Id);
637
=> this.Solution.WithProjectReferences(this.Id, projectReferences).
GetRequiredProject
(Id);
644
=> this.Solution.AddMetadataReference(this.Id, metadataReference).
GetRequiredProject
(Id);
651
=> this.Solution.AddMetadataReferences(this.Id, metadataReferences).
GetRequiredProject
(Id);
657
=> this.Solution.RemoveMetadataReference(this.Id, metadataReference).
GetRequiredProject
(Id);
664
=> this.Solution.WithProjectMetadataReferences(this.Id, metadataReferences).
GetRequiredProject
(Id);
671
=> this.Solution.AddAnalyzerReference(this.Id, analyzerReference).
GetRequiredProject
(Id);
678
=> this.Solution.AddAnalyzerReferences(this.Id, analyzerReferences).
GetRequiredProject
(Id);
684
=> this.Solution.RemoveAnalyzerReference(this.Id, analyzerReference).
GetRequiredProject
(Id);
691
=> this.Solution.WithProjectAnalyzerReferences(this.Id, analyzerReferencs).
GetRequiredProject
(Id);
698
=> Solution.WithProjectAttributes(attributes).
GetRequiredProject
(Id);
764
return this.Solution.RemoveDocument(documentId).
GetRequiredProject
(Id);
774
return this.Solution.RemoveDocuments(documentIds).
GetRequiredProject
(this.Id);
783
=> this.Solution.RemoveAdditionalDocument(documentId).
GetRequiredProject
(Id);
792
return this.Solution.RemoveAdditionalDocuments(documentIds).
GetRequiredProject
(this.Id);
801
=> this.Solution.RemoveAnalyzerConfigDocument(documentId).
GetRequiredProject
(Id);
810
return this.Solution.RemoveAnalyzerConfigDocuments(documentIds).
GetRequiredProject
(this.Id);
Workspace\Solution\Solution.cs (2)
337
var generatedDocument = this.
GetRequiredProject
(documentState.Id.ProjectId).TryGetSourceGeneratedDocumentForAlreadyGeneratedId(documentState.Id);
1680
var newProject = newSolution.
GetRequiredProject
(newDocumentState.Id.ProjectId);
Workspace\Solution\SolutionChanges.cs (4)
31
yield return NewSolution.
GetRequiredProject
(id);
47
yield return NewSolution.
GetRequiredProject
(id).GetChanges(OldSolution.
GetRequiredProject
(id));
58
yield return OldSolution.
GetRequiredProject
(id);
Workspace\Workspace.cs (4)
829
oldSolution.
GetRequiredProject
(projectId),
830
oldSolution.RemoveProject(projectId).AddProject(reloadedProjectInfo).
GetRequiredProject
(projectId)).Solution;
2082
var oldProject = CurrentSolution.
GetRequiredProject
(projectId);
2100
var oldProject = CurrentSolution.
GetRequiredProject
(projectId);
Workspace\Workspace_Editor.cs (1)
895
return newSolution.
GetRequiredProject
(oldProject.Id);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
462
var project = this.CurrentSolution.
GetRequiredProject
(info.Id.ProjectId);
606
var relativePath = PathUtilities.GetRelativePath(Path.GetDirectoryName(CurrentSolution.
GetRequiredProject
(projectId).FilePath)!, peRef.FilePath);