Search code examples
.netasp.net-mvcstylecop

Why is new .NET code from Microsoft not Microsoft StyleCop compliant?


I just downloaded the ASP.NET MVC beta and the templates are not StyleCop compliant.

Why is new .NET code coming from Microsoft not StyleCop compliant?


Solution

  • StyleCop checks conformance to the Microsoft Framework Design Guidelines.

    The guidelines are enforced only on the code that makes up the .NET Framework proper, and even in the framework proper, occasional lapses exist. Elsewhere, the guidelines are recommendations only.

    The framework design guidelines are available as a printed book, and make very interesting reading for the annotations from the contributors on why and how they agree or disagree, and how best to apply and interpret the rules. I should point out several important facts:

    • Not even the people who wrote the guidelines agree on all of them.
    • You probably aren't writing a framework for release into the wild.
    • The guidelines are a work in progress, and StyleCop lags behind them.