@yaqiyang reported an issue in which $([MSBuild]::EnsureTrailingSlash('$(MyProp)') was not equivalent to <MyProp Condition=!HasTrailingSlash('$(MyProp)')>$(MyProp)</MyProp>
I don't know in which cases they're equivalent and in which cases they aren't, but it would be good to find out and ideally make them the same.
cc @cdmihai