I've used SPDisposeCheck for SP2007/2010 and find it very useful for finding undisposed sp objects, but from this blog post, it's mentioned that it's no longer working for 2013.

Is there any alternatives available?


SPCop, the free tool of the SPCAF framework, will do the trick and even more. Have a look here: http://blogs.msdn.com/b/torstenmandelkow/archive/2013/10/08/free-sharepoint-code-analysis-tool-available.aspx

  • For what it's worth, SPCop and the SPCAF community edition no longer exist. SPCAF is a commercial-only product. You need a license to even see the report of which vulnerabilities/problems were detected in your code. I was rather disappointed to find this out, so I figured I would let anyone else know who happens upon this StackExchange post and believes they've found their answer. – haliphax Nov 29 '17 at 19:56
  • This page is no longer available. please can you post any other url – Vishal_chorghe Feb 20 at 6:50

You can use the SPDisposechecker. In this tool, what you have to do is give the path of dll and the file where you want the output file. Example,

Perform SPDisposeChecker on dlls using command line

C:\Program Files\Microsoft\SharePoint Dispose Check>SPDisposeCheck C:\CODE\DisposeCheckDllfolder >Log100DII.xml

where 1) C:\Program Files\Microsoft\SharePoint Dispose Check --> path of dispose checker exe

2) SPDisposeCheck --> command(Keyword)

3) C:\CODE\DisposeCheckDllfolder --> where the dll of your solution is kept.

4) Log100DII.xml --> output file name will generate in the same folder of dll


  • But from the blog, it's mentioned that the tool doesn't work for 2013, it will give false negative – Lee Gary Dec 3 '14 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.