Description
This issue has been moved from a ticket on Developer Community.
[severity:I'm unable to use this version] [regression] [worked-in:17.3.?]
I just updated to the latest version of Visual Studio and there's been a serious regression in the way F12
works when pressed on a class that belongs to a Form
. It has destroyed my productivity and I'm going to have to go back to a previous version of VS if it doesn't get fixed.
Repro Steps:
Inside a C# Windows Forms project, create a new Form
named Dialog
and then write this line of code somewhere in the project:
Dialog d = new Dialog();
Click on the word Dialog
now and press the F12
key.
Expected Result:
The Dialog.cs
file is opened and I'm taken to the Dialog
class inside it.
Actual Result:
The Find all references window appears at the bottom of Visual Studio and gets populated with two results:
...\Solution\Project\Dialog.cs(13):public partial class Dialog : Form
...\Solution\Project\Dialog.Designer.cs(3):partial class Dialog
To get where I want to go, I must now move the mouse to the bottom of the screen and double-click on the first line.
There is no scenario ever where I want to be taken to the designer file of a Form when pressing F12
on its class name. By definition, the designer file of a Form is an auto-generated file that is supposed to be hidden from the user. In fact, it contains comments inside of it that explicitly say "do not modify the contents of this method with the code editor".
With this regression, the F12
key is now useless. An action that has always taken a single keystroke now takes using the keyboard, moving the mouse a large distance, reading lines of text, and clicking on something. Instead of doing that, I would just grab the mouse and open the Dialog.cs
file myself in Solution Explorer.
NOTE:
This regression is related to the following feedback item that your team is working on, to remove auto-generated files from code search. Automatically generated code is not code that a user wants to see when searching for things. By definition, it is code the user is not supposed to "know" about.
No way to hide automatically generated files in Code Search
Original Comments
Feedback Bot on 4/26/2025, 09:47 PM:
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.
Feedback Bot on 5/2/2025, 00:27 PM:
This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.