locked
WP8 SDK: Designer crashes (VS NullReferenceException)

    Question

  • I everyone,

    I've just installed the Windows Phone 8 SDK and opened an existing WP7.5 Project. Then trying to open any XAML file the designer crashes with a NullReferenceException:

    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)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

    System.NullReferenceException
    Object reference not set to an instance of an object.

    Server stack trace:
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)
       bei System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       bei System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    System.NullReferenceException
    Object reference not set to an instance of an object.
       bei Microsoft.Expression.Platform.PlatformService.PlatformEntry.get_PlatformCreator()
       bei Microsoft.Expression.Platform.PlatformService.GetPlatformCreator(String frameworkSpec)
       bei Microsoft.Expression.Platform.PlatformService.IsCompatibleFramework(FrameworkName hostFramework, FrameworkName guestFramework)
       bei Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)
       bei Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)
       bei Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken)
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e()
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
       bei Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

     

    This also happens on newly created Project - Wp7.5 or WP8 doesn't Change anything. Has anybody the same Problem and maybe a solution?


    Ralf Ehlert Microsoft Expert Student Partner - Universität Leipzig MCPD | MCTS | MCAS | MCP


    Tuesday, October 30, 2012 8:52 PM

Answers

  • Apologies for the inconvenience. It feels like the designer installer packages are not being patched, possibly because the RTM packages are not present. That might be the case if a Windows Phone 8 SDK pre-release version were to be installed and not removed before installing the RTM version. Please try the following...

    1. Close all running instances of Visual Studio 2012
       
    2. start cmd.exe (as admin/elevated) 
    3. cd /d %windir%\installer 
    4. for /f %i in ('findstr /imc:"XAML UI Designer" *.msi') do (start /wait msiexec.exe -qb -x %i VSEXTUI=1)

      Clear the prompts, allowing the uninstalls. 
    5. For the next two steps, order is important...

      Go to Add/Remove Programs (AppWiz.cpl) and choose to repair all installations Visual Studio 2012 (Utimate, Pro, Premium, Win8 Express)

      then...

      Go to Add/Remove Programs (AppWiz.cpl) and choose to repair the Windows Phone 8 SDK

    Please let us know if this resolves the problem for you. Again, apologies for the
    inconvenience.

    - thanks

    Paul


    Microsoft Expression Setup Developer


    Wednesday, October 31, 2012 8:51 PM

