1
votes

When I run the below command from the command line for the WIx installer after migrated from version 2.0 to 4.0:

E:\Source\TestProgram\builder>ant -v -f Build.xml -Dlabel =.001 install

I am getting the below error:

[exec] light.exe : error LGHT0199 : The WixLocalization element has an incorrect namespace of 'WixLocalization'. Please make the WixLocalization element look like the following: . [ant] Exiting E:\Source\TestProgram1.0.1English_installer.xml.

I want to know the root cause of the error?

I checked "TestProgram1.0.1English_Installer.wxs" file for "WixLocalization" but didn't find any thing.

Pleas help me to resolve the issue.

2
Do not vandalize your posts. By posting on this site, you've irrevocably granted the Stack Exchange network the right to distribute that content under the CC BY-SA 4.0 license for as long as it sees fit to do so. For alternatives to deletion, see: I've thought better of my question; can I delete it?Sabito 錆兎

2 Answers

0
votes

UPDATE: wixlibs - another feature I have not used.


Bob knows everything about this, but let me chip in with a question in case the problem is something else. Just to verify, can you check all *.wxl files (localization files) in the project in question? Just to make sure the schema specified is according to what version 4 expects?:

WiX 4:

English.wxl:

<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl">
   <String Id="YOURLOCID">Your localized string</String>
</WixLocalization>

WiX 3:

English.wxl:

<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
  <String Id="YOURLOCID">Your localized string</String>
</WixLocalization>

Suggestions:

  • So maybe create a localization file (*.wxl) if it is missing for WiX 4. Either in Visual Studio or slipstream it into your batch build script.
  • If there is a *.wxl there, maybe update the schema to <WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl">.
  • For command lines, please see this: How To: Build a Localized Version of Your Installer.
0
votes

You're using an Ant task that doesn't support WiX v4. Stick with WiX v3 (the latest supported release).