I am using MSDeploy.exe to deploy a web app. One of the values that I am modifying is my Entity Framework (database first) connection string. When I use the following parameter:
-setParam:name="foo_container",value="metadata=res://*/foo.csdl | res://*/foo.ssdl | res://*/foo.msl;provider=System.Data.SqlClient;provider connection string="data source=localhost;initial catalog=foo;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework""
the web.config value is written as follows:
"metadata=res://*/foo.csdl | res://*/foo.ssdl | res://*/foo.msl;provider=System.Data.SqlClient;provider connection string="data source=localhost;initial catalog=foo;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework""
The & that is already part of an escaped sequence (") is getting escaped again when it is written out to the file: "
This causes an exception when running the web app as the connection string is not valid. Is there a way to tell MSDeploy that a parameter should be treated as a literal and not escaped? I have tried various escaping strategies with no luck.
thanks, Brian