Windows Phone 8 SDK + VirtualBox = Problem

Just installed the Windows Phone 8 SDK and got disappointed when running the sample app on the phone emulator failed with the following cryptic message:

The Windows Phone Emulator wasn’t able to create the virtual machine. Something happened while creating a switch: Xde couldn’t find an IPv4 address for the host machine.

Some people suggested that the problem might be related to the VirtualBox being installed on the machine (I had it). Uninstalling VirtualBox helped, although it is a bit annoying, as I need VirtualBox to access my work VPN.


Async Targeting Pack for Visual Studio 2012

The Async Targeting Pack for Visual Studio 2012 (distributed as a NuGet package) enables .NET Framework 4.0 and Silverlight 5 projects to use the async language feature in C# 5 and Visual Basic 11. Of course, it has some limitations, and behavior is not always the same as in .NET 4.5, but it seems to be a nice way to get the async feature into older projects.

Toolbox Scrollbar Disappeared in Visual Studio

My colleague just hit into a problem with his Visual Studio 2012 – the Toolbox (the one keeping UI controls) lost its scrollbar. The scrollbar was appearing if he was filtering controls by name, and disappearing again when filtering was off. After searching a bit on the net I found that people were seeing the same problem in Visual Studio 2010 as well. The workaround Barney Nicholls, that post’s author, proposes for Visual Studio 2010 involves deleting toolbox*.* files from the Visual Studio settings’ folder:

  1. Close Visual Studio.
  2. Delete toolbox settings using the commands below.
  3. Start Visual Studio.

The commands (script) to delete the toolbox settings (those files are normally hidden, thus we need to remove the hidden file attribute before):

attrib -h %userprofile%\appdata\local\microsoft\visualstudio\10.0\toolbox*.*
del %userprofile%\appdata\local\microsoft\visualstudio\10.0\toolbox*.*

Needless to say, that this worked for Visual Studio 2012 as well – just substitute 10.0 with 11.0 in the commands above. And, of course, you can perform these operations in Explorer, FAR, or any other file manager as well.

PS Just occurred to me, that there is one more problem, similar in its nature, but with different symptoms – IntelliSense stops working after some actions, e.g. renaming some function. Usually, deleting the hidden .suo file with the same name as the solution .sol file and located in the same folder as the solution file resolves the problem. Of course, Visual Studio must be closed when performing this operation.

TypeScript = Application Scale JavaScript

A few days ago Microsoft announced a new programming language, TypeScript. Effectively, it is a typed super-set of JavaScript that compiles to “normal” JavaScript. Being super-set also implies that JavaScript programs are also TypeScript programs, so one can reuse all the existing code-base and external libraries, while still benefiting higher productivity, new language features, and new tools (e.g. there is a VS2012 plugin with full IntelliSense).

The thing looks quite interesting, solid, and extra credibility is added by the fact that Anders Hejlsberg himself made almost an hour long Introducing TypeScript video about the subject. Of course, it is not guarantying that the project will survive in the long-term, but then, on the other hand, the risk of using TypeScript in own projects is minimal, even non-existing, as you always end up with normal JavaScript, so you can migrate back to JavaScript-only development any time you wish.

Scott Hanselman also expresses his view about TypeScript in Why does TypeScript have to be the answer to anything?. The article has some explanations, and references some extra tools, e.g. Web Essentials 2012 VS2012 plugin that, among many other cool things, improves TypeScript support in the VS2012.