VS2010构建部署包web.release.config转换错误
我在部署包中错误地转换了转换后的 web.config。
结果如下(注意连接字符串是如何生成的):
<connectionStrings>
<add name="xxxConnectionStringNamexxx"
connectionString="$(ReplacableToken_xxxConnectionStringNamexxx-Web.config Connection String_0)" providerName="System.Data.SqlClient" />
</connectionStrings>
Web.Config:
<connectionStrings>
<add name="xxxConnectionStringNamexxx"
connectionString="Data Source=.\sqlexpress2005;Initial Catalog=xxxx;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
Web.Release.config:
<connectionStrings>
<add name="xxxConnectionStringNamexxx" connectionString="Data Source=.\sqlexpress2005;Initial Catalog=xxxx;Integrated Security=True" providerName="System.Data.SqlClient" xdt:Transform="SetAttributes(connectionString)" xdt:Locator="Match(name)"/>
</connectionStrings>
Any ideas? 谢谢
I am getting the transformed web.config in the deployment package incorrectly transformed.
The result is as follows (notice how the connection string gets generated):
<connectionStrings>
<add name="xxxConnectionStringNamexxx"
connectionString="$(ReplacableToken_xxxConnectionStringNamexxx-Web.config Connection String_0)" providerName="System.Data.SqlClient" />
</connectionStrings>
Web.Config:
<connectionStrings>
<add name="xxxConnectionStringNamexxx"
connectionString="Data Source=.\sqlexpress2005;Initial Catalog=xxxx;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
Web.Release.config:
<connectionStrings>
<add name="xxxConnectionStringNamexxx" connectionString="Data Source=.\sqlexpress2005;Initial Catalog=xxxx;Integrated Security=True" providerName="System.Data.SqlClient" xdt:Transform="SetAttributes(connectionString)" xdt:Locator="Match(name)"/>
</connectionStrings>
Any ideas?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,benoit 在 asp.net 论坛上找到了答案: ReplacableToken_ when using web.config conversion? 。
我部署到桌面上的一个文件夹,并且 web.config 文件已正确转换。
So benoit found an answer on the asp.net forums : ReplacableToken_ when using web.config transform? .
I deployed to a folder on my desktop and the web.config file was transformed correctly.