以下是为我的开发环境生成的发布配置文件:
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>\\dev\webroot</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
</PropertyGroup>
</Project>
我想我想做的事情很简单,我只想在我想发布同一个项目的地方添加一个额外的发布网址。不幸的是,我无法以直接的方式找到有关如何执行此操作的任何信息。所有这些都表明我需要实现一些复杂的 msdeploy 解决方案或简单地回退到不受欢迎的脚本(即 ps/batch + robocopy/xcopy)。
我想象一个人可以简单地做类似的事情:
<publishUrl>\\dev\webroot;\\dev2\webroot2</publishUrl>
或者
<itemGroup>
<publishUrl>\\dev\webroot;</publishUrl>
<publishUrl>\\dev2\webroot;</publishUrl>
</itemGroup>
主要问题是: 如何扩展我的发布配置文件以通过 FTP 或文件系统部署到多个位置?
如果有 RTFM 响应 - 请参阅我可以阅读的地方。
更新 如果可以使用 FTP 进行多次部署,我也会对这样的解决方案感兴趣。