phmonte / Buildalyzer

A utility to perform design-time builds of .NET projects without having to think too hard about it.
MIT License
606 stars 95 forks source link

Problem with loading project references #130

Closed cezarypiatek closed 7 months ago

cezarypiatek commented 4 years ago

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) ??

phmonte commented 7 months ago

I understand that the problem has been resolved, if not, please open a new issue.