dotnet/msbuild

Some projects are not associated with the MSBuild task that caused them to build

Closed this issue · 6 comments

In 16.6.1 I'm seeing a situation where projects are not parented under the MSBuild task that spawned them.

image

Repro:

  1. git clone https://github.com/xunit/xunit
  2. git checkout 2.4.1
  3. cd xunit\src\xunit.runner.utility
  4. msbuild /r /bl

#5013 has implemented that we pass the parent task ID to ProjectStarted.ParentProjectBuildEventArgs, but I'm seeing parent task id == -1.

This only happens for some projects; most projects work fine.

Apparently others have also run into the same build error here: xunit/xunit#1972

xunit/xunit#1819 is related as well.

OK I think I found the real root cause of the build issue: novotnyllc/MSBuildSdkExtras#127

I have a suspicion that this could happen in the "previously built successfully" situation.

This was much easier than expected. I just missed a case.