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. HDU 1754 I Hate It(线段树区间求最值)

    很多学校流行一种比较的习惯.老师们很喜欢询问,从某某到某某当中,分数最高的是多少. 这让很多学生很反感. 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问.当然,老师有 ...

  2. Select的option事件问题

    一开始看你们会觉得没问题,我也就是觉得没问题所以才找不到错误所在. 问题出在option本身是没有事件的说法的,只能在select里添加事件,再获取option的属性值 这是我的写法 select设置 ...

  3. php过滤textarea 中的换行符问题

    之前我写的替换代码是这样的 $content = str_replace('\r\n', '', $_POST['content']); 为了确保window和Linux的换行符都能去掉,改成这样的: ...

  4. Python实战之Selenium自动化测试web刷新FW

    需求:将手工登录,手工刷新服务器的FW转化为Python+Selenium实现自动化操作. 1.创建用户表,实现数据与脚本分离.需要读取模块. 2.自动化刷新FW. 不说话,直接上代码: 1userd ...

  5. Python内置类型(2)——布尔运算

    python中bool运算符按优先级顺序分别有or.and.not, 其中or.and为短路运算符 not先对表达式进行真值测试后再取反 not运算符值只有1个表达式,not先对表达式进行真值测试后再 ...

  6. C#解析XML详解(XPath以及带命名空间NameSpace)

    <?xml version="1.0" encoding="utf-8" ?> <bookstore> <book> < ...

  7. Color Blender---在线渐变色带生成器

       Color Blender是一个很有用的在线渐变色带生成器,它可以在两种颜色之间,自动生成过渡色,对网页设计师来说是一个不错的颜色调配工具.   Color Blender的使用方法很简单,你只 ...

  8. DOS命令(系统错误5,拒绝访问)的解决方法

    在用DOS命令启动MySQL服务时,出现(系统错误5,拒绝访问)的错误提示,这是由于我们操作的权限不足造成的,需要以管理员身份启动,解决问题方法如下: 1."Windows+S"- ...

  9. d3力导向图聚焦

    效果描述 双击节点,节点以及节点一度关联的节点保持高亮状态,其余节点变灰,半径变小,文字消失,并且向内收缩. 效果展示 正常状态 聚焦效果 关键代码 节点变化 激活节点保持高亮的样式,其余节点应用no ...

  10. 关于string.h中字符串的操作

     string.h中字符操作的函数 注意:**对字符数组的多次操作需要进行赋初值.或者善于用memset()函数进行清空数组的操作.**     否则容易出现错误. string.h文件中函数的用法加 ...