iis - 如何在 {Project}.SetParameters.xml 文件中指定 IisVirtualDirectoryPhysicalPath?

标签 iis visual-studio-2012 msdeploy

我一直无法让我们的 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/

相关文章:

iis - 如何使用 iis arr 中的基于路径的路由为运行不同 iis 服务器的 2 个应用程序在 IIS 7.0 中配置应用程序请求路由

visual-studio-2010 - VS2010和2012中的发布向导错误

msdeploy - 如何将 "wmsvc=[server]"语法与 dirPath 提供程序一起使用?

msdeploy - 将参数传递给 msdeploy runco​​mmand 中的批处理文件

c# - 为什么我无法调试我的 ASP.NET Web 应用程序

powershell - 如何列出IIS服务器中所有事件和唯一的ips连接

IIS - AddDataProtection PersistKeysToFileSystem 未创建

c++ - 查找轮廓 OpenCV C++

c# - 重建全部失败,出现 0 个错误 - Visual Studio 2012 C#

visual-studio-2012 - 如何使用 MsDeploy 为 iisApp Provider 设置部署路径?