<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://blog.aabech.no/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Lars-Erik's blog</title>
    <link>https://blog.aabech.no/</link>
    <description>Ramblings about Umbraco, .net and JavaScript development. With a sprinkle of other stuff.</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <item>
      <guid isPermaLink="false">1067</guid>
      <link>https://blog.aabech.no/archive/web-deploy-says-could-not-open-source-file-some-webconfig-when-you-publish-an-umbraco-site/</link>
      <title>Web Deploy says "Could not open Source file ... some web.config" when you publish an Umbraco site</title>
      <description>&lt;p&gt;We use Visual Studio and Web Deploy to deploy most of our sites manually.&lt;br /&gt;
Every now and then a project won't deploy claiming that it &amp;quot;Could not open Source file ... some web.config&amp;quot;.&lt;br /&gt;
Turns out this is actually a failed attempt at transforming connection strings in sublevel configurations files, that more often than not doesn't contain connection strings.&lt;br /&gt;
In our solutions, we mainly use the root web.config xsd transforms Visual Studio provides instead of having Web Deploy configure our connections.&lt;br /&gt;
So the feature that blocks the deployment is actually a feature we don't use. :)&lt;br /&gt;
But the feature can also be turned off. The way to go about it is to locate the relevant &lt;code&gt;.pubxml&lt;/code&gt; file under &lt;code&gt;/Properties/PublishProfiles&lt;/code&gt; in your project.&lt;br /&gt;
Somewhere in the &lt;code&gt;/Project/PropertyGroup&lt;/code&gt; element we need to add&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;AutoParameterizationWebConfigConnectionStrings&amp;gt;false&amp;lt;/AutoParameterizationWebConfigConnectionStrings&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I like to put it just before the &lt;code&gt;&amp;lt;PublishDatabaseSettings&amp;gt;&lt;/code&gt; element since they seem to be related.&lt;br /&gt;
Just to be on the safe side, I also tend to make sure all the &lt;code&gt;/PublishDatabaseSettings/Objects/ObjectGroup&lt;/code&gt; elements also has &lt;code&gt;Enabled=&amp;quot;False&amp;quot;&lt;/code&gt; even though I'm sure the first step already did the trick. Guess it's OCD rearing it's familiar face.&lt;/p&gt;
</description>
      <pubDate>Tue, 26 Apr 2016 18:50:38 Z</pubDate>
      <a10:updated>2016-04-26T18:50:38Z</a10:updated>
    </item>
  </channel>
</rss>