|Summary:||Microsof.Build.BuildEngine Condition parser does not support the new embedded clr property functions.|
|Product:||[Mono] Class Libraries||Reporter:||jeremy|
|Component:||Ms.Build||Assignee:||Marek Safar <masafa>|
|Tags:||Is this bug a regression?:||---|
|Last known good build:|
|Attachments:||Hacky fix to the tokenizer and parser.|
Description jeremy 2014-06-16 19:37:17 UTC
Created attachment 7084 [details] Hacky fix to the tokenizer and parser. At least part of the problem is in the ConditionTokenizer and ConditionParser classes. I've attached a patch that rather hackily adds the tokenizer and parser support. I suspect a proper fix would probably entail merging the Expression and ConditionExpression parsing though. There is still an issue with the evaluation of the expressions in one of my builds that I haven't had a chance to figure out yet. That build is too big to upload here. If I can get a reproducible example that is small I'll upload it.
Comment 1 Marek Safar 2014-06-17 06:47:20 UTC
What condition syntax are you trying to fix?
Comment 2 jeremy 2014-06-17 10:17:40 UTC
An example syntax that fails: Condition="$([System.String]::new('%(ReferencePath.Filename)'). StartsWith('AutoMapper.'))" The embedded property syntax recently added works elsewhere just fine. But the Condition expressions have their own tokenization and parsing on top of the regular expression parsing. This is a part of the Automapper nuget packages .targets file.
Comment 3 Marek Safar 2014-06-19 11:29:17 UTC
Fixed in master