I will use a example of my project to show how to use MS Build and MS Deploy in a real project and situation.

First of all, I should put the URLs of MS Build and MS Deploy instruction came from MSDN here:

MS Build: https://msdn.microsoft.com/en-us//library/dd393574.aspx

MS Deploy: https://technet.microsoft.com/en-us/library/dd569106%28WS.10%29.aspx

Second, download the latest version of MS Build in Visual Studio official web site and MS Deploy in IIS official web site, here is the address:

Visual Studio: https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx

IIS: http://www.iis.net/downloads/microsoft/web-deploy

After MS Build and MS Deploy is installed, the MS Build contents are in the folder ‘C:\Windows\Microsoft.NET 'and the MS Deploy contents are in the folder ‘C:\Program Files (x86)\IIS\Microsoft Web Deploy V3’

Need have some concepts about MS Build and MS Deploy, otherwise it would be difficult to make sense of what I will show you below.

Some questions

In my project solution, I have three individual projects which provide functionality in different layer for the whole application. So I have three project files with the file extension(.csproj) need to be used in auto-deployment process. The three projects files are VRent.csproj, VRentDataAccess.csproj and ScheduleJob.csproj. Each of them has own configuration file contains many custom parameters or attributes that are used in the application for some reasons need be changed dynamically, for example WCF server/client endpoint address.

So the 1st question is how to change parameter values in configuration files dynamically during the process of building

When the parameter values could be changed, I want to build the project. But before building the project, I should archive the old version to a particular folder from IIS Web site or abstract application, whatever.

So the 2rd question is how to archive Web from IIS to physical folder

And then, I should build the project and package it for preparing to deploy it to IIS

So the 3rd question is how to build project with MS Build

After the package is prepared, I should deploy it to IIS. Developers or testers are likely to using the application which have already deployed in IIS at that moment I want to deploy a new one with higher version. In the case, the memory or thread of the application occupied is not be released by IIS. So if I try to deploy a new version, error would happen as the inaccessible application.

So the 4th question is how to recycle a particular application before deploying a new version to avoid the error regarding permission

Finally, I should deploy the project to IIS without any block

the 5th question is how to deploy project with MS Deploy

According to the five questions I mentioned above, I make five steps to finish the presentation as these questions' order and I will give a detailed description each of the question in the later section

Deploy .Net project automatically with MsBuild and MsDeploy (0)的更多相关文章

  1. Deploy .Net project automatically with MsBuild and MsDeploy (1)

    Q: How to change parameter values in configuration files dynamically In the first section http://www ...

  2. Intellij IDEA – How to build project automatically

    By default, Intellij IDEA doesn’t compile classes automatically. But, you can enable the auto compil ...

  3. VS2010 无法计算HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0@VCTargetPath处的属性表达式

    VS2010打开.csproj工程文件报错,不能加载,错误信息如下: 无法计算HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\1 ...

  4. 解决Cannot change version of project facet Dynamic Web M 3.0

    解决Cannot change version of project facet Dynamic Web M 3.0 dynamic web module 版本之间的区别: Servlet 3.0 D ...

  5. [AWS] Deploy react project on EC2

    如何在aws部署项目 申请到亚马逊AWS免费账户后,我们可以拥有很多的免费云服务产品项目,其中包括: EC2云服务器. Amazon S3存储. Amazon RDS数据库. Amazon Cloud ...

  6. Eclipse Maven: Cannot change version of project facet Dynamic web to 3.0 的解决方法

    在 Eclipse 中创建 Maven web 项目的时候使用 maven-artchetype-webapp 骨架,但是这个 catalog 比较老,用的 servlet 还是 2.3 在 Proj ...

  7. SDK Build Tools revision (19.0.3) is too low for project Minimum required is 19.1.0

    假设你正在使用Android Studio工具进行开发,且将版本号更新到0.6.0的时候.莫名的出现这种错误 SDK Build Tools revision (19.0.3) is too low ...

  8. Android为TV端助力 eclipse build project 出现major.minor version 52.0的问题

    那些网上说的JDK什么的的问题,我求你们不要误人子弟好吗? 出现在这个的原因就是ADT也就是你的SDK manager 的Tools版本跟你的SDK版本不兼容,如果你的是SDK 23.0.2那你的To ...

  9. unity, 由于project settings中time scale变成0导致动画不播放

    在Mac和iOS间多次switch platform之后,忽然发现开始scene的动画不播了.进入游戏后再切回来动画恢复正常. 检查了scene的逻辑,发现没有任何问题.删除了Temp和Library ...

随机推荐

  1. 实战系列之 Node.js 玩转 Java

    这些年以来,Node.js的兴起,JavaScript已经从当年的“世界最被误解的语言”变成了“世界最流行的语言”.且其发展之势,从语言本身的进化,库和包的增长,工具支持的完善,star项目和领域解决 ...

  2. hdu1698线段树的区间更新区间查询

    Just a Hook Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Tota ...

  3. node-Telnet

    什么是Telnet(window系统) 使用Telnet工具作为客户端对创建的TCP服务器进行会话交流时遇到的问题做一个简单的记录.希望可以帮助到一些同学. 这里看一下百度词条的解释 Telnet协议 ...

  4. Sublime Text3使用指南

    前言(Prologue) Sublime Text是一款跨平台代码编辑器(Code Editor),从最初的Sublime Text 1.0,到现在的Sublime Text 3.0,Sublime ...

  5. MongoDB学习教程(3)-常用命令

    1.MongoDB 条件操作符 描述 条件操作符用于比较两个表达式并从mongoDB集合中获取数据. 在本章节中,我们将讨论如何在MongoDB中使用条件操作符. MongoDB中条件操作符有: (& ...

  6. js-注释代码习惯

    功能块代码 /** * xxxx */ 定义的函数或方法 /* xxxx */ 调用了某个函数或方法 // <--xxx

  7. WPF DataGrid 样式设置

    隔行换色,鼠标单击,悬浮样式都有,其具体效果如图 1 所示. 图 1 WPF DataGrid 样式设置效果图 其中: 界面设计代码下所示 ? + 查看代码 1 2 3 4 5 6 7 8 9 10 ...

  8. SAP GB01替代 程序:RGUGBR00

    TCODE: SM30 VIEW : VWTYGB01 GB01 更新后需要执行 RGUGBR00

  9. java 集合之实现类ArrayList 和 LinkedList

    List 的方法列表 方法名 功能说明 ArrayList() 构造方法,用于创建一个空的数组列表 add(E e) 将指定的元素添加到此列表的尾部 get(int index) 返回此列表中指定位置 ...

  10. WPF 快捷键读写txt

    因为git提交需要写这次做的,所以我想弄个东西来帮我写 WPF可以使用快捷键,快捷键主要使用InputBindings,WPF读写文件很简单 我每次都要写 第一句标题 之后就是我写的修改 然后加上我名 ...