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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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