I have been using Octopus Deploy more and more recently and it is quickly becoming my deployment tool of choice. If you haven’t heard about it, then I would highly recommend that you go and check it out now! Octopus Deply
One of the projects I have been working on uses the EntityFramework for data access, so there is a
System.Data.EntityClient connection string within the web.config. The EntityClient connection string differs from the standard SqlClient string in that it contains metadata along with the connection string. It also contains
" within this string.
Here lies the problem. If you want to replace the connection string using variables within Octopus deploy, then the connection string (by default) will not be replaced correctly. What ends up happening is that
" is replaced with
&quot; which results in a broken EntityClient!
Now this is by design within Octopus deploy and there is an argument whether this is actually a bug or a feature.
The solution to this is pretty simple actually. If you copy your EntityClient connection string, then paste into an Octopus deploy varaible, replace
". When Octopus replaces the connection string in the web.config it automatically translates
" back into