Nuget consistently crashing in VS2010 SP1

Mar 17, 2011 at 1:00 PM

Hi I'm having serious troubles with the Nuget tools. The Package Manager Console freezes on load, with the message "Initializing PowerShell Host" for a long time (up to 10 mins) and when it eventually clears up, none of the powershell commandlets work. Not even get-help Nuget.

The Add Library Reference dialog freezes Visual Studio before eventually crashing..

I'm running Visual Studio 2010 Professional with SP1 (RTM) on Windows 7 x64 with the release version of NuGet.

Mar 17, 2011 at 2:51 PM

10 minutes? Can you give us your machine specs (CPU etc). Does it crash for all projects or certain ones?

Mar 17, 2011 at 3:24 PM

CPU - Intel Core 2 Quad 3.00GHz

RAM - 4.00 Gb

It's crashed with every project I've tried it with.

I'm not sure if it's relevant but one thing I've noticed is that while the VSIX package version is all the assemblies in the installation directory seem to be

Mar 17, 2011 at 3:34 PM

Does it really take 10 minutes to load or is it more like 10 seconds? How does it crash? What error message do you get?

Mar 17, 2011 at 3:34 PM

Does it really take 10 minutes to load or is it more like 10 seconds? How does it crash? What error message do you get?

Mar 17, 2011 at 4:06 PM
Edited Mar 17, 2011 at 4:10 PM

It seems that I am having the same issue. It took about 1-2 minutes to start the UI. The powershell command window seemed to take even longer, I killed devenv before it finished loading.

2.2GHz quad-core Core i7, 8gb ram, 7200 rpm hd, VS2010 sp1, Win 7 x64.

Uninstalling and installing packages also takes a really long time, but I think that may be the TFS issue that will be solved in version 1.2.

Mar 18, 2011 at 2:31 PM

I agree, the problem seems to be something to do with TFS integration. In one of the solutions where the UI had been consistently crashing, I deleted the packages folder from TFS and from the file system and reloaded the solution. While it was still really slow the UI did eventually load this time. Like @ntotten said however, installing and uninstalling packages takes a really long time.

The Package Management Console still doesn't work however - none of the commandlets are recognized.

Mar 22, 2011 at 10:20 PM
Edited Mar 22, 2011 at 10:20 PM

We think this may be fixed in a recent build. Would you be willing to try a pre-release build from our CI server?

Mar 25, 2011 at 11:40 AM
Edited Mar 25, 2011 at 11:41 AM

@haacked: I've tried a recent build from the CI server you provided. Overall the experience is much better. While the package manager console still crashes (i.e commandlets won't work or even be recognized) if opened when a solution is already loaded, it seems to work fine if it is loaded before loading the solution. Startup is also much faster.

One additional problem has arisen though: while it's not a big deal it seems the behavior around adding references to assemblies has changed a bit. Whereas before assemblies in subdirectories wouldn't be added to a project when a package is installed, now they are. This is best illustrated by an example:

Say we have a package with the following structure:









Before, when Package1 is installed to a project, references to assembly1.dll and assembly2.dll would be added and the contract assemblies would be ignored which is as it should be. Now, however, references are being added to the contract assemblies as well.

Mar 25, 2011 at 3:24 PM

When you say the console crash, do you mean it shows some error message? What is the message? Is it possible that you create a minimal solution that can repro the issue and share with us?

Mar 29, 2011 at 10:02 AM

By the console crashing I meant that none of the commandlets are recognized by powershell... some kind of error occurs during initialization that gets swallowed - nothing is reported, but attempting to use any of the NuGet commands fails saying the command wasn't recognized. Even something as basic as 'get-help NuGet' isn't recognized suggesting that the module wasn't loaded properly in Powershell. Like I said however, even in the those projects in which the console fails to load, if I start the console before loading the solution everything works fine (with the latest build of NuGet tools). It's only when started from within an open solution.

I'll see if I can provide a repro.

Mar 29, 2011 at 12:43 PM
Edited Mar 29, 2011 at 12:44 PM

NuGet crashes the moment i try to add a Library Reference.

I am in Windows XP Professional SP3 (German) with Visual Studio 2010 SP1 (English)

With this version:

i get: this error:

Mar 29, 2011 at 4:06 PM
Did u try from command line?

On Tue, Mar 29, 2011 at 7:43 AM, mrt181 <> wrote:

From: mrt181

NuGet crashes the moment i try to add a Library Reference.

I am in Windows XP Professional SP3 (German) with Visual Studio 2010 SP1 (English)

This is teh error i get:

Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at

Mar 31, 2011 at 7:27 AM

Yes, the command line installer works

May 5, 2011 at 2:43 PM

I have an issue very similar to this, however there is a way that it will work for me.  If I open VS, open my solution that uses NuGet, and then try to add a Library Package Reference, I get an error exactly like the image above, minus the reference to the AssemblyCatalog.  If I then try to go to Package Manager Console, it says "Initializing PowerShell host..." and then VS crashes.  VS will also crash in the same manner if I open VS, open the solution, and then go to Package Manager Console.

However, if I open VS and then go to Package Manager Console before opening the solution, it loads fine.  I am then able to open the solution and add Library Package References without a problem.  Perhaps this workaround will work for others as well.


Visual Studio 2010 SP1 on Windows 7 64-bit.

NuGet Version: 1.3.20419.9007

Package Manager Console Host Version: 1.3.20419.9005


May 5, 2011 at 8:00 PM

@sharpjd: Does your solution have some nuget packages installed in it? I suspect it's the issue with nuget trying to execute some init.ps1 scripts in one of the installed packages, but it might as well be another issue that I don't know of. Does it happen to any new solution or just that one particular solution?

Is it possible that you share your solution with us to debug? If not, you can try getting the nuget source code and help us debugging this issue.

Jun 10, 2011 at 5:54 PM
Edited Jun 10, 2011 at 5:56 PM

I have the same issue - VS now takes few minutes to start and then the "Initializing PowerShell host..." message stays forever (ok maybe not forever but certainly more than the 40-minute lunch).

64-bit XP with 8GB RAM, VS2010 Ultimate