MSDeploy - sync命令将文件复制到iis app的子文件夹 [英] MSDeploy - sync command to copy files to subfolder of iis app

查看:344
本文介绍了MSDeploy - sync命令将文件复制到iis app的子文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想执行一个后期构建步骤,使用MSDeploy将一些文件复制到网站文件夹中。

I want to perform a post-build step to copy some files into a website folder using MSDeploy.

最终我会将其转移到远程位置(指定 computerName userName 开关等),但是现在我在本地运行它:

Eventually I'll be doing this to a remote location (specifying computerName, userName switches etc.), but for now I'm running it locally:

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" 
   -AllowUntrusted -verb:sync 
   -source:dirPath="D:\files_to_copy" 
   -dest:iisApp="My Website Name"

这有效,但它删除了网站文件夹的所有内容,并将其替换为D:\ _files_to_copy的内容(正如您所料!) 。所以我想知道我如何使用这个简单的副本到网站中的子文件夹?

This works, but it removes all contents of the website folder and replaces them with the contents of "D:\files_to_copy" (as you might expect!). So I was wondering how I use this simply copy to a subfolder within the site?

我试过 -dest:iisApp =我的网站名称/ my_subfolder但这只会创建一个名为my_subfolder的新IIS应用程序嵌套在现有的IIS应用程序中。

I've tried -dest:iisApp="My Website Name/my_subfolder" but this just creates a new IIS app called "my_subfolder" nested within the existing IIS app.

推荐答案

提供商除了iisApp,也许dirPath是你想要的 -dest 以及?:

There are providers other than iisApp, maybe dirPath is the one you want for -dest aswell?:


  • dirPath :dirPath提供程序同步目录内容。

  • filePath :filePath提供程序同步各个文件。

  • i isApp :iisApp提供程序将目录内容同步到文件夹,并将该文件夹标记为应用程序。

  • contentPath :contentPath提供程序同步网站内容。

  • dirPath: The dirPath provider synchronizes directory content.
  • filePath: The filePath provider synchronizes individual files.
  • iisApp: The iisApp provider synchronizes directory content to a folder and marks the folder as an application.
  • contentPath: The contentPath provider synchronizes Web site content.

这篇关于MSDeploy - sync命令将文件复制到iis app的子文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