I tried the suppression option. It didn't work. Oh well. It's not a showstopper problem.
Thanks anyway. Grant C. Anderson DMC, Inc. Main office: 312-255-8757 -----Original Message----- From: Rob Mensching [mailto:r...@robmensching.com] Sent: Monday, February 17, 2014 5:39 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] Bind-time variables not resolving when building project. Off the top of my head, the VersionType in wix.xsd probably doesn't support that syntax. Today. You could try suppressing schema validation on the compiler and seeing if that avoids the problem. -----Original Message----- From: Grant Anderson [mailto:grant.ander...@dmcinfo.com] Sent: Monday, February 17, 2014 1:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Bind-time variables not resolving when building project. I’m using version 3.8 of the WiX toolset integrated with Visual Studio 2012. My WiX project is part of the same solution that contains my main project assembly (and a dll built as a separate assembly). Everything worked fine with the installer when I had the version numbers defined within my main wxs file. However, I felt it would be better to control all versioning using the AssemblyVersion property in the AssemblyInfo.cs file of my main project. Upon building, the main project I can see that the versions of my output files reflect the value of that property. However, I can’t get those versions when I go to build my WiX project. I have included a reference to my main project in the WiX project. I have the Product/@Version attribute set to "!(bind.fileVersion.$(var.My Main Project.TargetFileName))". However, upon building I get the following error: “The Product/@Version attribute’s value, ‘!(bind.fileVersion.$(var.My Main Project.TargetFileName))’, is not a valid version. Legal version values should look like ‘x.x.x.x’ where x is an integer from 0 to 65534.” Everything I’ve found online (including archives from this same mailing list) indicate that what I’m doing should work. I’ve also tried various other versions of the same idea (i.e. packageversion and productversion properties) and get the same problem. The odd thing is, this is same error I get if I just set the value to “foo”. (Though, the invalid value is now ‘foo’ rather than the property.) It’s as if it’s not viewing the binding as a binding and instead as a string literal. Furthermore, I have implemented functionality to conditionally replace a configuration file associated with this executable. The customer will drive the configuration file schema changes. I want to keep the existing configuration file around unless a new/updated schema is introduced, in which case we will release a new version and replace the old config with the new one, backing up the old one so that the customer can recover any settings they have modified in the original. We always use the “Major Upgrade” process for our installation. The difference is, we store the existing Major Version value in a registry key. For later releases that don’t update the configuration schema, we only modify the Minor Version and the product guid. For changes to schema, we update the Major, Minor, and product guid, and upon installation there’s always a check for a new Major version. If there is, the schema gets updated. This works like a charm when the Version is stored as part of the wxs file. However, I want to be able to get the Major version through the product version binding. The reason I mention this is because trying to get the Major version via a property is causing some really odd behavior. If I set my Product/@Version to a valid string such as “1.0”, the “!(bind.property.ProductVersion.Major)” seems to work fine in the places I use it. However, if I set Product/@Version to “!(bind.property.ProductVersion)” I now get errors of unresolved bind-time variables for the Major Version property. (And don’t get the error for Product/@Version.) And if the Major Version property is pulled out completely, I get the standard “‘!(bind.property.ProductVersion)’ is an invalid version string” error. Any ideas? Am I doing something wrong here? Or is there some odd bug. Grant C. Anderson DMC, Inc. Main office: 312-255-8757 ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users