Within a PowerShell script we collect TFS Build information values and post to octopus variables. Currently we are having a problem with a variable value that contains the “#” symbol, which is a valid character within a TFS Build url:
http://tfs.Blah.net:8080/tfs/collection/Team%20Project/_build#_a=summary&buildUri=vstfs:///Build/Build/7864
When this acquired variable is used within a custom expression, all characters from and after the hash symbol are removed.
Example custom expression:
#{Octopus.Action[Get TFS Build Details].Output.BuildUrl}
Resulting output:
http://tfs.Blah.net:8080/tfs/collection/Team%20Project/_build
Expected output:
http://tfs.Blah.net:8080/tfs/collection/Team%20Project/_build#_a=summary&buildUri=vstfs:///Build/Build/7864
Question: How to escape the hash symbol when using it within a custom expression?