Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Auto Fill Not Working in .razor Files #10314

Open
vsfeedback opened this issue Apr 25, 2024 · 0 comments
Open

Switch Auto Fill Not Working in .razor Files #10314

vsfeedback opened this issue Apr 25, 2024 · 0 comments
Assignees
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author feature-completion
Milestone

Comments

@vsfeedback
Copy link

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


[severity:It bothers me. A fix would be nice]

Problem

Auto filling a switch statement works in .cs files and not in .razor files

Reproduction

  1. Paste the following code snippet in a .cs class file and also in a .razor file
  2. Delete the generated switch statement
  3. Follow steps 1-4 in the comment
private enum Test
{
    A,
    B,
    C
}

private void Method(Test test)
{
    /**************************************************
        1. Type "switch"
        2. Press "Tab" two times
        3. Type "test" over the "switch_on" place holder
        4. Press "Enter" (Once in .razor file, two times in .cs file)
    **************************************************/
    switch (switch_on) // This is the template that is generated after pressing "Tab" two times
    {
        default:
    }

}

Visual Studio Info

Microsoft Visual Studio Enterprise 2022
Version 17.9.6
VisualStudio.17.Release/17.9.6+34728.123
Microsoft .NET Framework
Version 4.8.09037

Installed Version: Enterprise

Microsoft Visual Studio Tools for Applications 2022   00476-80000-00000-AA218
Microsoft Visual Studio Tools for Applications 2022

Visual C++ 2022   00476-80000-00000-AA218
Microsoft Visual C++ 2022

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools   17.9.199.22661
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.9.199.22661
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.9.199.22661
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Markdown Editor v2   2.0.156
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio   2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Node.js Tools   1.5.50908.1 Commit Hash:c294679b821c4b8f7f9c6db3827b7655db80fc28
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   6.9.2
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.9.2.2412004+684740676513b3b208d5bd5b7f8786dab8d287b7
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.9.56.1
Microsoft SQL Server Data Tools

SQL Server Integration Services   16.0.5397.1
Microsoft SQL Server Integration Services Designer
Version 16.0.5397.1

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   17.0.30103.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.9.0-beta.23614.3+a521e1cd420beb56c15faf6836184fadd2b7937a
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

ZenCoding   1.2.20
Provides ZenCoding for the HTML Editor - full support for static HTML, Razor and WebForms.

Original Comments

Feedback Bot on 4/17/2024, 06:36 PM:

(private comment, text removed)

Feedback Bot on 4/18/2024, 02:48 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-policy-service dotnet-policy-service bot added untriaged author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author labels Apr 25, 2024
@phil-allen-msft phil-allen-msft added this to the Backlog milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author feature-completion
Projects
None yet
Development

No branches or pull requests

3 participants