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" />

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念