简体   繁体   English

Web Deploy:如何将文件保留在特定的目标文件夹上

[英]Web Deploy: How to keep files on a specific destination folder

Scenario 情境

  • Visual Studio 2012 web publishing: web Deploy method. Visual Studio 2012 Web发布:Web Deploy方法。
  • "Remove additional files at destination" option selected. 选择了“在目的地删除其他文件”选项。
  • MVC3 website with a "upload" folder MVC3网站带有“上传”文件夹

Question

How to keep the existing files on destination for the upload folder without removing the "Remove addtional files..." option from the deployment settings? 如何在不从部署设置中删除“删除其他文件...”选项的情况下,将现有文件保留在上传文件夹的目标位置?

Apparently you can do it with wpp.targets file. 显然,您可以使用wpp.targets文件执行此操作。 Then skip only the folder you want... 然后仅跳过您想要的文件夹...

<ItemGroup>
  <MsDeploySkipRules Include="SkipErrorLogFolder1"> 
    <SkipAction>Delete</SkipAction> 
    <ObjectName>FolderPath</ObjectName> 
    <AbsolutePath>ErrorLog</AbsolutePath> 
  </MsDeploySkipRules> 
</ItemGroup>

Have a look here, see first there: 在这里看看,首先在这里看到:

MSbuild command line parameter for skipping the directory 用于跳过目录的MSbuild命令行参数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Web部署和文件夹权限 - Web deploy and folder permissions 从包含空格的文件夹进行Web部署 - web deploy from a folder with spaces “wwwroot”文件夹中的某些文件未在 ASP.NET 核心 web 部署中发布 - Some files in "wwwroot" folder are not published in ASP.NET Core web deploy 如何使用MSBuild脚本自动化特定发布配置文件的Web部署? - How to automate Web Deploy of a specific Publish Profile with an MSBuild script? 使用MSBuild进行Web部署仅部署BIN文件夹 - Web deploy with MSBuild deploys only BIN folder 如何列出Web服务器上某个文件夹中的某些特定图像? - How to list some specific images in some folder on web server? 如何使 web 根文件夹中的文件安全保存 - How to make saving files in the web root folder secure 如何以编程方式在同一文件夹中加载和合并2个web.config文件? - How to load and merge 2 web.config files in the same folder programmatically? 如何计算服务器上特定文件夹中的文件数? - How to figure out number of files in specific folder on server? 如何编写httphandler只截取特定文件夹中的文件 - how to write httphandler to only intercept files in a specific folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM