Roslyn: no documents in opened project on Ubuntu

Viewed 261

I'm trying to work with C# projects via Roslyn. I do it like this:

solution = workspace.OpenSolutionAsync(solutionPath).Result;
foreach (var project in solution.Projects) {
    foreach (var document in project.Documents) {
        ...

Everything works fine on Windows 10, however on Ubuntu 16.10 every project that I open contains no Documents

project.HasDocuments == false

I have latest versions (2.3.0-beta) of all necessary dependencies: Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.CodeAnalysis.CSharp.Workspaces, Microsoft.CodeAnalysis.Common, Microsoft.CodeAnalysis.Workspaces.Common

Project .NET version is 4.6, Mono version is 5.0.1.1

When using .NET 4.5 and older versions of the dependencies I had the problem of empty solutions (no projects were detected). After updating to 4.6 and new dependencies' versions, the projects are found, but not documents in them.

Is there any way if not to fix the problem, then at least to make Roslyn fail loudly? Or maybe functionality that I want is somehow Windows-only?

P.S. I've seen a related question (Roslyn load project documents faililng), but solution from there doesn't work.

1 Answers
Related