Hi All,
I have a problem with the latest update of Octopus. In some situations, we need to use empty variable value in Octopus for our environments deploy. This is asp.net application. When Octopus perform web.config variables replacement, he put enter value in a place where should be an empty string. Before the update to version 2018.7.8 problem never occurred.
web.config view
Thanks for getting in touch.
If I understand correctly when you do variable replacement on your Web.config file a variable that should be empty ends up with “Enter value”?
I’ve tried to reproduce but I get an empty value. The screenshot of your Web.config file looks correct to me, the variables substituted are False and empty.
I feel like I’m not understanding the issue, can you explain more about what is happening?
But at last, Octopus perform the transformation from Octopus.config to Web.config and result is:
That new line symbol between <value> </value> tags is readed by .net like new line, not empty value and it is a problem for us.
Maybe problem only occurred in Transform=“Replace” and it is the transformation engine problem?
Yes, the extra newlines are added by the transformation library we are using: Microsoft.XDT. It looks like a lot of people have run into the same issue.
I noticed that SetAttributes transformation doesn’t suffer from the same problem, would it be possible to use that instead? For example:
Unfortunately the defect has not been fixed. I have tried with the latest version (2.1.2) from NuGet and it still applies the special formatting: https://www.nuget.org/packages/Microsoft.Web.Xdt/.
I can’t think of a decent workaround other than to handle the extra newline in your application.