Blend cannot compile my app, is there a way to clean out blend? RRS feed

  • Question

  • For some reason there is something wrong with Blend's compiler, I cannot get it to compile my app by in VS2010 it works fine.

    It might be a temporary files issue, but Im not sure, is there a way to "clean" blend so its almost like a fresh start without re-installing? It is EXTREMELY frustrating not being able to compile in blend because I get XAML errors complaining about missing converters which exist and work fine when compiled in VS2010.


    Monday, February 7, 2011 3:51 AM

All replies

  • Are there any command line parameters to add to Blend to clean it out?
    Monday, February 7, 2011 9:12 AM
  • Blend uses msbuild to build your application, which in the end is almost identical to what VS uses. The differences might come from the fact that Blend always compiles the default build (generally DEBUG) whereas in VS you can change what build is targeted. Not sure if that is relevant here.

    Do you get an error when trying to build in Blend? Can you post them?

    If you want to try cleaning out the build, in VS run the "clean solution" command. Blend and VS operate on the same .sln and .csproj files.

    Monday, February 7, 2011 2:32 PM
  • Ok, so a few things, I am also doing the standard Debug build in VS, so I dont know why the compilation would fail.

    The other thing is that I dont get an error displayed to me when Blend crashes (even though I have the /exceptionlog flag on the exe), it just shows the standard "Expression Blend has stopped working" message which only has the cancel option available.

    But the off times when it doesnt crash i just get standard compilation errors (Class: MyClass is not found, are you missing an assembly reference?) but the class exists and it compiles fine in VS2010.

    I have done a clean solution, I thought perhaps there were dome files that Blend had of its own.

    I cannot think why this would be, I feel like a re-install is in order....

    Monday, February 7, 2011 9:34 PM
  • On thing I should mention is that my solution is somewhat complicated and has several projects ranging from WPF/Silverlight/Classlibraries/Setup projects/etc... and I am using code sharing techniques to share code between SL and WPF (linking files across projects).

    How can I test the difference between the VS build and the Blend build?
    Monday, February 7, 2011 9:37 PM
  • You could possibly try a msbuild build from the command line, this would probably be more similar to how Blend builds.

    From a command prompt, msbuild yourslnname.sln

    On my machine, the path to msbuild is:


    Monday, February 7, 2011 9:40 PM
  • Done, zero errors (several warnings, but nothing to worry about)...


    Monday, February 7, 2011 9:43 PM
  • Sounds like this may be a bug in Blend, are you able to share your project so we could reproduce this issue?


    Another thing that could help would be to delete any user specific files, solutionname.suo, and projectname.csproj.user, these are typically hidden files that are next to the .sln and .csproj (and other project type) files. They are binary formats and contain things such as your setting for startup project. They can become corrupt and cause problems.

    As with any file you delete, make a backup of the state of your project before you do so.

    Monday, February 7, 2011 9:52 PM
  • Ok, Im trying a re-install first, I will let you know how I go very soon
    Monday, February 7, 2011 9:54 PM
  • An interesting thing is that it also crashes 80% of the time on a clean in Blend, does this help at all?
    Monday, February 7, 2011 10:04 PM
  • Can I email you the solution?
    Monday, February 7, 2011 10:14 PM
  • Sure, first.last@microsoft.com (using my name).

    Zip file would be good, after a clean keeps the size down, and helps keep it from being marked as a virus due to the bin/obj files.

    Monday, February 7, 2011 10:51 PM
  • sent, let me know if you get the email :)
    Monday, February 7, 2011 11:47 PM
  • Im just looking at the output of Blend and I dont think it is using MSBuild it seems to be using Csc.exe instead??
    Tuesday, February 8, 2011 8:47 AM