The code below uses the preview API to retrieve a release definition, create a new draft release from the latest build, update some variables, then activate the release and start the deployment on a specific environment. It serves as a reference regarding how to use the RM API. I used the following nuget packages: <packages> <package id="Microsoft.AspNet.WebApi.Client" targetframework="net452" version="5.2.3"/> <package id="Microsoft.AspNet.WebApi.Core" targetframework="net452" version="5.2.3"/> <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" targetframework="net452" version="3.14.1"/> <package id="Microsoft.TeamFoundation.DistributedTask.Common.Contracts" targetframework="net452" version="15.118.0-preview"/> <package id="Microsoft.TeamFoundationServer.Client" targetframework="net452"
Typical scenario: You provide the user with a TextBox he can use to type a filter over a big chunk of data that takes a lot of time to process. Most of the time, you would handle the TextChanged event of the TextBox and issue a filter operation over the data source using the character(s) available in the TextBox. Typical problem: The user complains because he has to wait between the key strokes even if he already knows a filter that would allow the search to take place in a matter of a few seconds. Solution: Introduce a delay between the last key stroke and the processing using a timer. Walkthough: Create a new Winforms project with a Form. Add a TextBox (named textBox), a ListBox (named listBox). To mimic a very slow data source, we will create a dummy class: public class VerySlowDataAccess { private static string [] data = null ; static VerySlowDataAccess () { data = new [] { "AAAAAA1" , "AAAAAA2"
I use ClickOnce everyday for several internal applications. Recently, I had to move the publishing website to a new host. Here is how you can acheive a completely transparent move without annoying your users or forcing them to uninstall and reinstall the application. First, you need to publish the deployment files on the new server. The deployment configuration is as follows : Publishing folder : URL on the new server Installation Folder : URL on the new server Updates Folder : URL on the new server Revision : last revision + 2 (very important) Then you need to deploy a new version on the old server with an updates folder on the new server. This way, next time the application launches, it will get the new version from the new server, and voila. Here is the configuration for the last deployment on the old server : Publishing folder : URL on the old server Installation Folder : URL on the old server Updates Folder : URL on the new server Revision : last revision + 1 (very important) E
Comments
Post a Comment