168 references to Name
AnalyzerRunner (4)
DiagnosticAnalyzerRunner.cs (4)
138Console.WriteLine($" {solution.GetProject(projectGroup.Key).Name}"); 154Console.WriteLine($"{project.Name} ({project.DocumentIds.Count} documents): {averageEditsInProject:0.00} edits per second"); 385WriteLine($"Running analyzers for {project.Name}", ConsoleColor.Gray); 402WriteLine($"Failed to analyze {project.Name} with {e.ToString()}", ConsoleColor.Red);
IdeCoreBenchmarks (2)
IncrementalSourceGeneratorBenchmarks.cs (2)
145var project = _workspace.CurrentSolution.Projects.Single(p => p.Name == "Microsoft.CodeAnalysis.Workspaces(netstandard2.0)"); 148Console.WriteLine("Getting compilation: " + project.Name);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (1)
22FixAllScope.Project => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_1, title, triggerProject.Name),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
115throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (17)
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (2)
3185var compilation = await workspace.CurrentSolution.Projects.First(p => p.Name == "P3").GetCompilationAsync(); 3190var p1 = workspace.CurrentSolution.Projects.First(p => p.Name == "P1");
Workspaces\WorkspaceTests_EditorFeatures.cs (15)
286var id1 = snapshot.Projects.First(p => p.Name == project1.Name).Id; 287var id2 = snapshot.Projects.First(p => p.Name == project2.Name).Id; 325var id1 = snapshot.Projects.First(p => p.Name == project1.Name).Id; 326var id2 = snapshot.Projects.First(p => p.Name == project2.Name).Id; 412var id1 = snapshot.Projects.First(p => p.Name == project1.Name).Id; 434var id1 = snapshot.Projects.First(p => p.Name == project1.Name).Id; 435var id2 = snapshot.Projects.First(p => p.Name == project2.Name).Id; 462var id1 = snapshot.Projects.First(p => p.Name == project1.Name).Id; 463var id2 = snapshot.Projects.First(p => p.Name == project2.Name).Id; 495var id1 = solutionY.Projects.First(p => p.Name == project1.Name).Id; 496var id2 = solutionY.Projects.First(p => p.Name == project2.Name).Id; 549var id1 = solutionY.Projects.First(p => p.Name == project1.Name).Id; 550var id2 = solutionY.Projects.First(p => p.Name == project2.Name).Id; 617var id1 = solutionY.Projects.First(p => p.Name == project1.Name).Id; 618var id2 = solutionY.Projects.First(p => p.Name == project2.Name).Id;
Microsoft.CodeAnalysis.EditorFeatures (11)
NavigationBar\NavigationBarController.cs (1)
249d.Project.Name,
Preview\AbstractPreviewFactoryService.cs (10)
160string.Format(EditorFeaturesResources.Adding_reference_0_to_1, metadataReference.Display, oldProject.Name))); 167string.Format(EditorFeaturesResources.Removing_reference_0_from_1, metadataReference.Display, oldProject.Name))); 174string.Format(EditorFeaturesResources.Adding_reference_0_to_1, newSolution.GetRequiredProject(projectReference.ProjectId).Name, oldProject.Name))); 181string.Format(EditorFeaturesResources.Removing_reference_0_from_1, oldSolution.GetRequiredProject(projectReference.ProjectId).Name, oldProject.Name))); 188string.Format(EditorFeaturesResources.Adding_analyzer_reference_0_to_1, analyzer.Display, oldProject.Name))); 195string.Format(EditorFeaturesResources.Removing_analyzer_reference_0_from_1, analyzer.Display, oldProject.Name))); 203string.Format(EditorFeaturesResources.Adding_project_0, project.Name))); 210string.Format(EditorFeaturesResources.Removing_project_0, project.Name))); 258document.Name, document.Project.Name); 330document.Name, document.Project.Name);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Diagnostics\GenerateType\GenerateTypeTestState.cs (1)
46ProjectToBeModified = Workspace.CurrentSolution.Projects.FirstOrDefault(proj => proj.Name.Equals(projectToBeModified));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
MetadataAsSource\MetadataAsSourceTests.cs (1)
1917Assert.Equal("mscorlib", openedDocument.Project.Name);
SymbolFinder\DependentTypeFinderTests.cs (14)
78var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 119var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 132=> solution.Projects.Single(p => p.Name == "PortableProject"); 135=> solution.Projects.Single(p => p.Name == "NormalProject"); 170var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 211var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 253var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 295var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 336var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 377var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 417var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync(); 740var portableProject1 = solution.Projects.Single(p => p.Name == "PortableProject1"); 754var compilation1 = await solution.Projects.Single(p => p.Name == "PortableProject1").GetCompilationAsync(); 755var compilation2 = await solution.Projects.Single(p => p.Name == "PortableProject2").GetCompilationAsync();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (5)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
210Assert.Equal(expectedProjectReferenceFrom, addedProjectReference.Item1.Name)
Diagnostics\AddImport\AddImportCrossLanguageTests.vb (2)
585Select p.Name 590Select p.Name
Diagnostics\DiagnosticServiceTests.vb (1)
2223Dim project = solution.Projects.Single(Function(p As Project) p.Name = "MainAssembly")
FindReferences\FindReferencesTests.vb (1)
478Return $"{document.Project.Name}: {document.FilePath}"
Microsoft.CodeAnalysis.Features (23)
AddImport\References\ProjectSymbolReference.cs (1)
95: string.Format(FeaturesResources.Add_reference_to_0, _project.Name);
AddPackage\InstallPackageDirectlyCodeActionOperation.cs (1)
53_projectsWithMatchingVersion.AddRange(otherProjects.Take(projectsToShow).Select(p => p.Name));
EditAndContinue\CommittedSolution.cs (2)
366using var debugInfoReaderProvider = GetMethodDebugInfoReader(compilationOutputsProvider(project), project.Name); 475using var debugInfoReaderProvider = GetMethodDebugInfoReader(compilationOutputs, document.Project.Name);
EditAndContinue\EditSession.cs (14)
167var messageArgs = new[] { newProject.Name, availability.LocalizedMessage }; 829log.Write("EnC state of {0} '{1}' queried: project not loaded", newProject.Name, newProject.FilePath); 851log.Write("Found {0} potentially changed document(s) in project {1} '{2}'", changedOrAddedDocuments.Count, newProject.Name, newProject.FilePath); 868log.Write("Emitting update of {0} '{1}': project not built", newProject.Name, newProject.FilePath); 915log.Write("Project summary for {0} '{1}': {2}", newProject.Name, newProject.FilePath, projectSummary); 993log.Write("Emitting update of '{0}' {1}", newProject.Name, newProject.FilePath); 1070newCompilation.AssemblyName ?? newProject.Name, // used for display in debugger diagnostics 1158newProject.Name, 1159PathUtilities.GetFileName(oldCompilationOutputs.AssemblyDisplayPath) ?? oldProject.Name + ".dll", 1165newProject.Name, 1166PathUtilities.GetFileName(oldCompilationOutputs.PdbDisplayPath) ?? oldProject.Name + ".pdb", 1171log.Write(sessionId, delta.ILDelta, newProject.Name, generation + ".il"); 1172log.Write(sessionId, delta.MetadataDelta, newProject.Name, generation + ".meta"); 1173log.Write(sessionId, delta.PdbDelta, newProject.Name, generation + ".pdb");
EditAndContinue\Utilities\Extensions.cs (1)
47log?.Write("Project '{0}' (id '{1}') doesn't support EnC: no file path", project.Name, project.Id);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (2)
440!object.Equals(oldProject.Name, newProject.Name) ||
NavigateTo\RoslynNavigateToItem.cs (1)
172return itemDocument.Project.Name;
Navigation\INavigableItem.cs (1)
93=> new(project.Name, project.Id);
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
887AssertEx.Equal([$"{document2.FilePath}: (5,0)-(5,32): Error ENC2016: {string.Format(FeaturesResources.EditAndContinueDisallowedByProject, document2.Project.Name, "*message*")}"], InspectDiagnostics(emitDiagnostics));
FindUsages\DefinitionItemFactoryTests.cs (1)
616var project = solution.Projects.Single(p => p.Name == "P1");
Microsoft.CodeAnalysis.LanguageServer (3)
LanguageServer\Handler\DebugConfiguration\WorkspaceDebugConfigurationHandler.cs (1)
58return project.Name;
Testing\RunTestsHandler.cs (2)
124Contract.ThrowIfNull(workingDirectory, $"Unable to get working directory for project {document.Project.Name}"); 127Contract.ThrowIfNull(projectFileName, $"Unable to get project file name for project {document.Project.Name}");
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Extensions\ProtocolConversions.cs (1)
818Label = project.Name,
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (1)
31public string ToDisplayString() => $"{this.GetType().Name}: {Document.FilePath ?? Document.Name} in {Document.Project.Name}";
Handler\Diagnostics\IDiagnosticProjectInformationService.cs (1)
39ProjectName = project.Name,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Diagnostics\PullDiagnosticTests.cs (1)
514Label = document.Project.Name
Symbols\WorkspaceSymbolsTests.cs (2)
250return string.Format(FeaturesResources.project_0, solution.Projects.Single().Name); 254return string.Format(FeaturesResources.in_0_project_1, containingSymbolName, solution.Projects.Single().Name);
Microsoft.CodeAnalysis.Workspaces (7)
Classification\SemanticClassificationCacheUtilities.cs (1)
23var projectKey = new ProjectKey(SolutionKey.ToSolutionKey(project.Solution), project.Id, project.FilePath, project.Name, Checksum.Null);
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (1)
202oldDocument.Project.Name,
Remote\RemoteArguments.cs (1)
116$"We should always be able to resolve a symbol back on the host side:\r\n'{project.Name}-{project.Language}'\r\n'{SymbolKeyData}'\r\n'{failureReason}'");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (1)
22FixAllScope.Project => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_1, title, triggerProject.Name),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
115throw new InvalidOperationException(string.Format(WorkspaceExtensionsResources.Compilation_is_required_to_accomplish_the_task_but_is_not_supported_by_project_0, project.Name));
Workspace\Solution\Project.cs (1)
831=> this.Name;
Workspace\Workspace.cs (1)
1535progressTracker.Report(CodeAnalysisProgress.Description(string.Format(WorkspacesResources.Applying_changes_to_0, projectChanges.NewProject.Name)));
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildWorkspace.cs (3)
344string.Format(WorkspaceMSBuildResources.Project_path_for_0_was_null, project.Name), 657_applyChangesProjectFile.AddProjectReferenceAsync(project.Name, reference, CancellationToken.None).Wait(); 670_applyChangesProjectFile.RemoveProjectReferenceAsync(project.Name, project.FilePath, CancellationToken.None).Wait();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (13)
NetCoreTests.cs (8)
243switch (project.Name) 258Assert.True(false, $"Unexpected project: {project.Name}"); 314var dotIndex = project.Name.IndexOf('.'); 316? project.Name[..dotIndex] 317: project.Name; 390Assert.StartsWith("csharplib", project.Name); 444Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net6)"); 445Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net5)");
VisualStudioMSBuildWorkspaceTests.cs (5)
2728var testProject = solution.Projects.FirstOrDefault(p => p.Name == "ReferenceTest"); 2732var libraryProject = solution.Projects.FirstOrDefault(p => p.Name == "Library1"); 2754var testProject = solution.Projects.FirstOrDefault(p => p.Name == "ReferenceTest"); 2758var library1Project = solution.Projects.FirstOrDefault(p => p.Name == "Library1"); 2762var library2Project = solution.Projects.FirstOrDefault(p => p.Name == "Library2");
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
WorkspaceExtensions.cs (1)
55=> solution.Projects.Where(p => string.Compare(p.Name, name, StringComparison.OrdinalIgnoreCase) == 0);
Workspaces\TestWorkspace`1.cs (1)
473base.OnProjectNameChanged(projectChanges.NewProject.Id, projectChanges.NewProject.Name, projectChanges.NewProject.FilePath);
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (2)
32Assert.Equal("TestProject", project.Name); 60Assert.Equal("TestProject", project.Name);
FindReferencesTests.cs (6)
386}", NetCoreApp.References, solution.Projects.Single(pid => pid.Name == "NetStandardProject").Id); 388var netCoreProject = solution.Projects.First(p => p.Name == "NetCoreProject"); 389var netStandardProject = solution.Projects.First(p => p.Name == "NetStandardProject"); 476", Net40.References.mscorlib, solution.Projects.Single(pid => pid.Name == "PortableProject").Id); 479var portableCompilation = await solution.Projects.Single(p => p.Name == "PortableProject").GetCompilationAsync(); 483var normalCompilation = await solution.Projects.Single(p => p.Name == "NormalProject").GetCompilationAsync();
SolutionTests\SolutionTests.cs (4)
2842Assert.Equal(project, solution.GetProjectsByName(project.Name).FirstOrDefault()); 5302solution = solution.RemoveProject(solution.Projects.Single(p => p.Name == "CS2").Id); 5308solution = solution.RemoveProject(solution.Projects.Single(p => p.Name == "NC1").Id); 5404var s4 = s2.RemoveProject(s2.Projects.Single(p => p.Name == "P1").Id);
WorkspaceTests\AdhocWorkspaceTests.cs (6)
38Assert.Equal(info.Name, project.Name); 50Assert.Equal("TestProject", project.Name); 100Assert.Equal(pinfo.Name, project.Name); 132Assert.Equal(info1.Name, project1.Name); 138Assert.Equal(info2.Name, project2.Name); 175Assert.Equal("NewProject", proj.Name);
Microsoft.VisualStudio.LanguageServices (19)
CallHierarchy\CallHierarchyItem.cs (1)
50ProjectName = project.Name;
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (1)
310var projectOrSolutionName = project?.Name ?? PathUtilities.GetFileName(solution.FilePath);
FindReferences\StreamingFindUsagesPresenter.cs (1)
283projectName ??= document.Project.Name;
GenerateType\GenerateTypeDialogViewModel.cs (1)
791return Project.Name;
LanguageServer\Handler\Diagnostics\VisualStudioDiagnosticProjectInformationService.cs (1)
29ProjectName = project.Name,
Library\ObjectBrowser\Extensions.cs (5)
66return project.Name; 78return project.Name; 88if (other.Name == project.Name) 124var result = project.Name;
Library\VsNavInfo\NavInfoFactory.cs (1)
176var result = project.Name;
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));
ProjectSystem\VisualStudioWorkspaceImpl.AddProjectReferenceUndoUnit.cs (1)
45var projectName = toProject?.Name ?? "";
ProjectSystem\VisualStudioWorkspaceImpl.RemoveProjectReferenceUndoUnit.cs (1)
45var projectName = toProject?.Name ?? "";
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (1)
226projectNameToProjectMap[p.Name] = p;
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
232name: project.Name,
UnusedReferences\Dialog\UnusedReferencesTableProvider.DataSource.cs (1)
38.Select(update => new UnusedReferencesEntry(solutionName, project.Name, project.Language, update))
Microsoft.VisualStudio.LanguageServices.LiveShare (2)
Client\RemoteLanguageServiceWorkspace.cs (1)
317var project = CurrentSolution.Projects.FirstOrDefault(p => p.Name == projectName && p.Language == language);
ProjectsHandler.cs (1)
45Name = project.Name,
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
143ProjectName = project.Name,
Roslyn.VisualStudio.Next.UnitTests (12)
Services\ServiceHubServicesTests.cs (4)
293projectId1 = solution.Projects.Single(p => p.Name == "Project0").Id; 294projectId2 = solution.Projects.Single(p => p.Name == "Project1").Id; 1636var project = solution.Projects.First(p => string.Equals(p.Name, projectName, StringComparison.OrdinalIgnoreCase)); 1644var project = solution.Projects.First(p => string.Equals(p.Name, projectName, StringComparison.OrdinalIgnoreCase));
Services\SolutionServiceTests.cs (8)
270Assert.Equal("Name" + version, project.Name); 605Assert.Equal(project1.Name, project1SyncedSolution.Projects.Single().Name); 636solution = project3.Solution.AddProjectReference(project3.Id, new(project3.Solution.Projects.Single(p => p.Name == "P2").Id)); 646Assert.Equal(project2.Name, project2SyncedSolution.Projects.Single().Name); 669solution = project3.Solution.AddProjectReference(project3.Id, new(project3.Solution.Projects.Single(p => p.Name == "P2").Id)); 686AssertEx.Equal(project2.Name, project2SyncedSolution.Projects.Single().Name); 693AssertEx.Equal(project1.Name, project1SyncedSolution.Projects.Single().Name); 800Assert.Equal(project1.Name, project1SyncedSolution.Projects.Single().Name);