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

前端之家收集整理的这篇文章主要介绍了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" />

猜你在找的XML相关文章