80 references to AddAnalyzerReference
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Completion\CompletionServiceTests.cs (1)
207
.
AddAnalyzerReference
(analyzerReference)
Formatting\CodeCleanupTests.cs (1)
829
project = project.
AddAnalyzerReference
(new TestAnalyzerReferenceByLanguage(map));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (13)
CodeFixes\CodeFixServiceTests.cs (4)
57
var project = workspace.CurrentSolution.Projects.Single().
AddAnalyzerReference
(reference);
278
var project = workspace.CurrentSolution.Projects.Single().
AddAnalyzerReference
(reference);
365
var project = workspace.CurrentSolution.Projects.Single().
AddAnalyzerReference
(reference);
748
var project = workspace.CurrentSolution.Projects.Single().
AddAnalyzerReference
(reference);
CodeRefactorings\CodeRefactoringServiceTest.cs (3)
49
var project = workspace.CurrentSolution.Projects.Single().
AddAnalyzerReference
(reference);
168
.
AddAnalyzerReference
(reference)
207
.
AddAnalyzerReference
(reference)
Completion\CompletionServiceTests.cs (1)
43
var project = workspace.CurrentSolution.Projects.Single().
AddAnalyzerReference
(reference);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (5)
668
.Projects.Single().
AddAnalyzerReference
(analyzerReference).Solution);
704
.Projects.Single().
AddAnalyzerReference
(analyzerProjectReference).Solution);
793
.Projects.Single().
AddAnalyzerReference
(analyzerProjectReference).Solution);
837
project = project.
AddAnalyzerReference
(analyzerReference);
950
Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.Projects.Single().
AddAnalyzerReference
(new TestGeneratorReference(generator)).Solution));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Definitions\GoToDefinitionTests.cs (1)
367
var project = workspace.CurrentSolution.Projects.First().
AddAnalyzerReference
(new TestGeneratorReference(razorGenerator));
References\FindAllReferencesHandlerTests.cs (1)
377
var project = workspace.CurrentSolution.Projects.First().
AddAnalyzerReference
(new TestGeneratorReference(razorGenerator));
Rename\RenameTests.cs (3)
267
var project = workspace.CurrentSolution.Projects.First().
AddAnalyzerReference
(new TestGeneratorReference(razorGenerator));
316
var project = workspace.CurrentSolution.Projects.First().
AddAnalyzerReference
(new TestGeneratorReference(razorGenerator));
359
var project = workspace.CurrentSolution.Projects.First().
AddAnalyzerReference
(new TestGeneratorReference(razorGenerator));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
2929
workspace.TryApplyChanges(project.
AddAnalyzerReference
(aref).Solution);
Microsoft.CodeAnalysis.Workspaces.UnitTests (47)
SolutionTests\SolutionTests.cs (1)
5783
project1 = project1.
AddAnalyzerReference
(new TestGeneratorReference(new CallbackGenerator(() =>
SolutionTests\SolutionWithSourceGeneratorTests.cs (45)
49
.
AddAnalyzerReference
(analyzerReference);
89
.
AddAnalyzerReference
(analyzerReference1);
137
.
AddAnalyzerReference
(generatorReferenceToKeep);
181
.
AddAnalyzerReference
(analyzerReference)
253
.
AddAnalyzerReference
(analyzerReference)
293
.
AddAnalyzerReference
(analyzerReference);
337
.
AddAnalyzerReference
(analyzerReference)
365
.
AddAnalyzerReference
(analyzerReference)
405
project = project.
AddAnalyzerReference
(analyzerReference);
418
.
AddAnalyzerReference
(analyzerReference)
443
.
AddAnalyzerReference
(analyzerReference)
457
.
AddAnalyzerReference
(analyzerReference)
480
.
AddAnalyzerReference
(analyzerReference)
500
.
AddAnalyzerReference
(analyzerReference)
527
.
AddAnalyzerReference
(analyzerReference)
588
.
AddAnalyzerReference
(analyzerReference);
612
.
AddAnalyzerReference
(analyzerReference);
631
.
AddAnalyzerReference
(analyzerReference)
659
.
AddAnalyzerReference
(analyzerReference).Solution;
690
.
AddAnalyzerReference
(analyzerReference);
718
.
AddAnalyzerReference
(analyzerReference)
749
.
AddAnalyzerReference
(analyzerReference)
778
.
AddAnalyzerReference
(analyzerReference)
808
.
AddAnalyzerReference
(analyzerReference)
813
.
AddAnalyzerReference
(analyzerReference)
852
.
AddAnalyzerReference
(analyzerReference);
869
var project = AddEmptyProject(workspace.CurrentSolution).
AddAnalyzerReference
(analyzerReference);
902
var solution = AddEmptyProject(workspace.CurrentSolution).
AddAnalyzerReference
(analyzerReference).Solution;
904
var project2 = AddEmptyProject(solution, name: "TestProject2").
AddAnalyzerReference
(analyzerReference);
927
var project = AddEmptyProject(workspace.CurrentSolution).
AddAnalyzerReference
(analyzerReference);
950
var project1 = project0.
AddAnalyzerReference
(analyzerReference1);
966
var project3 = project2.
AddAnalyzerReference
(analyzerReference2);
984
.
AddAnalyzerReference
(analyzerReference)
1016
.
AddAnalyzerReference
(analyzerReference)
1047
.
AddAnalyzerReference
(analyzerReference)
1086
.
AddAnalyzerReference
(analyzerReference)
1114
.
AddAnalyzerReference
(analyzerReference)
1141
.
AddAnalyzerReference
(analyzerReference)
1169
.
AddAnalyzerReference
(analyzerReference)
1202
.
AddAnalyzerReference
(analyzerReference)
1203
.
AddAnalyzerReference
(analyzerReference2)
1256
var project = AddEmptyProject(workspace.CurrentSolution).
AddAnalyzerReference
(analyzerReference);
1291
var project = AddEmptyProject(workspace.CurrentSolution).
AddAnalyzerReference
(analyzerReference);
1328
var project = AddEmptyProject(workspace.CurrentSolution).
AddAnalyzerReference
(analyzerReference);
1359
var project = AddEmptyProject(workspace.CurrentSolution).
AddAnalyzerReference
(analyzerReference);
SolutionTests\SourceGeneratorTelemetryCollectorWorkspaceServiceTests.cs (1)
32
.
AddAnalyzerReference
(analyzerReference);
Roslyn.VisualStudio.Next.UnitTests (12)
Remote\SnapshotSerializationTests.cs (2)
59
.
AddAnalyzerReference
(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "path1"), new TestAnalyzerAssemblyLoader()))
507
project = project.
AddAnalyzerReference
(analyzer);
Services\ServiceHubServicesTests.cs (7)
453
.
AddAnalyzerReference
(analyzerReference);
776
.
AddAnalyzerReference
(analyzerReference);
1513
.
AddAnalyzerReference
(new TestGeneratorReference(generator1))
1514
.
AddAnalyzerReference
(new TestGeneratorReference(generator2));
1598
.
AddAnalyzerReference
(new TestGeneratorReference(generator1));
1677
.
AddAnalyzerReference
(new TestGeneratorReference(generator1));
2092
.
AddAnalyzerReference
(new AnalyzerFileReference(typeof(object).Assembly.Location, new TestAnalyzerAssemblyLoader()));
Services\SolutionServiceTests.cs (1)
502
.
AddAnalyzerReference
(new AnalyzerFileReference(typeof(Microsoft.CodeAnalysis.TestSourceGenerator.HelloWorldGenerator).Assembly.Location, new TestAnalyzerAssemblyLoader()))
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
196
var project = workspace.CurrentSolution.Projects.First().
AddAnalyzerReference
(analyzerReference);
229
project = project.
AddAnalyzerReference
(analyzerReference);