Visual Studio 2013 Search Solution Explorer fails to find files - visual-studio

So, I was using Visual Studio 2013, it crashed, and when I restarted it the Search Solution Explorer had stopped functioning correctly:
It fails to find any file if you type in the exact file name
It fails to find any static files e.g. HTML, CSS, JavaScript, etc.
It fails to find any configuration files e.g. Web.config
It seems to still find some files on a partial match, but not all files that you'd expect it to match e.g. if I search for Account I'd expect it to find AccountController.cs and AccountControllerTest.cs but it only finds the latter.
Some further info:
If I start VS 2013 in safe mode Search Solution Explorer works fine without any problems
If I manually disable or uninstall the extensions I'm using and start VS normally, the problem with Search Solution Explorer reappears
Has anyone come across anything similar to this, or got any suggestions of what to try to get Search Solution Explorer working again?
Update
I've had some joy running devenv /ResetSkipPkgs and devenv /ResetSettings. After a I ran those command Search Solution Explorer started working again, and works most of the time now. It still fails occasionally. Sometimes restarting Visual Studio will get it working again, but sometimes it just plain refuses to find certain files that are there.
Update 2
I installed Visual Studio 2013 Update 2, and Search Solution Explorer ran without any problems for just over a week before this problem reappeared. Restarting Visual Studio got Search Solution Explorer working again.

I was able to narrow this down to the extensions I was using, "Productivity Power Tools 2013" seems to break the search feature for me in IIS, so I've disabled it for now. I'm getting a full set of results when searching now.
I came to this conclusion by uninstalling all of my extensions and reinstalling them one by one until the problem reappeared.
A coworker also had some success with this solution, launching DevEnv.exe with /ResetSkipPkgs
http://msdn.microsoft.com/en-us/library/ms241276.aspx
Update
The problem returned for me after about 30 minutes, no specific cause noted. It was nice while it lasted. Removing all extensions gets me the same behavior as OP, only running in safe mode appears to work.
Deleting the .suo file also seems to fix the problem for a while, and then it comes back. I'm about to resort to a reinstall of vs2012 just to get this search feature back.

Please try to install VS2013 update 2 CTP before reinstalling everything and see if it fix the bug:

Weird that it works in Safe Mode, or that you manage to fix by removing extensiosn and it then re-appears...
but if some of your projects are in solution folders, then there is a known bug, fixed but not released yet apparently:
http://connect.microsoft.com/VisualStudio/feedback/details/801836/solution-explorer-doesnt-search-files-projects-inside-solution-folders

I have the same issue and confirmed it related to VS2013 Update 2 RC. Uninstall it will fixed this issue.
Wait for GM version of VS 2013 update 2.

I still had this issue both prior to and after installing VS update 3. I should note that it went away after I installed that for a while, and then came back. I suspect (but cannot confirm) that the broken behavior's return coincided with a lockup of my system which necessitated a reboot...
Anyway, I had the Productivity Power Tools installed, and after reading the answers here wondered if it might be complicit, and so I went to disable it and noticed it had a pending update. I went ahead and updated the add-on, and that resolved the issue for me (again). We'll see if it stays fixed.

This may caused by other extensions you have installed in your visual studio. I have some issue, found out Telerik JustTrace caused this issue.

Running devenv /ResetSkipPkgs will fix the problem but, as noted, it will return. For a permanent solution, add this parameter to the target in the exe's properties:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" -ResetSkipPkgs

Related

Visual Studio 2017 freezes on startup

