domingo, 8 de enero de 2012

SharePoint Dispose Checker Tool

 

http://archive.msdn.microsoft.com/SPDisposeCheck

SPDisposeCheck es una herramienta que ayuda a los desarrolladores y administradores a comprobar soluciones custom de SharePoint que utilizan el modelo de objetos SharePoint para que cumplan con las mejores prácticas de dispose de objetos. Esta herramienta no puede mostrar todos los memory leaks en el código y puede generar falsos positivos que necesitan revisión por parte nuestra.

Installation

During installation you can choose to integrate SPDisposeCheck into Visual Studio 2008 or 2010. It’s still a command line utility and is called by the Visual Studio Add-In. Supported SharePoint installations are:

  • SharePoint Server 2010
  • SharePoint Foundation 2010
  • Microsoft Office SharePoint Server 2007
  • Windows SharePoint Services 3.0

image 

image (1)

SharePoint development integration

The Visual Studio Add-In can be found under Tools > SharePoint Dispose Check:

image (2)

I have tested it with the Visual Studio 2010 SharePoint templates.

After creating a project and I have opened the SharePoint Dispose Check window where you can select if problems should be treated as errors or warnings… in both cases the solution can be build successfully and deployed.

image (3)

Using the following basic example you can generate a message created by the Dispose Check tool.

image (4)

Although it gives an error the solution builds successfully and can be deployed since the tool may produce false positives.

image (5)

 

Más información:

No hay comentarios:

Publicar un comentario