【发布时间】:2014-10-07 13:23:03
【问题描述】:
我们正在尝试通过 parameters.xml 将 ApplicationInsights 密钥推送到 ApplicationInsights.config。
该参数不适合所述文件。
我们构建了一个 webdeploy 包,然后发布到不同的环境。所有其他参数均适用于 web.config,并按预期工作。
parameters.xml中的入口:
<parameter name="InsightInstrumentationKey" description="InsightInstrumentationKey">
<parameterValidation kind="AllowEmpty" />
<parameterEntry kind="XmlFile"
scope="\\ApplicationInsights.config$"
match="/ApplicationInsights/InstrumentationKey/text()" />
</parameter>
ApplicationInsights.config 文件:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings" schemaVersion="2014-05-30">
<TelemetryChannel>
<DeveloperMode>false</DeveloperMode>
</TelemetryChannel>
<TelemetryModules>
[...]
</TelemetryModules>
<AccountId></AccountId>
<InstrumentationKey>HERE GOES THE PARAMETER</InstrumentationKey>
<ContextInitializers>
[...]
</ContextInitializers>
<TelemetryInitializers>
[...]
</TelemetryInitializers>
</ApplicationInsights>
我现在想知道是否有可能有一个与“web.config”不同的 scrope?
【问题讨论】: