开发者

MVC 3 Deploy Automation

开发者 https://www.devze.com 2023-04-01 20:18 出处:网络
I am looking for the most straight forward way to automate the deploy of an MVC 3 application. There is a wealth of in开发者_如何转开发formation on Stack Overflow already, but much of it seems to be o

I am looking for the most straight forward way to automate the deploy of an MVC 3 application. There is a wealth of in开发者_如何转开发formation on Stack Overflow already, but much of it seems to be old, and I am not sure what is still relevant to MVC 3.

Here is what I am trying to achieve:

  • Publish MVC application
  • Zip files
  • Copy zip to remote location

It is the “Publish” part of this I am having the most trouble with. Here are my main points of confusion:

  • How can an automated build be initiated for an MVC 3 app? Do we need to use the AspNetComiler MSBuild Task? I have seen an example of this uses in conjunction with a CSC Task. Are both really needed?
  • There is a “Build Deployment Package” option in Visual Studio. Can this be initiated with MSBuild? Should this be used instead?
  • Web Deployment Projects: where do these fit into the picture?

Thanks for any help


I am by far not specialist in application deployment so there might be better ways but here's what I do.

  • I use Web Deployment Projects to precompile my ASP.NET MVC 3 application
  • I feed the result of this project to a Setup and Deployment Project
  • I wrote a custom assembly which is applied to this Setup and Deplyment Project as an Install step and which based on the target IIS version creates App Pool and Virtual Directories.
  • I ship an MSI to the team responsible for deploying the application. All they need to do is to schedule a task which does an msiexec /u myapp.msi and then msiexec /i myapp.msi.

Remark : in my case all builds are automated in a continuous integration fashion with a Team Foundation Server Build but if you don't have a build server you could also build it manually by running the setup and deployment project which spits an MSI.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号