Visual Studio “Go to definition” disabled or gray out

前端 未结 12 1526
你的背包
你的背包 2021-02-03 21:59

Visual Studio\'s Go To Definition is disabled and F12 doesn\'t work. Other commands like Alt-F12 may continue working.

12条回答
  •  你的背包
    2021-02-03 22:24

    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

提交回复
热议问题