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.

Managed/Native Debugging in C#/C++

I had a problem debugging my solution consisting of C#, C++/CLI, and native C++ projects. I was not able to get breakpoints working in the native C++ parts – after running the solution with breakpoints set, they were turning gray with warning sign, and their tooltip stated that “The breakpoint will not currently be hit. No symbols have been loaded for this document.” despite all debug properties were set right on those projects and all debugging symbols existed. After fighting it for a few hours and almost giving up, I started to think that the problem might not be with the native C++ projects, but rather somewhere else, e.g. in the StartUp project, which is C#. Checked that project’s properties, and guess what! Debug > Enable unmanged code debugging option was off!!! Switched it on, and voila – breakpoints work fine in native C++ DLL now!!! :)

Today’s Sites/Blogs

  • Ask the Performance Team (Thoughts from the EPS Windows Server Performance Team) – in their own words “… the Performance team covers a broad range of seemingly unrelated areas such as Core OS Performance, Printing, WMI and Terminal Services. Simply put – we’re a bit of a “catch-all” team. […] Because we cover such a wide spectrum of technology, we see many different types of issues – some more frequently than others. So we thought we should share with the broader technical community. We’ll be sharing troubleshooting tips and technical information on areas of our specialty that we cover.”
  • 45+ Excellent Code Snippet Resources and Repositories – it is what it says it is.

.NET Events: Multithreading Issues

Threadsafe Events article at CodeProject explains problems one might encounter with .NET events in a multithreaded environment (not necessarily stating the absolute truth but still). Unfortunately, no-one has figured out the perfect solution, and we will have to choose “the best from all bad solutions” for some time still.

Asynchronous Callback Contexts article by the same author shows possible solution for event cancellation, particularly during object disposal: end-users do not expect components to raise events after they have been disposed or after they have unsubscribed from these events. The author refers to his Nito Asynchronous Library as a way to solve this issue.