Buildalyzer icon indicating copy to clipboard operation
Buildalyzer copied to clipboard

AnalyzerManager.GetWorkspace not retrieving Shared Projects

Open MS26 opened this issue 7 years ago • 2 comments

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: screen shot 2018-10-09 at 19 28 29

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

MS26 avatar Oct 09 '18 18:10 MS26

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.

daveaglick avatar Oct 09 '18 18:10 daveaglick

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

MS26 avatar Oct 09 '18 18:10 MS26