microsoft / BuildXL

Microsoft Build Accelerator
MIT License
917 stars 146 forks source link

Example MSBuild fails to build #1280

Closed jyoungman19111 closed 3 years ago

jyoungman19111 commented 3 years ago

[0:02.459] -- Done parsing MSBuild specs. C:\BuildXL-master\Examples\MsBuildHelloWorld\config.bc(3,9): error DX11410: An internal error occurred when computing the MsBuild graph. This shouldn't have happened! Tool standard error: 'Unexpected exception: System.MissingMethodException: Method not found: 'System.Collections.Generic.IReadOnlyDictionary2<Microsoft.Build.Graph.ProjectGraphNode,System.Collections.Immutable.ImmutableList1> Microsoft.Build.Graph.ProjectGraph.GetTargetLists(System.Collections.Generic.ICollection`1)'.

marcelolynch commented 3 years ago

Hi @jyoungman19111, thanks for calling this to our attention. Commit 6786c21501e4d5246b1bf7ee6ddfd8e0cf0028e3 fixes a known issue that was causing this error.

If you are still hitting it after updating the repo I recommend you specify the MSBuild path in the resolver configuration (refer to the example's README). The problem appeared when an older version of the System.Collections.Immutable library was loaded, which then conflicted with the version of the library that the latest MSBuild references to. Explicitly pointing to the MSBuild directory ensures that the DLL will be picked up from there and the versions will match.