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
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:
- Uninstall WP8 SDK
- Uninstall all instances of Silverlight SDK and Rutime.
- Re-install WP8 SDK.
I used it in the following workflow and it fixed my designer problem:
- Uninstalled all WP7 SDK:s
- Restarted computer (The designer still failed after this step)
- Uninstalled WP8 SDK (Maybe it is enough to choose repair here, but I selected to uninstall the SDK)
- Restarted computer
- 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.