Automate refactoring of import / use of directives using ReSharper and Visual Studio 2010

I want to automate the automatic insertion of Visual Studio 2010 / Resharper 5 import directives to put my internal namespaces in the scope of the namespace. Like this:

using System;
using System.Collections.Generic;
using System.Linq;
using StructureMap;
using MyProject.Core;          // <--- Move inside.
using MyProject.Core.Common;   // <--- Move inside.

namespace MyProject.DependencyResolution
{
    using Core;
    using Core.Common;   // <--- My internal namespaces to be here!

    public class DependencyRegistrar
    {
        ...........
    }
}

I am currently doing this manually, the problem is that with every refactoring using the directives up to the top of the page.

+5
source share
4 answers

It is impossible to achieve this. Therefore, probably the best action is an agreement that you can easily reach.

0
source

In R # 5.0:

ReSharper- > Tools- > . Ctrl + E, Ctrl + C.

, "", "".

+3

.

0

, , () , () .

using, ( ) .

Resharper , :)

0

All Articles