Freigeben über


SPDisposeCheck v1.3.1 is released

SPDisposeCheck is a tool to help SharePoint Developers follow memory management best practices when using the SharePoint API with IDisposable objects including SPSite and SPWeb. This tool is not supported by Microsoft and is recommended to be used on Developer workstations and not on production SharePoint Server installations.

It was released yesterday at https://code.msdn.microsoft.com/SPDisposeCheck

The tool reviews a .NET Assembly (DLL or EXE) and evaluates SharePoint API's used in that assembly. It will produce a report identifying where code doesn't follow best practices for memory management in SharePoint. It may not find all memory leaks in your code and it may produce false positive results but it does it much faster than you can review source code yourself. The tool checks for guidance published in an update to the MSDN Article (Best Practices: Using Disposable Windows SharePoint Services Objects) that describes the best practices for this area of SharePoint development. This guidance applies only to customers building custom software that they compiled to .NET assemblies that make use of SharePoint API calls. While these messages need expert evaluation in order to determine if the software is not performing properly, in some cases just running the tool on your custom code can lead you to simple fixes that improve the quality and performance of custom code on SharePoint. Customers who are currently experiencing difficulties with memory management in their custom applications should review the guidance listed above. Customers who are currently experiencing difficulties with Microsoft Office SharePoint Server 2007 should contact their regular Microsoft Customer Support Services contact, or refer to https://support.microsoft.com.

note: The MSDN article hasn't been updated at the time of the blog postThe MSDN article should be updated in the next 24 hours. 

You are encouraged to discuss usage of this tool on the SharePoint Developer MSDN Forum. You can also provide feedback directly on the CODE.MSDN site for SPDisposeCheck where we published it. We value your feedback on how useful this tool is.

We plan to use Roger Lamb's blog as a place to update the latest guidance for specific cases that come up.

Comments

  • Anonymous
    January 29, 2009
    PingBack from http://www.clickandsolve.com/?p=1933

  • Anonymous
    January 29, 2009
    SPDisposeCheck - This should be in EVERY SharePoint developer's toolbox

  • Anonymous
    January 29, 2009
    [via Paul Andrew ] Today Microsoft released a tool on MSDN Code Gallery called SPDisposeCheck . It will

  • Anonymous
    January 29, 2009
    Paul Andrew has just announced that the SharePoint Disposable Object checking tool SPDisposeCheck has

  • Anonymous
    January 29, 2009
    [via Paul Andrew] Today Microsoft released a tool on MSDN Code Gallery called SPDisposeCheck. It will...

  • Anonymous
    January 29, 2009
    I think there should be a "SPDisposeCheck Certified" logo.  This badge could be placed on the download pages and in the documentation of both free software and commercial software products as an indication of quality and adherence to best practices.

  • Anonymous
    January 29, 2009
    SPDisposeCheck v1.3.1 has been released on MSDN Code Gallery, http://code.msdn.microsoft.com/SPDisposeCheck

  • Anonymous
    January 29, 2009
    By now you have probably heard that the SharePoint Dispose Checker has been released. It's an excellent

  • Anonymous
    January 29, 2009
    Tal y como nos comenta Paul Andrew en este post , Microsoft acaba de liberar en MSDN Code Gallery la

  • Anonymous
    January 29, 2009
    Today the Microsoft SharePoint Product Team announced the SPDisposeCheck utility here and also at Paul

  • Anonymous
    January 29, 2009
    Must tool for All SharePoint Developers!

  • Anonymous
    January 29, 2009
    [ Via Paul Andrew ] Now here is a must have tool for every SharePoint developer that wants to make sure

  • Anonymous
    January 29, 2009
    [via Paul Andrew ] SPDisposeCheck avait été présenté dernièrement sur le blog de l'équipe SharePoint

  • Anonymous
    January 29, 2009
    Nareszcie! Po 2 miesiącach od zapowiedzi , MS opublikował narzędzie do sprawdzania czy nasz kod SharePoint

  • Anonymous
    January 30, 2009
    A must-have for each Sharepoint developer. More info are available at Paul Andrew’s blog: http://blogs.msdn.com/pandrew/archive/2009/01/29/spdisposecheck-v1-3-1-is-released.asp

  • Anonymous
    January 30, 2009
    SPDisposeCheck is a tool to help SharePoint Developers follow memory management best practices when using

  • Anonymous
    January 30, 2009
    Awesome job, Paul and co., for finally getting this out to the masses! For those who are starting to

  • Anonymous
    January 31, 2009
    Microsoft has released 3 cool things for SharePoint develoepers recently. 1. SPDisposeCheck v1.3.1 2.

  • Anonymous
    February 02, 2009
    I tried to run the tool and following error is thrown


Unhandled Exception: System.InvalidOperationException: Disposition.Problem is in accessible due to its protection level. Only public types can be processed.   at System.Xml.Serialization.TypeDesc.CheckSupported()   at System.Xml.Serialization.TypeDesc.CheckSupported()   at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo sourc e, Boolean directReference, Boolean throwOnError)   at System.Xml.Serialization.ModelScope.GetTypeModel(Type type, Boolean direct Reference)   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type , XmlRootAttribute root, String defaultNamespace)   at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultName space)   at System.Xml.Serialization.XmlSerializer..ctor(Type type)   at SPDisposeCheck.SPDisposeCheck.Main(String[] args)

  • Anonymous
    February 02, 2009
    The comment has been removed

  • Anonymous
    February 03, 2009
    For those of you looking to double check your custom SharePoint code for proper object disposal, Microsoft

  • Anonymous
    February 03, 2009
    I found it interesting that SPDisposeCheck ignored files and namespaces that started with Microsoft and System. With a little bit of reflection I managed to come around the “problem”: Microsoft.SharePoint.dll 9 Microsoft.Office.Policy.dll 1 Microsoft.Office.Server.Search.dll 1 microsoft.sharepoint.portal.dll 2 Microsoft.SharePoint.Publishing.dll 10 Microsoft.SharePoint.Search.dll 1

  • Anonymous
    February 11, 2009
    SharePoint Diagnostics (SPDiag) Tool v1.0 for SharePoint Products and Technologies The real power of

  • Anonymous
    February 15, 2009
    Nareszcie! Po 2 miesiącach od zapowiedzi , MS opublikował narzędzie do sprawdzania czy nasz kod SharePoint

  • Anonymous
    February 16, 2009
    Hi there, ive just develop a wrapper to use with SPDisposeCheck Tool, that displays Xml with errors if so, and its to be used on VisualStudio postbuild events to prevent bad disposal of Moss objects. I hope it helps someone in a need. http://www.codeplex.com/MossSnips2 Best Regards Scoutman, a portuguese connection Rodrigo Pinto, Sharepoint Solution Architect email:stationsolutions@gmail.com im:workstationpt@hotmail.com

  • Anonymous
    April 06, 2009
    SharePoint Diagnostics (SPDiag) Tool v1.0 for SharePoint Products and Technologies The real power of