locked
Expression Blend crashes with Windows Phone project RRS feed

  • Question

  • Hello,

    Each time I try to open my Windows Phone 7.5 project with Expression Blend, it crashes.

    I'm using Expression Blend v4.0.30816.0 over Windows 7 Proffessional 32 bit.

    Crash report can be seen in next link:

    http://pastebin.com/yqvzy0nT

    Any clue?

    Thanks


    • Edited by aZubi Thursday, March 1, 2012 11:37 AM specify Blend version number
    Thursday, March 1, 2012 11:35 AM

Answers

  • Is it one particular project or all WP7 projects?

    One big difference between VS and Blend is that Blend loads much more than VS on the design surface, so if your constructors or loaded events are doing certain operations it could in theory crash Blend. From the call stack, it looks like a web operation is possibly being run in one of those events? Hard to say for sure.

    There is a property you can check to see if your app is running inside a design surface to prevent some of those problems:

     if (System.ComponentModel.DesignerProperties.IsInDesignTool)
        // code to run if in designer
    else
        // code to run if not in designer i.e. running actual application

    • Marked as answer by aZubi Thursday, March 1, 2012 3:48 PM
    Thursday, March 1, 2012 3:16 PM
    Moderator

All replies

  • Does it work with other project types? How about if you open it without opening a project?
    Thursday, March 1, 2012 2:56 PM
    Moderator
  • Yes, it works with other projects, or running it without opening a project.

    The project with which Blend fails compiles and runs fine.

    Thursday, March 1, 2012 3:13 PM
  • Is it one particular project or all WP7 projects?

    One big difference between VS and Blend is that Blend loads much more than VS on the design surface, so if your constructors or loaded events are doing certain operations it could in theory crash Blend. From the call stack, it looks like a web operation is possibly being run in one of those events? Hard to say for sure.

    There is a property you can check to see if your app is running inside a design surface to prevent some of those problems:

     if (System.ComponentModel.DesignerProperties.IsInDesignTool)
        // code to run if in designer
    else
        // code to run if not in designer i.e. running actual application

    • Marked as answer by aZubi Thursday, March 1, 2012 3:48 PM
    Thursday, March 1, 2012 3:16 PM
    Moderator
  • If I remove next line from App.xaml, I can open the project with Blend.

    <vm:GlobalViewModelLocator xmlns:vm="clr-namespace:eICT.Phone.ViewModel" x:Key="Locator" d:IsDataSource="True" />

    But, I don't see where is the problem, because other projects work fine. I creates the project with MVVM Light Toolkit template.

    Thursday, March 1, 2012 3:30 PM
  • Look at the constructor for that class and see if it does anything that might cause trouble when running in a design surface vs the real app.
    Thursday, March 1, 2012 3:32 PM
    Moderator
  • I didn't find the origin of the problem, doing nothing in GlobalViewModelLocator class when IsInDesignTool==true works for now.

    Thanks!

    Thursday, March 1, 2012 3:50 PM