locked
"Initializing toolbox" takes 30secs-1min after opening any WPF project

    Question

  • I recently had to uninstall then reinstall my VS 2008 instance.  I reinstalled with VS 2008 SP1 and everything works ok.  The problem I have now though is after I open any WPF project, the first time I open a XAML file (or if one was reloaded automatically by the project on startup), the statusbar says "Initializing toolbox" for 30seconds to about a minute. 

    I switch projects a lot and this really kills productivity.  I don't remember this happening before.  Does anyone have any suggestions for a fix?

    I tried disabling AutoToolboxPopulate in the WinForms Designer options but that didn't help.
    actiprosoftware.com - WPF ribbon, docking/mdi, navbar, explorerbar, breadcrumb, gauge, bar code, wizard controls & much more
    Monday, October 20, 2008 2:44 PM

Answers

  • This should really just happen once and not for each project. I'm just guessing here but maybe something went wrong with the toolbox data files where the toolbox items get cached. You could try deleting them to see if that helps:

    1. Exit Visual Studio
    2. Navigate to your user profile directory for Visual Studio (this is found at %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\9.0)
    3. Delete the TBD files found there (they are usually hidden files)
    4. Re-start Visual Studio and open your WPF project - the toolbox will be initialized.

    Hopefully that will prevent it from doing this for every project.

    BTW, The WPF Designer has nothing in common with the WinForms Designer, changing any of the settings there will have no effect on the WPF Designer.


    Marco Goertz \ Sr. Dev Lead \ WPF Designer "Cider" \ Microsoft
    Thursday, November 06, 2008 4:27 PM

