VS2019 ASP.NET MVC “Cannot navigate to the symbol under caret”

走远了吗. 提交于 2020-01-24 22:22:21

问题


When opening an existing ASP.NET MVC project inside Visual Studio 2019 I keep receiving this error message "Cannot navigate to the symbol under caret" when trying to "Go To Definition" (F12).


回答1:


None of the other answers on here for "Cannot navigate to the symbol under caret" solved my issue until I found this solution from the visual studio developer community.

Here is the link and bellow is the solution from the post: https://developercommunity.visualstudio.com/content/problem/505489/cannot-navigate-to-the-symbol-under-the-caret-3.html

This is happening to projects that are using v1.0.0 of Microsoft.Net.Compilers. To work around this problem you need to update to the latest stable version which is 3.0.0. To do that you can follow the these steps:

1) Right click on "References" in the Solution Explorer

2) Select "Manage NuGet Packages"

3) Under the "Installed" tab search fro "Microsoft.Net.Compilers"

4) Select "Microsoft.Net.Compilers"

5) On the side window of "Microsoft.Net.Compilers" click the update button

That should allow you navigate to definitions



来源:https://stackoverflow.com/questions/55737784/vs2019-asp-net-mvc-cannot-navigate-to-the-symbol-under-caret

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!