Visual Studio 2013 hangs when opening a solution

2019-01-21 05:01发布

I installed VS2013 (v12.0.21005.1) and added ReSharper 8 (v8.0.2000.2660) a day or two ago. That day it was fine. Now I'm lucky if I can get it to open one solution in a whole day. It opens OK by itself, but when I try and open a solution from within - via the menu - it hangs, badly. If I right-click a solution in Windows Explorer and 'open with VS 2013', it opens then hangs, in exactly the same way. Every now and again, for hours, I get a little notice that it's busy with something.

Anyone know what could be wrong, before I endure a reinstall that doesn't fix the problem?

27条回答
混吃等死
2楼-- · 2019-01-21 05:46

For me the solution was to disable source control (Set plugin to None in Tools->Source Countrol). I think it was trying to sync some huge Git repo for some reason (have a couple of massive repos, but not in the tree I was trying to open).

查看更多
Root(大扎)
3楼-- · 2019-01-21 05:47

I've had this issue multiple times, in pretty much all versions of VS. The one solution that seems to work most of the times is to delete the .vs folder located in the solution folder. Sometimes it's enough to delete the .sou file located in .vs///

The folder is hidden by the way, so you will have to enable "Show hidden files and folders"

查看更多
爷、活的狠高调
4楼-- · 2019-01-21 05:48

Are you using any node modules in your project? Or can you identify that it is a ReSharper specific issue?

If you've got NPM modules (eg. for Grunt), mark your 'node_modules' folder as 'hidden' (no need to make child folders hidden though), and try again.

Visual Studio was hanging on open for me, turned out it was trying to scan deeply nested node modules with file paths longer than the Windows maximum (260 characters), and this was preventing me from opening the solution in VS, but marking the folder as hidden solved the problem.

查看更多
Emotional °昔
5楼-- · 2019-01-21 05:48

I restored a previous version of the .vbproj file and it solved it.

I don't know what was in the newer version but the problem was something inside the .bvproj file itself.

查看更多
Deceive 欺骗
6楼-- · 2019-01-21 05:49

In my case the Fusion log has been enabled. Log files has been growing for months as I forgot to turn it off after investigation. This way the antivirus software started to check these big log files several times during opening the solution, and "Preparing solution..." message is visible for long-long time. When I noticed this, I turned off the fusion log, and problem solved. Solution loads in 10 seconds instead of 20 minutes.

查看更多
祖国的老花朵
7楼-- · 2019-01-21 05:51

I found the following to be the better approach to debugging VS based on MS Connect instructions

Please help to confirm if your captured dump file is a 32-bit dump file. If it is a 64-bit dump file, please use the following step to capture a new dump file.

  1. Start Visual Studio.
  2. Start another instance of VS.
  3. In the second instance click Tools | Attach to Process...
  4. In the list of processes locate devenv.exe.
  5. Click Select... and explicitly choose 'Native' and 'Managed' code.
  6. Click OK and OK to close Select dialog and Attach to Process dialog.
  7. Go back to the first instance of VS and repro the hang.
  8. Upon the hang, control should go to the second instance of VS. If not please go back to the second instance of VS manually, and hit "Break All".
  9. In the second instance click Debug | Save Dump As Minidump with heap.

If you are running the VB profile you will not see the Save Dump As menu item. To add this menu item:

  1. Select Tools -> Customize
  2. Select the Commands tab
  3. Select Debug from the Menu bar dropdown
  4. Click Add Command...
  5. Select Debug from the Categories list.
  6. Find the Save Dump As entry in the Commands window.
  7. Click OK (the Save Dump As... command is added to the top of the Debug menu).
  8. Click Close

You can get detailed steps about how to get the dump file and call stack at http://blogs.msdn.com/debugger/archive/2009/12/30/what-is-a-dump-and-how-do-i-create-one.aspx

If you find the problem is with Resharper Addin you can then report the issue via - http://youtrack.jetbrains.com/issues/RSRP

查看更多
登录 后发表回答