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
: $(foo.Contains('BAR')) syntax doesn't work for Condition="" clause
Status: NEW
Product: Tools
Classification: Mono
Component: xbuild
: unspecified
: PC All
: --- normal
: ---
Assigned To: Bugzilla
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-01-22 18:07 EST by Andres G. Aragoneses
Modified: 2013-05-17 16:49 EDT (History)
3 users (show)

See Also:
Tags:
Test Case URL:
External Submit: ---


Attachments

Description Andres G. Aragoneses 2012-01-22 18:07:33 EST
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 EST
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

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