6
MSBuild引擎爲'$([MSBuild] :: Add($(OldRevision),1))'語句返回錯誤MSB4186。 我用一個例子來自here,但它不爲我工作:[MSBuild] ::添加調用返回錯誤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`))
這裏就是我試圖執行:
<CreateProperty Value="$([MSBuild]::Add($(OldRevision), 1))">
<Output
TaskParameter="Value"
PropertyName="NewRevision" />
</CreateProperty>
我不知道什麼是正確的塔語法它
ps是的,我正在使用MSBuild 4.5
我有同樣的問題。我認爲這與'$(OldRevision)'被視爲字符串對待有關。下面的代碼適用於我:' ',但不是當我用屬性替換2和3時。 –
vegemite4me