4

I am getting the transformed web.config in the deployment package incorrectly transformed.

The result is as follows (notice how the connection string gets generated):

<connectionStrings>
    <add name="xxxConnectionStringNamexxx"
         connectionString="$(ReplacableToken_xxxConnectionStringNamexxx-Web.config Connection String_0)" providerName="System.Data.SqlClient" />
</connectionStrings>

Web.Config:

<connectionStrings>
    <add name="xxxConnectionStringNamexxx" 
         connectionString="Data Source=.\sqlexpress2005;Initial Catalog=xxxx;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>

Web.Release.config:

<connectionStrings>
    <add name="xxxConnectionStringNamexxx" connectionString="Data Source=.\sqlexpress2005;Initial Catalog=xxxx;Integrated Security=True" providerName="System.Data.SqlClient" xdt:Transform="SetAttributes(connectionString)" xdt:Locator="Match(name)"/>
</connectionStrings>

Any ideas? Thanks

DanC
  • 8,595
  • 9
  • 42
  • 64
  • 1
    Maybe it's something in the air - cause I'm having the same luck you are : http://stackoverflow.com/questions/3629850/replacabletoken-when-using-web-config-transform – sirrocco Sep 02 '10 at 18:07

1 Answers1

3

So benoit found an answer on the asp.net forums : ReplacableToken_ when using web.config transform? .

I deployed to a folder on my desktop and the web.config file was transformed correctly.

Community
  • 1
  • 1
sirrocco
  • 7,975
  • 4
  • 59
  • 81
  • Thanks, you've pointed me out in the right direction. I was manually extracting the files from the zip file that was generated to be deployed using the command line tool, which will in turn replace that token with the correct connection string. Thanks again. – DanC Sep 05 '10 at 21:01