TFS / Azure seamless integration and connection string in app.config

0

I have a project composed of two subprojects, one of these subprojects is a Class Library , responsible for the activities of connection to bank. I'm using Entity Framework as an ORM tool.

In the file app.config , I have the following connection string:

<connectionStrings>
        <add name="DB.Context" providerName="System.Data.SqlClient"
             connectionString="Integrated Security=SSPI;Initial Catalog=DB.Context;Data Source=(LocalDb)\v11.0;" />
    </connectionStrings>

Nothing too complex, just point to a local database.

However, at the time of deploying this application to production (through publishing from Azure versioning), I can not make this connection string update automatically to point to the production DB. I have the connection string set up on my dashboard:

How can I get the connection string present in the app.config to be updated during publishing from TFS in Azure?

    
asked by anonymous 22.09.2014 / 20:12

2 answers

1

James,

The app.config does not transform during the deploy-publishing process (there is a way to do this, just via Visual Studio, but it is not native to the VS2013 version).

Your ConnectioString settings should stay in the application, then in web.config.

This is one of the reasons that there is no transformation in its continuous implementation.

    
14.05.2015 / 21:07
1

This blog shows you a walkthrough for Web.config . How transformations apply to all project files if you have this Visual Studio extension has a good chance of working.

As I have not tested, I can not say 100%.

    
22.09.2014 / 20:42