简体   繁体   English

重新安装Visual Studio 2010后,缩进已更改

[英]Indenting changed after I re-installed Visual Studio 2010

When I edit C# file in Visual Studio 2010, it looks ok, but when I open it in another IDE or push to github, I notice that indenting is wrong. 当我在Visual Studio 2010中编辑C#文件时,它看起来还可以,但是当我在另一个IDE中打开它或将其推送到github时,我注意到缩进是错误的。 It happened after I reinstalled Visual Studio. 重新安装Visual Studio之后发生了。

Any idea how put this on the line again? 知道如何再次将其放在网上吗? I do not remember changing any indenting options in previous installation, and I definitely didn't do anything to it this time either. 我不记得在以前的安装中更改任何缩进选项,并且这次我绝对也没有做任何事情。

UPDATE: 更新:

By wrong I mean this (faked, since it cannot if copy/pasted it gets ok): 错误的意思是我(这是假的,因为如果复制/粘贴就不能,它就可以了):

     _req = (HttpWebRequest)WebRequestCreator.ClientHttp.Create(new Uri(_options["url"]));
     _req.Method = _options["method"];
// disable buffering (this only works for ClientHttp version)
     //_req.AllowWriteStreamBuffering = false; // causes silent crash on Mac OS X 10.8.x

in Visual Studio it looks ok. 在Visual Studio中看起来还可以。 Basically any new line that I add (that didn't exist in files created in previous installation), I get weird indenting. 基本上,我添加的任何新行(在以前的安装中创建的文件中都没有),我会产生奇怪的缩进。

Probably in your previous installation of VS you have a different settings for your tabs. 可能在以前的VS安装中,您的选项卡具有不同的设置。
Now, the reinstall resetted everything to the default settings. 现在,重新安装将所有内容重置为默认设置。

Check the menu Tools, ->Options, ->Text Editor, ->C#, Tabs 检查菜单Tools, ->Options, ->Text Editor, ->C#, Tabs
and try with different settings 并尝试不同的设置

You can change the automatic formatting of text in Visual Studio by going to Tools --> Options --> Text Editor --> C#. 您可以通过在工具->选项->文本编辑器-> C#中更改Visual Studio中文本的自动格式。

There you can change the way indentation is done in the Tabs submenu and in --> Formatting --> Indentation. 您可以在“选项卡”子菜单和->“格式设置”->“缩进”中更改缩进的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在安装后在Visual Studio 2010中创建安装包,它在启动时自动运行? - How do I create a installation package in visual studio 2010 after installed it is automatically run when boot? 安装Visual Studio 11 beta后,不再通过Visual Studio 2010执行测试 - Tests are no longer executed through Visual Studio 2010 after Visual Studio 11 beta was installed 删除安装了Visual Studio 2010外接程序的调试器 - Removing Debugger installed Visual Studio 2010 Addin 我可以让 Visual Studio 2017 停止缩进大括号吗? - Can I make Visual Studio 2017 stop indenting braces for case? MAC上Visual Studio中的文件缩进 - File indenting in Visual Studio on the MAC 测试客户端上是否安装了Visual Studio 2010(及更高版本)的Crystal Reports - Test if Crystal Reports for Visual Studio 2010 (and later) is installed on client 如何在C#Visual Studio 2010中使用已安装的语音 - how to use installed voices in c# visual studio 2010 在Visual Studio 2010之后安装Visual Studio 2013 - install visual studio 2013 after visual studio 2010 Visual Studio扩展(VSPackage)在所有实验实例中运行,但在作为.vsix安装后不运行,VS2010除外 - Visual Studio Extension (VSPackage) runs in all Experimental Instances, but does not run after being installed as a .vsix, except in VS2010 如果不格式化,则Visual Studio无法正确缩进 - If else formatting Visual Studio not indenting correctly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM