Bad XML transformation in generated web.config when I publish or deploy a package - by ShadoFil

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 777479 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/25/2013 1:57:50 AM
Access Restriction Public

Description

Hello,

I use several build configurations. The XML-translation works very well in Visual Studio for my web project. The web.config generated is good when I preview xml transformation in Visual Studio, but :
- there is no xml transformation when I publish the web project
- there is xml transformation when I build a deployment package, but with a bad xml transformation. I have $(ReplacableToken_xxx)" instead of the good value :

  <connectionStrings>
    <add name="DoryConnectionString"
         connectionString="$(ReplacableToken_DoryConnectionString-Web.config Connection String_0)"
         providerName="System.Data.SqlClient"/>
  </connectionStrings>

Here is my xml-transformation :

<connectionStrings>
    <add connectionString="Data Source=MyDB\BE,1433; Initial Catalog=MyDB;Integrated Security=SSPI" xdt:Transform="SetAttributes(connectionString)" xdt:Locator="Condition(@name='MyConnectionString')"/>
</connectionStrings>

Thank you for your help.
Sign in to post a comment.
Posted by Microsoft on 3/13/2013 at 9:40 PM
Hi ShadoFil, thanks for the report here. I have looked at this and the behavior you are seeing is by design. You can control this on a per-profile basis if you like. For more info see my blob post for more details at http://sedodream.com/2010/11/11/ASPNETWebApplicationPublishPackageTokenizingParameters.aspx.

Thanks,
Sayed Ibrahim Hashimi | http://msbuildbook.com/
Posted by Microsoft on 2/1/2013 at 1:57 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 1/25/2013 at 2:49 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)