“Go To Definition” in Visual Studio only brings up the Metadata

后端 未结 26 2952
夕颜
夕颜 2020-12-07 13:33

I am working in a Web Project in Visual Studio 2008. When I hit F12 (or right-click and select Go To Definition) Visual Studio is consistently going to the Metadata file in

26条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 14:08

    For those using VS 2017 (I'm at version 15.3.4 at this moment) here are the simple steps:

    1. Open your solution in Windows Explorer and close down Visual Studio
    2. In the explorer menu, select View and ensure that the "Hidden items" checkbox is marked
    3. Navigate to the subfolder .vs\[your solution name]\v15
    4. Delete the .suo file
    5. Restart VS and build your solution

    That fixed it for me: F12 opened the actual source file, not the "from metadata" version.

提交回复
热议问题