VS 2008 Team System crash on opening solution - visual-studio

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.

Related

Visual Studio freezing (crashing) while loading solution

I've met with a strange problem. I had 7 projects in the solution. I had to add another MVC project. Now when the document (from the new project) is opened (for example HomeController.cs) and when this project is initializing at the start, it freezes the whole IDE like this:
(Some projects do not load)
After that, I have to kill the process. When I open VS again and fast click on another project (which is initializing) the freezing issue is gone. I have no idea what can cause a problem like this. I've tried with and without ReSharper but I get the same result. Also, I restored default settings of VS. Also repaired whole VS.
Maybe someone had the same problem and could give some helpful advice?
Usually removing of the hidden .vs folder in solution directory fixes the problem.
Possible solutions:
Delete .vs folder as mentioned above
Clear temp files from %USERPROFILE%\AppData\Local\Temp
Readjust source control in Tools -> Options -> Source control -> Plugins, set to None, Save, close VS. Then reopen it and reset the plugin.
There is no particular order, but one of them might help.
I experienced the same issue with VS 2019 and fixed it by deleting the user.json file from %USERPROFILE%\AppData\Roaming\Visual Studio Setup
EDIT
The issue reappeared after a few days, so I located the user settings for Visual Studio 2019 (%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\16.0_f124b472) and deleting the following files seemed to have reset VS to a normal state:
Current.vsk
User.vsk
ObjBrowEx.dat
Please close all your solutions before deleting the files
I used to have this problem, it was solved just by double clicking any of the stuck projects. This nudges the loading process somehow and causes unloaded projects to complete its loading.
Delete the .suo file in the solution folder.
I am pretty sure I found this answer somewhere on Stackoverflow before, but now I can't find it anymore. Credits to whoever came up with this.
None of above answers worked for me and found this solution.
By opening solution in safe mode devenv.exe /SafeMode will show you details about file causing issue and then
Search for all the files in the project directory with extension *.user
and remove them all
last reloaded the projects
For Visual Studio 2019, I cleared my %USERPROFILE%\AppData\Local\Temp folder.
It worked.
When you get over the past install multiply versions and the previous version was not fully uninstalled. This cause this issue in my case.
Control Panel > Programs > Programs and Features
Search for all Visual Studio related programs and Uninstall those.

How to remove recently opened files in a visual studio 2013 solution

I noticed that whenever I open a particular Visual Studio solution it automatically opens the files that I previously worked on. The issue is that it always opens the same files, even though I have moved on to work on other files.
Is there a way to remove these "recent" files so that no files are opened at all?
As #SergeyVlasov referred to in the comments, deleting the suo-file worked for me. I'm posting this answer for anyone interested.
It probably goes without saying but keeping a backup of the file is probably a good idea.

Visual Studio “Go to definition” disabled or gray out

