locked
WPF Hangs Visual Studio 2008 after compilation RRS feed

  • Question

  • Every single time I compile a WPF project in Visual Studio 2008, Visual Studio hangs for about 10 seconds as soon as the compilation completes. During this time, VS is obvisouly frozen, yet the actual application I'm debugging is fine. This happens on both Windows XP & Vista.

    Has anyone else had this problem? Any ideas on how to fix it?

    I'm running Windows XP SP2 w/ Visual Studio 2008 Professional
    Thursday, March 20, 2008 10:42 PM

Answers

  • Using "Source Code (Text) Editor" as the default works and you get intellisense.  I still hang for about 5 seconds after every build though, no matter what I use as the default editor.
    Friday, March 21, 2008 10:13 PM
  • you could make the xml editor as the default xaml editor...right click xaml file --> open with --> set as default

     

    Friday, March 21, 2008 5:07 PM
  • We are working to deliver a fix for this issue with our next service release.  Unfortunately, there doesn't appear to be a work around for this issue that you could use in the meantime.  ~Brett.

    Thursday, March 27, 2008 11:14 PM

All replies

  • Very often VS freeze when you have a Xaml Design editor opened. Try closing it or switching to the code behind before compilation. If it's not critical you can configure VS to show only raw xaml editor without designer.

     

    Friday, March 21, 2008 10:41 AM
  • Yeah, it seems to only freeze when the editor/designer is open. I have it configured now to "Always open documents in full XAML view", but other than that, I don't know how to edit a XAML file w/out the "Design" tab appearing at the bottom.

    Is there a way to ditch the Designer altogether?
    Friday, March 21, 2008 4:28 PM
  • you could make the xml editor as the default xaml editor...right click xaml file --> open with --> set as default

     

    Friday, March 21, 2008 5:07 PM
  • Yeah, I tried that but you lose all intellisense - which is muy importante. Bummer, hopefully MS will fix this issue in a near-future release.
    Friday, March 21, 2008 5:57 PM
  • Using "Source Code (Text) Editor" as the default works and you get intellisense.  I still hang for about 5 seconds after every build though, no matter what I use as the default editor.
    Friday, March 21, 2008 10:13 PM
  • We have confirmed and reproduced the problem you are encountering.  Unfortunately there isn't a work around that still allows you to use intellisense.  This issue will be fixed in a future update.  Thanks for reporting this issue. ~Brett.
    Monday, March 24, 2008 5:27 PM
  • Thanks for confirming this issue Brett. But I have to say I'm quite surprised that this is the first report of this issue. Anyone who compiles a WPF app w/ the XAML designer/editor visible wil experience this obvious delay so I find it incredibly hard to believe that you guys were unaware of this issue.

    Is there any more info on when this might be patched? Losing 10 seconds every time compiling is done really adds up to a significant time loss at the end of the day - especially when testing animations & other logic that can only be viewed when running the app. Closing the XAML editor each time just to compile is almost as annoying as the actual issue. Any chance this could be patched w/ a hotfix?
    Wednesday, March 26, 2008 6:03 PM
  • We are working to deliver a fix for this issue with our next service release.  Unfortunately, there doesn't appear to be a work around for this issue that you could use in the meantime.  ~Brett.

    Thursday, March 27, 2008 11:14 PM
  • Sounds good - thanks for the update. Let me know if you need any testers. I look forward to the release.
    Thursday, March 27, 2008 11:19 PM
  • Hi Brett,

    I have the same short of problem. Expression Blend 2.0/2.5 and visual studio 2008 Freezes when I am opening the xaml file in design mode and edit mode. Is there already a fix for  this problem.

    Thanks
    Peter
    Sunday, August 3, 2008 1:23 PM
  • Has a fix been published for this yet? It's a real pain to deal with XAML in Visual Studio 2008 at the moment.

    When can we expect a fix to become available?


    LINQ in Action, the book [http://LinqInAction.net] - .NET pros and jobs [http://proagora.com]
    Thursday, January 29, 2009 12:24 AM
  • Any update yet?
    Tuesday, May 19, 2009 9:24 PM
  • I was just trying to get on board with DataBinding with WPF. Downloaded and installed the updatesource.csproj example. Every time I tried to do ANYTHING, except scroll down in the xaml text editor, VS would hang/freeze and go 'Not Responding" in the task manager.

    After about a million attempts of trying to get VS to behave (including reloading the SP 1 which by the way does not show up as SP 1 in the Help>About, only as SP), I believe to have found the source at least of my trouble.

    I read somewhere that someone saw a xaml form column trying to resize to infinity which was causing VS to hang. So, I started looking for something similar in the updatesource example.

    Every time I did something to cause the form to re-draw in the editor, (such as resize my ToolBox so I could see it better)  VS would hang. As it is downloaded, the <Window> Height and Width is defined with SizeToContent="WidthAndHeight" (I believe). I deleted the  SizeToContent="WidthAndHeight" and instead used Height="350" Width="450". It compiled, but caused it to hang once again. But after a restart the changes had been saved and VS no longer hangs or freezes.

    Seems like WPF elements if not defined for size are causing problems b/c no one put any curbs on them:) I hope this helps b/c I could not find anything useful except, 'we know there is a problem'.

    Friday, September 11, 2009 7:39 PM
  • Hi

    Is there a fix for this issue?

    Thanks, Luis

    Tuesday, February 21, 2012 11:32 AM