Skip to content

Fix Move misplaced using directives breaks symbol qualification #75961

@just-ero

Description

@just-ero

Version Used

Compiler: 4.13.0-2.24561.3 (24e1dd6)
.NET: 9.0.100
Visual Studio Code: 1.95.3, f1a4fb101478ce6ec82fe9627c43efbf9e98c813, x64
C# Extension: v2.56.31
C# Dev Kit Extension: v1.14.2

Steps to Reproduce

  1. Create or open a C# project in Visual Studio Code (Visual Studio untested).
  2. Add the following code wherever syntactically applicable:
    namespace Foo;
    
    using Alias = C;
    
    class C;
  3. Apply the Move misplaced using directives fix on Alias.

Diagnostic ID: IDE0065

Expected Behavior

using Alias = Foo.C;

namespace Foo;

class C;

Actual Behavior

using Alias = C; // The type or namespace name 'C' could not be found

namespace Foo;
class C;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugFeature - IDE0065Misplaced using directivehelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions