question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Building MSI: Invalid Product Version

See original GitHub issue

I’m trying out Clowd.Squirrel and I’m hitting an issue with Wix when trying to create an MSI package. It does not like my rather large version numbers that represent build dates.

The exact same issue was previously reported to Squirrel.Windows as Squirrel/Squirrel.Windows#916 and solved in PR Squirrel/Squirrel.Windows#1023

Here’s what the error output looks like:

[INFO] Program: Compiling machine-wide msi deployment tool in 64-bit mode

[ERRO] System.AggregateException: One or more errors occurred. (Failed to compile WiX template, command invoked was: 'candle.exe -nologo -ext WixNetFxExtension -out C:\code\projects\myapp\artifacts\Publish\MyAppSetup.wixobj C:\code\projects\myapp\artifacts\Publish\MyAppSetup.wxs'

Output was:
MyAppSetup.wxs
C:\code\projects\myapp\artifacts\Publish\MyAppSetup.wxs(3) : error CNDL0242 : Invalid product version '1.8238.33358.0'. Product version must have a major version less than 256, a minor version less than 256, and a build version less than 65536.)
 ---> System.Exception: Failed to compile WiX template, command invoked was: 'candle.exe -nologo -ext WixNetFxExtension -out C:\code\projects\myapp\artifacts\Publish\MyAppSetup.wixobj C:\code\projects\myapp\artifacts\Publish\MyAppSetup.wxs'

Output was:
MyAppSetup.wxs
C:\code\projects\myapp\artifacts\Publish\MyAppSetup.wxs(3) : error CNDL0242 : Invalid product version '1.8238.33358.0'. Product version must have a major version less than 256, a minor version less than 256, and a build version less than 65536.
   at Squirrel.HelperExe.CompileWixTemplateToMsi(String wxsTarget, String outputFile) in ./Internal/HelperExe.cs:line 101
   at SquirrelCli.Program.createMsiPackage(String setupExe, IPackage package, Boolean packageAs64Bit) in ./Program.cs:line 439
   --- End of inner exception stack trace ---
   at SquirrelCli.Program.Releasify(ReleasifyOptions options)
   at SquirrelCli.CommandAction`1.Execute(IEnumerable`1 args) in ./ValidatedOptionSet.cs:line 168
   at SquirrelCli.Program.Main(String[] args) in ./Program.cs:line 87

I understand that you might not want to change this now that you are working on a complete rewrite but I thought I’d report it anyway.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
caesaycommented, Jul 23, 2022

I think if you drop a template.wxs file in the current working directory Squirrel should find it instead of the included one but I’ve not tested this.

0reactions
DavidZidarcommented, Jul 23, 2022

I won’t be changing my perfectly good version numbers just because of MSI. 😄 That said I agree with your reasoning.

Is there a way to provide a path to an alternate wsx-file that I’m missing? Editing the file under .nuget/packages is a no go. I suppose I could just call candle myself though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix LGHT0242 Invalid Product Version error in Wix
ProductVersion must be in the format major.minor.build . '4' does not match this format that's why you got this error. You may inspect...
Read more >
Override to enable larger product versions · Issue #916
Invalid Product Version - Override to enable larger product versions #916 ... Building MSI: Invalid Product Version clowd/Clowd.Squirrel#100.
Read more >
No error checking for valid version number when building ...
1 to (actual) version 1.0.5. If a product version is invalid then we should not build the msi in any case.
Read more >
MsiExec.exe and InstMsi.exe error messages (for ...
Error code Value Description ERROR_SUCCESS 0 The action completed successfully. ERROR_INVALID_DATA 13 The data is invalid. ERROR_INVALID_PARAMETER 87 One of the parameters was invalid.
Read more >
4 digits version number - InstallShield
Using a product version that exceeds the 255.255.65535 format will cause an ICE03 validation error indicating the product version is invalid.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found