Solved a problem with a build script last week. I had somehow caused the build to under some conditions take a very long time to start with heavy disk IO. After reviewing some recent changes I found the cause.
I had a ItemGroup that looked something like the following.
<ItemGroup Condition="'$(PathProperty)'!=''"> <SomeItem Include="$(PathProperty)/**/*.dll"/> </ItemGroup> |
Apparently MsBuild evaluates all ItemGroups even if the condition of the group or item evaluates to false. The result is just discarded if the condition evaluates to false. So the item above included all dll files on the entire hard drive when PathProperty was not set. By trial and error I found out that the condition of Choose elements are evaluated before the items they contain.
So to speed things up I changed the above to the following.
<Choose> <When Condition="'$(PathProperty)'!=''"> <ItemGroup> <SomeItem Include="$(PathProperty)/**/*.dll"/> </ItemGroup> </When> </Choose> |
Is this behaviour obvious to everyone else? Couldn’t find anything about it while reading the conditions documentation nor the documentation on items and properties on MSDN.
Your article helped me a lot, is there any more related content? Thanks!
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Okay, bdkgbd88’s up next! The site seems legit, but like, the games are decent. Hopefully I can win some money there, haha, with some luck! Check bdkgbd88
VK333APK, you’re my go-to for some quick gaming fun! So easy to use and always has something new. Check it out here: vk333apk
KT999APP has seriously upped my mobile gaming game! The app is smooth, the games are fun, and the wins are real. Give KT999APP a try here: kt999app
Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.bh/register/person?ref=JW3W4Y3A
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://www.binance.com/register?ref=IXBIAFVY
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Your article helped me a lot, is there any more related content? Thanks! https://accounts.binance.bh/fr-AF/register?ref=JHQQKNKN