简体   繁体   中英

How to create a Patch file for a web application using asp.net

I want to understand if there is a provision available within VS 2010 or using some third party tool for creating Patches/Hot fixes to a web application. I don't want to publish copy and replace the files / dlls methodology, Rather use a web setup that installs the application in a way such that only the files that were changed from the original application will be updated and installed in the Virtual Directory.

To be more clear, I would like to do the following steps:

Step-1

a) Create a Web Application with 10 Pages

b) Deploy the web application using Web Setup Project

Step-2

c) Change the functionality in 2 of the 10 pages

d) Create a patch for the only the 2 changed files and the Dlls that are affected.

Step - 3:

e) Run the setup file that was created as a patch or a hot fix.

Now, I want to achieve the c) and d) points that are mentioned in Step -2 section.

Assuming you have followed MSI patching guidelines when creating the initial web setup project and the one you want to derive a patch from...

Basic guidelines (plenty of others to follow if you search):

  • Make sure your web project has a valid version number (1.2.3.4)
  • Build installer for your initial release
  • Time passes....
  • Make changes as required for c)
  • Update web project version - DLL(s) need to have version incremented
  • Update web setup project properties - version needs to increase. Probably minor (XXX.YYY.ZZZ) <- increment Y. (by default this is 1.0.0)
  • Update package code in setup project properties
  • Build installer with changes
  • Make administrative installs of each setup (msiexec /a websetup.msi)
  • Use patch creation utility to create patch comparing the "old" to the "new" administrative installs you just created. (this step depends on the tool you want to use. I've used Installshield in the past, as well as straight msimsp.exe - old guide here )

You can limit the files impacted by the patch (assuming they didn't change) by removing them from both the previous and the latest admin installs.

Really, patching your website shouldn't be any different than any other set of files installed by MSI. Note that microsoft seems to be moving towards website deployment via msdeploy instead of building installers for them. For internal deployment, it works much easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM