You’ve probably noticed that it has been a few weeks since my last blog posting here and that is largely due to the fact that I’ve been working on a open source project called CSharpDistilled.Diagnostics.
While at Microsoft TechEd this year I got talking to the folks at the CodePlex area about the exciting things they were doing with exposing Microsoft Team Foundation Server through the Web for open source projects.
Uploaded tonight, is the first version of the CSharpDistilled.Diagnostics framework which includes the main C# library project, unit testing project, database project, and associated setup project. Although you’ll need Visual Studio 2005 Team Developer or Team Suite to use the unit testing project.
CSharpDistilled.Diagnostics introduces a new framework for publishing exceptions, based upon the ASP.NET 2.0 Provider design pattern. Using this framework you can configure one or more exception providers within an application domain configuration file (e.g. app.config or Web.config) and at runtime the framework determines the appropriate provider to publish the exceptions to.
The default exception provider within the framework is the SqlExceptionProvider class, which is responsible for persisting exceptions within a SQL Server 2005 database. Within the database there is the Exception table which contains columns for the each of the properties defined within the System.Exception base exception class, however it also contains a column that uses the new XML column type, within SQL Server 2005, to enable the database to store the exceptions serialized using the .NET Framework’s SoapFormatter class. The serialized exceptions will then allow developers to examine the various properties that may exist on exceptions derived from System.Exception.
When debugging exceptions that occur either within a development environment, or especially within a production environment, knowledge is power!!!
CSharpDistilled.Diagnostics is intended to provide that power such that .NET developers can sleep easy at night knowing that their exceptions are being published and that they’ll be able to resolve the issues that caused the exception in the first place.
Although the project is listed as an alpha release on CodePlex the framework is fully functional and will persist exceptions, and the various inner-exceptions, to the SQL Server 2005 database. In reality it is alpha because I’d like to get as much feedback from people who download it before I release a beta release which will then be functionally complete and unlikely to change aside from some internal workings which may be tweeked before a final RTM build is made available.
So hopefully the alpha nature of the release won’t stop you from downloading the framework and letting me know what you think.
Finally, once the framework has been released with one or two exception providers it is my intent to provide both a Windows Forms and ASP.NET based Diagnostics Management Studio, which would allow development teams to more easily search through exceptions that have been logged either in production or development environments. There is even a chance that the Diagnostics Management Studio will find itself as a plug-in to either Visual Studio 2005 or Microsoft Outlook 2007 (once released).