2014-04-07 134 views
1

我正在使用一個非常簡單的聲明來包含一個包含wix安裝程序的變量定義的文件。這僅在64位MSI安裝程序中失敗。Wix包含元素不起作用

?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
<?include $(var.ProjectDir)\Includes\Variables.wxi ?> 

我得到以下錯誤:

Schema validation failed with the following error at line 1, column 245: The element 'Wix' in namespace 'http://schemas.microsoft.com/wix/2006/wi' cannot contain text. List of possible elements expected: 'Bundle Product Module Patch Fragment PatchCreation'. 

回答

3

發現了這件事。包含的xml中有這個「 - >」註釋標籤。這是錯誤的原因。如果有某種功能來檢查錯字會更好。誤導性的錯誤信息。

+0

我有一個愚蠢的「某處。 – TomEberhard

+0

一個額外的>對我來說,聖潔的廢話我不能相信這個錯誤信息是如此糟糕。 – Hrethric

0

的錯誤消息是相當不言自明 - include指令應該是那些元素之一的孩子:Bundle Product Module Patch Fragment PatchCreation。看來Fragment最適合您的場景。

所以,儘量修改方式如下:

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
<Fragment> 
    <?include $(var.ProjectDir)\Includes\Variables.wxi ?> 
</Fragment>