Forcing not to intend anonymous functions

Hello There,

I'm not sure if this is even possible, so far I didnt find anything in the internet:
We'd like not to intend our anonymous functions, at the moment it looks like this:

        FacadeProxy.CallFacade<IAddress>(ctx =>

We'd like to format it like this:
        FacadeProxy.CallFacade<IAddress>(ctx =>         {             //DoSomething                  }

Is this possible? Normally the intending is fine, but at this cases it can become really annoying.

Thanks for your response and a good start in the new week!


From your example, I assume you mean "indent" rather than "intend"?

There's a post on the blog which suggests  that this will be improved in R# 8:

One common complaint about ReSharper’s default settings was that certain constructs we indented, shall we say, aggressively. The two particular cases of note are anonymous lambdas
These and similar cases will now be treated more gently by ReSharper’s default settings.


Hello Richard,

d'oh, yeah I meant indent, sorry for that.
The interesting thing is, it just happens on my machine, not on others. So can I allready change a setting to suppress this?



Try un-ticking: R# Options -> Code Editing -> C# -> Formatting Style -> Other -> Align Multiple Constructs -> Anonymous Method Body


Still not working, I allready deactivated this one.
Can it be caused by VS 2010 itself?


I don't think VS has an option to do that.

You could try using R#s "Manage Options -> Import/Export Settings" to copy the code formatting settings from the machine that's working to the one that's not.


Please sign in to leave a comment.