The 'TestWindowPackage' package did not load correctly RRS feed

  • Question

  • I have Visual Sudtio 2012 Premium installed on a Windows 2008 R2 Standard server.

    I was able to create MVC application and a Unit Test project with no problem.

    I installed Visual 2012 SP1 and now i am not able to open unit test projects, the following message is displayed 

    I have had a look at the xml file mentioned above and have included the message below

        <time>2013/01/17 09:31:28.236</time>
        <description>Begin package load [TestWindowPackage]</description>
        <time>2013/01/17 09:31:28.272</time>
        <description>TestWindowPackage.Initialize failed with exception:System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage.Initialize()</description>
        <time>2013/01/17 09:31:28.273</time>
        <description>SetSite failed for package [TestWindowPackage]</description>
        <hr>80004003 - E_POINTER</hr>
        <errorinfo>Object reference not set to an instance of an object.</errorinfo>
        <time>2013/01/17 09:31:28.275</time>
        <description>End package load [TestWindowPackage]</description>
        <hr>80004003 - E_POINTER</hr>
        <errorinfo>Object reference not set to an instance of an object.</errorinfo>

    I have tried to create new Solutions with Unit Test Projects and am still getting the same message.

    Is there a workaround or solution for this problem.


    Thursday, January 17, 2013 10:20 AM

All replies

  • Hi Jason,

    Thanks for your post.

    I'll try involve some experts on this issue.

    By the way, can you file a report here with this link:


    Barry Wang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 18, 2013 3:12 AM
  • I get a similary error message "The 'TestWindowPackage' package did not load correctly..."

    My log file entry:

    166 ERROR TestWindowPackage.Initialize failed with exception: System.InvalidOperationException: Service SComponentModel not found at System.ServiceProviderExtensions.GetService[T](IServiceProvider serviceProvider, Type serviceType) at Microsoft.VisualStudio.ComponentModelHost.ComponentModelHostExtensions.GetCompositionContainer[T](T serviceProvider) at Microsoft.VisualStudio.ComponentModelHost.ComponentModelHostExtensions.SatisfyImports[T](T serviceProvider) at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage.InitializeContainer() at Microsoft.VisualStudio.TestWindow.VsHost.TestWindowPackage.Initialize() PackageContainer loaded: False TestWindowPackage 2013/01/23 07:50:17.600

    What caused all of this initially, is a beta extension that failed to install. I never recovered from that. After deleting a 11.0 CONFIG directory, and one or two registry keys, and then reinstalling (probably 3 times), I now get this error.

    Any help would be appreciated.

    Wednesday, January 23, 2013 8:05 AM
  • Can you verify that you have installed Visual Studio 2012 Update 1 -

    Monday, January 28, 2013 3:29 PM
  • You might also want to

    1. Close VS instances.

    2. Delete component model cache folder %LocalAppData%\Microsoft\VisualStudio\11.0\ComponentModelCache . This wipes out the MEF cache.

    3. Run 'devenv /setup /ResetSkipPkgs ' ref.

    4. Start VS again and see if the problem goes away.


    Patrick Tseng

    Visual Studio ALM team.

    Patrick Tseng MSFT - Developer - Visual Studio Team Architect

    Friday, February 8, 2013 7:06 PM
  • Moving the question to the Visual Studio Setup forum.

    Thank you

    Wednesday, February 13, 2013 11:43 PM
  • I tried to run the command from the developer command prompt:
    devenv /setup /ResetSkipPkgs

    -- "access denied"

    Wednesday, May 1, 2013 7:44 PM
  • I too am having this problem on one of my development machines. I have two and I keep their updates in sync. They both have update 2 and they are running on Windows 8 Enterprise. I've tried deleting the component model cache and re-running the devenv /setup command. Is there any other solution to this?
    Monday, May 27, 2013 7:53 PM
  • Barry,

    It is 6 months later what is happening with this question?

    I just re-installed VS 2012 because of a host of package loading problems.  I now have a clean install with Update 3.  My OS is Windows 7 64 bit.  My Framework is 4.5.  I have this same error in my activity log.  I did not have this error the previous package loading problems.

    Even after re-installing I had the same host of package loading problems.  After I uninstalled VS 2012 Team Foundation Server Express, all those package problems went away.  However, this TestWindowPackage is a new one.




    Saturday, July 6, 2013 3:07 PM
  • From a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs:;en-us;offerprophone.

    Thank you

    Monday, July 8, 2013 4:51 PM
  • I had this same problem in VS 2013.  Coincidently I ran the test Manager for the first time.  it asked for the registration key, once entered everything began to run normally.
    Friday, January 24, 2014 8:52 PM
  • It seems there are multiple ComponentModelCache.

    This method works once I replace 'VisualStudio' with 'WDExpress' for the edition I am using.

    VS for Desktop 2012 cache is at


    Monday, March 17, 2014 3:44 AM
  • I ran into a similar issue after upgrading VS2013 to update 2.  This fix worked for me.  Thanks!
    Wednesday, May 14, 2014 2:55 PM