Showing posts with label WiX. Show all posts
Showing posts with label WiX. Show all posts

Wednesday, January 15, 2014

WiX & MSBuild - Adding WixExtension To Fix LGHT0094

I recently ran into a problem with compiling a WiX project using MSBuild. Here's the error message:

error LGHT0094: Unresolved reference to symbol 'WixUI:WixUI_Minimal' in section 'Product:*'. [C:\Dir\Test.wixproj]


To fix this specific error, the MSBuild file needs the following element (as a child of the Project element):

<ItemGroup>
    <WixExtension Include='WixUIExtension' />
</ItemGroup>

Adding this element causes the WiX 'candle' build step to include the extension that you need. You need to change the Include value if you require a different extension.

If you receive this error when building a WiX project using Visual Studio or the 'light' command-line tool, follow the Using Built-in WixUI Dialog Sets tutorial included in the official WiX documentation.

(tested with WiX v3.8)

WiX - CNDL0107 "invalid child element" in Product

When building a WiX file (tested with v3.8), you might see an error message similar to this one:


error CNDL0107: Schema validation failed with the following error at line 1, column 396: The element
'Product' in namespace 'http://schemas.microsoft.com/wix/2006/wi' has invalid child element 'UIRef' in namespace 'http://schemas.microsoft.com/wix/2006/wi'. List of possible elements expected: 'Package'. [C:\Dir\Test.wixproj]


This error might seem cryptic, but indicates that the schema expects Package to appear as the first element of the Product element.

Thankfully, there is a very easy fix for this error. The UIRef element (or whatever child element comes first in the WiX file) needs to be moved below the Package element.