MSBuild引擎为'$([MSBuild] :: Add($(OldRevision),1))'语句返回错误MSB4186.我在这里使用一个例子,但它对我不起作用:
error MSB4186: Invalid static method invocation syntax:
"[MSBuild]::Add($(OldRevision), 1)". Input string was not in a correct format.
Static method invocation should be of the form: $([FullTypeName]::Method()),
e.g. $([System.IO.Path]::Combine(`a`, `b`))
Run Code Online (Sandbox Code Playgroud)
这是我正在尝试执行的操作:
<CreateProperty Value="$([MSBuild]::Add($(OldRevision), 1))">
<Output
TaskParameter="Value"
PropertyName="NewRevision" />
</CreateProperty>
Run Code Online (Sandbox Code Playgroud)
我想知道它的正确语法是什么
ps是的,我正在使用MSBuild 4.5