Monday, March 31, 2008

Validating email notification HTML for Outlook 2007

Velodoc issues numerous email notifications. The presentation uses the latest CSS tags and sophisticated layered HTML. Everything worked fine in Outlook 2003 which uses Internet Explorer as the HTML rendering engine. Outlook 2007 and its Word 2007 rendering engine broke many little things.

Although it is definitely a step back in terms of HTML rendering capability for emails, everything is explained in Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007. The article comes with a very handy tool to validate HTML and CSS in your development environment.

I have not been able to install the tool for Visual Studio 2005 SP1 on Windows Vista Ultimate x64 because I could not instantly find the registry keys described in the setup instructions, but it works perfectly with Dreamweaver 8 provided you replace "Dreamweaver MX 2004" by "Dreamweaver 8" in the default installation path.

FileNotFoundException in Visual Studio Setup Project

The Velodoc XP setup project would consistently fail on a specific Windows Server 2003 server of ours but not on other computers of our network. The complete issue is described at http://www.codeplex.com/VelodocXP/WorkItem/View.aspx?WorkItemId=1005. The error message was:

Exception occurred while initializing the installation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\WINDOWS\system32\and' or one of its dependencies. The system cannot find the file specified.

Obviously, there is no such "C:\WINDOWS\system32\and" file in our application or on the system. MSI logs and fusion logs would not give any more information.

We have been puzzled by this issue for quite some time. We have finally removed features from our setup one by one until we have been able to identify that a specific custom action was at the source of the problem.

In the literature and samples that you will find regarding developing Visual Studio setup projects, custom action data is passed in the form /NAME = VALUE which works fine unless value contains a space.

The reference documentation at http://msdn2.microsoft.com/en-us/library/2w2fhwzz.aspx states that in setup custom actions, data should be passed as:

/NAME = VALUE if not a directory and value has no space
/NAME = "VALUE" if spaces are expected in a value which is not a directory
/NAME = "VALUE\" if the expected value is a directory

I wish we had not simply read how-to articles and sample code, but also the reference documentation.

Monday, March 17, 2008

Installing Visual Studio Extensions for WCF after an upgrade to .NET 3.0 Service Pack 1

Yesterday, I got stuck installing Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP after my computer had been upgraded to .NET Framework 3.0 Service Pack 1. The installation fails with a warning that a prerequisite, i.e. Microsoft .NET framework 3.0, is missing.

A quick search on the Internet gave me the following trick which works:

  1. Add the following key and value to the registry aimed at luring the installer:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{15095BF3-A3D7-4DDF-B193-3A496881E003}]
    "DisplayName"="Microsoft .NET Framework 3.0"
  2. Install vsextwfx.msi.
  3. Remove the key above.

Source: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2550726&SiteID=1.
Thanks Erich.