Find and replace not working in cshtml file

Hi,

I am trying to replace a value in a group of CSHTML files, using the Find and Replace script.

Files:
#{Octopus.Action[Get Package].Output.Package.InstallationDirectoryPath}\Views\Shared_Layout*.cshtml
If I look in the logs, this is finding all of the files I want to update.

Pattern:

Substitution:

Options:
None

When I look in the logs, the Substitution value is correctly populated, but no entries are being found.

I am already using a similar script elsewhere, but with different values. This works OK and shows the number of entries found.

What am I doing wrong?

Thanks,

Karl

Hi Karl,

Thanks for reaching out! Could you please send us a deployment log following these instructions?

  1. Add these 2 variables to your project http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

  2. Create a new release (so the new variables take effect) and deploy it.

  3. Send us the raw log of that deployment http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Also please send us one of your CSHtml files with the variable on it so we can test on our end.

I’m setting this conversation as private so the information on your files can only be seen by you and our staff.

Thanks!

Dalmiro