Skip to content

C# - Automatic "prop" <tab> behavior breaks when IDE adds a 'using' statement #82222

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice]
I'm not sure what this feature is called, so I'll have to describe it.

Make yourself a new class.
Position the cursor inside the class and type "prop" then hit tab.
This auto generates "public int MyProperty {get; set; }" and you can enter the type, hit tab again, and type the name of the property, then tab to be done and move to the next line. Nice and quick, great feature!

However, if when you add your type, it's something custom, and it's in a namespace that isn't part of the file, the acting of adding the 'using' statement at the top breaks this flow.

To reproduce...

  • Make a folder called Common
  • Make an enum inside common called MyEnum
  • In the main folder, make a new class
  • Position the cursor and type "prop" then hit tab.
  • Starting typing "MyEn" and you should see "MyEnum" pop up as a hint. Select it and hit tab.

You've now ended the quick entry flow and the cursor is in between your type and "MyProperty". Pressing tab will actually add a tab.


Original Comments

Feedback Bot on 12/11/2025, 06:50 AM:

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.

YI CHWEEN ONG (Centific Technologies Inc) [MSFT] on 1/13/2026, 05:57 AM:

Thank you for taking the time to log this issue!
Do you still repro this issue now? I can’t repro this issue in VS2022 Community (17.14.23).
In order to investigate your issue further, could you help to confirm several questions?

  1. Could you upgrade your VS to the latest version and try again?
  2. Can you provide us a repro video using https://www.screentogif.com/ or a similar tool?

(The reason we’re asking for additional information is that we’d like to fully understand the issue and try to reproduce it on our side.)
We look forward to hearing from you!

Don Thompson on 1/15/2026, 02:18 AM:

Still was happening in 17.14.19 last week. I updated to 17.14.24 today and reproduced it again.

  • New console project (it’s .net 8 but shouldn’t matter)
  • make a folder “test1”
  • add a class in that folder “class1”
  • add a function to Class1:
    public void DoSomething(){}
  • at the root of your project, add a new class “dto1”
  • go into dto1.cs
  • put your cursor in the class brackets
  • type “prop” and hit tab
  • a highlight should be on the type. Type Class1 and hit tab
  • Class1 will be entered, but you’ll see the IDE add a using line at the top and then the cursor is left after Class1 with “MyProperty” still there. hit tab again and it adds ~4 characters. [BAD BEHAVIOR]
  • Now make a new line and try again. This time it’ll set Class1, but when you hit tab again it jumps to the variable name. [CORRECT BEHAVIOR]

Don Thompson on 1/15/2026, 02:24 AM:

(private comment, text removed)

YI CHWEEN ONG (Centific Technologies Inc) [MSFT] on 1/19/2026, 06:34 AM:

Thanks for your sharing the detail steps, I can reproduce this issue through your shared steps and this issue has been escalated for further investigation, if there is any process, I will inform you immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions