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. 插入排序的性能测试对比(C与C++实现)

    一.概述: [标题]学生成绩管理的设计与实现 [开发语言]C.C++ [主要技术]结构体.STL [基本功能]实现对学生成绩类的基本操作:增加.删除.查询.排序 [测试数据]功能测试:按提示输入5组正 ...

  2. 5分钟教你玩转 sklearn 机器学习(上)

    假期结束,你的状态有没有回归?那么,放空脑袋后,先来学习学习,欢迎大家继续关注腾讯云技术社区. 作者:赵成龙 这是一篇很难写的文章,因为我希望这篇文章能对大家有所帮助.我不会给大家介绍机器学习,数据挖 ...

  3. C# 使用FileUpload控件上传图片,将文件转换成二进制进行存储与读取

    状况描述: 需要上传文件,但是不想要保存到实体路径下,便可以用该功能来实现. 效果图: 点击[Upload]按钮,上传文件到数据库: 点击[Preview],预览文件: 具体实现: 前台: <t ...

  4. Js、Jquery定时执行(一次或者重复多次,取消重复)

    1. 创建一个变量 var ref = ""; 2. 定时刷新调用的方法 function consoleLog(){ console.log("a"); } ...

  5. Jquery购物车jsorder改进版,支持后台处理程序直接转换成DataTable处理

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  6. 接口自动化测试方案PHP + mysql

    接口测试在测试工作中是很常见的工作,但是在以往的接口测试工作中借助的一般是第三方插件.python开发的发送请求脚本.LR脚本.Jmeter脚本,之前也使用python开发了一套接口自动化测试系统,但 ...

  7. Linux 可运行进程 Runnable Process Definition

    From : http://www.linfo.org/runnable_process.html 一个可运行的进程是指该进程的进程状态为TASK_RUNNING. 进程,也可被称为任务,是指一个程序 ...

  8. SpringMvc 关于 EXCEL

    概述 我在使用SpingMvc 的EXCEL的发现传统的 AbstractJExcelView jexcel api已经过时 AbstractView poi Api 通过阅读官方文档发现建议我们使用 ...

  9. 2017上海QCon之旅总结(上)

    本来这个公众号的交流消息中间件相关的技术的.这周去上海参加了QCon,第一次参加这样的技术会议,感受挺多的,所以整理一下自己的一些想法接公众号和大家交流一下. 下面进入正题,从自己参加了的一些分享中挑 ...

  10. Kafka 学习笔记-基本概念

    一.基本概念 Kafka是一个分布式的,可分区的,可复制的消息系统 Kafka以由一个或多个服务以集群的方式运行,服务叫broker producer,consuer通过kafka topic发布,预 ...