Microsoft WMI Code Creator 1.0

While working on the C# Distilled Diagnostics project which is available from the Microsoft CodePlex website, I began working on using WMI to establish the processor architecture of the machine where an exception was thrown.

On Saturday morning I took my laptop down to Starbucks to discuss the project with a friend I knew while at Intel, he suggested that I take a look at Microsoft’s WMI Code Creator 1.0. Even if you don’t have a business need to know the voltage that your processor(s) are using or the amount of Level 2 Cache that the processor(s) have, I’d really recommend taking a look at this utility, it is very cool indeed.

Windows Vista Build 5536, Where’s 5700, Where’s 64-bit, Where’s the Windows SDK?

After connecting several times tonight to the Microsoft Connect website hoping to see a download of Windows Vista build 5700, it was a little less than exciting to see a new download of Windows Vista available that was significantly earlier than the build I was hoping for. Microsoft have provided build 5536 and although I’m aware that internal builds will always be a few ahead of what Microsoft lets us MVP’s take a look at; 5536 is significantly earlier than build 5700 demonstrated at Microsoft TechEd 2006 Australia and the associated Internet Explorer RC build that released earlier today. Below is a photograph of Windows Vista build 5700 taken by Long Zheng at Microsoft TechEd 2006 in Australia.

It seems we’ll just have to wait until the public release of the Windows Vista Release Candidate sometime later this month or next month. Come on Microsoft there are more than just a few of us that would like to check out 5700, not to mention the associated new builds of the .NET Framework 3.0.

Another strange thing is there is only 32-bit versions available for download tonight and no sign of a download for the associated Windows SDK or DDK.

Internet Explorer 7 Release Candidate 1 Available

Today Microsoft released the first release candidate of Internet Explorer 7 for Windows XP SP2, could this be a sign that we should see a release candidate of Windows Vista soon? I suppose time will tell. 

Internet Explorer 7.0 RC1

Given that the previous release of Internet Explorer 7.0 within Windows Vista Build 5472 was 7.0.5472.5 and the RC version is 7.0.5700.6 it would seem logical that the next build of Windows Vista that we see will be at least build 5700.

Update 1:30PM PST – It appears that Windows Vista Build 5700 is a recent build of Windows Vista as seen at Microsoft TechEd 2006 in Australia. See the screenshots at and also note that the build is labeled as RC1.

ADO.NET vNext August CTP Available

During the months preceding the release of Visual Studio 2005 and the .NET Framework 2.0 we were able to see the Whidbey release develop through the addition of CTP's (Community Technology Previews) to the traditional beta releases.

Today Microsoft have made available a CTP release of the next generation of data access in the form of ADO.NET vNext which Pablo Castro introduced to many attendees at the recent Microsoft TechEd 2006 conference in Boston, MA.

You can download the August CTP from the following link:

ADO.NET vNext August CTP

Channel 9 also contains an episode describing where Microsoft intends to take data access with ADO.NET vNext and that episode can be downloaded here.

CodePlex Project – CSharpDistilled.Diagnostics

Tonight I’ve just uploaded the latest alpha release of the CSharpDistilled.Diagnostics project which allows the publication of exceptions using the ASP.NET 2.0 provider design pattern.

Within this update the associated SQL Server 2005 database creation script adds additional tables to store information regarding the AppDomains, Assemblies, and Threads associated with the exception(s) being published.

In version the .pfx code signing key file was accidentally released with a password protecting it and this has been fixed with this release.

FEEDBACK: Please provide feedback either through this blog or by using the discussion forums on the CodePlex website. Your feedback is important in developing this framework.

C# Distilled Code Snippet Library

Within Visual Studio 2005 the Visual C# team provides 37 code snippets that allow the C# programmer to accelerate writing several common code constructs such as constructors and properties. One of the more useful code snippets that is provided by the Visual C# team is the exception code snippet that simplifies the creation of custom exception types that inherit from the base System.Exception class. It would have been more useful however if the code snippet provided Xml comments for the methods defined within the newly created exception type, in addition to providing an override of the GetObjectData method and an associated deserialization constructor. Within this blog posting we will explore the creation of additional code snippets and show how they can be installed into Visual Studio 2005 using the Visual Studio Installer.

At the time of writing there are 53 code snippets within the C# Distilled code snippet library, most of which are merely an extension of one of the code snippets provided by the Visual C# team. An example of a code snippet that has been extended is the _ctor.snippet which provides a default Xml comment whose wording follows the standard format for constructors within the .NET Framework. In addition to the Xml comment, the constructor is also enclosed within a code region with the name of the region being the same as the signature of the constructor. Use of code regions in this way is required within the C# coding standards that I have used on several commercial projects, if you’d be interested in me publishing the C# coding standard here then please let me know and I’ll move it up the priority list for postings I have in mind for the next few months.

Those of you with keen eyes will have noticed that the extended code snippet has the same name as that supplied by the Visual C# team aside from the preceding underscore, this is such that I have install the extended code snippets while keeping those provided by the Visual C# team.

Instead of listing all 53 code snippets within the C# Distilled code snippet library, and how they might differ from those already included within Visual Studio 2005, I have instead provided a Microsoft Excel spreadsheet that lists the code snippets and provides a brief description along with the Visual C# code snippet it is derived from (where appropriate). The spreadsheet is included in the zip file that can be downloaded below.

To install the C# Distilled code snippet library download the .zip file which is linked above. Open the .zip file and expand the files to a location of your choosing, then double click on the .vsi file to begin the installation. Once the installer opens you will be presented with a dialog such as the following and you should simply click the Next button to proceed.

The next screen you will be presented with will ask you if you wish to proceed to install the components within the .vsi file because the file is not digitally signed, there is no harmful code within the .vsi file however you can verify the .vsi files contents by opening it with WinZip as that is really all the .vsi file is. The Visual Studio Installer file is a .zip file renamed to .vsi, containing a .vscontent file that tells the Visual Studio Installer runtime which files it should install. These files are also included within the .vsi file.

The following screen asks that you select the code snippets on the left of the window that you would like to install, and then on the right of the window you choose the appropriate installation location. To select all the code snippets click on the first code snippet and then press Ctrl+A to select all the code snippets and then click the installation location, either the Visual C# folder (where the Visual C# team installs their code snippets) or the My Code Snippets folder.

Once you have selected the code snippets you would like to install you simply click next and then you are asked once again to confirm the installation by clicking the Finish button on the following screen.

Upon completion of the installation you will recieve an update telling you that the installation of each code snippet was successful. If an error occurred while copying the file you’ll also see the errors within the following screen.

Now that you have the code snippets installed you can look at the differences between some of the extended code snippets and their counterparts developed by the Visual C# team, in a follow up blog posting I’ll introduce the code snippet functions that enable the code snippets to determine the name of the class within which the code snippet is being executed or if the appropriate using statement is present such that classes are referenced appropriately using the fully qualified name or the simple type name.

CodePlex Project – CSharpDistilled.Diagnostics

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).