When I start VisualStudio it frezzes on the start screen. But when I start it a second time while the first instance is open the second instance works fine.
It's not that important but what could cause that problem?
Not sure. Sometimes some Visual Studio extensions are locking up Visual Studio.
I think by default Visual Studio tries to update these extensions
that have been installed automatically.
Recently I was trying to run Visual Studio (at Home) and it would freeze if I tried to open a specific project. But I was busy, so I didn't pursue it further and did other things. Then a week or a few days later I tried to run Visual Studio (at home), and it locked up when I ran it. I tried really hard to fix it.
There is a way I don't like where you can delete all or most of the
extensions from the place Visual Studio installs them, but this is
messy, and it is easy to get rid of something you need, and may hard
to get it back where it works correctly again. So I now recommend against this since there is a better solution now, below!
I searched to find a solution, and someone on a Microsoft board I think said to run from a command prompt as Administrator: DEVENV /RESETSETTINGS, I tried that and it didn't work for me. Then I thought, run DEVENV /? to see what I can see, and I saw :
DEVENV /SAFEMODE
So I tried that and it worked! Note: it was still being run from the Visual Studio Developer Prompt as an Administrator.
Visual Studio loaded up correctly, and I was able to look at the
installed extensions.
Eventually I noticed that they all or a lot of them were disabled (probably because of this SAFEMODE parameter), and I noticed that it the most recently updated were at the top of the list. I noticed that a lot of them had been automatically updated by Visual Studio and started Uninstalling a bunch of the more recent ones, and reverted at least one of them, then later uninstalled it. Eventually, after about 6 to 10 uninstalls, I got it to where Visual Studio would load normally, without the /SAFEMODE parameter! Cool!
So I turned off the automatic updates, so this will never happen automatically again. If I load a new extension or update and existing one manually, I should always exit Visual Studio and reload it after not doing too many updates or installing too many extensions to see if these extensions allow Visual Studio to load.
Sometimes an extension will not freeze Visual Studio, but will have errors. The ones that are the big problem are the ones which prevent Visual Studio from loading all the way and freezing it up. But with the above solution, you can eventually, cleanly, uninstall all the latest updates or new installed extensions until you finally get Visual Studio to load normally!
This workaround should be more widely known, so I am putting my solution to it here. Hopefully what I found should help someone else who is in a hurry, without having a lot of time to burn trying to get Visual Studio running again without freezing!
I use Visual Studio Community 2017, and I got this same issue on startup until I stumbled on this solution that deals with some corruption in the .suo file. Before I open Visual Studio for the day, I first delete the .suo file in my project folder, and it starts up just fine.
It's in a folder called .vs next to the .sln file. You may have to go to folder options View and check "Hidden Items" in order to find this folder. Dig down in that folder and you'll find the .suo file. Delete it. When you startup the project in Visual Studio, it will automatically create a new .suo file. So you'll have to do this every time you reopen.

Visual Studio 2015 Extensions Manager Index was out of range error

