Bug 39353 - Every entry in the project file with Condition="Exists()" will fail to compile
Summary: Every entry in the project file with Condition="Exists()" will fail to compile
Status: NEW
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-03-04 08:43 UTC by diegoxleon
Modified: 2016-03-04 08:48 UTC (History)
2 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 for Bug 39353 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description diegoxleon 2016-03-04 08:43:10 UTC
Every entry in the project file with Condition="Exists()" will fail to compile.
An example: 

<Import Project="..\packages\refit.2.4.1\build\portable-net45+netcore45+wp8+wpa81+monoandroid+xamarin.ios10\refit.targets" Condition="Exists('..\packages\refit.2.4.1\build\portable-net45+netcore45+wp8+wpa81+monoandroid+xamarin.ios10\refit.targets')" />

And the error:

Error: Error building target AfterCompile: Microsoft.Build.BuildEngine.InvalidProjectFileException: Unable to parse condition "Exists(@(IntermediateAssembly))" : Expected an item list at position 8 in condition "Exists(@(IntermediateAssembly))". Missing opening parantheses after the '@'. ---> Microsoft.Build.BuildEngine.ExpressionParseException: Expected an item list at position 8 in condition "Exists(@(IntermediateAssembly))". Missing opening parantheses after the '@'.
  at Microsoft.Build.BuildEngine.ConditionParser.IsAtToken (TokenType type, System.String error_msg) <0x2ac2470 + 0x0009f> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseReferenceExpression (Char prefix) <0x2ac2000 + 0x00133> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseFactorExpression () <0x2a8bf48 + 0x001a7> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseFunctionArguments () <0x2abd168 + 0x000c7> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseFunctionExpression (System.String function_name) <0x2abd100 + 0x00013> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseFactorExpression () <0x2a8bf48 + 0x0008b> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseRelationalExpression () <0x2a8bcf0 + 0x00013> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseBooleanOr () <0x2a8bc40 + 0x00013> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseBooleanAnd () <0x2a8bb90 + 0x00013> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseBooleanExpression () <0x2a8bb68 + 0x00013> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseExpression () <0x2a8bb40 + 0x00013> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseCondition (System.String condition) <0x2a8a148 + 0x0003f> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.ConditionParser.ParseAndEvaluate (System.String condition, Microsoft.Build.BuildEngine.Project context) <0x2a870e8 + 0x0004f> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Microsoft.Build.BuildEngine.ConditionParser.ParseAndEvaluate (System.String condition, Microsoft.Build.BuildEngine.Project context) <0x2a870e8 + 0x00173> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.Target.BuildActual (System.String built_targets_key, System.Boolean& executeOnErrors) <0x2acc1c8 + 0x000bb> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.Target.Build (System.String built_targets_key, System.String parentTarget, System.Boolean& executeOnErrors) <0x2acbe10 + 0x001db> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.Target.BuildOtherTargets (IEnumerable`1 targetNames, System.Action`1 missing_target, System.Boolean& executeOnErrors) <0x2accbe8 + 0x000e3> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.Target.BuildAfterThisTargets (System.Boolean& executeOnErrors) <0x2ad1098 + 0x0002b> in <filename unknown>:0 
  at Microsoft.Build.BuildEngine.Target.BuildActual (System.String built_targets_key, System.Boolean& executeOnErrors) <0x2acc1c8 + 0x001eb> in <filename unknown>:0  (OneHour.Core)