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. Hibernate中的实体映射

     一.一对一映射  如人(Person)与身份证(IdCard) 的关系,即为一对一的关系,一个人只能有一张身份证,一张身份证只能属于某一个人,它们的关系图如下图所示: 在Person实体中添加一个属 ...

  2. JS脚本检查密码强度

    <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Con ...

  3. Python日期时间Date/Time

    Python程序可以处理多种方式的日期和时间.日期格式之间的转换是一种常见计算机的杂活. Python的时间和日历模块,能帮助处理日期和时间. Tick是什么? 为时间间隔,以秒为单位的浮点数.从“新 ...

  4. Java面向对象 String 基本数据类型对象包装类

      Java面向对象  String 知识概要:              (1)String的用法详解 (2)基本数据类型对象包装类 String          顾名思义,该类主要是对字符串 ...

  5. jQuery Mobile 所有data-*选项,开发全解+完美注释

    全栈工程师开发手册 (作者:栾鹏) jQuery Mobile事件全解 jQuery Mobile 所有class选项 jQuery Mobile 所有data-*选项 jQuery Mobile 所 ...

  6. DevOps之平台架构

    唠叨话 关于德语噢屁事的知识点,仅提供精华汇总,具体知识点细节,参考教程网址,如需帮助,请留言. DevOps平台架构(Platform Architecture) <虚拟化平台(Platfor ...

  7. Linux下搭建svn服务端

    安装 使用yum安装非常简单: yum -y install subversion (压缩包安装比这麻烦的多) Tortoise本是window下客户端工具,但也可以建仓库,作为服务端.Linux只有 ...

  8. win10 uwp json

    本文讲的是关于在uwp使用json的简单使用,json应用很多,因为我只是写简单使用,说的东西可能不对或者不符合每个人的预期.如果觉得我有讲的不对的,就多多包含,或者直接关掉这篇文章,但是请勿生气或者 ...

  9. Oracle学习笔记之用户自定义函数

    自定义函数语法格式:   用户自定义的函数,可以直接在sql语句中直接调用,并且任何一个funciton都必须有返回值,而且该函数声明后,是保存在数据端的,我们随时可以使用:注意:函数只能有一个返回值 ...

  10. JAVA基础知识总结:五

    一.初步认识数组 1.理解数组 数组是用来存储相兼容数据类型的定长的容器 特点: a.只能存放相兼容数据类型,不能存放多种数据类型 b.可以存放基本数据类型和引用数据类型 c.数组是定长的,一旦被初始 ...