How do I clear Expression Blend 4's caching information?

I seem to be good at making Expression Blend 4 crash on startup. The problem seems to be related to locking initializing static managed and unmanaged variables as Blend first opens my solultion which contains a mixture of unmanaged C ++ projects and managed code. Blend causes MyModel to be instantiated (I'm using MVVM Light in App.xaml, but I think it's not very relevant). This page details how to detect and fix this potential deadlock: Initializing mixed assemblies

Since I am writing code and markup in both VS2010 and Blend4 at the same time, I sometimes accidentally create this situation and then Blend crashes when my solution loads. The Blend load crash persists even if I fix the issue in VS2010 (VS2010 seems immune to a crash in the same solution file as the Blend crash). Blend can crash on both x86 and x64 systems. Blend fails to launch even if I try to delete all output directories. Blend's crash persists even if I rename "C: \ Users \ username \ AppData \ Local \ Microsoft \ Expression \ Blend".

My question is: How do I reset the Mix state as if it has never seen this solution before?

I suppose this would be a suitable solution since if I download a fresh fresh copy of the source from the original control with the fixed managed / unmanaged issue it loads into Blend4, builds and starts fine.


source to share

1 answer

The main reason for Blend to crash is when the Intialising UI components actually run their constructor, which may have some code like accessing the database, and Blend doesn't support database access so that it can crash.

Thus, there are two ways to find a potential problem.

Comment out all code in your UI constructor except InitializeComponent () to find out the problematic code


Attach Visual Studio Debugger to Blend and then rebuild the project or open the XAML file that blend the blend

To perform the second option, you will go to Debugger β†’ attach to process β†’ select Blend from the list.

When you identify the code that crashes, Expression Blend only has an if statement that will stop running the code if it's a blend that is trying to execute it, and if it doesn't just run it. So something like this:

  // This code will run when Blend renders the controls
  // This code will run when you are running application on it own


Hope it helps.



All Articles