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
SharePoint development integration
The Visual Studio Add-In can be found under Tools > SharePoint Dispose Check:
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.
Using the following basic example you can generate a message created by the Dispose Check tool.
Although it gives an error the solution builds successfully and can be deployed since the tool may produce false positives.
Más información:
- Roger Lamb's SharePoint Developer Blog
- Best Practices: Using Disposable Windows SharePoint Services Objects
- SharePoint 2007/2010 “Do Not Dispose Guidance” + SPDisposeCheck
- Problema con la herramienta:http://blogs.technet.com/b/stefan_gossner/archive/2010/12/15/first-issue-with-spdisposecheck-has-been-identified-by-the-community.aspx
- Suprimir falsos positivos: http://www.itidea.nl/index.php/spdisposecheck-how-to-suppress-a-false-positive/
- Usar la herramienta con TFS: http://www.novolocus.com/2011/12/05/run-spdisposecheck-as-part-of-your-build-process/ http://msmvps.com/blogs/rfennell/archive/2010/07/03/running-spdisposecheck-as-part-of-a-2010-ci-build.aspx
No hay comentarios:
Publicar un comentario