3

Closed

Cannot open package manager for solution. Visual Studio 11 RC

description

In VS11 RC Manage NuGet Packages for the solution will freeze entire VS.

file attachments

Closed Aug 3, 2012 at 1:19 AM by dotnetjunky
no repro for me.

comments

tstojano wrote Jun 12, 2012 at 6:54 AM

At the moment, we're having to open up VS2010 in order to configure the solution's nuget packages.

Can we please escalate this to high?

dotnetjunky wrote Jun 12, 2012 at 9:24 AM

This is pretty bad. Thanks for reporting. A couple of questions to help us diagnose the problem:
  1. Does it happen every time?
  2. Does it happen when you open the Manage NuGet packages for a particular project (as opposed to the solution)?
  3. What types of projects do you have your solution?
  4. Is it possible that you share your solution with us?

JeffHandley wrote Jun 12, 2012 at 8:38 PM

We are unable to reproduce this as it is. Can you give more details to answer @dotnetjunky's questions, and also:
  1. Do you have projects unloaded in your solution?
  2. Are there any other unusual characteristics of your solution at the time of invoking this operation?
  3. What are the exact repro steps for getting to this state?
Thanks,
Jeff

pcalin wrote Jun 14, 2012 at 1:40 AM

Hi dotnetjunky,
  1. Everytime
  2. Works perfectly for the project. Only fails for solution.
  3. WPF, WCF DLLs, DLLs and Windows Services.
  4. Sadly no. :(
  5. I tried with unloaded projects and with every loaded. If everything is unloaded the manager opens correctly.
  6. We are using 2 nuget sources for our packages and many packages will exist in both sources. We have 42 packages used with Nuget. Solution contains 43 projects.
  7. Start Visual Studio 2012 RC. Load solution. Open Package Manager.
We were trying to figure out how to get any logs from Nuget itself and could not figure it out.

Can we get any logging from nuget so we can figure out what is happening?

Cheers,
Calin

dotnetjunky wrote Jun 14, 2012 at 3:23 AM

OK, I suspect the Windows Services project is the culprit. If you unload or remove that project from the solution, does the problem go away?

pcalin wrote Jun 17, 2012 at 7:05 AM

Removing the windows service project does not help. :(

pcalin wrote Jun 17, 2012 at 7:06 AM

Rather than trying things blindly, can we turn on some logging in NuGet? That way we would get the error instantly without wasting so much time.

dotnetjunky wrote Jun 27, 2012 at 5:23 PM

Hi pcalin,

You can turn on the logging option by running "devenv.exe /log c:\log.xml". Then please attach the log file here.

pcalin wrote Jul 2, 2012 at 12:12 AM

Nuget seems to not log anything useful :(...

pcalin wrote Jul 2, 2012 at 1:20 AM

I compiled nuget from the official source code zip file using the debug version and it all works correctly. If I have enough time I may pursue this further.

Is it possible this was fixed after 2.0 was released.

The version of the source code is 2.0.0.0

dotnetjunky wrote Jul 3, 2012 at 5:11 PM

Can you try installing the released version of NuGet 2.0 (from the Extensions Manager) and see if you can repro the error? If not, then maybe it has been fixed in 2.0.

pcalin wrote Jul 5, 2012 at 5:39 AM

I upgraded to 2.0 when it was released and the same error happens.

I have been using the Source code from 2.0 and built debug version, still get the error.

When I'm debugging I cannot get the error. It is really hard to reproduce under the microscope... :(

What puzzles me more is how come we all get this problem on multiple solutions and no one else seems to complain. Maybe not many people are using VS11 on large solutions with lots of dependencies?!?

dotnetjunky wrote Jul 9, 2012 at 6:11 PM

If you can find a consistent repro, please reactivate this bug.

** Closed by dotnetjunky 07/09/2012 11:11AM

pcalin wrote Jul 16, 2012 at 7:21 AM

Finally reproduced the problem

pcalin wrote Jul 16, 2012 at 7:29 AM

Extract "NuGet bug repro.zip"

Follow these steps in order to reproduce the problem:

1) Open Visual Studio 2012 RC
2) Open solution from disk.

Beware, the bug will not appear if the solution is opened by double clicking the sln file.

The bug will also appear if using the Windows 7 jump list.

Enjoy, ;)

