Tuesday, August 18, 2009

Faster Silverlight testing

Using Control-F5, F5, and Control-Shift-B in Visual Studio 2008 works well for smaller Silverlight projects, but as you get more projects in your solution, etc building the entire solution just to see the difference in XAML or .cs can take too long for my liking.

What I figured out is that in many cases, all I have to do it build the Silverlight project, and leave open the browser (like you would do in ASP.NET) and just F5 (refresh page) works much faster.

This trick works because when the Silverlight app is built it updates the reference in the website that is hosting the Silverlight app. When you refresh the browser page, it detects that the .xap file changed and sends the new .xap file that you just built.

This trick really isn’t new or specific to Silverlight, but it is worth mentioning.

No comments: