msbuild: Building solution with forced out-of-proc nodes fails
๐ Iโm not sure weโre going to be very motivated to fix this, but it cost me a lot of time debugging bootstrapped-build failures in #3365, so Iโm filing it.
Steps to reproduce
Build a solution using the MSBuild task
<Project>
<Target Name="BuildSln">
<MSBuild Projects="some.sln" BuildInParallel="true" />
</Target>
</Project>
While using MSBUILDNOINPROCNODE, this results in an error
S:\msbuild\some.sln(2,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 2, position 1.
Why?
Solution metaprojects are built based on an in-memory instance which isnโt transferable. See
So when forced to out-of-proc nodes, the solution build fails.
Environment data
msbuild /version output: 15.8.139-preview+g5951330944 for .NET Framework (also on Core)
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 15 (11 by maintainers)
Setting
MSBUILD_PROJECTINSTANCE_TRANSLATION_MODEtofullworks around this issue as it makes sure that the ProjectInstance is correctly moved to the out-of-proc node. And it looks like a lead to a reasonable fix as well.ProjectInstance.TranslateEntireStatereturn true for meta projects.