All replies

  • I have the same problem, can anyone please advise??
    Thursday, November 06, 2008 4:01 PM
  • This should really just happen once and not for each project. I'm just guessing here but maybe something went wrong with the toolbox data files where the toolbox items get cached. You could try deleting them to see if that helps:

    1. Exit Visual Studio
    2. Navigate to your user profile directory for Visual Studio (this is found at %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\9.0)
    3. Delete the TBD files found there (they are usually hidden files)
    4. Re-start Visual Studio and open your WPF project - the toolbox will be initialized.

    Hopefully that will prevent it from doing this for every project.

    BTW, The WPF Designer has nothing in common with the WinForms Designer, changing any of the settings there will have no effect on the WPF Designer.


    Marco Goertz \ Sr. Dev Lead \ WPF Designer "Cider" \ Microsoft
    Thursday, November 06, 2008 4:27 PM
  • Hi,

    It didn't work for me. I deleted all .tbd files and restarted VS. When I opened a xaml file  it again started by initializing toolbox and created all those file again which I deleted.

    Any other ideas?


    iffi
    Thursday, November 27, 2008 12:33 PM
  • I renamed the 9.0 folder and that solved the problem for me.
    Codigo ergo sum
    Monday, December 15, 2008 7:48 AM
  • Hi,

    Is there any way to disable the Toolbox?

    Opening a xaml file, (including the App.xaml,) takes up to 2 minutes on my system. I've tried all the suggested workarounds in this thread with little discernible success.

    Please help!

    Danny
    Tuesday, February 17, 2009 10:03 AM
  • If you are happy to work without the design surface and the toolbox (i.e. just use the XAML editor only), you may be able to work around the problem by disabling the designer (Tools...Options...Text Editor...XAML....Miscellaneous....Always Open Documents In Full XAML view checkbox). However this is a fairly extreme work around.

    As Marco mentioned, this is not normal behavior; the toolbox should only initialize when VS is installed and/or the Toolbox is reset/the TBD files cannot be read. Another possibility is that Visual Studio doesn't have proper access to the TBD file directory in the account you're working in; try checking the ACLs on %USERPROFILE%\appdata\local\microsoft\visualstudio\9.0 and make sure you have write access to the folder? I can't imagine why this would have got changed however. 

    Mark
    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Wednesday, February 18, 2009 9:16 PM
  • Hi,
    I had a similar problem yesterday. What I did is I just renamed the folder as described by PA66 and it worked. However as Mark explained there could be some problem with ACLs because after renaming and upon VS restart it created the folder again but this time no problems at all.

    Hope this helps

    iffi
    Thursday, February 19, 2009 8:26 AM
  • i try but every solution not work on my pc wich is Window Vista 64 bit edition...

    any ideas ?

    • Edited by Ale cts Thursday, September 10, 2009 8:51 AM error
    Thursday, September 10, 2009 8:20 AM
  • I'm having this same problem and have NOT been able to resolve.  What I've tried so far:

    1.  Rename ...Visual Studio\9.0
    2.  Reset Toolbox
    3.  ACL shows my account, Admin account, and System account as having full rights to the dir

    Any other suggestions other than wipe and re-install everything?  I've spent hours and hours searching via Google and even Bing (which was useless) and found this problem to be VERY common and not everyone is finding resolution.  Is Microsoft aware of the problem?

    Rob
    Tuesday, February 16, 2010 5:57 PM
  • Rob,

    I'm afraid I don't know of any other tricks for VS 2008 than what was mentioned in this thread. However, a lot of work has gone into VS 2010 to improve the experience around toolbox performance, so I would encourage you to check out the newly released RC at:

    http://msdn.microsoft.com/en-us/vstudio/default.aspx

    Best regards,
    Marco
    Marco Goertz \ Sr. Dev Lead \ WPF/SL Designer "Cider" \ Microsoft
    Tuesday, February 16, 2010 7:15 PM
  • Marco,

    Thanks for the response, please don't be offended, but the last time I install a VS RC, I spent a weak recovering from the havoc it created on my computer (which as you know is not supported).  Since then, I pretty much don't touch any Microsoft products until they're at SP1 or higher.  VS seems to be an incredibly fragile environment which usually indicates not enough validation in the coding of VS.  I know when my code becomes fragile, it's often a result of me not doing enough validation to account for the unexpected.

    I'm guessing, but most likely the problem is either a security issue or a registry problem -- that seems to account for about 95% of the issues around all Microsoft products (hopefully Microsoft have recognized this and the light bulbs have turned on).  I was hoping an engineer could step up to the plate and identify what areas of the registry the Toolbox works with and/or what VS security context is need to work with the Toolbox. 

    Example: is it possible that an 3rd party VS tool installed under Admin account could cause the problem when VS is run under a user account (even if that user is a member of admin)?

    But from your suggestion, it sounds like Microsoft have abandon VS 2008 support to focus on VS 2010.

    Rob.
    Tuesday, February 16, 2010 7:45 PM
  • Marco,

    at the end I have un'installed and re-installed all and now work fine.

    Ciao
    Ale
    Wednesday, February 17, 2010 1:36 PM
  • Rob,

    No offense taken. I can certainly understand your reservations against trying an RC version. I would never suggest anyone install pre-release software on a production machine they depend on. A great alternative for someone who doesn't have a spare computer that can easily re-imaged would be Virtual PC:

    http://www.microsoft.com/windows/virtual-pc/

    Example: is it possible that an 3rd party VS tool installed under Admin account could cause the problem when VS is run under a user account (even if that user is a member of admin)?

    You may want to rule that out by deleting the *.TBD files under %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\9.0 (make sure to close all instances of VS first) and starting VS as an Admin (right click on Start menu shortcut and "Run as Administrator").

    But from your suggestion, it sounds like Microsoft have abandon VS 2008 support to focus on VS 2010.

    Support for VS 2008 is not abandoned, but the development efforts are certainly focused on VS 2010.

    Marco Goertz \ Sr. Dev Lead \ WPF/SL Designer "Cider" \ Microsoft
    Wednesday, February 17, 2010 4:59 PM
  • I've tried deleting the *.TBD and doing the "Run As Administrator" part, but no change.  Is there any "trace" (output to a log) I can enable to identify what is triggering the Toolbox initialize every time I start VS?  Or if someone from the VS dev team could tell me all the possible toolbox initialization triggers, that would be even better.

    I can't spend a week or more uninstalling everything, deactiviting various 3rd party licenses, re-installing everything, license reactivition, binding to VSS, etc. etc. etc.  -- and with no guarantee it will fix my problem.  Even a complet OS wipe might not fix the problem, just never know (and that's part of the problem, no logging or ability to identify).

    VM is an option and I use it extensively on one of my Mac computers, but haven't done it for my Windows based office computers yet.  But it does beg the question about "restore points" and exactly what is the point of having them if they rarely work.  VM snapshots seems to be the only way to be "sure" when one wants to regress back to a prior state.  But VM does have a small performance penalty and doesn't do 3D graphics programming nor audio processing very well.

    As far as abandoning VS 2008, we'll just have to disagree, as I understand it VS 2008 SP2 will not happen and got bumped by VS 2010.  So it has been abandoned from any fixes of existing issues (like this toolbox problem for example) in favor of releasing VS 2010.  But like I said, no VS 2010 for me until I see an SP1 for VS 2010 -- sorry, but I've just been burned too many times by Microsoft -- my work is too mission critical for me to be a testing goat.

    Rob.
    Wednesday, February 17, 2010 5:52 PM
  • Fair enough. Let's try and narrow down the issue.

    Try opening the toolbox before opening a project. Is this where it takes all the time to initialize? And when you then open the project, do you see another toolbox initialization delay?

    If it's the former, could you please open a VS Command prompt and launch VS via "devenv /log <filename>", and send that log file to mgoertz(at)microsoft.com?

    Also, it may be helpful to know which 3rd party addons for VS you have installed.

    Since you mentioned VSS, does this repro for all projects or maybe only project under Source Control?


    Marco Goertz \ Sr. Dev Lead \ WPF/SL Designer "Cider" \ Microsoft
    Wednesday, February 17, 2010 10:17 PM
  • I am awaiting the outcome of this thread with interest - I have exactly the same problem and it is driving me up the wall!
    Do we have a solution yet?!
    Wednesday, February 24, 2010 1:38 PM
  • Not sure what you mean by a "VS Command Prompt" -- assume you mean a command window (i.e. cmd) or from the OS search?

    I have narrowed the problem down to a specific 3rd party component from ComponentFactory Krypton Suite 4.1.x.  I will get "Initializing Toolbox" after I open up a project that uses the Krypton control and then click on any control from the Krypton Suite (very important, must be one of the Krypton controls).  If I click on anyone other standard VS control, I do NOT get the "Initializing Toolbox".

    I'm contacting ComponentFactory folks to get their input on this problem.

    VSS doesn't appear to be an issue, happens with or without.

    Rob

    Wednesday, February 24, 2010 3:56 PM
  • Marco,

       Thanks for the 411, I deleted the TBD files and set the owner of the 9.0 folder to my account.  It was owned by System before.  Whatever the case, the first time I openned VS it initialized the toolbar and the next time I openned it, it took no more than a fraction of a second to initialize. 


    - Rashad Rivera www.omegusprime.com
    Tuesday, May 11, 2010 4:29 PM
  • Rashad,

    I'm glad to hear that you got this resolved. Thanks for letting me know.


    Marco Goertz \ Sr. Dev Lead \ WPF/SL Designer "Cider" \ Microsoft
    Wednesday, May 12, 2010 2:29 PM
  • Hi Everyone,

    just in case you have this in 2012 - there seems to be another problem with Windows 7 Ultimate, VS2010 pro on 64 bit - after SL5 install. 

    The post by Josh on this thread worked for our PC's :

    http://connect.microsoft.com/VisualStudio/feedback/details/551183/loading-toolbox-content-from-package-takes-55-seconds-or-more 

    Plus we had to delete the TBD files at the same time as removing the reg entries

    Anyway - hope this helps!

    Cheers

    Peter


    Newbie web developer

    Tuesday, March 27, 2012 2:20 PM