I’ve been trying to adapt the following WIX XML to create an MSI to install a web site.
I’m pretty new to this but WIX has quite a step learning curve, so I’ve gotten as far as the code snippets below indicate.
It won’t compile at the moment as I get this error:
Unresolved reference to symbol ‘WixComponentGroup:C_WebAppContent’ in section ‘Product:*’
All I want to do is the following.
Install the web site to D:\websites\website
Set up the virtual directory
Set up the App Pool
and that’s it… Where am I going wrong with the below?
Product.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<!--NEVER EVER EVER EVER CHANGE THE UPGRADE CODE!!!!!!!!!!!!!!! -->
<?define UpgradeCode="176df50b-d3aa-4f25-ae7b-2098a6b881b2" ?>
<Product Id="*"
Name="MdxWebsite"
Language="1033" Version="1.0.0.0"
Manufacturer="RBS"
UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" />
<!-- This includes our properties that implement the "Remember Property" pattern -->
<?include Configuration.wxi ?>
<Media Id="1" Cabinet="media.cab" EmbedCab="yes" />
<MajorUpgrade AllowDowngrades="no"
AllowSameVersionUpgrades="yes"
Schedule="afterInstallInitialize"
DowngradeErrorMessage="A later version of this product is already installed. Setup will now exit."/>
<!-- Creating default directory structure (INSTALLLOCATION be override by user, but it starts in Program Files) -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id="INSTALLLOCATION" Name="TheDefaultInstallFolderName">
</Directory>
</Directory>
</Directory>
<Feature Id="F_Content"
Title="Content"
Level="1"
Description="The website content"
ConfigurableDirectory="INSTALLLOCATION">
<ComponentRef Id="C_RegistryEntries"/>
<!-- The C_WebAppContent can either be generated by the WiX tool "heat", or a hand-crafted set of content, this component is not included in this example -->
<ComponentGroupRef Id="C_WebAppContent" />
</Feature>
<Feature Id="F_IISWebsite" Title="IIS Website" Description="The IIS website and application pool" Level="1">
<ComponentRef Id="C_IISWebsite" />
</Feature>
<InstallExecuteSequence>
</InstallExecuteSequence>
<!-- Specify UI -->
<UIRef Id="UIFlow" />
</Product>
</Wix>
So I was able to fix this by using the ID that was created by HEAT for the output in Visual Studio help in the in ..\obj\Debug folder