Visual Studio designer not working (NullReferenceException) in Windows Phone solution after WP8 SDK installation.

I watched the Build keynote last week on a big screen together with colleagues at Jayways Copenhagen office. One of the highlights was the WP8 SDK release. You can read a great introduction to the most significant API additions and changes at the Nokia Dev Wiki. I installed the SDK this weekend but ran into a frustrating problem when opening one of my WP7 solutions in Visual Studio 2012.

While working flawless in the standalone version of Blend, the VS 2012 designer crashed and showed the following error:

An unhandled Exception has occured

Click here to reload the designer

Details:

System.NullReferenceException Object reference not set to an instance of an object.
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext,BlockingCall call, WaitHandle timeoutSignal)

I looked into the problem today and found this MS Dev Center thread with the following advice:

  1. Uninstall WP8 SDK
  2. Uninstall all instances of Silverlight SDK and Rutime.
  3. Re-install WP8 SDK.

I used it in the following workflow and it fixed my designer problem:

  1. Uninstalled all WP7 SDK:s
  2. Restarted computer (The designer still failed after this step)
  3. Uninstalled WP8 SDK (Maybe it is enough to choose repair here, but I selected to uninstall the SDK)
  4. Restarted computer
  5. Installed the WP8 SDK

 

This also solved the slow emulator startup time

I have also noticed how slow the emulator started after my first WP8 SDK installation. This seems to be related with the problem described in this post because the emulator now works perfectly after my reinstallation.

Trackback URL: https://codeblog.silfversparre.com/2012/11/visual-studio-designer-not-working-nullreferenceexception-in-windows-phone-solution-after-wp8-sdk-installation/trackback/