3
My Web.config points to an external connectionString file.
<?xml version="1.0"?>
<configuration>
<connectionStrings configSource="connectionStrings.config"/>
</configuration>
So far no news. Problem is I use Web.Config File Transformation and my deployment process is on File System. I don’t use Web Deploy.
In the Publish screen I have the information that Database Publish is not supported in this Publish method. Summarizing does not work with File System.
To solve I thought of creating a connectionString file for testing, homologation and production. In my project then I would have a file connectionString.config, another one called connectionStringProducao.config, another connectionStringHomologacao.config and so on.
And change in Transformation as below:
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<connectionStrings configSource="connectionStringsProducao.config" xdt:Transform="Replace"/>
<system.web>
//...
</system.web>
</configuration>
I think it will work, but I think it’s a scam. Someone has a better solution?