Summary
Gets a Roslyn workspace for the analyzed project. Note that this will rebuild the project. Use an
AnalyzerResult
instead if you already have one available.
Syntax
public static AdhocWorkspace GetWorkspace(this ProjectAnalyzer analyzer, bool addProjectReferences = false)
Parameters
Name |
Type |
Description |
analyzer |
ProjectAnalyzer |
The Buildalyzer project analyzer. |
addProjectReferences |
bool |
true to add projects to the workspace for project references that exist in the same AnalyzerManager .
If true this will trigger (re)building all referenced projects. Directly add AnalyzerResult instances instead if you already have them available.
|
Return Value
Type |
Description |
AdhocWorkspace |
A Roslyn workspace. |