- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
目前我正在尝试创建一个 Web 部署包。所以我在我的项目的根目录中添加了一个 parameters.xml 并指定了一些自定义参数。
我发现我的很多参数都部分相同。所以我想做某种参数引用。寻找这个,我来了 Reference for the Web Application Package .在那里它说如下:
Hidden - A Hidden parameter is not shown to the user as part of the installation UI. A Hidden parameter must have a defaultValue set. These parameters are used either to set a hard-coded default value or to set a computed default value. Hard-coded defaults are sometimes used when establishing a parameter for future use. Computed values are used to construct a parameter’s value from other parameters. When constructing computed values, you can refer to other parameters by putting the other parameter name surrounded by {}s in the place you want the value. Please refer to the "Connection String" parameter in the example for a common usage of this tag.
<parameters>
<parameter name="vdeHostname" description="Please provide the hostname" defaultValue="www.test.com">
<description culture="en">The hostname of the website.</description>
<parameterEntry kind="XmlFile"
scope="obj\\Release\\Package\\PackageTmp\\Configuration\\hosts\.config$"
match="/hostConfigurationSection/hostConfigurations/add[@name='Default']/@host" />
</parameter>
<parameter name="vdeDashboardAddress" defaultValue="https://{vdeHostname}/" tags="Hidden">
<description culture="en">The https address of the Dashboard.</description>
<parameterEntry kind="XmlFile"
scope="obj\\Release\\Package\\PackageTmp\\Configuration\\identity\.config$"
match="/system.identityModel/identityConfiguration[@name='Default']/audienceUris/add/@value" />
</parameter>
<parameters>
<audienceUris>
<add value="https://{vdeHostname}/" />
</audienceUris>
最佳答案
我不确定,但 scope
属性对我来说看起来很可疑。我面前的(工作)参数文件中的所有范围元素的形式都是 scope="\\Path\\To\\File\.extension$"
假定指定的路径从部署应用程序的根文件夹开始。 (例如,最常见的是 scope="\\Web\.config$"
。)我的工作文件中的所有范围属性都不包括路径的 Package\PackageTmp 部分,即使该路径存在于 WebDeploy 使用的 zip 文件中。
关于parameters - MsDeploy parameters.xml : howto refer a parameter?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23150728/
我是一名优秀的程序员,十分优秀!