Reputation: 1
I am using msdeploy to sync IIS on remote machine. Till now I needed to replace default connection string with required one and I was able to use parameter.xml
"C:\program files\IIS\Microsoft Web Deploy V2\msdeploy.exe" -verb:sync -source:iisApp="$(BuildLocation)" -dest:iisApp="MySite",computerName=ServerName -setParamFile="MYSiteParameters.xml"
<parameter name = "Name" defaultValue="ConnectionString">
<parameterEntry kind="XmlFile" scope="Web\.config$" match="/configuration/connectionStrings/add[@name='Name']/@connectionString" />
</parameter>
This was successfully replacing the existing connection string.
Now I want to add another connection string, an extra one which is not available in source file. Is this possible with msdeploy?
Thanks.
Upvotes: 0
Views: 1248
Reputation: 44342
This is not possible with the parameterization which exists in MSDeploy today. You will need to create a placeholder connection string inside of your web.config so that you can parameterize the value for it.
Upvotes: 2