locked
pkgdef cache, is always invalid? RRS feed

  • Question

  • Hello,

     

    I've just started using VS2010. Every time I start the IDE it takes about 45s to load and display the welcome screen. Digging a bit deeper I enabled the log with "devenv /log xyz.xml". Looking at this log I can see that the problem is the pkgdef file cache is always out of date and is being rebuilt. Which is why startup takes so long.

     

    Here is the log output of interest. Can anyone suggest as to what is out of date here and how I can fix it?

    17 Discovered 9 PkgDef files VisualStudio 2012/01/18 13:55:50.485
    18 Newest node in pkgdef cache
              VMDebugger.Connect
    VisualStudio 2012/01/18 13:55:50.502
    19 Warning Current pkgdef cache timestamp is not valid VisualStudio 2012/01/18 13:55:50.502
    20 Initializing non-volatile pkgdef cache VisualStudio 2012/01/18 13:55:50.503
    21 Copying from HKEY_LOCAL_MACHINE to PkgDefManagement
              Software\Microsoft\VisualStudio\10.0
    VisualStudio 2012/01/18 13:55:53.111
    22 Loading discovered pkgdef files VisualStudio 2012/01/18 13:56:12.811
    23 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.pkgdef
    VisualStudio 2012/01/18 13:56:13.612
    24 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.pkgdef
    VisualStudio 2012/01/18 13:56:13.614
    25 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Data\vspackage.pkgdef
    VisualStudio 2012/01/18 13:56:13.615
    26 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Data\vspackage.pkgdef
    VisualStudio 2012/01/18 13:56:13.617
    27 Warning PkgDef encountered data collision in section 'HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\ShellFileAssociations\.dbproj' for value '' VisualStudio 2012/01/18 13:56:13.874
    28 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Data\SqlServer\DacPackage.pkgdef
    VisualStudio 2012/01/18 13:56:13.879
    29 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Data\SqlServer\DacPackage.pkgdef
    VisualStudio 2012/01/18 13:56:13.882
    30 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Data\SqlServer\sqlpackage.pkgdef
    VisualStudio 2012/01/18 13:56:14.846
    31 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Data\SqlServer\sqlpackage.pkgdef
    VisualStudio 2012/01/18 13:56:14.849
    32 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\VC\ClassWizard\10.0\ClwWizard.pkgdef
    VisualStudio 2012/01/18 13:56:14.997
    33 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\VC\ClassWizard\10.0\ClwWizard.pkgdef
    VisualStudio 2012/01/18 13:56:14.999
    34 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Platform\Microsoft.VisualStudio.ExtensionManager.pkgdef
    VisualStudio 2012/01/18 13:56:15.012
    35 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Platform\Microsoft.VisualStudio.ExtensionManager.pkgdef
    VisualStudio 2012/01/18 13:56:15.013
    36 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Platform\VsAppDomainManager.pkgdef
    VisualStudio 2012/01/18 13:56:15.058
    37 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Platform\VsAppDomainManager.pkgdef
    VisualStudio 2012/01/18 13:56:15.060
    38 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\CommonExtensions\DataDesign\DataDesign.pkgdef
    VisualStudio 2012/01/18 13:56:15.084
    39 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\CommonExtensions\DataDesign\DataDesign.pkgdef
    VisualStudio 2012/01/18 13:56:15.087
    40 Scanning pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\CommonExtensions\Microsoft\ProjectWizards\NewProjectFromExistingPackage.pkgdef
    VisualStudio 2012/01/18 13:56:15.092
    41 Importing pkgdef file
              C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\CommonExtensions\Microsoft\ProjectWizards\NewProjectFromExistingPackage.pkgdef
    VisualStudio 2012/01/18 13:56:15.093
    42 Saving pkgdef cache meta data VisualStudio 2012/01/18 13:56:15.136
    43 Newest node in pkgdef cache
              Software\Microsoft\VisualStudio\10.0_Config
    VisualStudio 2012/01/18 13:56:15.153
    44 PkgDefManagement startup complete

     

    Thanks paul-shed

     

    Wednesday, January 18, 2012 2:00 PM

Answers

  • Thanks for the reply.

     

    Your suggestion didn't help directly as it only forces a rebuild. Which is what I was getting all the time.

    After some more digging I managed to sort out the problem. It was due to the VMWare Workstation debugger  "AddIn" constantly "touching" the "VMDebugger.connect" registry key. I could see in the log it always reckoned that this key was later than the pkgdef cache and was rebuilding every time on startup.

    As I don't use the VMWare debugger I removed it as described here http://www.rossisdead.com/post/Removing-VMWare-Debugger-from-Visual-Studio.aspx

     

    Now VS2010 starts up in about 10s rather than 40s.

     

    paul-shed

     

    • Marked as answer by Helen Zhou Monday, January 23, 2012 3:18 AM
    Thursday, January 19, 2012 10:58 AM

All replies

  • Hi Paul,

    Please check this article about Troubleshooting pkgdef Files

    Since the pkgdef loader will not rebuild the cache if it does not think it is out of date, there is a bit of a trick to using /log to debug pkgdef load issues when you are not sure which files it is finding (and thus which ones to touch). Use Notepad to create a file called “log.pkgdef” that contains a single comment line (“// comment”) and copy it to C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions. This ensures that the pkgdef loader has a new file to process. If you need to run /log more than once with this file in place, be sure that it gets saved with a new timestamp before each run.

    Hope it helps.

    Regards,
    Helen Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Thursday, January 19, 2012 1:15 AM
  • Thanks for the reply.

     

    Your suggestion didn't help directly as it only forces a rebuild. Which is what I was getting all the time.

    After some more digging I managed to sort out the problem. It was due to the VMWare Workstation debugger  "AddIn" constantly "touching" the "VMDebugger.connect" registry key. I could see in the log it always reckoned that this key was later than the pkgdef cache and was rebuilding every time on startup.

    As I don't use the VMWare debugger I removed it as described here http://www.rossisdead.com/post/Removing-VMWare-Debugger-from-Visual-Studio.aspx

     

    Now VS2010 starts up in about 10s rather than 40s.

     

    paul-shed

     

    • Marked as answer by Helen Zhou Monday, January 23, 2012 3:18 AM
    Thursday, January 19, 2012 10:58 AM
  • Great! Do glad to hear that you solved it and thank you for sharing the solution with us. If you have any difficulty in future programming, we welcome you to post here ag
    Helen Zhou [MSFT]
    MSDN Community Support | Feedback to us
    • Marked as answer by paul-shed Tuesday, January 24, 2012 6:48 PM
    • Unmarked as answer by paul-shed Tuesday, January 24, 2012 6:48 PM
    Monday, January 23, 2012 3:17 AM