All replies

  • Hi Ralf,

    1. Are you opening your project using Expression Blend or Visual Studio 2012?

    2. What development tools did you have installed previously? Are you using only the Express (free) versions of Visual Studio 2012 and Blend, or are you using the more advanced (purchased) VS or Blend software?

    3. Do you have WP7 tools still installed?

    4. Do you have older versions of VS or Blend installed?


    Mark Chamberlain Sr. Escalation Engineer | Microsoft Developer Support | Windows Phone 7

    Tuesday, October 30, 2012 9:29 PM
  • I have this exact same problem.

    I am running Windows 8 Pro, with Hyper V enabled.

    Visual Studio 2012 Express for Windows 8 development with the Windows Phone 8 SDK installed after.

    The System.NullReferenceException show up in the designer on completely new Windows Phone 8 projects in Visual Studio 2012 Express. I have no WP7 SDKs installed nor older versions of VS.

    Following troubleshooting has been done:

    * Uninstall Silverlight 5.1 and Silverlight 4 SDK, then Repair the Windows Phone 8 SDK from ISO

    * Numerous reboots

    Edit: Adding some more info that might be relevant

    Computer: Apple iMac 27" Summer 2010
    Processor: Intel i5 Quad Core
    Memory: 16 GigaBytes
    Video: ATi Radeon Mobility 5800 HD with DirectX 11 support

    Installation: Bootcamp, clean install. Bootcamp 4.0 installed with drivers. All Windows Updates installed. Visual Studio 2012 Express for Windows 8 development installed first, then Windows Phone 8 SDK installed. Hyper-V added post-SDK install

    -------------------------

    1. Made no difference to the issue

    2. The update that was recommended when I first launched VS2012Express and NuGet

    3. None

    4. Format of partition, OS install.

    5. No

    6. n/a


    • Edited by Cato L Wednesday, October 31, 2012 3:36 PM Added answers for Mark's questions
    Tuesday, October 30, 2012 11:18 PM
  • happens here aswell.

    VS 2012 Pro, Windows 8 PRO, WP8 SDK

    this is a clean Box, never installed anything else on it.

    Emulator is working fine, its just the 'designer' in Visual Studio 2012 that gives that NullReferenceException.

    • Proposed as answer by banjming Thursday, November 01, 2012 4:43 AM
    • Unproposed as answer by Ralf Ehlert Sunday, November 11, 2012 9:07 AM
    Wednesday, October 31, 2012 12:30 AM
  • Hate to pile on, but I have the exact same issue.

    Clean Windows 8 build with Visual Studio 2012 premium installed previously.  I did notice that whenever I have to reboot it asks me everytime I load the emulator to add my user to the Hyper-V administrators group.

    Will try to re-install the SDK tonight.

    Wednesday, October 31, 2012 12:52 AM
  • Hi Mark,

    I start what is installed on my machine. My notebook (HP Elitebook 2730p) runs Windows 8 Enterprise, Expression Studio 4 Ultimate, VS2010 Pro with SP1, Async CTP 3, WP7 7.1 SDK (with update). Since a few weeks I installe the VS2012 Express editions for Windows 8 and Web. Yesterday I installed the WP8 SDK and got the VS2012 Express edition for WP.
    Windows 8 is installed in German, all other installed stuff are in English.

    1. I opened them with VS2012.
    2. See above.
    3. Yes
    4. Yes

    I noticed that then opening the project in Expression Blend with comes with the WP8 SDK the Blend designer works fine.

    Thanks for your time.


    Ralf Ehlert Microsoft Expert Student Partner - Universität Leipzig MCPD | MCTS | MCAS | MCP

    Wednesday, October 31, 2012 8:22 AM
  • I get the same issue with the designer.  Windows 8 RTM, x64, VS 2012.

    Plus, the Emulator won't load with varying messages, the latest is:

    Windows Phone Emulator
    The Windows Phone Emulator wasn't able to set some properties on the virtual machine:

    Couldn't change Memory of the virtual machine: Error code 32775

    Wednesday, October 31, 2012 9:39 AM
  • You need 4gb of memory.

    how much do u have?

    Wednesday, October 31, 2012 9:58 AM
  • 8GB.
    Wednesday, October 31, 2012 10:20 AM
  • I seem to be having the same problem.

    I had the 7.x sdk installed prior to the 8 SDK, but tried uninstalling 7.x without any change.

    Wednesday, October 31, 2012 11:07 AM
  • Same here, clean install of Windows 8, Designer crashes. Environment: MacBook Pro +Parallels Desktop + win8 + windows phone 8 sdk. 4Gb memory is reserved for Windows 8. Blend opens nicely.
    Wednesday, October 31, 2012 11:27 AM
  • Same to me, on clean install (first VS2012, now SDK) and completely new empty projects, both on 7.1 and 8.0.

    Also, XDE says it cannot find IPv4 for the host machine.

    Wednesday, October 31, 2012 12:54 PM
  • I am running some internal inquiries regarding this. In the mean time:

    1. Can each of you verify that using the Control Panel Programs and Features, choosing the Repair option for the SDK, does not fix the problem?

    2. What other Visual Studio (VS) add-ins/plug-ins are you using, or have installed for VS if any?

    3. What edition of VS are you using (Pro and above, or none, i.e. you are using the VS Express edition supplied with the SDK)

    4. By "clean" does this include a whole new install of Windows 8 (reformat, reinstall)?

    5. Are you using any other virtualization software? VirtualBox?

    6. If you used Pro or higher VS, what optional features did you choose? Did you use the default option set?

    Thanks for your patience...!
    Mark


    Mark Chamberlain Sr. Escalation Engineer | Microsoft Developer Support | Windows Phone 7

    Wednesday, October 31, 2012 2:05 PM
  • 1) repair did not work

    2) none

    3) Microsoft Visual Studio Ultimate 2012
    Version 11.0.50727.1 RTMREL
    Microsoft .NET Framework
    Version 4.5.50709

    Installed Version: Ultimate

    4) I do not have a clean re-install of Windows.  I hope I don't have to do this.

    5) Nope, although I used to have virtual box installed, however, I uninstalled this a long time ago

    6) I'm afraid I cannot remember, as I installed VS in August.  Pretty much just omitted C++ and any Office related stuff.

    I have this processor: http://ark.intel.com/products/54619/Intel-Core-i5-2537M-Processor-3M-Cache-up-to-2_30-GHz

    I have virtualization enabled in the BIOS. Core Info says that

    Note: Coreinfo must be executed on a system without a hypervisor running for
    accurate results.

    Intel(R) Core(TM) i5-2537M CPU @ 1.40GHz
    Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
    HYPERVISOR      *       Hypervisor is present
    VMX             -       Supports Intel hardware-assisted virtualization
    EPT             -       Supports Intel extended page tables (SLAT)

    I have run this twice, once with Hyper-V running and once without, bearing the same results.

    I realise the hyphen rather than the * means I don't support HAV or EPT/SLAT.... however, the specification of my CPU on the Intel website say it does support virtualization and SLAT.

    I have a Samsung Series 9 (900X3A-A01UK) from May 2011, are you able to tell me simply whether it should support the WP8 SDK Emulator? 

    It's pretty high-end hardware really, so I would hope it does.

    The current error when I start the Emulator is

    "The Windows Phone Emulator wasn't able to set some properties on the virtual machine:

    Couldn't change Memory of the virtual machine: Error code 32775"



    • Edited by daysleeper55 Wednesday, October 31, 2012 2:38 PM
    Wednesday, October 31, 2012 2:21 PM
  • 1. did not work

    2.did not install any, just the Tools that followed With the default installation.

    3.

    Microsoft Visual Studio Professional 2012
    Version 11.0.50727.1 RTMREL
    Microsoft .NET Framework
    Version 4.5.50709

    Installed Version: Professional

    4. I downloaded Windows 8 last week and just installed it on a totally clean harddrive.

    OS Name Microsoft Windows 8 Pro
    Version 6.2.9200 Build 9200
    OS Manufacturer Microsoft Corporation
    System Manufacturer FUJITSU
    System Model LIFEBOOK AH531
    System Type x64-based PC
    Processor Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz, 2694 Mhz, 2 Core(s), 4 Logical Processor(s)

    5.no virtualization software.

    6.default set

    Wednesday, October 31, 2012 2:30 PM
  • 1. Tried, but it didn't fix the problem.

    2. Default installation and no addons.

    3. 2012 Pro.

    4. Fairly recent install of Windows 8.

    5. No

    6. C#, ASP.NET and web-related options.
    Wednesday, October 31, 2012 2:41 PM
  • 1. Did the repair but didn't changed anything

    2. None

    3. VS2012 Express

    4. Windows 8 was installed on a formatted SSD

    5. No

    I try this evening if I have the same problem on my desktop machine (freshly installed last friday with Windows 8).


    Ralf Ehlert MCPD | MCTS | MCAS | MCP

    Wednesday, October 31, 2012 3:06 PM
  • I managed to get the Emulator working by

    Stopping Hyper-V

    Changing the permissions on the "C:\ProgramData\Microsoft\Windows\Hyper-V" to include "everyone"

    going into "C:\ProgramData\Microsoft\Windows\Hyper-V" renaming the Virtual Machines directory to something else

    Starting Hyper-V

    Starting Visual Studio and hitting run on a WP8 project.  This recreated the Virtual Machines directory and it looks ok to me now.

    Wednesday, October 31, 2012 3:11 PM
  • > 1. Can each of you verify that using the Control Panel Programs and Features, 
    > choosing the Repair option for the SDK, does not fix the problem?

    It does not fix the problem.

    > 2. What other Visual Studio (VS) add-ins/plug-ins are you using, or have installed 
    > for VS if any?

    "Visual Studio extensions for Windows Library for Javascript", but problem existed before installing this plug-in.

    > 3. What edition of VS are you using (Pro and above, or none, i.e. you are using the 
    > VS Express edition supplied with the SDK)

    VS Express for Windows 8
    VS Express for Windows Phone 8

    Installed in this order.

    > 4. By "clean" does this include a whole new install of Windows 8 (reformat, 
    > reinstall)?

    Started brand new image using Parallels Desktop virtualization software.

    > 5. Are you using any other virtualization software? VirtualBox?

    Yes, Parallels Desktop 8 for Mac OS X 10.8.

    >6. If you used Pro or higher VS, what optional features did you choose? Did you use
    > the default option set?

    Only express versions.

    Wednesday, October 31, 2012 3:16 PM
  • 1. No, still crashes;

    2. None;

    3. Professional;

    4. Completely fresh install of Windows 8 and VS2012 on a clean SSD drive;

    5. VirtualBox is causing "IPv4" error, after uninstalling it, emulator works, but designer still crashes;

    6. As I remember - pretty default, without Office stuff.

    Wednesday, October 31, 2012 4:59 PM
  • Found a possible solution, at least for those of us running Visual Studio 2012 Express.

    * Uninstall The Windows Phone 8 SDK, Visual Studio 2012 Express and all related components
    * Uninstall SQL Lite
    * Uninstall all Silverlight features (SDK and Runtime)

    * Reboot

    * Install Windows Phone 8 SDK

    Once I did this, I got the design view up. The emulator seems to be working fine as well.

    Wednesday, October 31, 2012 6:23 PM
  • I got it fixed by:

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

    • Proposed as answer by THKAWMVP Thursday, November 01, 2012 9:44 AM
    Wednesday, October 31, 2012 7:50 PM
  • Thanks, Lost Logic and Noerdk.

    All, please try the above workaround. You also might consider manually deleting library DLL resources that may not have been removed during the process of uninstalling the 7.1 SDK (if necessary). It might be that the old libraries failed to get flushed out.

    Make sure before you do your SDK uninstallation, VS is not running, and the 7.1 emulator is not running.

    -Mark


    Mark Chamberlain Sr. Escalation Engineer | Microsoft Developer Support | Windows Phone 7

    Wednesday, October 31, 2012 8:08 PM
  • Apologies for the inconvenience. It feels like the designer installer packages are not being patched, possibly because the RTM packages are not present. That might be the case if a Windows Phone 8 SDK pre-release version were to be installed and not removed before installing the RTM version. Please try the following...

    1. Close all running instances of Visual Studio 2012
       
    2. start cmd.exe (as admin/elevated) 
    3. cd /d %windir%\installer 
    4. for /f %i in ('findstr /imc:"XAML UI Designer" *.msi') do (start /wait msiexec.exe -qb -x %i VSEXTUI=1)

      Clear the prompts, allowing the uninstalls. 
    5. For the next two steps, order is important...

      Go to Add/Remove Programs (AppWiz.cpl) and choose to repair all installations Visual Studio 2012 (Utimate, Pro, Premium, Win8 Express)

      then...

      Go to Add/Remove Programs (AppWiz.cpl) and choose to repair the Windows Phone 8 SDK

    Please let us know if this resolves the problem for you. Again, apologies for the
    inconvenience.

    - thanks

    Paul


    Microsoft Expression Setup Developer


    Wednesday, October 31, 2012 8:51 PM
  • I have now tested the WP8 SDK on my primary desktop PC and it works without problems. The designer works as expected and the emulator too.

    On my notebook the workaround works.

    Thanks for the help!


    Ralf Ehlert MCPD | MCTS | MCAS | MCP

    Wednesday, October 31, 2012 10:04 PM
  • Hi Paul,

       It does not work on my PC as you suggested, still following exception come out when load XAML:

    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)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

    System.NullReferenceException
    Object reference not set to an instance of an object.

    Server stack trace: 
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    System.NullReferenceException
    Object reference not set to an instance of an object.
       at Microsoft.Expression.Platform.PlatformService.PlatformEntry.get_PlatformCreator()
       at Microsoft.Expression.Platform.PlatformService.GetPlatformCreator(String frameworkSpec)
       at Microsoft.Expression.Platform.PlatformService.IsCompatibleFramework(FrameworkName hostFramework, FrameworkName guestFramework)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)
       at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

    Thursday, November 01, 2012 3:31 AM
  • Sorry, Paul, It does not work on my laptop

    Win8 x64 RTM + VS2012 Ultimate + WP8 SDK

    The XAML Designer crashes as well - -

    I notice some very interesting  phenomenon:

    1. When open a win8 project , The XAML Designer works like a charm.

    2. When open a WP project(no matter 7.1 or 8), The XAML Designer crashes everytime

    3. Blend for VS 2012 can work


    We are Better Studio.


    • Edited by Better Studio Thursday, November 01, 2012 6:52 AM add
    Thursday, November 01, 2012 6:49 AM
  • I got it fixed by:

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

    Awesome!

    Your method fixed  me up too ;) 

    Sorry Paul, I still get same problem after i tried.

    My platform:

    Lenovo W520

    Pure Install Windows 8 Pro X64

    And yesterday After Install WP8 SDK, I got this problem

    But solved now (y)

    After do all of this step,

    you need to manual install back Sliverlight 5 SDK if you need.

    • Edited by THKAWMVP Thursday, November 01, 2012 9:52 AM update sliverlight part
    Thursday, November 01, 2012 9:47 AM
  • Hi Paul.

    Unfortunately the given steps did NOT work for me. Designer still crashes. :(

    Thursday, November 01, 2012 9:47 AM
  • I got it fixed by:

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

    It works like a charm.

    Thanks man


    We are Better Studio.

    Thursday, November 01, 2012 11:19 AM
  • how do I do step2?

    deleting all silverlight elements in "add/remove programs" ?


    :)

    Thursday, November 01, 2012 1:25 PM
  • how do I do step2?

    deleting all silverlight elements in "add/remove programs" ?


    :)

    Just remove all the instances with uninstall under add/remove programs - yes.
    Thursday, November 01, 2012 1:41 PM
  • I got it fixed by:

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


    Now it Shows another error:

    Original:

    Exception: Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler zurückgegeben.  
    
    bei MS.Internal.XcpImports.CheckHResult(UInt32 hr)   
    bei MS.Internal.XcpImports.Collection_InsertValue[T](PresentationFrameworkCollection`1 collection, UInt32 index, CValue value)   
    bei MS.Internal.XcpImports.Collection_InsertDependencyObject[T](PresentationFrameworkCollection`1 collection, UInt32 index, DependencyObject value)   
    bei System.Windows.PresentationFrameworkCollection`1.InsertDependencyObject(Int32 index, DependencyObject value)   
    bei System.Windows.Controls.UIElementCollection.InsertInternal(Int32 index, UIElement value)
    
    InnerException: Keine
    Translated:
    Exception: when you call of a COM component an HRESULT returned E_FAIL error.
    
    with MS.Internal.XcpImports.CheckHResult (UInt32 hr)
    with MS.Internal.XcpImports. Collection_InsertValue [T](PresentationFrameworkCollection'1_collection,_UInt32_index,_CValue_value)
    with MS.Internal.XcpImports. Collection_InsertDependencyObject [T](PresentationFrameworkCollection'1_collection,_UInt32_index,_DependencyObject_value)
    at System.Windows. PresentationFrameworkCollection'1. InsertDependencyObject(Int32_index,_DependencyObject_value)
    at System.Windows.Controls.UIElementCollection.InsertInternal(Int32_index,_UIElement_value)
    
    InnerException: No
    
    

    Thursday, November 01, 2012 8:55 PM
  • I got it fixed by:

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

    Works fine for me. Thank you.

    Michael

    • Proposed as answer by banjming Saturday, November 10, 2012 11:44 PM
    Saturday, November 03, 2012 12:54 PM
  • Download this file vsupdate_KB2707250.exe from this site : Microsoft Download Center "Visual Studio 2012 Update 1 CTP 4"  and it will fix the problem it works with me.

    • Proposed as answer by Swaz90 Wednesday, November 14, 2012 9:44 PM
    Sunday, November 04, 2012 8:05 PM
  • Download this file vsupdate_KB2707250.exe from this site : Microsoft Download Center "Visual Studio 2012 Update 1 CTP 4"  and it will fix the problem it works with me.

     this doesn't appear to have solved problem

    Morgan Vermef

    Sunday, November 04, 2012 9:32 PM
  • didn't help me out I'm afraid :/

    same error...

    Monday, November 05, 2012 8:21 AM
  • Tried every proposed solution, still same error.
    Monday, November 05, 2012 3:06 PM
  • [bump] this really needs to be addressed it is causing other problems with 3rd party controls or its making it really difficult to get the 3rd party control's issues pinpointed.

    Morgan Vermef

    Sunday, November 11, 2012 1:31 AM
  • Fixed this issue for me. Thanks :)
    Wednesday, November 14, 2012 9:46 PM
  • This worked for me.

    As i note, I only have silverlight 4 sdk installed if that could matter.

    Sunday, November 18, 2012 3:16 AM
  • Hi! I've found the solutions by following this post! It's very easy and straightforward! 

    Hope It Helps! ;)

    http://diaryofamsp.azurewebsites.net/?p=151

    Tuesday, November 27, 2012 2:36 PM
  • I got it fixed by:

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

    it's work.. big thanks Noerdk .. yaaay \m/
    Thursday, November 29, 2012 5:55 AM
  • i found out that in my case, the designer only crashes if i use a reference to a portable library...

    this is really annoying...

    is there a solution for this bug?

    Sunday, December 02, 2012 1:24 PM
  • i found out that in my case, the designer only crashes if i use a reference to a portable library...

    this is really annoying...

    is there a solution for this bug?

    Exact same problem here.
    Saturday, December 08, 2012 8:32 PM
  • many devs give up windows phone because of this bug.

    Sunday, December 09, 2012 11:09 AM
  • Hi,

    I am having exactly the same problem as the others in the thread here and have been chipping away for a couple of days, i have VS2012 Pro, Win8 SDK, I have tried pretty much everything in this thread to no avail. I have recently upgraded to Update 1, i am not sure if that has a bearing. That was before i first installed the WP8 SDK.

    And am still getting the below Error. 

    XamlParseException: Cannot find a Resource with the Name/Key PhoneBackgroundBrush [Line: 47 Position: 111]

    at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)

    Any help would be much appreciated.

    Thanks in advance.

    Wednesday, December 26, 2012 6:10 PM
  • Same problem.  The issue is with the portable .net library.
    Sunday, December 30, 2012 10:31 PM
  • Hi,

    On the subject of compatibility issues with portable .net libraries, please refer to the compatibility matrices found at the following MSDN site:

    Cross-Platform Development with the .NET Framework
    http://msdn.microsoft.com/en-us/library/gg597391.aspx

    Personally I would be disinclined to share portable libraries across projects that span multiple platforms, out of concern that those API usage scenarios may not have as thoroughly tested in the real world as DLLs that target one platform only.

    -Mark


    Mark Chamberlain Sr. Escalation Engineer | Microsoft Developer Support | Windows Phone 8

    Wednesday, January 02, 2013 4:09 PM
  • Obviously the point to portable .net libraries is to share them between platforms!

    Friday, January 04, 2013 8:25 PM
  • I can confirm for sure that these errors are the result of portable libraries... that are supposed to work between platforms!

    I can also confirm that it appears to be something with phone:. I.e. all forms load fine if they don't have a phone element such as a pivot on it. As soon as you put one on it, it dies.

    • Edited by JohnGalt Friday, January 04, 2013 9:21 PM
    Friday, January 04, 2013 9:15 PM
  • Windows 8 Professional

    Visual Studio 2012

    Code : http://code.msdn.microsoft.com/wpapps/Weather-Forecast-Sample-586ef733

    I fix it this way.

    Uninstall Silverlight SDK 5

    Uninstall Silverlight SDK 4

    Uninstall Silverlight SDK 3

    Uninstall Silverlight

    Reboot

    Load Weather Forecast simple and return Silverlight SDK 4 not found!

    Uninstal Windows phone 8 sdk

    Reboot

    Install Windows phone 8 sdk

    Reboot

    Load Weather Forecast Sample and Designer Works!

    Tuesday, January 08, 2013 5:30 PM
  • The easy way to solve this is to close all Visual Studios running, go to your temp directory and clear it out.

    Open VS.net, rebuild the project.

    Open it and it will work... for a while, and then you have to do it again.  This is clearly a bug in the sdk that needs to be fixed. MS I can provide you with repro project any time you want.

    Tuesday, January 08, 2013 5:41 PM
  • Didn't work for me... none of the solutions did.. MS get your act together... would people vote for the question so it can get some attention
    Sunday, January 13, 2013 3:25 PM
  • I did Paul Bronowski's suggestion but the designer was still in error.

    When I installed Visual Studio 2012 update 1, the designer loaded successfully. :)


    • Edited by rara18 Friday, February 01, 2013 6:49 AM
    Friday, February 01, 2013 6:42 AM
  • That's because the temp directory files were invalidated. Wait a while. It will still do it.
    Friday, February 01, 2013 1:14 PM
  • Tried previous solutions and unfortunately, nothing helped me. Have the same problem as Ralf Ehlert stated in the first post.
    On Windows 7 with VS Professional 2012 I had no problems with this designer.
    I formatted my system partition, installed Windows 8 and VS Ultimate 2012.
    Now, when I open my project using Blend for VS 2012, designer works properly. But when I open the same project using VS Ultimate 2012, designer crashes (the same problems as in the first post).

    EDIT:
    Installing VS Update 1 solved the problem.

    • Edited by tpazdziurek Saturday, March 16, 2013 9:12 AM
    Friday, March 15, 2013 7:54 PM
  • Hi Everyone,

                     I didn't try uninstalling WP8 sdk . Instead When I installed Visual Studio 2012 update 4, the designer loaded successfully and its working fine now.

    Thursday, July 04, 2013 9:14 AM
  • yes, after installing vs2012 just install vs 2012 update, the issue can be solved. it works!
    Monday, December 16, 2013 7:13 AM
    1. Uninstall WP8 SDK
    2. Uninstall all instances of Silverlight SDK and Rutime.
    3. Re-install WP8 SDK.
    Wednesday, February 26, 2014 7:53 AM
  • After performing your steps I am getting the following message.

    System.InvalidOperationException
    The document failed to open.
       at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

    What do now plz help.

    Thanks in advance.

    Tuesday, August 26, 2014 5:08 AM