Recurrent message "Cannot navigate to the symbol under the caret" - visual-studio

I'm using Visual Studio 2015 CE. About a week ago I started seeing a message box showing the error mentioned in the subject. It happens only if I try to open a .cs file and it's completely preventing me from working :(.
I also noticed that the projects in my solution are being "lazy loaded". That means that I open the solution and in the solution explorer I see my projects listed with a label that reads "(loading)". Once I click on them, they get loaded.
I think it could be due to a windows update, probably, because I also noticed that while working with the browser (Chrome or Edge) F12 seems to be automatically pressed because the developer tools are opened randomly. That kind of makes a consistent pattern with the issue in VS. I uninstalled the latest updates but still have the issue.
Now, I don't thing there's something wrong with my keybord, even that's possible.
I saw many posting about this issue but couldn't find a solution yet.
Does anybody know what could be wrong here? I'm about to completely reinstall my computer.
Thanks!
Gonzalo

Related

Visual Studio for Mac - Autocomplete doesnt work anymore since mfractor

Im using Visual Studio Community 2017 for Mac.
I installed mfractor. Ever since I installed it my autocompletion in xaml does not work anymore and I do not know how to fix it. I tried to disable mfractor and I even uninstalled it but nothing helped. Two Examples:
Before I could type <SL after the very first character S I was able to see a few options to autocomplete. After writing the two characters SL I could autocomplete it to StackLayout. Not anymore. I dont see a list for autocompletion. I have to manually type every single char and I will never see a list for autocomplete options.
When typing <StackLayout> after typing > there was another autocomplete that I could choose </StackLayout. Well not anymore. I have to type everything myself.
Does anyone know something about this problem and maybe even know how to fix it?
After restarting the Mac and VS, uninstalling/disabling mfractor a few teams I had to realize that nothing worked.
But I accidentally found a way to fix it. I created a few Forms ContentPage XAML files in hope of that fixing something and got this message: You´ve reached your limit of two MFractor-enabled XAML files for today. Upgrade to Mfractor Professional for unlimited use.
Since then my autocompletion works again. Even with Mfractor enabled.

Visual Studio says it can't find source code for a web-debug

I'm using VS2005, and have been for many years without problems, and 2003 before that.
Today suddenly, when I try and debug javascript on a site from the web, the debugger loads as normal but complains it can't find the source and offers me the chance to go looking for it. In the Script Explorer it shows all of the files loaded by the page, it just won't show me the source for them when I double-click on them.
I've tried resetting all settings to web-development default. Didn't work. I even tried exporting the settings from another machine (XP) I have with VS2005 on it that works fine. After importing to the faulty machine (on Win 7) it made no difference.
Any ideas?
Steps to recreate:
1. Open IE9, go to yahoo.com
2. Click View->External Script Debugger->Open
3. Once in the debugger it says cannot find source and offers me a dialog to help me find it on my local machine (why would it be there?).
4. In the Script Explorer I see all html and js files the page loaded, but upon double-clicking them, nothing happens. Usually it opens the source and you can set breakpoints.
Working config is on XP/IE8
Non-working config is on Win 7/IE9 but was working fine before today.
I just noticed a bizarre side-effect. The File menu in IE9 is greyed out during the debug session and even after I've closed VS. So freaky.
Well, no solution was found as to why VS2005 suddenly developed a lack of understanding as to how to get JavaScript source code for live sites. I uninstalled it and installed VS2010 instead and that's working just fine, on the same sites. Maybe re-installing VS2005 would have worked, but I'd had VS2010 around waiting to be installed for a while anyway, so two birds, one stone and all that.
It remains a mystery. No point anyone offering any further input now. The problem is history.

Why is Telerik JustCode so confused?

I have been using JustCode(latest ver) for about 2 months now, and have started just turning it off most of the time.
The final straw was today when I wasted about an hour trying to find out why I was getting an error(along the lines of no overload with those parameters) when I was sure the code was correct. Finally I turned JC off and the error went away.
Why does it wrongly report errors?
Why does it sometimes disable keys like backspace in a normal code block?
Why does it sometimes color the code in an ASPX page like it is commented out(all green), when it is not(after disabling it VS colors it correctly).
There are lots of other niggly problems like if my mouse is over the word im typing intellisense will not come up etc.
So am I using it wrong or something? It really does look like a promising product from the features videos etc on their site - so I hope the problem is with me :)
Sorry to hear you had such problems with JustCode. I suppose you used the Q2 version that was released in July. Some of the problems that you describe – hiding the intellisense, blocking some keys – are problems that others have also reported and were fixed in the Service Pack that was recently released. Please, go ahead and download the latest version. It has other fixes as well than could solve other niggly problems that you may have.
In case you find yourself wondering why some error is showing while you are sure your code is correct – Visual Studio successfully builds the project – try refreshing the code analysis (in JustCode menu choose – Refresh Code Analysis). That may clear the errors. If the error shows even after that – then position the cursor onto the error and hit Alt + Enter (or choose Fix… from JustCode menu). At the bottom of the popup menu you will find Report Good Code Red. This will send over a report for the issue to the team and they’ll contact you with more information on the problem. If you are irritated from the error you can choose Ignore This Error / Warning from the same popup menu.
One thing that you can always count on is accurate and prompt response from the team. If you have any problems or suggestions – please, go ahead and write a support ticket or forum post in Telerik’s web site.
Hope this helps.