Visual Studio's Go To Definition is disabled and F12 doesn't work. Other commands like Alt-F12 may continue working.
Close the solution.
Delete the intellisense database file for the solution: [solution].ncb or [solution].suo
Reopen the solution.
Optional: Rebuild the solution.
Note that this can also be as a result of disabling database for C++/C#.
In Tools - Options, type "IntelliSense" into the search box, and click on C/C++ - Advanced. In the Browsing/Navigation section, change Disable Database to False, if it is not so already.
After re-enabling, close and reopen to force rebuild.
NOTE: IntelliSense will produce large files on disk (*.sdf and ipch) that should be excluded from Git, for example.
I know the solution has been resolved. However, I encountered the exact same problem. I searched internet. None of the trick works including this one.
Eventually, I figured out. I right clicked on the file that had the problem. I included the file in the project. Isn't that obvious. Actually not, the file has been included for a week. I have been working on that file more than 7 hours a day for the whole week. Up till yesterday 6:20 pm.
Oh, I could not compile correctly this morning. There were tons of syntax error message yesterday. This morning, I was able to compile. Strange. right? Then my go to definition was gone.
Took me a while to find out cs and designer.cs were certainly excluded, but aspx file was.
I solved the problem. Did my figure slip? I don't know.
That is one thing people check. Either yourself, someone else, or system accidentally exclude the cs files without the knowledge. I know it is strange, but it solved the problem. There are weird scenarios in Visual studio. People can present 200 solutions. They work for 99% of time, but not our cases. I just bring one more scenario
I encountered this in Visual Studio 2010.
For me, this solution did the trick
Close all the files.
Reopen the files.
and you are good to go.
This also happens, if Visual Studio has files opened, which are not in the current Solution.
I don't know how I got to this state, where files of a different solution where open as I didn't open them manually, but a quick check of the file path showed that those weren't files of the opened solution.
Therefore, "Go to Definition" was disabled.
I found that I had to remove my TFS mapping:
VS 2010 > open Team Explorer > Drill into the team project > double click source control > right click on the team project in the left pane and do "Remove Mapping" > after everything was removed I manually went to the local folder and deleted any lingering files > back in source control explorer I re-mapped to the same local folder and re-pulled all the code. Now the "go to definition" works again.
Not sure why I had to do this...
Check dll in references which is yellow. Remove it and add again.
I've just had this happen with a CMake-based C++ project in Visual Studio 2019. Everything was fine yesterday, then when I opened it up today all the Go To Definition/Declaration etc options were greyed out everywhere in every file in the project, even for things defined within the same file (and the syntax highlighting didn't look right either). It did work if I opened one of the .cpp files separately on its own (without loading the Project/Solution).
I tried various things including the answers here and telling it to generate the CMake cache again, but what finally fixed it was actually deleting the CMake cache. The Delete Cache option didn't seem to work (all the files were still there on disk, and there was some sort of failure message in the Output window) so I just deleted the entire "out" directory from the project directory (well, moved it somewhere outside of the project, just in case). Loaded up Visual Studio again, it rebuilt the cache again automatically and IntelliSense immediately started working again! I just had to wait 5 minutes for it to compile everything again when I wanted to run the project.
Maybe it wasn't necessary to remove the entire "out" directory, but when I clicked "Open in Explorer" under the "CMake Cache" menu it opened the actual build directory (which was the only thing in the "out" directory anyway) so I assumed the entire thing was related to the cache and was getting too fed up with it to try to narrow it down further. It's probably only certain files within that directory really.
Tried all the above solutions in my VS2019, nothing worked for me. Than I've noticed an update sign on the bottom Right corner. After updating the VS all options were restored.
Simple just check your bottom left corner of Visual Studio if Restricted turn it as a trusted and your problem will solve.
In my case due to my project is mapped with TFS so I am unable to go to definition also my project files showing read only when opening from Solution. So I have move to my root folder mapped with TFS and then right-clicked on folder > Go to properties > Attributes section was Read-Only I have unchecked it and clicked Apply. Reopen visual studio. Everything is now working fine.
I faced the same Issue in my Visual Studio 2019 version.I followed the below Steps:
Go to references folder in the solution.
Click on Manage Nuget packages.
Click on Browse.
Search for 'Microsoft.Net.Compilers'.
Click on Update.
This Worked for me.
In my case, another Visual Stuidio was opened (not closed succsessfully). Close all examples of VS, then re open solution.
Just open the Solution using Windows Explorer, instead of opening it from inside VS...

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.

Is there any way to get Visual Studio to reload all projects when the .proj files have changed?

If I do an svn update while I have Visual Studio open and a number of project files have changed (but not the solution file) I have to wait and click yes on the reload project dialog box every time. Sometimes this can take a while depending on how many projects have changed and how slow my pc is being.
Is there a way to say 'reload all' after the first dialog pops up, like holding down shift to force no to all in the Windows Explorer dialog? (note: I already tried this, it doesn't work)
if you install this plugin from the visual studio gallery:
http://visualstudiogallery.msdn.microsoft.com/d491911d-97f3-4cf6-87b0-6a2882120acf/
The button "Reload all" appears.
Regards,
Koen
Deleting my solution_name.v11.suo file (hidden file stored in same location as solution file) seemed to do the trick.
Unfortunately, VS doesn't come with a way to do this. A probable workaround is to touch the solution file before activation VS. It would then reload the whole solution.
There must, however, be ways to do this programmatically, since I remember CMake solutions asking me whether I wanted to reload the whole solution after individual projects were re-generated. CMake is Open Source, so if you're really desperate, you might want to look into it.
Use a tool like VisualSVN to automate the process for you. It allows you to perform the update within Visual Studio, then automatically reloads the projects that have been modified.
I got my project to bind in my solution by closing the solution (File -> Close Solution) then reopening it.
If your project is hosted on a TFS, then delete the solution file and get latest. VS will prompt you to Reload all projects. Press Reload All.
Adding a bit automation here, in case you have multiple solutions and fd installed (also available for windows), fd -IH suo -X rm will delete all those .suo files pointed out by Luke.

Resources