Visual studio hangs when editing any document in a specific solution - visual-studio-2010

After I closed a specific solution and reopened it, it open without any problem but when I tried to edit any document the first keystroke on the code editor cause the visual studio 2010 to become completely unresponsive, and I had to end the program. I tried opening that solution many times but it still hangs till after restarting the PC. any other solution is working fine it is just this solution that cause the problem

You can try to delete the (SolutionName).suo File in the Solution Folder and try to reopen the solution.
Maybe some User Settings of the Solution are corrupted

Related

Visual Studio 2015 Crashes While Moving Tabs or Sorting Internal Windows

Visual Studio 2015 suddenly crashes while moving any internal window to another place (Toolbox - Solution Explorer), or moving tabs to another window that already has tab in the second monitor.
If moving opened tab to another monitor it working good but once move the second tab beside it, It crashes.
I've uninstalled it and re-installed but the issue still.
I made all commands here Visual Studio 2015 crashes .. but nothing help
#Sergey Vlasov .. Thanks a lot .. Fixed after following these steps
Edit %InstallRoot%\Common7\IDE\devenv.exe.config
Edit %LocalAppData%\Microsoft\VisualStudio\14.0_xxx\devenv.exe.config .. Actually for me after added the following line in the first config file it was added to the second file automatically.
Append the following text to the AppContextSwitchOverrides element’s value attribute:
;Switch.System.Windows.Interop.MouseInput.OptOutOfMoveToChromedWindowFix=true;Switch.System.Windows.Interop.MouseInput.DoNotOptOutOfMoveToChromedWindowFix=true
After restarting VS, you should be able to drag your VS windows around without crashing.
However, based on feedback provided by users who have tested this workaround, it might not resolve the issue on systems where KB4598299 was installed.
Most probably caused by recent Windows 10 updates: https://www.bleepingcomputer.com/news/microsoft/recent-windows-10-updates-cause-visual-studio-wpf-app-crashes/

Visual Studio 2013 opens every project in solution explorer

I've recently upgraded to VS2013 and I've noticed that it has the annoying habit of expanding every project node in Solution Explorer.
I can go through and close all of the nodes I'm not working on at the moment to declutter the display, but every time I open up the solution it re-clutters it by opening each project node again.
Anybody know any tricks to fix this?
Ok I see. It was a corrupt suo file. I just deleted it and all was well.

VS2013 - Operation Could Not Be Completed

After installing Visual Studio 2013 and playing around with some of the new features, I noticed I'm unable to open a cshtml file in one of my MVC projects. If I try opening it in the default html editor, I'm receiving the following error
The operation could not be completed
Opening the file in another editor, IE: HTML (Webforms) Editor, opens the file without any issue. So it seems to be an issue with the default Html Editor.
I've followed various suggestions for how to combat this problem from previous versions of VS. If I delete all the solution's ".suo" files, and restart Visual Studio, the error changes to:
Object reference not set to an instance of an object
Once Visual Studio creates a new ".suo" file, the error message reverts back to the previous one.
I've tried doing a repair install on VS2013, however I'm still running into the same issues. Also, running VS in Safe-Mode did not work either. I tried creating a new MVC project, which failed during creation. With any of these errors, the windows event log does not contain any messages.
Has anyone else had this problem?
Just found your question here because it happened to me as well. Here's what I did and hopefully it will fix / help find the problem.
Deleted all .suo
Terminate IIS Express
Close VS2013 and re-open
Open your project and try to start it (F5)
You probably have an error on your web.config file. For me it was an <appSettings> being there twice.
Fixed the web.config file, save and boom, error is gone.
Hope it will also fix your situation.
Found a working solution here (tested with VS2015 Update 1):
https://github.com/aspnet/Tooling/issues/276#issuecomment-166650817
Close VS
Delete the content of %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
Open VS
I just figured it out. In my web.config, I had the following in my
<appSettings>
<add key="webpages:Version" value="2.0.?.?" />
</appSettings>
Changing this the value to "3.0.0.0" resolved the issue. I never had a problem with this on VS2010 or VS2012. It seems there is something in the IDE that is not handling this gracefully.
That worked for me for VS 2015 (command prompt as Admin):
cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
devenv.exe /resetuserdata
Like most people here have mentioned, review your web.config file for duplicates. I was in a rush, just copied and pasted appSettings from another solutions without noticing the section existed already in the existing document. Then issue this thread relates to started to surface. I went back and consolidated the appSettings, saved, and the issue ceased to exist.
For me this error was resolved by setting the VS 2013 shortcut to "run as administrator".
Check for errors in your web.config file:
duplicate keys (app settings)
tags not closed or used multiple times
...
It is due to IIS Express not running from Visual Studio when you try to debug the aspx page.
Quick and dirty fix is to right click the your project and choose "Use Visual Studio Development Server" and then again right click and choose back to "Use IIS Express" will fix this problem. This way I will care about all the changes required in configuration file.
I also got this problem after using some Nuget package. The problem was a duplicate of appSettings. I merged them all and it worked.
There is also this thread that an MS employee has answered with possible cause:
This is a bug in the debugger. There is a race condition that happens when all of the following are true:
Script debugging is enabled in IE User is debugging IE and another process
The other process stops (hits breakpoint, step operation completes, stops at an exception, etc) at a moment when IE is not running script code
IE starts running script code at roughly the same moment that the user hits F10/F5 in Visual Studio.
The most likely
reason for this to happen is that the code from 'setTimeout' is run,
but I am not a JScript expert, so I am sure there are other possible
reasons as well.
and these workarounds:
If you hit this problem, I believe you could detach the debugger and then re-attach.
-or-
This problem happens when debugging ASP.NET and when script debugging is enabled in IE. If you disable script debugging in IE, or
toggle it on and off when switching between debugger server-side and
client-side problems, you would be able to work around the issue.
-or-
If your web application is using setTimeout, you may be able to avoid or at least reduce the problem by doing something to ensure that
script runs less often. This could mean increasing the timeout value,
or this could mean adding conditions around when setTimeout is used.
I had error in my web.config file, there was two spaces before <xml> tag. after removing it stopped showing this error.
I had the same error in VS 2015 running on Win 10. Fortunately fixed simply with a reboot. On restart it appears windows applied some updates in the previous session which broke VS somehow.
I got this error in Visual Studio 2015 but only after I installed ASP.NET 5 RC 1.
Installing Visual Studio 2015 Update 1 fixed the problem for me.
What solved my issue is this :
Type %LOCALAPPDATA% in Windows Explorer and go to Microsoft\XX.0 your version of Visual Studio then delete the folder ComponentModelCache
Restart VS and it worked like a charm!
This is due to an update made to GitHub which is reported in their forum
I was asked by a colleague to look at this problem. I tried all the proposed solutions and nothing worked. Eventually I found that they had done a project Update from svn and they had a conflict and ignored it. In one of the config files I found the conflict marked ".yours". I corrected this and all now loads without error.
In my case, the problem was due to my web.config's app settings include pointing to a file that doesn't exist:
<appSettings configSource="App_Config\MISSPELT-FILENAME.config" />

Visual Studio 2010 SP1 crashes when opening web page

As the title says, my Visual Studio 2010 SP1, running on Windows 7 x64, is crashing whenever I try to open a .html, .aspx, .cshtml, etc. file. I noticed this problem some weeks ago. Since then, when I open one of these kinds of files, it opens, freezes for a few seconds and then crashes. I tried using the repair function provided with the installer, but it didn't work. The only solution right now is to reinstall the os, but I don't feel like doing such thing.
Has anyone else encountered this kind of problem? Thank you!
I've been having this problem when using the default Web Form Editor and still haven't found a solution that works. I haven't a clue what's causing it, and the only plugin I have is Resharper.
I solved it temporarily by right-clicking the ASPX file, clicking Open with and choosing HTML Editor as the Default editor. Seems to be a problem with the Web Form Editor for a certain kind of files.

VS 2008 Team System crash on opening solution

VS 2008 crashes whilst opening a solution file when it reaches the stage of "Loading project files 'Solution Items'".
Is there any way of either stopping the virtual folder of solution items from opening or a workaround for this? The solution is coming from TFS 2005 and source control.
Thanks
Another thing you could try is removing the .suo file of your solution. This files contains your personal settings and can get corrupted sometimes. It also contains which documents where open when you exited, so removing this file also clears that list.
.sln (and .csproj) files are just text files. So you could open the solution fle in a text editor and remove the entry for the offending project or item.
Have you tried creating a new solution and adding the projects from the old solution into it?
I had a problem with crashing Visual Studio too. Mine went away when I reset window positions.
I'm not sure that you crash is like that, though.

Resources