MSBuildComponent

Advanced evaluation with MSBuild engine.

[ v0.12.6+ ]

This is a very simple component (as a mediator) for immediate result from expression via MSBuild.

Syntax:

#[$(...)]

Samples:

#[$(name)]
#[$([System.String]::Format("v{0}/{1}", $(v), $(r)))]

Multiline support

[ v0.12.10+ ]

Now supports multiline definition of MSBuild data, for example:

$([MSBuild]::Add($(revDeltaMin), $([MSBuild]::Modulo($(revBuild), $([MSBuild]::Subtract($(revDeltaMax), $(revDeltaMin)))))))

you can format like this:

#[$(
    [MSBuild]::Add(
        $(revDeltaMin), 
        $([MSBuild]::Modulo(
            $(revBuild), 
            $([MSBuild]::Subtract(
                $(revDeltaMax), 
                $(revDeltaMin)
             ))
          ))
    )
)]

please note: the original MSBuild engine still does not support any newline symbols.

#[$(
    [System.Math]::Exp('$(
        [MSBuild]::Multiply(
            $([System.Math]::Log(10)), 
            4
        ))'
    )
)]
#[var revBuild  = #[$(
                    [System.TimeSpan]::FromTicks('$(
                        [MSBuild]::Subtract(
                        $(tNow), 
                        $(tBase))
                    )')
                    .TotalMinutes
                    .ToString('0'))]]

References