Project Description
SPDisposeCheck Static Code Analysis Ruleset allows SharePoint 2010 architects and developers to ensure SharePoint APIs are properly disposed using Visual Studio 2012 Static Code Analysis.

Requires the SPDisposeCheck.exe utility
The install can be downloaded from here http://download.microsoft.com/download/B/4/D/B4D279A0-E159-40BF-A5E8-F49ABDBE95C7/SPDisposeCheck.msi

Setup Steps
You can watch this video to understand more about the Setup Steps and see a real-life example. http://youtu.be/OwiKKYAlXDc

- Copy SPDisposeCheckRules.dll to local static analysis rules folder example: C:\Program Files\Microsoft Visual Studio 11.0\Team Tools\Static Analysis Tools\FxCop\Rules
- Copy SPDisposeCheck.exe to local static analysis rules folder
- Please ensure that you right click on the two files and select Properties and ensure the files are "Unblocked" otherwise they will not show up in the Code Analysis Ruleset editor as an option

New SPDisposeCheck Rules will be available for SharePoint 2010 projects in Project Properties>Code Analysis

Notes
This wonderful ruleset has been originally created by Stephen Vick, I just tweaked it to work with Visual Studio 2012.
http://spdisposecheckstatic.codeplex.com/
http://stephenvick.wordpress.com/2010/01/08/spdisposecheck-using-static-analysis

Video
You can watch this video to understand more about the Setup Steps and see a real-life example. http://youtu.be/OwiKKYAlXDc

About Me
Ayman El-Hattab
SharePoint MVP, ALM Ranger & SharePoint Practice Lead @ MEA ALM Community
Blog: http://www.aymanelhattab.com
LinkedIn: http://eg.linkedin.com/in/aymanelhattab
Twitter: http://www.twitter.com/aymanelhattab
MEA ALM Community: http://www.meaalmcommunity.com

Last edited Jan 17, 2013 at 2:34 PM by sharepointholic, version 7