Calin

dotnetjunky wrote Jul 16, 2012 at 4:34 PM

I don't see any error. Did you forget to zip any file in the 'packages' folder? I don't see any package in there.

pcalin wrote Jul 16, 2012 at 11:29 PM

Sorry, I thought having nunit in there will make the zip go over 4 Mb.

Updated archive with nunit.

dotnetjunky wrote Jul 17, 2012 at 12:11 AM

I still can't repro (with the public nuget 2.0 bits). Can you install the latest VSIX from our CI build and see if it fixes the erorr?http://ci.nuget.org:8080/guestAuth/repository/download/bt4/.lastSuccessful/VisualStudioAddIn/NuGet.Tools.vsix

pcalin wrote Jul 17, 2012 at 11:16 PM

Still happening.
Here it is crashing for everyone, every single time. No exceptions.

Is there a way to give you a Virtual Machine (VirtualBox) where this is reproduced?

dotnetjunky wrote Jul 18, 2012 at 12:06 AM

Can you record a video and post it here?

ZeroLeveL wrote Oct 7, 2012 at 11:46 AM

I have been having this issue with VS2012. I found out how to workaround it :/

When I opened my project and managed NuGet, VS would freeze as described above (VS2012, Win8) - but it only freezes if I go to the Online -> All

This happened on 2 computers, tried on 3rd, and it works okay, so its not the solution, but something in the environment.
  1. I cleaned the nuget cache and recent packages.
    Did not help
  2. I opened a different project, managed Nuget, works
  3. I switched to the original project that would freeze, and now it works :)
At this point I closed VS, reopened it, and it does not happen anymore, working now as expected.

Figured I would share..

jsturtevant wrote Nov 20, 2012 at 7:48 PM

for a similar issue in VS 2012 check out this work item: http://nuget.codeplex.com/workitem/2167

Deleting the csproj.user file seems to do the trick in VS 2012

slickjuanito wrote Dec 20, 2012 at 4:32 PM

It is December 2012 and this is still happening on multiple machines for us. We have a solution with 10 projects in it, we can open the projects individually and access the NuGet Manager but if we open the Manager at the solution level a message saying that the projects are required to be loaded first pops up and then it hangs. It states that if I press the cancel button on the message pop up screen that the project will continue loading in the background. I've gone to lunch and back and it still hangs. I've even left it running over night and it still hangs.
Could someone please give us an update on this?

pcalin wrote Dec 20, 2012 at 11:54 PM

Hi Juanito,

When I raised this issue I spend a lot of time and effort to reproduce the problem in a very small project so they can try and fix it. I even offered access to a Virtual Machine reproducing this problem.

The last reply I had from dotnetjunky was to send him a video of the problem. I decided that was not worth my time to answer and I stopped wasting my time with them.

To Nuget's defense it is not a fault directly in Nuget that causes the freeze. This is a defect in Visual Studio and it affects Nuget because of how they invoke VS in the solution manager. It is also a thread timing issue which makes it very hard to reproduce.

We fixed the solution on our end so this bug no longer affects us. Using Nuget 2.2.31210 seems to have also fixed the problem, although it might be just luckier timing.

The problem seems to be related to how the projects are upgraded when moving to a higher version of VS. The fix is in the first PropertyGroup of the CSProj file. Try removing various attributes from that tag and test again.

This are the steps we used to fix our solution:

1) Unload all projects from the solution and then load them one by one restarting VS and Nuget until you find the project that causes Nuget to freeze.
2) The project at fault is one of the projects referenced in the last project loaded, so start unloading those until you find the culprit.
3) Then edit the CSProj file of the offending project by removing unnecessary attributes from the first PropertyGroup tag until everything works correctly.

I hope this will help you.

Cheers,
Calin