This project has moved and is read-only. For the latest updates, please go here.

Coding standards:

  • CodeAnalysis:
    • ALL projects should enable "Enable Code Analysis on Build" and "Suppress results from generated code".
    • Feature projects (e.g. not samples, tools, tests, etc.) should enable the "Microsoft All Rules" ruleset.
    • Any suppressions should be included directly in the source and must pass code review.
  • StyleCop:
    • Install the VS plugin from here:
    • Run stylecop manually before submitting any pull requests.
    • StyleCop is enabled by default in the command line build and the CI build so any failures break the build.
    • The rules are defined in Settings.StyleCop at the root of the repo and apply to all projects.
    • StyleCop is not good at enforcing alternative rules (e.g. require using statements to be outside of the namespace), so additional changes may be required in code review. When in doubt, follow the existing style.

Unit tests:

  • Each project has an associated unit test project.
  • XUnit is the test framework of choice.
  • The VS 2012 extension is available here:
  • All of the tests should pass on a Win8 machine without any special setup or admin privileges (except the SSL tests, see below).
  • Most tests should pass on Win7 except the WebSocket tests.
  • SSL tests require setting up a server certificate. From an elevated VS developer command prompt run \tests\Microsoft.Owin.Host.HttpListener.Tests\SetupProject.bat to install a test certificate.
  • Tests for client side SSL certificates may fail if you have smart card client certificates in your cert store (e.g may promt for a pin). Delete these certs or file an issue for re-working these tests.

Last edited Mar 26, 2013 at 1:42 AM by howarddierking, version 1


No comments yet.