3

I have seen the following questions and tried all of their answers:

Namely that I have tried:

  • Cleaning the project and deleting all generated project files
  • Resetting all of the keyboard mappings

The difference in this question from the previous listed is the following:

  1. It is a C++ project, not c#, there are no references and no .NET version.
  2. I have not installed nor do I use the ReSharper program.
  3. I have tried checking out the same code and solution in a separate directory, and the problem no longer occurs (but still occurs in the original after a clean checkout)
  4. This started today, and I am unaware of an event that could have caused it. I have not installed any new plugins or similar. The only thing that has happened recently was that yesterday I installed some NUNIT references into a C# project that is in the same solution.

Since the other posts listed above did not list explicit details about the problem, this is a detailed description of what is occurring:

  1. I try to go to definition on an object (or go to declaration), with either F12 or the right-click menu: enter image description here
  2. Instead of going to the source of this (ie the HeartBeat class) it will show in the symbol search a list of possibilities: enter image description here
  3. All of these references open the object browser window instead of going to the source: enter image description here

How can I revert the behavior of visual studio to normal?

Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
  • This sounds like something to submit under Help->Send Feedback in VS and then watch the response page. – SoronelHaetir Jan 11 '18 at 05:33
  • @SoronelHaetir, if i want a solution next year, then sure. As in the question i could solve this by checking out new, but that is not very satisfying for me, or anyone else that runs into this problem. – Fantastic Mr Fox Jan 11 '18 at 05:35
  • So you know, at the worse case, you can always reset your VS completely by `devenv.exe /resetuserdata` – Dean Seo Jan 11 '18 at 05:55
  • @DeanSeo, I didn't know that. You should make an answer out of it. Also it worked, so definitely add that. – Fantastic Mr Fox Jan 11 '18 at 05:58

1 Answers1

3

As the OP mentioned, /resetuserdata will definitely bring your Visual Studio back to normal as follows:

devenv.exe /resetuserdata

although this is not the fundamental solution.

This kind of weird situation can occur especially when you run multiple Visual Studio at the same time, and you changed a few configurations only on one of them.

That's because Visual Studio tries to share the same .vssettings and the file is over-written every time it exits, to keep .vssettings to have the newest configuration sets you made at all times - the definition of the newest configuration is the one the last Visual Studio that you closed has.

Therefore, the configuration change that you think you've made might not be the one your Visual Studio is running on.

To prevent this from happening, you could make your .vssettings Read-Only. Then every time you close it, your VS will complain about it, but you can keep your customized configuration safe. (Which, I agree, is sort of ugly though)

Dean Seo
  • 5,486
  • 3
  • 30
  • 49