David Pallmann's blog

Distilled ramblings on Distributed systems

Indigo samples in the WinFX CTP

Now that the March 2005 WinFX Community Technology Preview is going out, we're starting to ship samples with Indigo. This first CTP contains only 25 Indigo samples, but there will be increasing numbers over time.

Finding and setting up the samples is a bit trickier than we'd wanted it to be, so I offer some tips and tricks below. This is something we'll improve on with each successive CTP release, so any pain or inconvenience should be temporary.

First off, where are the Indigo samples? They are part of the WinFX SDK and you locate and install samples through the documentation. The first step to getting Indigo samples, then, is to install the WinFX SDK, go to the documentation, and locate the section for Indigo samples.

You can install a sample in one of two ways:

(1) When viewing the documentation for an individual sample, you can install that sample using download buttons on the page.

(2) You can find the full set of samples for the WinFX SDK in a zip file named AllSamples.zip in the WinFX SDK folder under Program Files.

The important thing to know about the Indigo samples in the March CTP is that they are designed to work in a particular folder hierarchy that looks like this:

    \Quickstarts
        \Binding
        \Client
        \Contract
        \GettingStarted
        \Management
        \Service
        \vroot

The reason for this organization is so you only have to create a single virtual directory, once, for all of the Indigo samples. You name this vdir "Quickstarts", and you point it to the \Quickstarts\vroot folder. Note that the \vroot folder won't actually exist until you build one of the samples.

The samples project files copy service binaries and config up to \Quickstarts\vroot, so if you don't respect the folder hierarchy you may experience errors during building and the samples won't run. There are post-build events that copy files up to \Quickstarts\vroot and make assumptions about the relative hierarchy.

Given this scheme, I find it's generally easier to install the samples from the AllSamples.zip file rather than individually from the documentation pages, because it preserves the folder hierarchy. If you install a sample individually, you must create folders in the right structure yourself. The doc page for each sample tells you what that structure is, but it's easy to miss.

Even if you do go the zip file route, there's another gotcha you need to be aware of. Because AllSamples.zip contains all samples for the SDK, you end up with some very long paths if you extract all of it to your hard drive. In fact, the paths are so long that the copy steps in the Indigo samples can fail on you. A good solution is to find the Indigo \Quickstarts section of the zip file and copy that portion to your root, so you end up with a c:\Quickstarts and everything underneath. A bit of work, but if you do this you will have maintained the proper hierarchy and the Indigo samples should build and run for you happily.

Once you're past all of that, start with the GettingStarted sample. If you build this sample, you should end up with these files in your virtual directory:

    \Quickstarts
        \vroot  (<-- vdir Quickstarts points to here)
            \bin
                service.dll
            service.svc
            Web.config

After you get the sample running, working with any other Indigo sample is just a matter of building the sample. They all copy to this same area.

Don't let a few rough edges deter you from installing and running the Indigo samples. I've always found samples to be one of the key ways to learn a new product.

I'd love to hear any feedback you have on the Indigo samples. In particular I'd like to know about what kind of samples you think we should be including and how we can make the existing ones better.

Published Monday, March 21, 2005 8:32 AM by davpall
Filed under:

Comments

No Comments
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker