title: Visual Studio Team Services release XML transformation doesn't work
body: <p>Visual Studio Team Services - Build &amp; Release</p>
  
  <p>In the release definition, under File Transforms &amp; Variable Substitution Options, there are XML transformation, and XML variable substitution.</p>
  
  <p>I checked both checkboxes, but after deployment, nothing in my Web.Dev.config replaces web.config. The transformation doesn't happen at all.</p>
  
  <p>What is the problem?</p>
  
  <p>--------edit: detail---------</p>
  
  <p>build</p>
  
  <p>all the settings here is default.</p>
  
  <p><a href="https://i.stack.imgur.com/0Laap.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Laap.jpg" alt="enter image description here"></a></p>
  
  <p>release</p>
  
  <p><a href="https://i.stack.imgur.com/2pdnF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2pdnF.jpg" alt="enter image description here"></a></p>
  
  <p>web.dev.config</p>
  
  <p>This transformation works fine if I deploy from visual studio 2015.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
    &lt;connectionStrings&gt;
      &lt;add name="DefaultConnection" connectionString="Server=tcp:xxxx.database.windows.net,1433;Database=xxxx;User ID=xxx@xxx;Password=xxxx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"  providerName="System.Data.SqlClient" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/&gt;
      &lt;add name="NicoContext" connectionString="metadata=res://*/Nico.csdl|res://*/Nico.ssdl|res://*/Nico.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=tcp:xxxx.database.windows.net,1433;initial catalog=xxxx;User Id=xxxx@xxxx;Password=xxxx;App=EntityFramework&amp;quot;" providerName="System.Data.EntityClient" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/&gt;
    &lt;/connectionStrings&gt;
    &lt;system.web&gt;
      &lt;compilation xdt:Transform="RemoveAttributes(debug)" /&gt;
    &lt;/system.web&gt;
    &lt;appSettings&gt;
      &lt;add key="Environment" value="Dev" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/&gt;
      &lt;add key="AzureStorageContainerName" value="xxx" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" /&gt;
      &lt;add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxx;EndpointSuffix=core.windows.net"  xdt:Transform="SetAttributes" xdt:Locator="Match(key)" /&gt;
      &lt;add key="FacebookLoginAppId" value="xxx"   xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/&gt;
      &lt;add key="FacebookLoginAppSecret" value="xxx"   xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/&gt;
    &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/EbWl4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EbWl4.jpg" alt="enter image description here"></a></p>
  
  <p>--------edit 2: no longer work ---------</p>
  
  <p>I did as the solution suggested on a new project in another Azure account, but this time it didn't work. For build, I choose template "Asp.net (preview)", for release, I choose template "Azure App Service Deployment".</p>
  
  <p><a href="https://i.stack.imgur.com/RWSw1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RWSw1.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/ThuHF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ThuHF.jpg" alt="enter image description here"></a></p>
  
  <p>--------edit 3: Release - Package or folder  ---------</p>
  
  <p><a href="https://i.stack.imgur.com/DW8kt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DW8kt.jpg" alt="enter image description here"></a></p>