Microsoft
Visual Studio
Visual Studio
  • Home
    • Problems
    • Suggestions
  • Downloads
    • Visual Studio IDE
    • Visual Studio Code
    • Azure DevOps
    • Team Foundation Server
    • Accounts and Subscriptions
  • Subscriber Access
      • Microsoft 365
      • Azure
      • Office 365
      • Dynamics 365
      • SQL
      • Windows 10
      • Windows Server
      • Enterprise Mobility + Security
      • Power BI
      • Teams
      • Visual Studio
      • Surface for Business
      • AI
      • Internet of Things
      • Azure Cognitive Services
      • Quantum
      • Research
      • Docs
      • TechNet
      • Developer Network
      • Windows Dev Center
      • Windows IT Pro Center
      • FastTrack
      • Partner Network
      • Solution Providers
      • Partner Center
      • Cloud Hosting
      • Education
      • Financial services
      • Government
      • Health
      • Manufacturing & resources
      • Retail
      • Security
      • Licensing
      • AppSource
      • Azure Marketplace
      • Events
    • View all
    Sign in to your account
    Sign in

    Developer Community

    Get help from our community supported forum
      • Home /
      • Visual Studio /
      Searched and didn’t find your feedback?
      • Visual Studio
      • Visual Studio for Mac
      • .NET
      • C++
      • Azure DevOps
      • Azure DevOps Server (TFS)
      or
      • Visual Studio
      • Visual Studio for Mac
      • .NET
      • C++
      • Azure DevOps
      • Azure DevOps Server (TFS)
      Visual Studio
      Visual Studio for Mac
      .NET
      C++
      Azure DevOps
      Azure DevOps Server (TFS)
      
      37
      • View Status History

      Cannot navigate to the symbol under the caret in ASP.NET MVC Projects

      Fixed - Pending Release visual studio 2019 version 16.0 previewwindows 10.0solutionvisual studioFixed In: Visual Studio 2019 version 16.1 Preview 3

      avatar image Shivji Patel reported Mar 26 at 08:28 AM

      When opening an exiting solution in VS2019 RC that uses ASP.NET MVC and try doing go to difinition F12 or go to difinition we get Cannot navigate to the symbol under the caret, if you open the solution in VS2017 all works fine

      thub.nodes.view.add-new-comment
      Add comment Hide 18

      Add Comment

      • Insert linkRemove link

      ​

      10 |10000 characters needed characters left characters exceeded
      avatar image Visual Studio Feedback System ♦♦ · Mar 26 at 09:12 AM 0
      Share

      We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

      avatar image Jinu Joseph [MSFT] · Apr 04 at 06:42 AM 0
      Share

      This issue has been identified as a duplicate of an earlier reported feedback linked here: https://developercommunity.visualstudio.com/content/problem/381747/cannot-navigate-to-the-symbol-under-the-caret-vs-1.html . If you reported or voted here, your vote has been applied to the original issue. Everyone else can add their vote directly at the above linked feedback. Voting helps increase the priority of the issue by consolidating customer impact under one feedback. Thank you!

      avatar image Jason Malinowski [MSFT] · Apr 05 at 03:25 PM 0
      Share

      I'd like to ask you if you can help us get some extra logging information for your project to help us diagnose these issues. The instructions are available at:


      https://github.com/dotnet/roslyn/wiki/Diagnosing-Project-System-Build-Errors


      If you could follow the steps under "How do I get log files to diagnose what is happening in Visual Studio 2019?" and could attach the resulting logs to this feedback item, that would be greatly appreciated. Thanks!

      avatar image 卢泽涵 Jason Malinowski [MSFT] · Apr 08 at 04:41 PM 0
      Share

      The feedback you just closed contains some attachments, i hope that can give some help :)

      avatar image Jason Malinowski [MSFT] 卢泽涵 · Apr 08 at 04:45 PM 1
      Share

      The bug originally landed on me but it's not something I can drive the fix for. I've just been looking at attachments to confirm the issue it the same as this one, but will let the other team actually drive the issue to resolution.

      avatar image Dave Glick · Apr 08 at 05:13 PM 0
      Share

      FWIW, I think I've reported the same issue over here: https://developercommunity.visualstudio.com/content/problem/520524/not-getting-design-time-build-information-for-one.html

      Thanks for connecting the dots on these @Jason Malinowski [MSFT]

      avatar image Wagner Ignacio Pinto Junior · Apr 08 at 05:36 PM 0
      Share

      Thank you for looking into this issue

      avatar image Juan José Mejia [MSFT] · Apr 08 at 06:42 PM 0
      Share

      Would it be possible for someone to share their source code? I am trying to reproduce this issue to validate a workaround.

      avatar image Juan José Mejia [MSFT] · Apr 08 at 06:45 PM 0
      Share

      We need access to source that will reproduce this issue. Would it be possible for you to share your source code?

      avatar image Francisco Samuel Courtois Garcia Juan José Mejia [MSFT] · Apr 08 at 06:48 PM 0
      Share

      What kind of source code? Any ASP.NET MVC source code?

      avatar image Dave Glick · Apr 08 at 06:48 PM 0
      Share

      @Juan José Mejia [MSFT] I was able to create a minimal repro at https://github.com/daveaglick/VS2019Test

      avatar image Juan José Mejia [MSFT] · Apr 08 at 07:52 PM 2
      Share

      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

      avatar image Derek Juan José Mejia [MSFT] · Apr 10 at 04:55 PM 0
      Share

      This is the same step to resolve the issue in https://developercommunity.visualstudio.com/content/problem/515168/visual-studio-2019-release-go-to-definition-doesnt.html

      Can we get something built into VS 2019 to help deal with this situation as these types of projects will still build fine but Intellisense is completely broken?

      avatar image Visual Studio Feedback System ♦♦ · Apr 24 at 06:19 AM 1
      Share

      A fix for this issue has been internally implemented and is being prepared for release. We'll update you once it becomes available for download.

      Show more comments

      Solutions

      · Add your solution
      9
      Best Solution

      Solution by avatar image Juan José Mejia [MSFT] · Apr 08 at 07:55 PM

      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

      thub.nodes.view.add-new-comment
      Add comment Hide 21 · Share

      Add Comment

      • Insert linkRemove link

      ​

      10 |10000 characters needed characters left characters exceeded
      avatar image paulapostolos · Apr 08 at 08:06 PM 0
      Share

      That worked for me! Thanks.

      avatar image Dave Glick · Apr 08 at 08:06 PM 0
      Share

      FWIW, I was able to get back up and running by upgrading to Microsoft.NetCompilers v1.1.0. That appears to be working okay and is a little less risk IMO since mine is a legacy application in maintenance and we try to avoid major version updates.

      avatar image Wagner Ignacio Pinto Junior · Apr 08 at 08:56 PM 0
      Share

      Solved! Thanks!

      avatar image Herb Fickes · Apr 08 at 09:38 PM 0
      Share

      This doesn't help my situation. I don't have any NuGet packages in the project which is having these issues.

      In my case, its a solution with a couple of dll's. One of them has project references to two others and even though it compiles and runs, the project references are ignored in the IDE and are shown as unknown. Additionally, any type or method from those reference is shown as unknown and cannot be navigated to.

      Unfortunately, I am unable to upload the code to demonstrate it.

      However, it works fine in VS 2017 and has this problem in VS 2019.

      avatar image Jason Malinowski [MSFT] Herb Fickes · Apr 08 at 10:09 PM 0
      Share

      If you don't have any NuGet packages then you're seeing something else. I'd suggest you create a new feedback item so we can investigate that separately. Do still follow the steps at https://github.com/dotnet/roslyn/wiki/Diagnosing-Project-System-Build-Errors to get the logs so we can investigate, and feel free to tag me in the description.

      avatar image Herb Fickes Jason Malinowski [MSFT] · Apr 09 at 04:42 PM 0
      Share

      Thanks Jason. Rather than creating a new problem, I found this one

      https://developercommunity.visualstudio.com/content/problem/524877/intellisense-not-working-cannot-navigate-to-the-sy.html

      which was recently created and seems to be the same and attached my logs there.

      avatar image David Covey · Apr 11 at 10:48 PM 0
      Share

      This solution worked for me as well. I learned that I can't assume that an existing project is automatically going to work in a new version of a tool. We must always remember that many tools' features are dependant on packages (either extensions or NuGet packages). Thanks for the solution and keep on keepin' on.

      David

      avatar image Jason Malinowski [MSFT] David Covey · Apr 12 at 01:39 AM 0
      Share

      It is something we try for! This is something that unfortunately slipped through testing. :-(

      avatar image Jorge Armando González Pino · Apr 12 at 01:41 AM 0
      Share

      Its working in visual studio 2019.

      avatar image Nico Naparstek · Apr 12 at 03:39 PM 0
      Share

      What are we supposed to do if the project is a asp.net webform project that does not have any version of "Microsoft.Net.Compilers" installed?

      avatar image Jason Malinowski [MSFT] Nico Naparstek · Apr 12 at 03:48 PM 0
      Share

      File a new feedback item, since you're seeing something else we'll need to investigate. (Trying to keep track of multiple, separate issues in one feedback item gets confusing really quick!) Do still follow the steps at https://github.com/dotnet/roslyn/wiki/Diagnosing-Project-System-Build-Errors to get the logs so we can investigate.

      avatar image Nico Naparstek Nico Naparstek · Apr 12 at 03:48 PM 1
      Share

      I went into manage nuget packages but it did not show "Microsoft.Net.Compilers".

      what worked for me was to edit the .vbproj file

      in there I found the following two lines, removing them fixed the go to definition problem

      <Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
        <Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
        <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
      avatar image Jason Malinowski [MSFT] Nico Naparstek · Apr 12 at 03:55 PM 0
      Share

      Ah, so do you not have a packages.config that listed those? Then somehow your project may have gotten corrupted during some past change.

      Show more comments
      Show more comments
      avatar image David Covey · Apr 13 at 02:33 PM 0
      Share

      one thing for sure is that this seems to be a project based issue and not a problem with visual studio 2019. This is a good thing as all of the fixed seen to be an adjustment to one of the projects various configuration files/options.

      avatar image atanas.yanew · Apr 16 at 12:58 PM 0
      Share

      Solved! Thank you.

      avatar image MALVIK BHAVSAR · Apr 28 at 01:42 PM 0
      Share

      This is ultimately the solution that worked for me.

      Thanks. Worked for me vs community 2019

      Show more comments
      0

      Solution by avatar image Narasimha Trinadh Nemani · 8 hours ago

      Worked for me. You saved some time. Thanks

      thub.nodes.view.add-new-comment
      Add comment · Share

      Add Comment

      • Insert linkRemove link

      ​

      10 |10000 characters needed characters left characters exceeded

      Add a Solution

      • Insert linkRemove link
      Enter your reply here...

      Up to 5 attachments (including images) can be used with a maximum of 2.1 GB each and 2.1 GB total.

      Follow

      180 People are following this

      Related Problems

      Intellisense cannot handle Boost anymore
      0 Solution

      Навязчивое окно "завершения строк в следующим файле не являются единообразными"-Obsessive window "the completion of lines in the following file are not uniform"
      0 Solution

      Target Framework won't change (preview)
      1 Solution

      Integration tests(HostType("VS IDE")) are not worked in vs2019.
      0 Solution

      Problem with Docker installation by Visual Studio 2019
      0 Solution

      打开时候直接卡死-Just stuck when you open it.
      0 Solution

      Se muestra mal la ventana del proyecto después de compilar la solución (VS2019 RC3)-The project window is displayed incorrectly after compiling the solution (VS2019 RC3)
      1 Solution

      No se pueden cargar más de 2 soluciones en un proyecto - Unable to load more than 2 solutions on a project
      0 Solution

      VS Open my solution with Active Solution Platform as ANY CPU instead of x86
      0 Solution

      WPF controls can not load design-time assemblies in ToolBox in VS2019 RC
      0 Solution

      What's new

      • NEW Surface Pro 6
      • NEW Surface Laptop 2
      • NEW Surface Go
      • Xbox One X
      • Xbox One S
      • VR & mixed reality
      • Windows 10 apps
      • Office apps

      Store & Support

      • Account profile
      • Download Center
      • Sales & support
      • Returns
      • Order tracking
      • Store locations
      • Support
      • Buy online, pick up in store

      Education

      • Microsoft in education
      • Office for students
      • Office 365 for schools
      • Deals for students & parents
      • Microsoft Azure in education

      Enterprise

      • Microsoft Azure
      • Enterprise
      • Data platform
      • Find a solution provider
      • Microsoft partner resources
      • Microsoft AppSource
      • Manufacturing & resources
      • Financial services

      Developer

      • Microsoft Visual Studio
      • Windows Dev Center
      • Developer Network
      • TechNet
      • Microsoft developer program
      • Channel 9
      • Office Dev Center

      Company

      • Careers
      • About Microsoft
      • Company news
      • Privacy at Microsoft
      • Investors
      • Diversity and inclusion
      • Accessibility
      • Security
      English (United States)
      • Sitemap
      • Contact us
      • Privacy & cookies
      • Terms of use
      • Trademarks
      • Safety & eco
      • About our ads
      • © Microsoft 2018
      • Anonymous
      • Sign in
      • Spaces
      • Visual Studio
      • Visual Studio for Mac
      • .NET
      • C++
      • Azure DevOps
      • Azure DevOps Server (TFS)
      • Explore
      • Topics
      • Problems
      • Features
      • Users
      • Badges
      Sign in with another account
      Dismiss dialog