Solution.AddAnalyzerReferences Method

Definition

Overloads

AddAnalyzerReferences(IEnumerable<AnalyzerReference>)

Create a new solution instance updated to include the specified analyzer references.

AddAnalyzerReferences(ProjectId, IEnumerable<AnalyzerReference>)

Create a new solution instance with the project specified updated to include the specified analyzer references.

AddAnalyzerReferences(IEnumerable<AnalyzerReference>)

Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs

Create a new solution instance updated to include the specified analyzer references.

public Microsoft.CodeAnalysis.Solution AddAnalyzerReferences (System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference> analyzerReferences);
member this.AddAnalyzerReferences : seq<Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference> -> Microsoft.CodeAnalysis.Solution
Public Function AddAnalyzerReferences (analyzerReferences As IEnumerable(Of AnalyzerReference)) As Solution

Parameters

analyzerReferences
IEnumerable<AnalyzerReference>

Returns

Exceptions

analyzerReferences contains null.

analyzerReferences contains duplicate items.

The solution already contains the specified reference.

Applies to

AddAnalyzerReferences(ProjectId, IEnumerable<AnalyzerReference>)

Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs
Source:
Solution.cs

Create a new solution instance with the project specified updated to include the specified analyzer references.

public:
 Microsoft::CodeAnalysis::Solution ^ AddAnalyzerReferences(Microsoft::CodeAnalysis::ProjectId ^ projectId, System::Collections::Generic::IEnumerable<Microsoft::CodeAnalysis::Diagnostics::AnalyzerReference ^> ^ analyzerReferences);
public Microsoft.CodeAnalysis.Solution AddAnalyzerReferences (Microsoft.CodeAnalysis.ProjectId projectId, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference> analyzerReferences);
member this.AddAnalyzerReferences : Microsoft.CodeAnalysis.ProjectId * seq<Microsoft.CodeAnalysis.Diagnostics.AnalyzerReference> -> Microsoft.CodeAnalysis.Solution
Public Function AddAnalyzerReferences (projectId As ProjectId, analyzerReferences As IEnumerable(Of AnalyzerReference)) As Solution

Parameters

projectId
ProjectId
analyzerReferences
IEnumerable<AnalyzerReference>

Returns

Exceptions

analyzerReferences contains null.

analyzerReferences contains duplicate items.

The project already contains the specified reference.

Applies to