Visual studio build task in Azure DevOps Build pipeline

Viewed 68

I am using Visual studio build task in my Azure DevOps Build pipeline. But my connection string was replaced into unexpected format.

In my Web.release.config, I have below lines

<connectionStrings>
    <add name="MyDB" connectionString="$(MyDB)"
              xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>

After File transform task execution, it changed to expected format as below.

<add name="MyDB" connectionString="$(MyDB)" providerName="System.Data.EntityClient" />

But after Visual studio build task, it was changed as below.

<add name="MyDB" 
connectionString="$(ReplacableToken_MyDB-Web.config Connection String_0)"
providerName="System.Data.EntityClient"/>

Do I need to give any specific arguments not to change web.config again?

0 Answers
Related