Visual Studio 2015不会自动为多行注释添加星号 [英] Visual Studio 2015 not automatically adding asterisk for multiline comments

查看:200
本文介绍了Visual Studio 2015不会自动为多行注释添加星号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在键入多行注释时,Visual Studio会在我按Enter键时在注释的每个新行中添加一个自动星号(显然2015年不再这样做)。我真的很喜欢这个。但是从现在开始,如果我键入 / * 并输入,Visual Studio根本不会尝试自动完成它。实际上,它甚至可以让我以 * / 结尾,而不是为我自己做。所以我的问题是:还有其他人遇到这种情况吗?如何恢复原来的功能,所以每行都自动加星号作为前缀,并由 * / 为我关闭?

When typing multi-line comments Visual studio used to add an automatic asterisk to each new line of the comment as I press enter(apparently 2015 does not do this anymore). I really liked this. As of right now though, if I type "/*" and enter, Visual studio does not try to autocomplete it at all. In fact, it even lets me end the comment with "*/", too, instead of doing it for me. So my question is: is anyone else experiencing this? How do I get the original functionality back, so each new line is automatically prefixed with an asterisk, and closed for me by "*/"?

我已经检查了,是的,我的环境设置设置为C#,是的,确实在我的设置中选中了为///生成XML文档注释选项。

I already checked and yes, my environment settings are set to C# and yes the option "Generate XML documentation comments for ///" is indeed checked in my settings.

推荐答案

只是想进行更新,并说此问题在Visual Studio的最新更新中显然已得到解决。编辑器仍然没有为您完成注释,但是至少可以使格式保持一致,并为您的下一行添加一个星号。

Just wanted to update and say that this problem was apparently fixed(sort of) in one of the newer updates of Visual Studio. The editor still does not complete the comment for you, but it does at least keep the formatting consistent, and adds an asterisk to the next line for you.

这篇关于Visual Studio 2015不会自动为多行注释添加星号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