![]() ![]() ![]() ![]() Afterall, these tests are pretty small in scope and only do a handful of operations. Success! Of course, it's inefficient to keep getting a new FileInfo for every operation - it's just for coding simplicity. || System.IO.Path.GetInvalidPathChars().Intersect(Īnd all of our tests are passing. Public static string LocalVersion( string path) What does the version text file look like? Our procedures are small in scope and could easily reside within the application itself, but of course you were going to fully unit test the code, right? It's easier to test a class library, so let's create it. Create a new WPF Application called ArticleAutoUpdater. We'll be using the Ionic DotNetZip library ( ). Since our archive can contain multiple files, it'll be easier to use a decompression library other than GZip to unpack it. If they don't match, we'll need to download the update and unpack it. When the client's text file and the update location's text file match, the launcher knows the current version is up to date. The file is present in the update location, and after an update is successfully downloaded and unpacked, it is saved to the client. We store the current version information in a text file. A unit test framework of your choice may be used, but the walk through below will use the commands in Team Test. The unit tests are written in Visual Studio Team Test. NET 4.0, using Visual Studio 2010 and C#. If there aren't any version updates or the update location is not available, the Launcher simply executes the current version of the main application. In short, the Launcher checks the update location for version changes, downloads and unpacks any updates, and then executes the main application. This meant that we would have to have a way of easily and quickly updating remote installations. We had been having problems with a mobile app synching its data across multiple versions, so we enacted a policy to only allow a sync operation from the most current version of the software. NET solution that would allow our clients to use the most current version of our software. Consumers of your application are busy people and they don't always remember to check for updates to your software. If an application connects to an external system to push or pull data, the problems can be even worse - even resulting in data loss. Even standalone applications have problems with results from old versions. But when we have clients installing our software, we still need to give them updates. We fix some bugs, add a feature, make a patch, and deploy it so that our customers can continue using our software without interruption. When we develop web-based solutions, usually, we are in charge of updating the installations to use a current version. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |