tags:

views:

24

answers:

1

So I'm trying to install a web application and I stumbled upon this question: http://stackoverflow.com/questions/624918/using-wix-to-create-an-iis-virtual-directory. When I try to adapt this for my own app, I get an error:

W:\projectlocation\IssInstallationComponents.wxs(6,0): error LGHT0204: ICE18: KeyPath for Component: 'SiteInstallationComponent' is Directory: 'WEBDIRECTORY'. The Directory/Component pair must be listed in the CreateFolders table.

I'm stuck trying to figure this out. Here's what I have in the affected file:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"&gt;
  <Fragment>
    <DirectoryRef Id="WEBDIRECTORY">
      <Component Id="SiteInstallationComponent" Guid="MY GUID">
          <iis:WebVirtualDir Id="ProductVirtualDirectory" Alias="[PRODUCTVERSION]" Directory="WEBDIRECTORY" WebSite="DefaultWebSite"/>
      </Component>
    </DirectoryRef>

    <iis:WebSite Id='DefaultWebSite' Description='Default Web Site' Directory='WEBDIRECTORY'>
      <iis:WebAddress Id="AllUnassigned" Port="80" />
    </iis:WebSite>
  </Fragment>
</Wix>

A couple of notes on my example. First, I know that the GUID is wrong, I removed it from the sample above so that it doesn't get indexed by google and reused by someone looking to figure out something similar. In my code, I have a correct GUID. I also changed the product name to "Product" to avoid any kind of IP issues.

Any ideas on what I need to do to get this code working?

+1  A: 

sigh

Okay, I went digging through the interwebs and found the following thread: http://www.mail-archive.com/[email protected]/msg03483.html

Basically I need to change my component so that it looks like this:

  <Component Id="SiteInstallationComponent" Guid="MY GUID">
      <CreateFolder />
      <iis:WebVirtualDir Id="ProductVirtualDirectory" Alias="[PRODUCTVERSION]" Directory="WEBDIRECTORY" WebSite="DefaultWebSite"/>
  </Component>

I love Wix, but sometimes it drives me crazy.

Jason Thompson