打开解决方案时 VisualStudio2013挂起

一两天前,我安装了 VS2013(v12.0.21005.1)并添加了 ReSharper 8(v8.0.2000.2660)。那天还好。现在我很幸运,如果我能让它在一整天内打开一个解决方案。它自己打开 OK,但是当我尝试从内部打开一个解决方案时——通过菜单——它挂起来了,非常糟糕。如果我在文件资源管理器中右键单击一个解决方案并“用 vs2013打开”,它会以完全相同的方式打开然后挂起。时不时地,几个小时之后,我会收到一个小小的通知,说它正忙于某事。

有人知道哪里出了问题吗在我忍受不能修复问题的重新安装之前?

70306 次浏览

Basically it could be anything, but you can try a few things:

  1. Turning it off and on again.
  2. Clear the ReSharper cache, it's in %LOCALAPPDATA%\JetBrains\ReSharper\<CurrentVersion>\SolutionCaches, where you should find a folder matching the solution you are trying to open. Just close all instances of VS2013, delete the folder and try again.
  3. turn off ReSharper: Tools > Options > ReSharper > General > Suspend
  4. uninstall ReSharper completely and see if problems persists.
  5. Repair Visual Studio through Programs and Features.

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

Sometimes it's enough to simply delete the ".v12.suo" file and try to open the solution again. Helped me many times when VS2013 was freezing on loading a project.

I had this issue recently as well, and found that disconnecting my computer from the internet when loading the project fixed it. With this, I managed to cut loading times from several hours down to seconds. Since my network cable is not particularly accessible, I simply disabled my network adapter before loading the project (in Control Panel).

This soon became frustrating, however, and I recently looked into the problem again. It seems that logging on to my Microsoft account in Visual Studio ultimately fixed the problem, and I now have no more issues loading projects.

This may work for you as well (if you haven't yet fixed it - but since there is no accepted answer here, I assume that the problem is persisting), so I suggest that you at least try disconnecting from the internet, even if you would rather not enter your Microsoft credentials.

Check for Windows updates

I had this problem too. Furthermore, I couldn't open my Windows firewall settings (trying to block VS's internet connection).

When opening update settings (Windows 8), I saw there was a pending update ("found today"), so I rebooted my computer, letting Windows update. After that, VS and the firewall worked fine again.

Check your hardware

I've had the problem a second time; even Windows 8's update page would keep loading forever. It was an issue with my (non-OS) hard drive: https://superuser.com/questions/756261/various-parts-of-windows-8-and-visual-studio-2013-get-blocked-by-possibly-comm?noredirect=1#comment978074_756261

Deleting all ".suo" files worked for me. There were several copies due to opening the solution in multiple versions of Visual Studio.

Edit:

Possible path could be:

PathToSolution\.vs\ProjectName\v14\

.vs may be a hidden folder.

.suo is filename.

I had similar issue, when i checked the solution file it was created by VS.Net 2012. To resolve the issue, I created dummy solution file and reloaded the projects from vs.net 2012.

Also observed when nuget package update got screwed up, while you reload the solution, Visual Studio might get hang.

The Visual Studio might go hang, when there was a problem in loading the nuget packages.

I get this issue now and again - VS 2013 Update 2, Win 8.1, IE 11.

Try this - Open task manger, kill the VS app hanging, and then close any IE sessions that are running in the Background Process list - there may be one or more hanging around.

Restart VS

Seems to clear it for me, without a reboot.

Suspending Resharper Worked for me. Goto

Tools -> Options -> ReSharper -> General -> Suspend Now

Now your solution will load very fast. After your solution fully loaded, you can change the Resharper settings to Resume Now.

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.

I went into the %LOCALAPPDATA%\JetBrains\ReSharper\ and opened all the directories looking for the SolutionCaches, and emptied all of them. Problem solved. The application was quite large, so this helped.

In my case, VS 2013 Professional was hanging on every startup, even without opening a solution because the license was no longer valid.

Last item in the log file:

<entry>
<record>367</record>
<time>2015/07/13 20:11:05.051</time>
<type>Information</type>
<source>UserConnection</source>
<description>myemailaddrs@gmail.com signed in for IDE user</description>
</entry>

And on the msdn.microsoft.com subscription page: "Your subscription is no longer active, contact your administrator."

I had to get an updated subscription from my employer.

Deleting Test Results from my TestResults folder actually did the trick for me. Just another thing to try.

The problem I had was the Perforce connection.

When opening the solution, it would ask if I wanted it to connect to Perforce. Allowing it to try would make it hang and allocate 1.5 GB of RAM.

Not allowing the P4 connection let it load properly (allocating 1 GB RAM). Then I could tell it to connect to P4 after, and it is now fine.

VS2012 hangs on me e.g. when opening a csproj file on a network share (in fact on a share that was on the VirtualBox host, connected as a smb share using a VirtualBox feature).

Copying the project over to a local drive fixed it for me. Not sure if assigning a drive letter would do the trick.

Also not sure why it does not work via network share, if it is a VS limitation or perhaps some plugin (I use resharper, of course).

Try to uninstall extensions with "Control Panel" or disable any add-in in [Tools]=>[Add-in Manager] then try to reopen the solution.

My problem was fixed by uninstall "Visual Localizer".

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.

For me , whether computer crashes with power outage, or sometimes with mandatory reboots in the middle of the night. What does WORK for me

DELETE ALL FILES IN THIS DIRECTORY:

C:\Users\yourusername\AppData\Local\Microsoft\WebsiteCache\

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.

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"

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).

For me this appears to have something to do with the project having the MVC 4 project type guid (E3E379DF-F4C6-4180-9B81-6769533ABE47). Removing this guid from the .csproj resolved the hanging for me. (An additional wiping of the .vs folder was required after removing the guid.)

I just removed "packages" folder from root of solution and it helped for me (Visual Studio Express 2015)

Sorry for having to create a new post instead of commenting on the selected answer .. I do not have enough rep to comment at this time.

My issue was was temporarily resolved by the "...delete the .suo file ..." solution, and as other folks pointed out, I had to delete the file every single time.

Since it (apparently) is impossible to stop the creation of the file I started to dig a little more into what the file did. In addition to saving user settings, I believe it is also saving session settings, like which files you have open when VS is closed. I suspected that my project is attempting to open a file that no longer exists and that is what is causing the hang. What fixed things on my end was to delete the .suo, open VS, open a file within my solution, build and close the solution. After doing this I have had no hangs.

tl:dr

In my case, a user setting file(.suo) was attempting to open a file in my solution that no longer existed. I resolved the issue by performing the following steps.

  1. Delete the .suo file (for me this was in /[projectfolder]/.vs/[projectname]/v14
  2. Open Visual Studio
  3. Open your project
  4. Open a file (I simply opened a random .cs file)
  5. Build and save your solution (Simply saving may do the trick, I built by habit)
  6. Close Visual Studio

Hope this helps someone ... we spent way too many hours on this issue :)

For anyone still referring this helped me:

I had to always delete .vs12.suo file to load the project.

I came across this thread from Microsoft and following that I created registry entry which fixed my issue with Solution load.

https://connect.microsoft.com/VisualStudio/feedback/details/860685/visual-studio-hangs-after-10s-when-loading-solution-corrupt-suo

Lots of suggestions here and elsewhere but the only thing that permanently worked for me had to do with the start-up project I'd set. This is what I did:

  1. Delete the .suo file as suggested elsewhere.
  2. Start VS and open the solution. All should be well at this point.
  3. Leave the start-up project as-is, even if it's not what you want.
  4. Save the solution. (Possibly do as someone else suggests and open a file, clean, build/re-build, etc, but I didn't have to do any of that.)
  5. Close the solution and exit VS.
  6. Re-start VS and open the solution.
  7. Change the start-up project to whatever it should be
  8. Save the solution. (Possibly again do the open file, clean, build/re-build, etc.)
  9. Close the solution and exit VS.
  10. Restart VS and re-open the solution and all should be well.

这可能对你起作用,也可能不起作用,但我试过我能找到的everything-注册表更改,从第二个VS会话调试VS,你能想到的-但没有什么比一个启动/打开更有效的了。

I have fixed the issue by uninstalling these two plugins:

  1. Productivity Power Tool
  2. Web Essentials