Monthly Archives: November 2008

Follow me, follow you

If you subscribe to my blog and you too write a technical blog I’d like to know so I can return the favor. Please leave a comment on this post and set the Home Page URL edit box of the comment so I can find your blog and the $g(Google juice) can’t hurt!

Btw, I have a link blog in case you’re interested.


[UPDATE: Nov 26, 2008] If you’re interested in a peek at the content of the blogs posted in the comments here I’ve setup a page on my wiki to give you a snapshot of each blog.

Modifying emails sent using CruiseControl.NET's email publisher

Last year I wrote a brief post on configuring email for CCNET whereas this time I’m looking at changing the content of mail sent by the email publisher. Btw, modifying the email is identical to controlling the look of the web dashboard so this really covers both topics. The first thing to note is that the format of the email is specified in ccnet.exe.config (or ccservice.exe.config) as follows:

<!-- Specifies the stylesheets that are used to transform the build results when using the EmailPublisher -->
    <file name="xsl\header.xsl"/>
    <file name="xsl\compile.xsl"/>
    <file name="xsl\unittests.xsl"/>
    <file name="xsl\fit.xsl"/>
    <file name="xsl\modifications.xsl"/>
    <file name="xsl\fxcop-summary.xsl"/>

The above collection of XSL files (included, by default, with CCNET) are used to construct the email body in the order they’re listed. To change the layout or add/remove content you can either edit the above .xsl files or add your own to augment the output as you see fit. The down side is you’ll need at least some understanding of XSL to make those changes.

In the case of my EDI work with CCNET I want to publish error details from custom CCNET tasks using the email publisher. By modifying the email content I can include details such as what caused the build to fail. When these custom tasks execute they contribute XML to the build log which looks similar to the following:

<editask warning_count="0" error_count="2">
    <error name="c:\edi\partners\inbound\P100451612.850.TXT" message="Invalid buyer or buyer not configured to allow EDI DUNS: 00xxxxxx9" />
    <error name="c:\edi\partners\inbound\SYSCO850.txt" message="Invalid buyer or buyer not configured to allow EDI DUNS: 8xxxxxxx7" />

To have this content included in the email I modified msbuild2ccnet.xsl which is a stylesheet from Christian Rodemeyer to parse MSBuild output (available here), and tweaked it to handle the above XML. I then added <file name=”xsl\edi.xsl”/> to the above <xslfiles> section. When the build fails this content is included in the email that’s published. Btw, making the same change to dashboard.config and copying the .xsl file to the webdashboard\xsl folder will update the CCNET web dashboard.

Intellisense for TestComplete's Script Extensions description.xml file

I’ve been working on Script Extensions for TestComplete and thought it would be nice to have Intellisense support while editing the description.xml file required by the IDE. Here is what I did:

  1. Opened the TestComplete online help and searched for description.xml
  2. Copied the xml and saved it to a .xml file

     TestComplete online help for description.xml

  3. From the command line I ran xsd.exe on the file as follows:

    %ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\xsd.exe TCSchema.xml

  4. In VS.NET open a description.xml file
  5. Select XML|Schemas… and Add the schema file saved in the step above:

    Adding a schema to edit an xml file in VS.NET 2008

Now, I have Intellisense support for creating description.xml files.

Intellisense support for custom xml file

Adding XFBML support to the Facebook Starter Kit

I’ve been playing around with XFBML support for Facebook and thinking about how to incorporate support for it into the Starter Kit. I haven’t decided yet if it should be added directly to the existing master page or add another master page or some other approach. If you feel strongly either way please let me know.

If you would like to add support for XFBML simply replace existing site.master with the following:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="FacebookApp.Site" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xmlns:fb="">
<head runat="server">
    <title>Untitled Page</title>
    <!-- Load Javascript for Facebook Connect -->
    <script src="" type="text/javascript"></script>
  <form id="form1" runat="server">
      <asp:contentplaceholder id="MainContentPlaceHolder" runat="server"></asp:contentplaceholder>
  <script type="text/javascript">FB_RequireFeatures(["XFBML"], function(){ FB.Facebook.init('<%=ConfigurationSettings.AppSettings["APIKey"] %>', "xd_receiver.htm"); });</script>

Add an HTML file called xd_receiver.htm to the root of your project with this content:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<title>Cross-Domain Receiver Page</title>
<script src="" type="text/javascript"></script>

Once you’ve made these changes you can start using XFBML tags. Here’s an example of the <fb:user-status /> added to the Default.aspx page:

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
  <h1>ASP.NET Starter Kit Application</h1>
  <fb:user-status uid="<%=Master.API.uid%>" /><br />

Importing photos from Picasa to Facebook always fails

Over the past few months I’ve tried numerous times to import pictures into Facebook from Picasa using the import option that’s part of Facebook. Each time I try I almost always get “Importing from external sites failed. Please try again later”. I think out of ~50 times I’ve tried it’s managed to work only twice but it seems more or less broken with no additional information as to what’s wrong nor any way to actually debug the problem. Here’s what I’m seeing: image

The above screenshot is from the Import option on the Profile tab. I’ve posted here about it but does anyone know who/how to contact Facebook to report this problem?

Missing Install Script Extensions menu item in TestComplete

Recently, I upgraded my copy of TestComplete from v6.4 to v6.5 which includes a cool new feature called Script Extensions. The online help for this feature mentions a new File|Install Script Extensions… menu item which, after upgrading was not present on the File menu.

Fortunately, there is a simple workaround which is to manually place the item onto the menu as follows:

TestComplete Customize dialog

  1. Right click on the toolbar and select Customize…
  2. On the Customize dialog click the Commands tab
  3. Select the Script Extensions Category
  4. Select the “Install Script Extensions…” item
  5. Drag/drop it onto the File menu

At present, I’m still experimenting with Script Extensions but they look very powerful and are a welcome addition to TestComplete.

Facebook Starter Kit updated (again) now to v2.0 release code

I wasn’t sure how long it was going to take to move from RC3 to the released v2.0 of the Facebook Developer’s Toolkit (FDT) but I wouldn’t have guessed it would only be hours after I posted my latest update. Anyway, here is an updated update of the v2.0 Facebook Starter Kit.

For detailed instructions on how to get started developing a Facebook Applications take a look at my wiki page which is now updated for v2.0 of FDT.

Enjoy and feedback welcome…

Facebook Developer Toolkit Starter Kit updated to v2.0 RC3

UPDATED: Download now points to the v2.0 release code version and here is my wiki page about using the Starter Kit.

Now that the Facebook Developer Toolkit has reached v2.0 RC3 I’ve updated my Starter Kit with the download, for VS.NET 2008, is available here. The new Toolkit has changed dramatically since v1.7 and now utilizes LINQ to XSD and Facebook.xsd to wrap the API. While a complete departure from the previous release I think the new release more natural and maps directly to the FB API as well as the documentation. Kudos to the Clarity team.