Visual Studio "Find" results in "No files were found to look in. Find stopped progress."

Sometimes while developing in Visual Studio IDE, when you use "Find in Files" dialog to find something, the search fails and you will see the following message in the "Find Results" window.
No files were found to look in. Find stopped progress
Once this message shows up, all the subsequent searches will result in the same message. Nothing fixes the problem including restarting the computer except pressing Ctrl + ScrLk.
What causes Visual Studio to get into this state and is there a setting to permanently prevent it from happening?
According to this thread:
Posted by Microsoft on 10/13/2009 at
4:33 PM
Hi all,
Thank you for your continued interest
in this bug. We have been able to
reproduce the issue intermittently in
several versions of Visual Studio
running on several versions of Windows
and have identified the root cause as
external to VS. The Windows team
unfortunately did not have time to fix
this for their current release, but we
are working with them to hopefully
have this bug fixed for a future
version of Windows. At present, the
workaround (as many of you noted) is
to press Ctrl+Scroll Lock, Ctrl+Break,
or the Break key alone.
Again, thanks for all of the details
you provided about this bug. If you
have any further questions or
comments, please feel free to post
again here; although this issue was
closed quite a while ago, I'll make
sure it stays on our radar.
Thanks, Brittany Behrens Program
Manager, VS Platform - Editor
This bug has been around since at least 2004 and, as of the above post in 2009, had not been fixed.
Sometimes Ctrl + Break works, sometimes Alt + Break, sometimes Ctrl + Scroll Lock, and other times Alt + Scroll Lock.
Right now, nothing works. This has been a huge problem for me. Shame on Microsoft for not fixing this bug in the last nine years.
Apparently, for those for who the key combinations don't work (like me at the moment), deleting the following registry key brings salvation:
MyComputer\HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\[VS VERSION NUMBER]\Find
Of course, [VS VERSION NUMBER] should be internal version number of the IDE. Don't forget to restart your computer.
Mind you, deleting stuff in the registry is dangerous. Like anyone on SO cares but anyway...
I don't think there is anything you can do to prevent it.
It seems to occur after I have stopped a build with CTRL+Break...Maybe I am pressing CTRL+Scroll Lock during that time???
I have only had it happen to me 2-3 times, and that was several months apart.
What he is saying is that occasionally when performing a search within Visual Studio you get the mentioned error message. Even though you know there is stuff to find. It is some weird state that Visual Studio gets into. If you press the (CTRL+Scroll Lock) it will 'fix' the issue.
There are currently nine bugs on the Connect site related to this and marked as Not reproducible.
I created another one for Visual Studio 2010 SP1: "Find was stopped in progress" while performing search in Visual Studio
Please vote for it if you are unable to perform search.
PS: Microsoft claims that they fixed it in Visual Studio 2012.
I have had this problem and saw peoples' answers about the multiple Ctrl + Break/Pause Scroll Lock combinations.
I considered this, but I thought it a poor workaround (especially as I use a Mac Keyboard so those keys are not easily available).
So the solution I found was to do this:
Menu: Tools → Options → Environment → Find and Replace
Uncheck the top three check boxes (checked by default in my settings).
Re-check the top three check boxes.
Et voila, everything should work fine.
Well, it did for me anyway, which was a relief as I can't believe Microsoft would allow a weird key combination as a work around for a bug like this.
I submit this hoping it may help!
See if this Stack Overflow question helps:
Search stops working for "Entire Solution"
Short version of the solution:
You should try clicking inside the Find Results window, and once the blinking text cursor is visible, hit Ctrl + Break four or five times. That should do the trick.
My experience with this problem:
Steps to Reproduce
I just experienced this using Windows Server 2008 R2 Standard and Visual Studio 2010 SP1.
I was accessing Visual Studio remotely through Citrix Receiver (from my computer, A, to B) and through Windows Remote Desktop (from B to C). In this set-up (chaining two remote sessions), I sometimes have stuck modifier keys.
In B, I had pressed Windows+Pause to access the System Properties window. (This may or may not be related; I suspect there could have been a stuck key press or something.)
Later on, when I opened Visual Studio on C, I had this problem. Note that I always use Ctrl+Shift+F to access the Find All window.
Solution
I solved it by pressing Ctrl+Scroll Lock as suggested in other answers.
Cause
As for why this happens, I did notice that if I press Ctrl+Break while the text cursor is in the Find Results window but before any results are found then the search stops with the same message. This indicates to me that it's related to a keyboard problem.
As reported by others, apparently it's a Windows bug. Here's a discussion about this.
I encountered a very similar problem. I was searching a folder for all files for a phrase in all .cs files in my solution. Visual Studio kept saying "No files were found to look in". (It did not have the "Find stopped progress" part of the message.)
I searched for the message and found this question. The suggested keyboard commands in other answers did not work.
I like to use the keyboard for navigation. I had accidentally hit Alt+B and Space. Alt+B is the shortcut to jump to the "Include sub-folders" checkbox on the Find and Replace form. The space bar cleared the checkbox, and then Alt+A performed a Find All action. Because it was not searching sub-folders, no files were found. The message was correct.
After checking the "Include sub-folders" box, searches found the matching files in sub-folders. So if you're getting the message "No files were found to look in" without the message "Find stopped progress", ensure the search is looking in sub-folders!
I thought I was seeing this problem, but after two days of searching for a solution I figured out that the "Look at these file types" selector had changed and didn't include the file extension I needed.
I had this in Visual Studio 2015 yesterday.
In Find in Files, in the textfield Look in:, I typed
*.*
instead of Entire Solution, and that also caused No files were found to look in.
This is not a Visual Studio bug or Windows bug. It's a keyboard bug. Please see an answer in duplicate question https://stackoverflow.com/a/28219093/147805.
I can reproduce your issue.
There are some steps as following below you can try:
Check the setting Find and Replace (menu Tools → Environment → Find and Replace).
Open "Developer Command Prompt for VS2013" and paste
“devenv.exe /resetsettings”
Use the Visual Studio Setup Wizard (via Control Panel) to repair Visual Studio. You also can read the reference about Find in Files:
http://msdn.microsoft.com/en-us/library/dechx2tz.aspx
I have found another cause of this: Moving the solution folder to a new location, when CMake is part of the build process.
I was working with the Chromium Embedded Framework and moved the main CEF folder from e:\ to c:\ . This seems to break everything including Find because the CMake build scripts it uses hard-code the disk volume and full path (E:\folder) into the source paths.
To be clear, Press Ctrl + ScrlLck, with the Search Window open. That resolved it for me too.

Error List Freaking Out in VS 2008 while in large Aspx Files

I've been having this irritating issue lately. The site I'm currently working on has large aspx pages with tons of client side js code. While I'm typing the Error List window will keep opening and closing at the bottom of VS (where I have the window docked). I mean constantly. This is beyond aggravating as you can imagine. It's happening to a coworker as well. Does anybody else have this issue? Any solutions? (other than smaller pages)
We've got 2008 Pro SP1. I've turned off every JS feature I can find since with pages this large it slows the VS to a crawl while it tries to parse it. I've tried closing the Error list completely but it just re-opens itself.
Thanks in advance,
Geoff
Try deleting the .user file in the project directory
Use Add/Remove programs to do a repair on VS2008
If neither of those work, copy the markup to a new project and attempt to reproduce. If you can reproduce this issue then update this question with details.
I finally found the options that were causing the issue.
1. Options->Text Editor-> Miscellaneous,
un-check "Formal HTML on paste
2. Options->Text Editor->JScript->Formatting
un-check The boxes under "Automatic Formatting"

Resources