This project is read-only.
Project Description
Refinement of Microsoft's SharePoint Guidance Library 2010 solution (Developing Applications for SharePoint 2010 Guidance) with usage & deployment improvements.


This project provides a sample of how to use the SharePoint Guidance Library logging classes to provision a diagnostics area and categories, and call the default logger class provided by the library. Several log method overloads are demonstrated to provide a simplified interface.

Adapt this to your own project by simply copying the SoftwareCraft.SharePoint.Diagnostics.Demo.Diagnostics classes into your solution package, replacing the demo area, categories and events with real one applicable to your solution, and calling AddArea() in your feature activated event receiver. This can be either a farm or web application scoped feature.

As in most cases, it is highly recommended to set Activate on Default to False for web application scoped features so you don't end up with it auto-enabled on every web application in your farm.

A test application page solution package is also included.

The solution and projects are VS2010 version not VS2012/2013 because the library unit tests project Microsoft.Practices.SharePoint.Common.Tests uses Moles and is not (in its current config) compatible with .NET Framework 4.5 hence won't compile and run once VS2012/2013 and .NET 4.5 are installed. It should be possible to tweak the Moles config to work when .NET 4.5 is installed, but since Microsoft Fakes is the recommended and supported replacement for Moles, I haven't put the time into that.

If someone wishes to convert the unit tests project to Fakes, this article may help, Comparing Microsoft Moles in VS2010 to Microsoft Fakes in VS11.

Last edited Apr 29, 2014 at 5:36 PM by johnmcalvert, version 5