微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

msdeploy setParameters.xml,如何设置web物理文件位置

这个问题已经跳了一下,请原谅我,如果它是重复但我无法找到确切的答案.

我正在尝试为部署配置创建一个Parameters.xml,用于指定网站的目标物理文件文件夹.这适用于使用TeamCity的自动构建,例如命令行使用.deploy.cmd.

有人可以解释我需要做什么吗?

的parameters.xml:

<parameter name="physicalPathLocation" description="Physical path where files for this Web service will be deployed." defaultValue="\" tags="PhysicalPath">
    <parameterEntry kind="DestinationVirtualDirectory" scope="Default\ Web\ Site/iag\.application\.services\.exampleservice/" match="" />
</parameter>

并在SetParameters.xml中

<setParameter name="physicalPathLocation" value="C:\MyFolder\MySite" />

我怀疑我的问题在于我如何宣布范围但不确定需要做什么.

解决方法

假设认网站/ iag.application.services.exampleservice是IIS中的虚拟目录(DestinationVirtualDirectory仅对“应用程序”有效),您可能只是删除/后缀而不是编码它. (我也删除了匹配属性)

<parameter name="physicalPathLocation" 
           description="Physical path where files for this Web service will be deployed." 
           defaultValue="\" 
           tags="PhysicalPath"
           >
    <parameterEntry kind="DestinationVirtualDirectory" 
                    scope="Default Web Site/iag.application.services.exampleservice" />
</parameter>

请记住,在设置参数之前不必声明参数.您可以轻松声明完整参数并同时设置它:

<setParameter name="physicalPathLocation" 
              kind="DestinationVirtualDirectory" 
              scope="Default Web Site/iag.application.services.exampleservice" 
              value="C:\MyFolder\MySite" />

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。