Buildalyzer
Buildalyzer copied to clipboard
AnalyzerManager.GetWorkspace not retrieving Shared Projects
Hi,
I am currently developing using .Net Core 2.1 and I am using Buildalyzer to generate a AdhocWorkspace so that I am able to browse a complete solution all of its projects and the documents within the projects.
The code I have written looks like:

Now as soon as one of the projects being iterated has a reference to a Shared Project the 'result' variable has errors saying that it could not find the namespace for classes within the Shared Project imported.
I am firstly wondering if I am doing anything wrong or whether or not his is an actual issue? If you need anything else let me know and I'll send it across.
Thanks Matt
TBH, shared projects isn't something I test for or even thought of. The big question is going to be how tightly coupled to Visual Studio they are. For example, does the .NET Core SDK ship targets that know how to deal with shared projects? The VS build tools must know something about them since you can build the solution after all. This will probably take some digging to figure out how to include shared projects correctly.
I know that using 'dotnet build' compiles the projects with the Shared Project classes correctly, I am unsure on how the internals of Buildalyzer works so will probably not be much help sorry