我正在使用 ASP.Net 表单应用程序运行 Visual Studio 2010。我正在尝试在构建时转换 XMl,但它不起作用。
在我的配置部分,我有以下内容:
<elmah>
<security allowRemoteAccess="yes" />
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionString="Data Source=TestServer;Initial Catalog=OnlineApplication;Trusted_Connection=True" />
<errorMail from="emhelp@server.edu" to="person@test.com" subject=" Exception" async="true" smtpserver="smtpgate.server.edu" />
当我通过 web.config.production xml 转换发布到生产环境时,我试图将其转换为 ELMAH 服务器名称。我对应用程序设置和连接字符串的所有其他设置都可以正常工作。我的 web.production.config 中有以下内容:
<add type="Elmah.SqlErrorLog, Elmah"
connectionString="Server=ProductionServer;Initial Catalog=OnlineApplication;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(type)"/>
</elmah>
它不会抱怨,但也不会改变文本。我需要更改什么才能在构建/发布时进行文件转换。