Is there a setting in Visual Studio (or ReSharper) that allows you to specify what namespaces should be default and which scope they are put in?
The default for an MVC project for example is
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Namespace
{
public class Class1
{
}
}
but ReSharper and StyleCop complain:
All using directives must be placed inside of the namespace. [StyleCop Rule: SA1200]
Using directive is not required by the code and can be safely removed
Is there a way to make the default simply:
namespace Namespace
{
public class Class1
{
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…