string manipulation function

Jun 18, 2009 at 8:01 PM

We are switching from NAnt/CruiseControl/VSS based build to msbuild/TemBuild/TFS. One of the challenges we are facing is converting some of the NAnt functions we were using, particularly the string manipulation functions.  Are their any msbuild string manipulation functions/tasks available anywhere. If somebody could point me to it, it'd be great help.

Coordinator
Jun 19, 2009 at 10:33 AM

Hi, take a look at the TextString class http://www.msbuildextensionpack.com/help/3.5.3.0/html/9c5401ed-6f55-089e-3918-2476c186ca66.htm

Also, the DynamicExecute task should handle anything that that doesn't. http://freetodev.spaces.live.com/blog/cns!EC3C8F2028D842D5!927.entry

Mike

Editor
Jun 23, 2009 at 3:12 PM

The DynamicExecute task currently does not work well with string arguments that have embedded semicolons. This is because all its argument inputs are ITaskItem[] properties, so MSBuild will split any strings by semicolons before DynamicExecute can get to them.

I've developed a fix that adds ScalarInputValue/ScalarInput1/etc as string properties. I spent some time trying to find a cleaner solution, but that's all I could come up with. (Suggestions are welcome!)

I expect to have it in scc tomorrow night (a lot of the docs need updating, since this changed some of the ways input parameters are converted).

       -Steve