This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 3010 - $(foo.Contains('BAR')) syntax doesn't work for Condition="" clause
Summary: $(foo.Contains('BAR')) syntax doesn't work for Condition="" clause
Status: RESOLVED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: xbuild (show other bugs)
Version: unspecified
Hardware: PC All
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-01-22 18:07 UTC by Andres G. Aragoneses
Modified: 2014-06-19 11:31 UTC (History)
4 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Andres G. Aragoneses 2012-01-22 18:07:33 UTC
I just tested this node in a .csproj file:

  <ItemGroup Condition="$(DefineConstants.Contains('DISABLE_FOO'))">
    <Reference Include="System.Data" />
  </ItemGroup>

And it works on MS.NET. For example, calling it with:

msbuild TestProject.csproj /p:DefineConstants=DISABLE_FOO


However when I try with xbuild, it throws:


Build started 1/22/2012 11:05:33 PM.
__________________________________________________
TestXBuild1.csproj: error : /home/andres121/Documents/code/TestXBuild/TestXBuild1/TestProject.csproj: Unable to parse condition "$(DefineConstants.Contains('DISABLE_FOO'))" : Expected a property at position 2 in condition "$(DefineConstants.Contains('DISABLE_FOO'))". Missing closing parantheses'.
Build FAILED.
Errors:

TestXBuild1.csproj: error : /home/andres121/Documents/code/TestXBuild/TestXBuild1/TestProject.csproj: Unable to parse condition "$(DefineConstants.Contains('DISABLE_FOO'))" : Expected a property at position 2 in condition "$(DefineConstants.Contains('DISABLE_FOO'))". Missing closing parantheses'.

	 0 Warning(s)
	 1 Error(s)
Comment 1 Andres G. Aragoneses 2012-02-01 07:36:07 UTC
After chatting with Ankit on IRC we agreed I would first look at creating a patch for supporting just the 'String Property Functions' chapter in this MSDN page: http://msdn.microsoft.com/en-us/library/dd633440.aspx
Comment 2 Marek Safar 2014-06-19 11:31:11 UTC
Fixed in master

Note You need to log in before you can comment on or make changes to this bug.