MSBuild file for the deployment process

I could do with some pointers, code examples or links that might help me do the following in the msbuild file to speed up the deployment process.

This scenario assumes getting the local developer version on the development server.

  • Upgrading the version of the developer's local web apps
  • Publish developer local web app files somewhere
  • .rar published files or folder in v [IncrementedAssemblyNumber] .rar format
  • Copy the .rar somewhere
  • Backup (.rar) of an existing folder in real time (located elsewhere) in the format Pre_v [IncrementedSssemblyNumber] .rar
  • Move the .rar backup to the / Backup folder.
  • Overwrite development web files with published local web files

Should be easy for all these MSBUILD gurus.

As I said, answers or "Good and Applicable" links would be much appreciated.

Also I am thinking about getting one of the MSbuild books. From what I can tell, there are 2, maybe 3 applicants. I am not using TFS. Can anyone recommend a book for getting started with MSBUILD? Ideally from people who have read more than one book on the subject.

Greetings,

- Lee

+2


source to share


3 answers


I think for the build part you should of course use MSBuild . For the deployment aspect, you can take a look at Microsoft Web Deployment Tool (MSDeploy) . It supports website backup (via .zip files) and updating. I would like to create an MSBuild file that is called in MSDeploy. Also PowerShell would be a good driver that calls MSDeploy. You can only do the same tasks with MSBuild, but this will be more difficult.

The aspect of your post that makes me wonder is your link to "developer local network ...". If possible, you should have a build server that is responsible for making all of your products work in a non-dev environment. As someone said a good free CI server, CruiseControl.NET .



About the books you can look at in my Inside Microsoft Build Engine: Using MSBuild and Team Foundation Build . If you're not using TFS (and Team Build for that), you're fine. MSBuild chapters (9 of 12) are independent of TFS.

+6


source


- Edit: Let's assume you are using .NET ...

Use NAnt and use NAnt. You can call MSBuild. This will give you a basic system :)



- Change

You should of course also get a CI server like CruiseControl.NET and connect it to a source control system like SVN and then build your own.

0


source


Code should not jump from the developer window to the deployment server. It should go from the source of control via CI (like CruiseControl.Net) to your deployment environment.

  • Install CruiseControl.Net (CC.NET)
  • Connect CC.Net to pull the source control files to the CC.NET machine. To do this, use the CC.NET task. There is an SVN task, a TFS task, etc.
  • Create a msbuild definition file (.proj) to do most of the build logic. I put my file next to my .sln file ... in the original control.
  • The .proj file will build your .sln.
  • Add tasks in the .proj file to zip (rar) your build artifacts (build outputs), publish whatever you do.
  • You can set up multiple CC.NET "publish" tasks. More often than not, the main one is to email a group of people that you have / have not worked with.

If you put most of your build logic in a .proj file, if you ever switch from CC.NET to another CI tool, the amount of effort is minimal. Using the above, you only need to swap the source control files and a few published events (CC.NET native tasks). The .proj file is migrated to other CI tools. We switched from CC.NET to TFS, and because I had this provision, the change was minimal. If I were using CC.NET special tasks instead of .proj, the transition would be painful.

http://mikefourie.github.io/MSBuildExtensionPack/

and

https://github.com/loresoft/msbuildtasks

have many additional functions. Most of the msbuild requests were coded by someone out there.

And if the click clicks, you can always create a custom msbuild task. But this is rare these days.

There is a basic plan.

0


source







All Articles