-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build/assembly reference not found errors due to random sorting of the projects in the Workspace when loading projects from solution file #241
Comments
Was there supposed to be a log file or bug linked here? If so, I don't see it. Is the problem here that the build itself isn't correctly ordered? We just "shell out" to MSBuild or Or am I misunderstanding the problem? Is it that projects are being added into the Roslyn Workspace in an order where some are relying on references from others that haven't been added yet? If this is the case, how could we determine the "correct" order? Perhaps most importantly is whether there's a reproduceable example of this problem. It'll be hard for me to diagnose and verify a fix without one. |
Hi Dave, I encountered the issue on a private solution with multiple csproj files, and unfortunately cannot share the source code. I think that the issue was reported initially using the eShopOnContainers solution as specified in the referenced url. |
I think I'm starting to understand the issue after reading the link. I'll implement the fix identified in that thread and see if it helps. |
…spaces to be based on the Solution order, if there is a Solution (#241, eNeRGy164/LivingDocumentation#56)
Buildalyzer 6.0.2 is rolling out to NuGet now. Can you test it when you get the chance (you might need to reference the latest version explicitly in your project if you're getting it transitively through LivingDocumentation)? |
Trying the 6.0.2 did not fix the issue. Now the projects always come in the same order in the AdhocWorkspace, but it seems not to find namespaces in the build dependencies (as before). I believe the difference is made by the following:
When calling the AddToWorkspace with addProjectReferences=true, it seems to add results to the workspace, but also rebuilding and adding the referenced projects. |
Of course that's the one little bit I accidentally left out :). I added that flag and 6.0.3 is rolling out now. Hopefully that resolves it once and for all, do you mind checking one more time? |
6.0.3 tag seems to point to the same commit as 6.0.2: I imagine that 6.0.3 should be associated with a new commit corresponding to the change? |
Whops! I got carried away and published the release before committing the code. I publish locally so the 6.0.3 up on NuGet actually does have the change, I just need to update the tag. |
Thanks, it seems to be working fine with 6.0.3, I guess that parameter made a difference |
There seems to be a problem in the way the projects from a solution are loaded into the workspace.
When part of a solution, the projects might have dependencies and they will require a certain build order.
When getting the Workspace, it seems that the workspace is randomly building them.
As a result of this behaviour, there are assembly reference errors that appear in some of the projects' compilation as severity=error diagnostics.
Please have a look at the following bug for a detailed explanation and for some possible workarounds, including a method to returned a sorted Workspace (GetOrderedWorkspace)
The text was updated successfully, but these errors were encountered: