我想創建一個網站安裝程序,並使用wix。我使用本教程 http://www.dalun.com/wix/01.05.2007.htmwix 3.0意外子元素'網站'
我不得不改變我的腳本使用
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
,因爲它是在抱怨
<Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>
所以我的劇本是這樣的
<?xml version='1.0' encoding='Windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Id='6197b262-b2d8-464c-9d0b-6cade171b46f' Name='WixWebSiteExample' Language='1033' Version='0.0.0.0' Manufacturer='Corporation'>
<Package Id='439d5627-cc07-4a41-9f50-b201ae3f8202' Description='Creating a web site with WiX' Comments='Creating a web site with WiX' InstallerVersion='200' Compressed='yes' />
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='ApplicationFolder' Name='AppDir'>
<Component Id='WebSiteComponent' Guid='6b27e78e-bcbc-462a-bd7a-50cf991c7d39' DiskId='1'>
<File Id='WixExampleFile' Name='simple.txt' src='bin\simple.txt' />
<WebSite Id='DefaultWebSite' Description='My First Web Site Created With WiX' Directory='ApplicationFolder'>
<WebAddress Id="AllUnassigned" Port="80" />
</WebSite>
</Component>
<Component Id="WebVirtualDirComponent" Guid="8d7c59c0-b84d-40d9-b3a5-0c73b6487ae4">
<WebVirtualDir Id="VDir" Alias="Test" Directory="ApplicationFolder" WebSite="DefaultWebSite">
<WebApplication Id="TestWebApplication" Name="Test" />
</WebVirtualDir>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id='TestProductFeature' Title='Wix File Product Feature' Level='1'>
<ComponentRef Id='WebSiteComponent' />
<ComponentRef Id='WebVirtualDirComponent' />
</Feature>
</Product>
</Wix>
我得到這個錯誤
C:\ Downloads \ wix3.0.5419.0-二進制文件\ firstWebsite \ firstwebsite.wxs(13):錯誤CN DL0005:Component元素包含一個意外的子元素'WebSite'。 C:\ Downloads \ wix3.0.5419.0-binaries \ firstWebsite \ firstwebsite.wxs(18):error CN DL0005:組件元素包含意外子元素'WebVirtualD ir'。
是wix 3.0不支持的網站標記?