我想尝试'Web部署‘方法来部署我们的网站。在提出问题之前,我想详细介绍一下目前的部署程序:
我已经在开发系统中创建了包,
(i)在Visual中使用发布选项(web部署包)以及
(ii) IIS中的导出应用程序(提供选择文件的选项)
我还没有选择安装软件包的部分。
发布于 2016-04-28 18:05:23
1 -不是通过VS,因为没有扩展点(据我所知)到MSBuild的网站。赛义德拥有一个伟大的职位,它描述了网站是如何被区别对待的。
Alternative -您可以将希望部署的文件复制到新文件夹中,然后使用MSDeploy.exe命令行工具创建客户MSDeploy包,您可以将该包部署到服务器上。
D:\temp>"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:contentPath=%cd%\DefaultWebSite\website1 -dest:package=DefaultWebSite.zip
Info: Updating MSDeploy.contentPath (MSDeploy.contentPath).
Info: Adding virtual path (D:\temp\DefaultWebSite\website1)
Info: Adding directory (D:\temp\DefaultWebSite\website1).
Total changes: 3 (2 added, 0 deleted, 1 updated, 0 parameters changed, 0 bytes c
opied)
D:\temp>"C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package=DefaultWebSite.zip -dest:contentPath="Default Web Site\website2"
Info: Adding MSDeploy.contentPath (MSDeploy.contentPath).
Info: Adding virtual path (Default Web Site\website2)
Info: Adding directory (Default Web Site\website2).
Info: Adding file (Default Web Site\website2\Default.aspx).
Info: Adding file (Default Web Site\website2\Default.aspx.cs).
Info: Adding file (Default Web Site\website2\Web.config).
Total changes: 6 (6 added, 0 deleted, 0 updated, 0 parameters changed, 971 bytes
copied)2/3 -是的,您可以将包含到中,但是每次部署包时都会部署它。我们发现将SQL部署分离到自己的包中更好,因此只有在需要时才能部署它。
本文描述了我们如何处理SQL部署- https://dotnetcatch.com/2016/02/10/deploying-a-database-project-with-msdeploy/。
https://stackoverflow.com/questions/36908277
复制相似问题