1

I use Visual Studio 2019 (16.7.7). I created new ASP.NET Web Application (.NET Framework) with web forms. But in code behind “Find All References” doesn’t work for setter. And in .aspx-file I can’t “drill down” to user control definition. It seems like a plain text.

I can’t use a previous visual studio version. My current project contains a lot of web forms and also projects with PackageReference format

I had installed visual studio 2017 before. But I unistalled it according to https://learn.microsoft.com/en-us/visualstudio/install/uninstall-visual-studio?view=vs-2017 and https://learn.microsoft.com/en-us/visualstudio/install/remove-visual-studio?view=vs-2017 Also I several times have reinstalled visual studio 2019 but problem remains

Here are steps to reproduce:

  1. Create ASP.NET WEB Application (.Net Framework) C#
  2. Select Web Forms Template
  3. At ViewSwitcher.aspx.cs file I have added public property
        public string SomeProp { get; set; }
  1. At Site.Mobile.Master file I have added value. Here intellisense works. It suggests property SomeProp.
<friendlyUrls:ViewSwitcher SomeProp="someValue" runat="server" />
  1. Build.
  2. Return to ViewSwitcher.aspx.cs. I do right mouse click on set of SomeProp and click "Find All References". But it doesn't show using from Site.Mobile.Master.

It is too difficult make any refactoring and rename without it

Maybe, visual studio have never had such feature. Previously I have used Resharper but now I can't use it.

The same true for visual studio 2017. windows 10

  • Hi and welcome to StackOverflow. A good question. – Marcel Oct 29 '20 at 06:51
  • With "Drill down", do you talk about the F12 key?. With me, both the F12 key (in aspx and code behind) and the "Find all References" in the code behind do work, in a WebForms project with .NET 4.6.2 in my case. I have Microsoft Visual Studio Enterprise 2019 Version 16.6.5. Maybe the "Enterprise" does make a difference. And oh, I also use ReShaper, but it should make no difference, as the features you are talking about are not ReSharper's. – Marcel Oct 29 '20 at 06:56
  • 1
    Yes it is because Resharper. I also can with Resharper – roman.gorgol Oct 29 '20 at 10:43
  • Ok, then. Please post this finding as an answer to your own question. It's regarded as good etiquette here, because actually it is an answer. – Marcel Oct 29 '20 at 13:22
  • No, it is not answer. I don't want use Resharper – roman.gorgol Oct 29 '20 at 14:17
  • My opinion is that many things change at MS and VS2019. You should think of moving to .net core ... also webform doesn't sound safe for me ... – Fabrice T Oct 29 '20 at 16:01
  • 1
    check out these solutions: https://stackoverflow.com/questions/57474785/visual-studio-2019-go-to-definition-and-intellisense-not-working – Albert D. Kallal Oct 29 '20 at 18:59

1 Answers1

0

I suggest you could try the following suggestions:

1) disable any third party vs installed extensions under Extensions-->Manage Extensions-->Installed

2) clean nuget caches

3) run update-package -reinstall under Tools-->Nuget Package Manager-->Package Manager Console.

4) close VS, delete all the folders C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\16.0_xxxx to initialize your VS.

also, for your project, you should delete .vs hidden folder under the solution folder, bin and obj folder of your project.

enter image description here

Besides, if you still cannot get what you want, please click C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe to clear all vs versions strongly, their registry information and data info.

Then, reinstall the VS again. If you have tried this step, then, you should try to turn off any antivirus software, other third party windows programs.

Update 1

Actually, it is quite strange. As to help you further, I have reported the issue on our DC Forum and you can vote it and add any comments if I did not describe the issue in detail so that it will get more Microsoft's attention. And I hope the Team will give you a satisfactory reply.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41
  • No, it doesn't help. It strange. For protected propetries inside .ascx "Find All References" works, but it doesn't work for setter of public properties when I set that property in some .aspx – roman.gorgol Oct 30 '20 at 14:40
  • Quite strange. Did you try to use [devenv /safemode](https://learn.microsoft.com/en-us/visualstudio/ide/reference/safemode-devenv-exe?view=vs-2019) to start VS to test the issue. Besides,And could you please provide some sample code and several steps to help us reproduce this issue? And it could be helpful. – Mr Qian Nov 02 '20 at 08:45
  • I added it to the question – roman.gorgol Nov 02 '20 at 14:08
  • It seems that when I search `SomeProp` user control property by right-click on `Find All References`, it cannot find it on `Site.Mobile.Master` page, I faced such situation and I am investigating it. And I will report to the team. – Mr Qian Nov 04 '20 at 10:19
  • @user2768921, I have reported the issue on our DC Forum. See update from my answer. And you can check it. – Mr Qian Nov 05 '20 at 09:26