[Mono-dev] Invalid construct in DLR's MSBuild file?

Seo Sanghyeon sanxiyn at gmail.com
Wed Dec 10 05:39:35 EST 2008


Hello, now I am trying to use xbuild (open source implementation of
MSBuild language) to build IronPython, and the first error (after
instrumenting the source to make it clear what the error is) is this:

$ xbuild Microsoft.Scripting.ExtensionAttribute.csproj
XBuild Engine Version 0.1
Mono, Version 2.3.0.0
Copyright (C) Marek Sieradzki 2005. All rights reserved.
ConditionParser failed to parse  $(SilverlightBuild) != 'true'

Unhandled Exception:
Microsoft.Build.BuildEngine.InvalidProjectFileException: The requested
feature is not implemented. ---> System.NotImplementedException: The
requested feature is not implemented.
  at Microsoft.Build.BuildEngine.ConditionParser.ParseFactorExpression
() [0x00000]
  at Microsoft.Build.BuildEngine.ConditionParser.ParseRelationalExpression
() [0x00000]
  at Microsoft.Build.BuildEngine.ConditionParser.ParseBooleanOr () [0x00000]
  at Microsoft.Build.BuildEngine.ConditionParser.ParseBooleanAnd () [0x00000]
  at Microsoft.Build.BuildEngine.ConditionParser.ParseBooleanExpression
() [0x00000]
  at Microsoft.Build.BuildEngine.ConditionParser.ParseExpression () [0x00000]
  at Microsoft.Build.BuildEngine.ConditionParser.ParseCondition
(System.String condition) [0x00000]
  --- End of inner exception stack trace ---
  at Microsoft.Build.BuildEngine.Project.DoLoad (System.IO.TextReader
textReader) [0x00000]
  at Microsoft.Build.BuildEngine.Project.Load (System.String
projectFileName) [0x00000]
  at Mono.XBuild.CommandLine.MainClass.Execute () [0x00000]

According to MSDN, MSBuild Conditions
http://msdn.microsoft.com/en-us/library/7szfhaft.aspx conditions
should be of the form 'stringA' != 'stringB', where "single quotes are
not required for simple alphanumeric strings or boolean values". Is
$(SilverlightBuild) this case? If it isn't, shouldn't it be quoted as
'$(SilverlightBuild)'?

If I manually change this condition to be quoted (I also note, all
other uses of $(SilverlightBuild) is actually quoted in this file),
xbuild builds this assembly successfully.

Even if this is actually valid (then I argue documentation is
confusing), I think it would be a good idea to quote this anyway.

-- 
Seo Sanghyeon


More information about the Mono-devel-list mailing list