积极答复者
VS不能正常的格式化代码

问题
答案
全部回复
-
你好,
可以通过Ctrl+Z 恢复的,我使用的VS 2017, 是可以正常格式化的, 请问你使用的是什么版本的VS。 怎样才能重现你的问题。
Best regards,
Zhanglong
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com. -
你好。VS的相关信息如下:另外目前这个问题只发生在aspx页面,code behind 是没有问题的,感谢你的回复~
Microsoft Visual Studio Professional 2017
Version 15.7.3
VisualStudio.15.Release/15.7.3+27703.2026
Microsoft .NET Framework
Version 4.7.02046Installed Version: ProfessionalApplication Insights Tools for Visual Studio Package 8.12.10405.1
Application Insights Tools for Visual StudioASP.NET and Web Tools 2017 15.0.40522.0
ASP.NET and Web Tools 2017ASP.NET Core Razor Language Services 15.7.31476
Provides languages services for ASP.NET Core Razor.ASP.NET Web Frameworks and Tools 2017 5.2.60419.0
For additional information, visit https://www.asp.net/Azure App Service Tools v3.0.0 15.0.40424.0
Azure App Service Tools v3.0.0Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.Azure Data Lake Tools for Visual Studio 2.3.3000.2
Microsoft Azure Data Lake Tools for Visual StudioAzure Stream Analytics Tools for Visual Studio 2.3.3000.2
Microsoft Azure Stream Analytics Tools for Visual StudioC# Tools 2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
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.JavaScript Language Service 2.0
JavaScript Language ServiceMicrosoft Azure HDInsight Azure Node 2.3.3000.2
HDInsight Node under Azure NodeMicrosoft Azure Hive Query Language Service 2.3.3000.2
Language service for Hive queryMicrosoft Azure Stream Analytics Language Service 2.3.3000.2
Language service for Azure Stream AnalyticsMicrosoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure NodeMicrosoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10420.2Microsoft Continuous Delivery Tools for Visual Studio 0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual MachinesMicrosoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggersMicrosoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.NuGet Package Manager 4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed InfoResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed InfoSQL Server Data Tools 15.1.61804.210
Microsoft SQL Server Data ToolsToolWindowHostedEditor 1.0
Hosting json editor into a tool windowTypeScript Tools 15.7.20419.2003
TypeScript Tools for Microsoft Visual StudioVisual Basic Tools 2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
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 10.1 for F# 4.1 15.7.0.0. Commit Hash: 2527e6829ecdc8281ee60d83be8cfd0fa720a648.
Microsoft Visual F# Tools 10.1 for F# 4.1Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio -
你好,
根据你的描述,我新建了一个asp.net 的项目, 在.aspx的文件中,COPY 你的代码,使用Ctrl + K + D, 什么都没有发生。不会出现对齐的问题。
Best regards,
Zhanglong
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.