Rule to build solution before check-in in Visual Studio

1k views Asked by At

Is it possible to use StyleCop to enforce these two rules?

  1. Get latest version before check in
  2. Build solution with a specific configuration before check in

Any other suggestions besides StyleCop are welcomed. Thank You.

1

There are 1 answers

0
NikolaiDante On

No. Stylecop is an open source static code analysis tool from Microsoft that checks C# code for conformance to StyleCop's recommended coding styles and a subset of Microsoft's .NET Framework Design Guidelines.
(wikipedia)

To enforce the getting of the latest version before checking in, you could use a custom TFS policy. This seems to have been successful for other users.

To check that a particular solution builds before checking in, you could use a Gated Check-in for that solution. The code won't be committed if that solution (and it's tests do not pass).