Strange token in web.config after publishing

I had two projects that I had published to the web server many times from Visual Studio 2010.  I use web.config transformations to set my connection strings different based on which server I’m publishing too.

But while traveling I needed to make some edits using Visual Web Developer 2010 Express.  When I published from that, I started seeing that my connection strings were getting replaced with something like “$(Replaceable Token…)”  Huh?

After googling, the fix was easy.  I had to open my .csproj file and add:

<AutoParameterizationWebConfigConnectionStrings>False</AutoParameterizationWebConfigConnectionStrings>

in the <PropertyGroup> section near the top.  Not sure why I suddenly needed this, but it solved the problem!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s