Env: Visual Studio 2015 Community Edition on Windows 8
Trying to open Tools --> Extensions and Updates results in the following error in a message box:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Tried running as Admin, same result.
I've tried looking at the log but nothing mentions that error.
In the log there are 3 error entries related to extensions which could be related, they say the following:
Error loading extension: Could not find a part of the path 'C:\path\to\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\14.0\EXTENSIONS\ZW2UF5JV.JVN\extension.vsixmanifest'.
The other 2 are identical except the odd string at the end is HQ1Y5EQD.TMG and 3KWE1LJF.Z1W.
Interestingly, just before those errors in the log appear, there is a line for each saying the extension was loaded successfully but if I try to go to the path it's got listed, it doesn't exist.
I can't find any reference to those strings on my machine. I've also searched the registry but can't find any reference in there either.
I can get into the Extensions manager if I click on one of the update notifications but the original error message just displays in the main pane and I can't do anything else. I can get to the online window but as soon as I click an extension, I am prompted with the original message.
I haven't installed any extensions or VS updates for a while but my Web Compiler extension extension has stopped auto compiling JSX files which is why I started trying to look at the Extension manager. I'm guessing the issues are related.
I can still work, compiling can be done manually which is inconvenient but not the end of the world. My worry is some other extensions are also misbehaving and I just haven't noticed yet.
Don't really want to re-install VS as a) it took ages last time and b) it might not fix the issue. Is there any good advice on troubleshooting the error or anything else I can try before I re-install?
I refreshed the GitHub extension on VS 2015 and got this error. Deleting the two cache files:
extensions.en-US.cache
extensionSdks.en-US.cache
from the AppData\Local\Microsoft\VisualStudio\14.0\Extensions causes them to be rebuilt and eliminates the error.
No reinstall needed.
Problem got worse, I started getting the error message when starting Visual Studio and things like the package manager wouldn't load. Each restart seemed to yield a different combination of windows not loading, sometimes Solution Explorer, sometimes Team Explorer etc. Not good.
A repair to VS 2015 via the Control Panel took a while but didn't help, same problems.
I ended up completely uninstalling and trying to re-install. However the installer threw an index was out of range error but weirdly VS 2015 was now listed as an installed application again.
So I'm guessing the original uninstall left some problematic files lying around which messed up the next install. So I uninstalled again, renamed Microsoft Visual Studio 14.0 folder, cleared all files from AppData\Local\Microsoft\VisualStudio\14.0\Extensions and re-installed.
It installed and ran fine.
The problem I now had was that I couldn't find the SQL Server Object Explorer window anywhere. I tried repairing SQL Server Data Tools but still no luck. So I uninstalled SSDT and then re-installed. This seemed to fix it.
Now I realised I also couldn't connect to Azure through the Server Explorer window, the option was simply not appearing in the list like it used to. This time a repair to Azure Tools for Microsoft Visual Studio 2015 - v2.9 and a repair to Azure App Service Tools v2.9 - Visual Studio 2015 fixed that problem.
I confronted same issue and found this thread. I tried the above suggestions, but unfortunately, it went all unsuccessful. I even tried to uninstall/install with even worse result as Visual Studio became unable to start due to new "missing components" issue. Reinstallation was nothing better.
I finally came by a piece of magic. It was Visual Studio Uninstaller which although would remove all your installed extensions, it would perform a complete cleanup. It would save you from installing new Windows (at least it was my case.
Just go to releases and download the first zip file
This way you will be able to perform clean install of Visual Studio.

Visual Studio 13 raises unknown error at the startup?

As I start visual studio 13 it raises unknown error by saying "Microsoft Visual Studio 2014 has stop working" without any further explanation.
Here's what I've tried to solve this problem;
I reinstall .Net framework
I repair, uninstall-install Visual Studio
2013
I installed another version of VS13
but still the problem persists. Do you have any further suggestion ?
I am using Windows 8.
I've run into a similar situation described here. Once i find a solution, i will post it there.
As a first attempt i would try to generate a logfile via the /log option and see if there is a problematic extension that you could disable/deinstall, e.g. NuGet.
You say you reinstalled VS2013, so the problem might be related to settings. If reverting all settings is an option for you, see this thread on how to truly really reset your settings. This involves calling your devenv.exe with special parameters (e.g. in a cmd.exe), removing files and tinkering with the registry.
I have found the solution to this or a similar problem if you are starting Visual Studio by loading a solution file.
The symptoms are that a solution that previously could be loaded with no problems, suddenly starts having the unknown error box appear for every project in the solution. Sometimes you can't see the relationship to the continuous reappearance of the error message and the project loading, because you don't have the solution explorer open, so you aren't even aware there is a correlation.
The solution to this is to use task manager to stop visual studio, confirm with visual studio that you wish to shut it down and then look for the .suo file for the solution you are trying to load. In VS2012 it appears in the same directory as the solution file and has the extension solutionname.v11.suo while in VS2015 it appears in a hidden .vs directory under the location where the solution file is found, in a folder named for the solution.
Delete this file and the problem will go away.
The .suo file contains the user preferences for the solution you are trying to load and it is perfectly safe to delete it as it is regenerated when you load the solution.
If you are getting the unknown error when you haven't tried to load any solutions, this is probably not the right answer.

How do I add versions to “Visual Studio Version Selector”, my list is empty

I have VS 2008, 2010, and 2012 installed.
Initially, VS2013 Team Explorer was installed (Shell only). I uninstalled that.
Now, the Visual Studio Version Selector shows an empty list when executing a .sln file. Nothing shows.
How can I repopulate this list? Where is it stored? Registry? I tried to find entries, but since it doesn't actually have any items in the list, I couldn't search for a specific string.
I just encountered the same issue after installing Visual Studio 2015 parallel to an existing 2013 installation. In my case it turned out that that the problem was related to the solution file itself: It seems that the version selector does not like BOMs etc. (don't know how the solution got crippled, though). Make sure that the solution starts with
Microsoft Visual Studio Solution File, Format Version 12.00
and has no space, non-printable character etc. before that. After saving the file, the effect should be immediately visible with the correct icon returning.
I just ran into a similar problem where this dialog started popping up after a recent Windows Update (Win10) on 1/6/2018. That update caused all sorts of havoc in terms of broken file associations.
I tried searching for solutions and trying a few things but everything was overly complicated and messy.
My solution was to run the Visual Studio (2013) repair.
After the repair, I did receive a warning (from vs installer) about update 3 failing to update but I restarted the computer and sln files can now open without needing that version dialog. Everything seems to be compiling and running fine as well.
Just ran into this situation for VS2017 then I realized I have unfinished updates for Visual Studio when checking Visual Studio Installer.
The installer displayed a hint that I should restart my computer to complete the update and after doing so, the version selector works again.

Visual Studio crash at start-up

My Visual Studio began crashing at start-up. In my search for finding a remedy, I found these two suggestions, but neither worked for me:
Launching Visual Studio while running in safe mode, and
Running repair on Visual Studio.
However, I found that if I logged into a different Windows account, Visual Studio was able to run from that account without crashing.
Here is an error code that that I observed in the crash report:
LCID: 1033
Can anyone provide a solution for returning my Visual Studio to working order?
For me it turned out to be the plugin that GitExtensions installed into Visual Studio 2013.
-- UPDATE: try this before uninstalling GitExtensions
#Enceradeira proposed in the comments to uncheck the Show current branch in Visual Studio option. In GitExtensions, you get there via Tools -> Settings -> Appearance:
-- END OF UPDATE
After uninstalling GitExtensions and reinstalling it with all VS plugin unselected my VS runs smoothly again.
I even put together a blog post about this issue because it bugged me so much.
Since you're able to run with another user login, something may be wrong with your local settings, you can try to reset them: devenv /resetsettings in Start menu -> Run.
Warning: this will restore visual studio to default settings.
In my case VS used to crash on a single solution. I resolved the problem by deleting the respective solutions's user file: SolutionName.suo
My colleague recently experienced a problem with Visual Studio 2013 crashing on start-up. Unfortunately, we found that the approach recommended in the answer by #Arun M did not solve the problem:
devenv.exe /ResetSettings
...however, using a different command line argument did:
devenv.exe /ResetUserData
An easy way to run devenv.exe is via the Visual Studio command prompt; on Windows 10, it can be found here:
Start Button => All Apps => Visual Studio 2013 => Visual Studio Tools =>
VS2013 x86 Native Tools Command Prompt
For more about these command line arguments for devenv.exe, see this answer to this related question: How do I truly reset every setting in Visual Studio 2012?. ⚠ In particular, please note the cautionary statement in that answer about the /ResetUserData command line argument!
Try to run VS as administrator. That's necessary in my case.
If coincident to these Visual Studio crashes you are getting "Heap corruption" (Exception code: 0xc0000005) errors in your Windows Application log (Faulting module name: WindowsCodecs.dll), here is something worth checking into: A faulty WIC component within Expression Blend can cause ALL versions of Visual Studio to crash upon launch, as well as cause Internet Explorer to crash upon visiting many, if not most sites. Even though Microsoft distributes this component, they call it a "non-Microsoft component". As such, a Visual Studio reinstall won't fix this,, an OS reinstall over existing Windows installation won't fix this, and a system file integrity check won't detect it.
If my case, the misbehaving codec was "C:\Program Files (x86)\Microsoft Expression\Common\Imaging\4.0.360.0\PSDCodec.dll", and simply unregistering this component got my Visual Studio working again from consistent startup launch crashes.
I post this in hopes this solution to one source of Visual Studio crashing might save others from the $500 Microsoft support incident fee and week of downtime this caused me.
I just changed the windows language in the bottom right to "EN", then started as admin. And it worked, interesting..
I had the very strange phenomenon that both Visual Studio 2010 and 2013 on a Windows 7 machine crashed when run in a remote desktop session, started from a Windows 10 pc. Debugging the crash showed a CultureNotFound exception. It was caused by regional settings on the Windows 10 pc, which could not be translated in something understood by Windows 7. I had language English(Belgium) with an Azerty keyboard. I added and selected English(UK) with an Azerty keyboard and the crashes disappeared. No other programs suffered from this.
For me it was being caused by Web Essentials and I was able to resolve by disabling it, restarting VS, enabling it back , restart again. Works now.
I had a crash on startup (or soon after startup, before opening any solution) occurring in git2-msvstfs.dll, caused by placing a 3GB temp file into a directory within my solution. Deleting the file fixed it.
Once I accidentally pressed a random key combination (maybe something like ctrl+', but I didn’t realize I was holding ctrl down so I forgot what keys I hit by the time I realized something bad had happened) that resulted in VS Professional 2017 15.3.5 crashing within half a minute. After relaunching, I found that VS would be interactive for a few seconds before it would crash within half a minute. It was really too fast for me to try to figure out what I had accidentally activated or for me to disable it before VS would crash. Also, it would even crash if I didn’t open any solution, so I figured it was not something that deleting a .vs (per project/solution Solution Explorer/open files state) folder would fix.
To fix, I followed Arun M’s comment and renamed my %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_3f4d04be folder. You will need to adjust the path for the edition/version of VS that is crashing. On my machine, I think 15.0_3f4d04be is Professional and 15.0_0fed6c59 is VS Community Edition. You’ll probably have to guess based on the folder’s modification timestamp which is probably going to reflect the date you last used that edition of VS.
After renaming the versioned dotfolder, VS launched without crashing. It started with default settings but automatically restored some of my settings through the cloud sync stuff after a minute of running and it even remembered my account information so I didn’t need to sign in.
I did not need to rename my %LOCALAPPDATA%\Microsoft\VSCommon folder (which Arun M had also suggested).
I had a similar problem, both VS2015 and VS2013 would crash at startup. Tracked it down to an application I installed which put .net 4.7.2 on the system. Once i removed that app, removed .net, and reinstalled .net 4.6, Visual Studio started working again.

Resources