One of the important innovative features of team system is the ability to define project wide source code check-in policies. Many people have already written about the policies that are supplied out of the box of team system, but how can you write your own?
I decided that it was time to write something about the way you can write your own policies. So I did, and you can find the article I wrote and the source code at this location. The article describes how policies work and what you need to do to implement them. I wrote a policy that checks if you enable C# source code documentation in the project file. This is a very useful policy if you, like me, run a daily build that generates the source documentation every night as well. I use for that purpose NDOC and a custom MSBuild task I wrote. (Perhaps I will post on that some other time). NDOC fails in the build if it does not find the XML file that contains the documentation. So enforcing a policy that checks if the developer did not disable documentation generation can be very useful.
Hope you find this policy useful as well. Feel free to comment on the implementation, I always like it to make it better based on other people’s feedback. And if you have some idea’s on policies you would like to see post them as well, perhaps I decide to implement them as well 🙂