locked
Blend - The document "default.html" has become unresponsive

    Question

  • Hi,

    I've just dowloaded the trial of Windows 8 and Visual Studio 2012 Express. I started off by following one of the guides in the Dev Center and downloaded the Memory Game sample. When I opened the solution in Blend it hung indefinitely when trying to load default.css (it kept saying Loading... and was unresponsive). I then tried creating a new solution and the same thing happened when loading default.html. After waiting a while I finally got an error dialog saying that: The document "default.html" has become unresponsive. This can be caused by long running scripts, or if an error has been encountered.

    I have a screenshot but apparently I cannot insert an image until my account has been verified (how???).

    Any idea what might be causing this?

    Cheers


    Monday, December 3, 2012 9:40 PM

All replies

  • I tried reinstalling Visual Studio 2012 Express but that didn't help.

    This seems to occur when opening any HTML page in the Design View. CSS and JS open fine, and opening the HTML page in the Code View works too.


    • Edited by TheSteiny69 Monday, December 3, 2012 9:51 PM Clarify the view
    Monday, December 3, 2012 9:48 PM
  • Most likely this is happens because Blend trips over some call to WinRT API which is not allowed to be executed under "Blend Design Mode".  For example if you try to send a Toast Notification via WinRT API, that would work fine during actual  app runtime (on device or emulator), but would block under Blend.  You need to wrap calls to "design-time-unsupported APIs" with if statements checking for whether your app is running under "Blend Design" mode or not.

    var isInDesigner = Windows.ApplicationModel.DesignMode.designModeEnabled;
    
    if ( !isInDesigner ){
      // here we can call our "non-design-time" APIs
      // like sending Toast Notifications..
      // as this code only would be executed by app but NOT
      // by Blend.
    
      Windows.UI.Notifications.ToastNotificationManager.doSomeCall();
    
      
    }

    I have also answered this question there:

    https://social.technet.microsoft.com/Forums/en-US/05944b4b-f073-4169-8716-488446cd57d6/cannot-open-published-siena-app-in-visual-studio-blend

    Friday, May 29, 2015 11:23 AM