MSBuild woes
MSBuild is so nearly perfect, but not quite. I've got a fantastic build process now, that does all kinds of useful things, but it has a strange quirk. Quite often, the build fails. The only input into the process is the contents of the SourceSafe database, so the assumption would be that someone checked in something evil. Not so. Running the build immediately afterwards, the build succeeds.
The cause is a copy task that copies all files built in release mode into a directory on the same machine. The issue seems to be the Include="@(Source)\**\bin\Release\*.*". Sometimes it selects everything, sometimes it selects nothing (and yes, I have checked that there are files there).
I've tried using the standard copy task, and the SDC copy task, and both randomly fail. I hope this is sorted out in Beta 2: I don't want to redo it all in NAnt.
The cause is a copy task that copies all files built in release mode into a directory on the same machine. The issue seems to be the Include="@(Source)\**\bin\Release\*.*". Sometimes it selects everything, sometimes it selects nothing (and yes, I have checked that there are files there).
I've tried using the standard copy task, and the SDC copy task, and both randomly fail. I hope this is sorted out in Beta 2: I don't want to redo it all in NAnt.
3 Comments:
Hi,
My name is Jomo Fisher and I’m a developer on the MSBuild team. We've only fixed a few minor bugs in the file matching code between Beta 1 and Beta 2 so I'm pretty curious about the intermittency problem you’re having--we'd definitely like to get to the bottom of this. Have you seen any pattern to the failure? Is it possible that @(Source) is populated differently between the runs? As an experiment, would you consider replacing @(Source) with its literal value and see if things become deterministic? You can contact me directly at MSBuild@Microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Jomo,
Thanks for your interest.
I haven't seen any pattern to the failure, which is the frustrating thing. @(Source) is defined as
<BuildDir Include="\Build" />
<Root Include="@(BuildDir)\Root" />
<Source Include="@(Root)\Source" />
so I can't see that it would change between runs. I use @(Source) in 12 other places, and they always work fine. I will try your suggestion of using the literal value though.
Many thanks.
Just tried the literal value, and it still fails.
Post a Comment