我的Web.Config转换没有被发布 - 我认为这个错误与我得到的这些警告有关。这些Visual Studio警告是什么意思?
使用Visual Studio 2010,我正在玩我的Web.Config
/Web.Config.Debug
文件。
在我的.Debug
文件中,我收到以下警告列出了许多次。
No element in the source document matches '/configuration'
我认为它会列出它为每个部分存在于.Debug
文件。
因此,以下示例Web.Config.Debug文件..将列出两次。 (我猜,第一个是为<connectionStrings>..</>
,第二个是为<system.webServer>...</.>
)
<?xml version="1.0"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xdt:SupressWarnings="false">
<connectionStrings>
<add name="Foo" connectionString="Server=foo;Database=Foo;uid=foo;password=foo" providerName="System.Data.SqlClient"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="ETag" value="Dev_IIS" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
能
任何人的帮助,好吗?
我有同样的问题:http://stackoverflow.com/questions/12593671/why-wont-my-web-config-transforms-work – 2012-09-26 03:21:17