Updating aspx/text files

I have a .net WinForms app that i want to update, and i'm confident i can achieve this with the AutomaticUpdater control. But along with the app binaries are some text files (aspx, html, css) that i want to update as well.

If the text files are edited locally, post-installation, will this confuse the update process and make it fail? Or worse still; will the update complete, but i'll be left with a corrupted text file?

I'm assuming the ability to make very small difference-patches is based on looking for bit/byte differences between file versions; the 'patch' being a tuple of the changed bytes AND their location inside the changing file.

Are people successfully updating web site files with wyBuild?!

Hey Rusty,

If the text files are edited locally, post-installation, will this confuse the update process and make it fail? Or worse still; will the update complete, but i'll be left with a corrupted text file?

You'll never be left with a corrupt install -- wyUpdate installs updates in a transactional manner. That is, updates either install correctly and the user will have the new version of your software or the update will fail and wyUpdate will rollback to the old version of your software.

If you know a user will be editing a particular file, you can handle this case a few different ways:

  • If the file is installed once but you never update it (e.g. config files), then you can just exclude the file from wyBuild and wyUpdate will never touch the file.
  • You can include the "possibly-edited-by-user" files in only the latest version tab in wyBuild. Then wyBuild will see there's no old file to create a patch from and it will just include the full file. When wyUpdate installs the update it will copy the full file over any changes your user made.
  • If you want to preserve the user's changes but allow the user to optionally replace files, then include the "possibly-edited-by-user" files under a different name (e.g. filename.ext.default) and then run an app or script after the update that offers the user the ability to replace their changes.

Tell me if this helps.

Are people successfully updating web site files with wyBuild?!

Yes, it's not as common as updating plain-old desktop apps, but we have quite a few customers that update websites with wyUpdate.

Thanks for your suggestions, but i still don't think my question has been answered.

So I've done some scenario testing this morning, with a text file differencing application, to look at the before- and after-update changes to a file. It seems that if a user has edited a file since the last update, then the whole file is overwritten upon the next update; which for me is fine!

It all seems robust to me, and i think i'll recommend we purchase wyBuild!

Thanks for your support; it's a great community.regards,Rusty.