You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, assume that the project to which the object projAnalyzer is associated with has structure such as that of this project — from a Roslyn issue.
Then, the addition to the workspace triggers an InvalidOperationException. I imagine that Buildalyzer should check the presence of the project before adding it (due to transitive references).
The text was updated successfully, but these errors were encountered:
I'm having a little trouble understanding the issue here. Can you provide any more details about the InvalidOperationException generated in this case? Is it coming from Buildalyzer directly (and if so, where?) or from Roslyn?
What would really help is a reproducible Solution and Project file(s) so I can see exactly what's going on.
The InvalidOperationException is generated from MSBuild API, but it does so because Buildalyzer adds duplicate Projects to a Solution/Workspace.
You can reproduce this issue by creating .csproj files that map the organization I mentioned here, requesting their corresponding ProjectAnalyzers to build and passing true as the option to (automatically) include project references.
I just did some related work on transitive references in Roslyn workspaces in #181 which should hopefully help with the scenario here, but I still can't reproduce anything like the InvalidOperationException you describe. Any chance you could work up a small reproducible project with the latest version that exhibits this problem? This might be a good starting point: https://github.com/slang25/BuildalyzerBugRepro
Consider the following snippet.
Now, assume that the project to which the object
projAnalyzer
is associated with has structure such as that of this project — from a Roslyn issue.Then, the addition to the workspace triggers an
InvalidOperationException
. I imagine that Buildalyzer should check the presence of the project before adding it (due to transitive references).The text was updated successfully, but these errors were encountered: