我一直无法让我们的 TFS 构建服务器停止将它的本地构建路径放在 {Project}.SetParameters.xml 文件中。我目前正在尝试使用项目 parameters.xml 文件覆盖它,但找不到可以让我覆盖该属性的神奇组合。主要问题是我不知道该值来自哪里,因此很难匹配和覆盖它。
当前结果:
<?xml version="1.0" encoding="utf-8"?>
<parameters>
<setParameter name="IIS Web Application Name" value="Default Web Site/MyService" />
<setParameter name="IIS Web Application Pool Name" value="MyService" />
<setParameter name="IisVirtualDirectoryPhysicalPath" value="F:\Builds\59\EAS\MyService.Changeline_1.1.1.0\Sources\API Layer\API_deploy" />
</parameters>
我希望最后一行是:
当然,MSFT 文档在这方面是缺乏的。这是我当前的 parameters.xml 文件,它不起作用。没有构建错误,它只是不会覆盖 IisVirtualDirectoryPhysicalPath 值。
<?xml version="1.0" encoding="utf-8"?>
<parameters>
<parameter name="IisVirtualDirectoryPhysicalPath"
description="Physical path where files for this Web application will be deployed."
defaultValue="C:\Program Files\Blah\MyService\API"
tags="DestinationVirtualDirectory">
<parameterEntry kind="DestinationVirtualDirectory" scope=".*" match="^F:\\Builds[\w\s\\\.\-]+$" />
</parameter>
</parameters>
最佳答案
我无法让那个 parameters.xml 做任何事情。
如果您创建一个 MyService.wpp.targets 文件,
http://msdn.microsoft.com/en-us/library/ff398069(v=vs.110).aspx
然后您可以在该文件中添加一个条目。它将在 setparamters.xml 中设置这个值(但是它不会在 zip 中设置值,这有点痛苦,因为如果有人只是导入 zip 会怎样。但这总比没有好。
C:\Program Files\Blah\MyService\API
关于iis - 如何在 {Project}.SetParameters.xml 文件中指定 IisVirtualDirectoryPhysicalPath?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22177517/