How can we extend the SQLProj code analysis rules by adding our own custom rule?


Currently .sqlproj files have 15 code analysis rules (SR0001 to SR0015). I would like to create my own code analysis rule to make sure that columns used in where clauses are indexed.

How would I extended the current .sqlproj code analysis so that I have a 16th (SR0016) custom code analysis rule.

Just noticed this.

Consider using SSDT Code Analysis Extensibility which has just been added back to SSDT and is available in the SSDT March 2014 release. (Visual Studio 2012 and 2013)

If you are using Visual Studio 2010 then visit: (Visual Studio 2010)

Note the location you push your custom library to:

Also checkout (this will give you a leg up)