Is there any MSbuild task to check if a string contains another string (similar to string.contains)
Solution 1:
If you use MSBuild 4, you could use Property function
<Import Project="A.proj"
Condition="$(BuildDefinition.Contains('Dist Staging to Dev'))"/>
(More info on Property function)
Solution 2:
MSBuild4: As Julien said, in MSBUILD 4 is possible to user Property Function.
MSBuild 3.x: In previous versions is possible if you use Tigris MsBuild Tasks
You can use task RegexMatch and use a regular expression