November 2007 - Posts

High-performing virtual machines with Diskeeper

One of the first things (if not THE first thing) I install on virtual machines (as well as the host) is Diskeeper. It really makes a noticeable difference on the performance of the VM, especially when compared to other VMs you use for quite some time without defrag'ing. VMs stress the hard drive a lot, so keeping it in good shape is a must for well performing VMs.

I just noticed that the new Diskeeper 2008 is out, and it seems to have a few interesting new features:...

Read full article

Fastest way to get a new GUID from within Visual Studio

 

There's the VS2005 Create Guid tool:

CreateGuid

CreateGuidTool

But you have to click New GUID, then Copy, the Exit. That's not very fast (even if you learn the keyboard accelerators, which I always do). Also, in VS2008 it didn't come configured out of the box. So I tried the following alternative which turned out to be better:

Go to the External Tools menu shown above, and add the following:

NewGuid 

The uuidgen.exe tool lives in the VS installation folder, under Common7\Tools, and is a command-line utility that just creates a new guid. Note the "Use Output window" option, which basically leaves the generated Guid in your VS output window....

Read full article

Forget about writing Atom or RSS XML handling code ever again

A *very* welcome addition to .NET 3.5, which just went RTM for MSDN subscribers and trial for the rest before general availability early next year: System.ServiceModel.Syndication.

This namespace, which lives in the System.ServiceModel.Web.dll assembly which provides the WCF Syndication functionality, contains useful classes for working with feeds and items. I won't go over the Architecture of Syndication...

Read full article

How to parse specific date-time formats using DateTime.ParseExact

 

I've done this myself: write an entirely new date-time parser using regular expressions. I'm sure most people implementing standards have done the same (i.e. for syndication libraries, etc.). There's almost no point in doing so, except for some very specific cases, as DateTime.ParseExact is very flexible through the use of custom DateTime format strings.

The following is an example of how you can parse (and normalize, by removing milliseconds) ...

Read full article

Blogger: how to provide label/tag feeds

By default, blogger will only render links to the pages where you can read all entries with given labels:

BloggerLabels

If you want to expose a feed so that people can subscribe to receive only entries with the given label, here's what you need to do:

  1. Go to the Template -> Edit HTML tab on your feed management page:

    BloggerEditHTML 
  2. Make sure to check "Expand Widget Templates"
  3. Do a "find" for "data:labels". That will take you to the markup where the labels are iterated to build the links. ...



Read full article

Windows Live Writer RTM: a missed opportunity on extensibility

The Window Live suite final version was finally released. I've been following quite closely its evolution since Beta2, and have done a quite complicated (although not from the point of view of the end user) plugin which goes quite deep into WLW libraries (deeper than I dare to confess, if you know what I mean ;)).

What works:

  1. Plugins are easy to author for simple cases: adding "body" content via a plugin is very easy. Pretty much anybody can cook a plugin in a matter of minute.s ...

Read full article

Microsoft is now officially open source friendly

I'm surely a bit late, but I just learned that the OSI has approved the Microsoft Public License (Ms-PL) and the Microsoft Reciprocal License (Ms-RL). Both are now listed in the OSI licenses page.

I wonder what will Microsoft haters will say about that...

Read full article

How to compile and run ALL WPF samples in the Windows SDK with a single command

Just issue the following PowerShell one-liner, and you'll compile and run each sample in the SDK (enter all in one line; broken here for readability):

PS C:\WinFx Samples\WPFSamples\AppModel\> 
gci -i *.csproj -r |
foreach
{
pushd ([System.IO.Path]::GetDirectoryName($_.FullName));
msbuild $_.fullname;
(gci -i *.exe -r |
%{ &$_.fullname; read-host; });...






Read full article

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered error with Vista 64bit

If you're getting this error while trying to connect to Access 2007 or Excel 2007 via the Office 12 OleDB provider, you must first make sure you have the Office 2007 data providers installed.

Next, under x64 (64bit), the data providers will not work by default as they are 32-bit only (x86), even if the data providers download page doesn't say it. You have to explicitly compile for x86 instead of the default "Any CPU" platform:...

Read full article

Properly detecting application installation on launch conditions

If you need to detect whether a given application is installed (i.e. you're writing a plugin, or depend on an existing framework/toolkit to be installed), you have a couple options:

  1. Search for a registry key
  2. Search for a Windows Installer component

The first is the easiest, but it's not without problems. For example, I was creating a Windows Live Writer (WLW) plugin and followed the instructions on MSDN on how to deploy it...

Read full article

More Posts Next page »

Search

Go

This Blog

News

     

      Microsoft MVP Profile

Syndication