Domanda

I'm using a very simple declaration for including a file that contains variable definition for wix installer. This fails only in 64bit MSI installer.

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

I get the following error:

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'.
È stato utile?

Soluzione

Found it out. There was this "-->" comment closing tag present in the included xml. That was reason for the error. It would be better if there is some kind of functionality to check typo. Misleading error message.

Altri suggerimenti

The error message is quite self-explanatory - the include directive should be a child of one of those elements: Bundle Product Module Patch Fragment PatchCreation. It seems that Fragment fits best for your scenario.

So, try to modify it the following way:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
  <?include $(var.ProjectDir)\Includes\Variables.wxi ?>
</Fragment>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top