Buildalyzer icon indicating copy to clipboard operation
Buildalyzer copied to clipboard

Problem with loading project references

Open cezarypiatek opened this issue 5 years ago • 0 comments

Hi,

I would like to use Buildalyzer to load a project for roslyn analysis. I tried to load a project with the following code:

var manager = new AnalyzerManager(new AnalyzerManagerOptions()
{
	LogWriter = Console.Out,
	
});
var analyzer = manager.GetProject(options.ProjectPath);
using var workspace = analyzer.GetWorkspace();
var project = workspace.CurrentSolution.Projects.First();

However, references to other projects are not loaded so I can't get symbols for types defined in referenced projects. I tried also analyzer.GetWorkspace(true) but it's not working too. How can I load a project with a complete set of references (packages and projects) ??

cezarypiatek avatar Feb 26 '20 20:02 cezarypiatek