Windows 8

Alternative to HttpClient for Windows Phone 7.5

If you wanted to move your WinRT project to support Windows Phone 7.5, you’ll rejoice at the recent news that Microsoft’s Microsoft.bcl.Async package in Nuget that allows using Async keywords and Task class but in the end, you really used them in WinRT because HttpClient class had a GetAsync method which is not available outside WinRT.

Worry not, the Microsoft.bcl.Async package comes with a Microsoft.Threading.Tasks.Extensions assembly that if you look inside, includes:

public static System.Threading.Tasks.Task<webresponse>GetResponseAsync(this System.Net.WebRequest source)
Member of AsyncExtensions</webresponse>

Which means you can use System.Net.WebRequest in its place and it supports Task/Async.

So you can do something like:

WebRequest request = WebRequest.Create(uri);
await request.GetResponseAsync();

How to Debug/Deploy WinRT/Windows 8 App to ARM Tablet

You’ve now made your app and tested it on desktop and want to use the same code for your developer unlocked the tablet. Until there’s an ARM version of Visual Studio, here’s what you can do. The basic process would be to set up a Remote Debugger service on your tablet and from a desktop on the same subnet, run on it directly. This assumes you have a development tablet device and a desktop running the same user (who also has admin rights) Read More…

 Scroll to top