Search code examples
tfsmsbuildbuild-process

TFS build step WriteCustomSummaryInfo with Replace


How would I run "Replace" within WriteCustomSummaryInfo step.

I'm trying to display a link to an html report on the build summary:

  • Get drop location which I do:

    \tfsbuild03\temp\Dev-Deployment\Dev-Deployment_20160115.22

  • replace all \ with / and append report.html at the end

I assume this is the way to do it.

I've tried the following but it doesn't work:

String.Format("dotCover [Coverage Results]file:({0})/{1}", Replace(DropLocation,"\","/"), "report.html")

EDIT enter image description here


Solution

  • I figured it out. It's suppose to be this:

    String.Format("dotCover [Coverage Results]file:({0})/{1}", DropLocation.Replace("\", "/"), "report.html")