title: Checking Visual Studio projects for consistency
body: <p>You have a large Visual Studio Solution with dozens of project files in it. How would you verify that all the projects follow certain rules in their property settings, and enforce these rules if a new project is added. For example check that all projects have:</p>
  
  <pre><code>TargetFrameworkVersion = "v4.5"
  Platform = "AnyCPU"
  WarningLevel = 4
  TreatWarningsAsErrors = true
  OutputPath = $(SolutionDir)bin
  SignAssembly = true
  AssemblyName = $(ProjectFolderName)
  </code></pre>
  
  <p>I know two methods myself that I will add in an answer below, but I was wondering how people go about doing this type of project test. I'm especially interested to learn about available solutions such as libraries or build tasks for this rather than having to have to invent something new or write it from scratch.</p>