Hi Alberto,
Please first download msbuild extension pack at
http://www.msbuildextensionpack.com/Importing its tasks, then use the following task:
<MSBuild.ExtensionPack.Framework.TextString TaskAction="Compare" Comparison="Contains" String1="$(DefineConstants)" String2="RETAIL" IgnoreCase="false">
<Output PropertyName="IsRetail" TaskParameter="Result"/>
</MSBuild.ExtensionPack.Framework.TextString>
<ItemGroup>
<Compile Include="FolderName\File.ext" Condition="$(IsRetail) == true" />
</ItemGroup>
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.