Resharper と自動整形ブレースに問題があります。しばらくの間、Resharper は左中括弧を入力しているときに右中括弧を追加しません。また、メソッドの最後の行で右中括弧を入力すると、メソッドの右中括弧が削除されます。
例:
private void Method()
{
if(true)
{ // If I type '{' resharper of vs2010 will normally add a '}'
// but I don't know why not now
}
private void AnotherMethod(){}
右中括弧を手動で追加すると、メソッドの右中括弧が削除され、AnotherMethod()
インデントされます。
private void Method()
{
if(true)
{
} // Why is the closing brace of the method removed?
private void AnotherMethod(){}
resharper の私の関連設定:
Formatting style > Braces Layout :
- Braces Layout : for all次の行 (BSD スタイル) (および空の括弧の書式設定: On different lines )
- Force Braces : for all Add Braces
IntelliSence > Completion Behavior :
-有効:完了後に括弧を自動的に挿入
+-選択:開始と終了の両方
エディター
-有効:右中括弧を自動挿入
+-選択:左中括弧の入力時
この問題を解決するために必要な resharper の設定は何ですか?