|
From: Foster, R. - P. <Ric...@qu...> - 2006-11-07 15:34:27
|
Oliver, =20 I'm still a bit unsure about where you are getting the error (I.e. are you building the installation from the command line? Within Visual Studio 2005? Somewhere else?). Unfortunately, I also don't use Votive so the vast majority of this reply is guesswork! =20 I suspect that the MSBuild variable "Configuration" is being set, but that when you are seeing the error it is because this variable is never being passed to WiX. =20 Depending on your build process, to get the information to WiX you may need to pass it via the command line (e.g. -dWixVariableName=3D$(MSBuildVariableName) ), in which case you would access it using $(var.WixVariableName), or set an environment variable (e.g. set SomeEnvironmentVariable=3D$(MSBuildVariableName) ) and access i= t in WiX using $(env.SomeEnvironmentVariable). =20 It is likely that Votive is intended to do this for you (like I said, I don't use Votive, so I don't know for certain), in which case you may have uncovered a bug. =20 I also notice that you mention that you found a batch file setting "var.Build" to "$(ConfigurationName)". If true, this may not be desirable, since within WiX you may then need to reference that variable as $(var.var.Build). Within it's scripts, WiX requires the addition of the var prefix to indicate that you want to use a WiX variable (not an environment variable or system setting), but you do not specify that prefix when defining the variable. =20 Hopefully this offers at least some additional information which may help you determine where you need to look. =20 Regards, Richard ________________________________ From: wix...@li... [mailto:wix...@li...] On Behalf Of Friedrich, Oliver Sent: Tuesday, November 07, 2006 03:37 To: wix...@li... Subject: Re: [WiX-users] preprocessor variable $(var.Build) Well, seems like $(Configuration) is set by Votive, but inside the WiX-code I can not access it? =20 With : <Property Id=3D'MyProp' Value=3D$(Configuration)/> I get the Errormessage:=20 =20 Error 1 Ill-formed preprocessor variable 'Configuration'. Variables must have a prefix (like 'var.', 'env.', or 'sys.') and a name at least 1 character long. Z:\Projects\Aldi - Intranet\EwsSetup\Features\Ews_Mmc.wxs 5 1 EwsSetup =20 Those three throw "Undefined preprocessor variable": <Property Id=3D'MyProp' Value=3D$(var.Configuration)/> <Property Id=3D'MyProp' Value=3D$(sys.Configuration)/> <Property Id=3D'MyProp' Value=3D$(env.Configuration)/> =20 On the properties of the .wixproj in the linker tab, there I can set userdefined variables, there I added "Configuration=3D$Configuration" but even then, I can not access this variable like above inside my WiX-code. =20 Oliver =20 ________________________________ =09From: Justin Rockwood [mailto:roc...@cs...]=20 =09Sent: Tuesday, November 07, 2006 6:58 AM =09To: 'Bob Arnson'; Friedrich, Oliver =09Cc: wix...@li...; roc...@cs... =09Subject: RE: [WiX-users] preprocessor variable $(var.Build) =09 =09 =09The variable $(Configuration) is set by most MSBuild scripts automatically (C#, VB, VJ#, WiX, etc.). Also, $(ConfigurationName) is usually set as well, but I'd probably go with $(Configuration). You won't be able to know what the configuration is outside of MSBuild, but assuming that you're using C# or VB.NET, then you should already have this defined for you by the time you call your Pre-build event. =09=20 =09If you're using Votive (and therefore wix.targets), then you also get $(Configuration) defined for you. I'm not sure if $(ConfigurationName) is defined. If not, it's a bug. =09=20 =09Justin =09=20 =09From: Bob Arnson [mailto:wi...@bo...]=20 =09Sent: Monday, November 06, 2006 7:28 PM =09To: Friedrich, Oliver =09Cc: wix...@li...; roc...@cs... =09Subject: Re: [WiX-users] preprocessor variable $(var.Build) =09=20 =09Friedrich, Oliver wrote:=20 =09Alright, just found out, where this variable was set. It is set on the commandline while calling the batch-file to start the compilation of the setup. =09=20 =09The batch-file is called as "Pre-build event command line" in VS2005. The variable "var.Build" is set to the value of "$(ConfigurationName)". The last is homemade of VisualStudio. How can I access this "ConfigurationName" under WiX-V3? =09 =09WiX doesn't support that as it's a Visual Studio-specific concept. Votive might, though. JRock? =09 =09 =09 =09--=20 =09=20 =09sig://boB =09=20 =09http://bobs.org =0A* C O N F I D E N T I A L I T Y N O T I C E *=0A----------------------= -------------------------------------=0AThe content of this e-mail is int= ended solely for the use of the individual or entity to whom it is addres= sed. If you have received this communication in error, be aware that forw= arding it, copying it, or in any way disclosing its content to any other = person, is strictly prohibited. Peek Traffic Corporation is neither liabl= e for the contents, nor for the proper, complete and timely transmission = of (the information contained in) this communication. If you have receive= d this communication in error, please notify the author by replying to th= is e-mail immediately and delete the material from any computer.=0A=0A |