Direct using of the SBE-Scripts engine

If you want to work directly with engine, you should remember about protection of evaluation from used strings:

  • All elements inside quotes ("...", '...') will be automatically protected from evaluation.

If you work with standard options, you also should remeber this - Dynamic evaluation with both engines MSBuild & SBE-Scripts

What to do if really need evaluation

Use any convenient variants to avoid using inside quotes or use also the SBE-Scripts for using quotes.

For example, for C# Mode:

string type = $([System.String]::Format('"{0}";', #[Build type]))
#[var _type = "#[Build type]"]
...
string type = #[var _type];
  • With User-variables (MSBuild or SBE-Scripts):
$(q = '"')
.. .
string type = $(q)#[Build type]$(q);

and others..

As result for all above you should see, for example:

string type = "Rebuild";

New Components for SBE-Scripts core

References