E�ޭ��z�w�~D�nE�M4�/8��A�;�_<ӝ5�к�,��{)����yhq�A���]��4Ӏ�㾵���|�Nt�_B��3����*�r���ƥ�5�P��@@�v��...@�
��Ja��7�Mv�^�N����:Ӿ���9�]}�5�*'�����'���_6�QA�0t델�A�N��0���^�מz�>HX�
�\��\��$~��r�����]��4Ӏ�㾵���|�Nt�_B� s����*�r���ƥ�ͻP}:�n9�uӽ�
��~4ׯ5�]B<�/W(��!y��眢`w�~D�nE�M4�/8��A�;�_<ӝ5�н�|��{)����yhq�u�n�CN�ێA�t�n� 1xߍ5��y]����0��+��^rG�y�(�_6�QA�0t델�A�N��0���^�בuߞHX�
�\��\��$~��r�����]��4Ӏ�㾵���|�Nt�_B�>�����*�r���ƥ�ͻP}:�n9�uӽ�
��~4ׯ5�]x2<�/W(��!y��眢`w�~D�nE�M4�/8��A�;�_<ӝ5�Ѐ���{)����yhq�A���]��4Ӏ�㾵���|�nt�...@�����*�r���ƥ�ͻp}
:�n9�uӽ� ��~4ׯ5�μ��<�/W(��!y��眢`w�~D�nE�M4�/8��A�;�_<ӝ5�Ё
��{)����yhq�u�n�CN�ێA�t�n� 1xߍ5��z����0��+��^rG�y�(�Z蘫������ʺ�Iz{��a��)����w(�:zw�jWb�ˬ�*'~�֊wh��'�֥���0�h�[���ǫ�X���(��~��zw�grin
:) I was having the same problem with density. Glad we can find understanding.
I had to reverse the order of the DefineConstants with Condition otherwise,
when DefineConstants is empty, we end up with duplicates of
DefineDefaultConstants. Here is my new set of properties
<PropertyGroup>
<!-- other properties -->
<BGBuildVersion Condition=" '$(BGBuildVersion)' == ''
">5.3.3333</BGBuildVersion>
<DefaultDefineConstants>BGProductVersion=$(BGBuildVersion)</DefaultDefineConstants>
<DefineConstants Condition=" '$(DefineConstants)' != ''
">$(DefineConstants);$(DefaultDefineConstants)</DefineConstants>
<DefineConstants Condition=" '$(DefineConstants)' == ''
">$(DefaultDefineConstants)</DefineConstants>
</PropertyGroup>
This works fine in the IDE.
It still does not work for me via tfsbuild.proj. All I see on the command line
to candle is "-dBG_STANDARD". If I remove DefineConstants from tfsbuild.proj
then I see "-dDebug -dBGProductVersion=5.3.3333".
Also we have gotten a bit sidetracked here. I have already figured out how to
pass BGProductName by using local wxi files. I kept on with the BGProductName
because it appears that I have two problems, 1) combining command line
parameters from tfsbuild.proj and wixproj, 2) passing a version number
generated in tfsbuild.proj into a wixproj.
The real problem is how to pass the build version into the wixproj. I want to
use a Version generated in tfsbuild.proj as the ProductVersion for my
installation. But, I am at a loss how to do this if tfsbuild will not let me
pass "name=value". Should we work on one problem then the other or go at them
both at one time?
Kurt Jensen
Senior Software Engineer
Ophir-Spiricon
The True Measure of Laser Performance™
-----Original Message-----
From: Castro, Edwin G. (Hillsboro) [mailto:[email protected]]
Sent: Thursday, May 20, 2010 11:48 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] msbuild command line parameters
Sweet! That write-up was extremely useful! Steps 1-3 gave me the context I
needed. Thank you so very much! I was probably being dense.
The value passed in from tfsbuild.proj was getting overridden by the definition
in the *.wixproj which is why you got the results you got in 3). In MSBuild the
last definition of a property always wins. What you want to do is concatenate
the current value of DefineConstants (as specified in tfsbuild.proj) with the
default values you specify in *.wixproj.
Ok, here's what you want to do:
In tfsbuild.proj specify your DefineConstants like you were already doing:
<SolutionToBuild
Include="$(BuildProjectFolderPath)/../../LBA/Source/AllProject/AllProject.sln">
<Targets></Targets>
<Properties>
DefineConstants=BG_STANDARD;
OutDir=$(TeamBuildOutDir)BG_STANDARD\
</Properties>
</SolutionToBuild>
<SolutionToBuild
Include="$(BuildProjectFolderPath)/../../LBA/Source/AllProject/AllProject.sln">
<Targets></Targets>
<Properties>
DefineConstants=BG_PROFESSIONAL;
OutDir=$(TeamBuildOutDir)BG_PROFESSIONAL\
</Properties>
</SolutionToBuild>
In your *.wixproj define DefaultDefineConstants (in the first PropertyGroup).
It should include your values for WiXProductName and WiXProductVersion. Also
define DefineConstants (in the first PropertyGroup) twice using a Condition
attribute to check whether DefineConstants already had a value.
<PropertyGroup>
<!-- other properties -->
<DefaultDefineConstants>WiXProductName=BeamGage
Standard;WiXProductVersion=$(WiXVersion)</DefaultDefineConstants>
<DefineConstants Condition=" '$(DefineConstants)' == ''
">$(DefaultDefineConstants)</DefineConstants>
<DefineConstants Condition=" '$(DefineConstants)' != ''
">$(DefineConstants);$(DefaultDefineConstants)</DefineConstants>
</PropertyGroup>
When $(DefineConstants) is not set then we set the new value of DefineConstants
to the value of DefaultDefineConstants.
When $(DefineConstants) is set (value provided by tfsbuild.proj) then we set
the new value of DefineConstants to include both the old value of
DefineConstants and the value of DefaultDefineConstants.
At this point we have the correct value of DefineConstants defined for
Release|x86 so we don't need to define it in the PropertyGroup for Release|x86.
We still need to add Debug for Debug|x86 so we'll define DefineConstants in the
PropertyGroup for Debug|x86 to include Debug and the current value of
DefineConstants.
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
This all happens statically when the project files are loaded into memory.
The syntax that uses <CreateProperty/> is a task that creates properties
dynamically at runtime and must be specified inside the body of a Target. In
this case, we have all the information we need to create the correct values at
load time so we don't need to wait until runtime to define DefineConstants.
Hopefully that now explains what was going on. Or at least, get you unblocked
so that you can build again. :)
Edwin G. Castro
Software Developer - Staff
Electronic Banking Services
Fiserv
Office: 503-746-0643
Fax: 503-617-0291
Please consider the environment before printing this e-mail
> -----Original Message-----
> From: Kurt Jensen [mailto:[email protected]]
> Sent: Thursday, May 20, 2010 10:06 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] msbuild command line parameters
>
> Not odd. Well, maybe I don't understand the oddness.
>
> 1)
> - I created a new WindowsFormsApplication1.
> - I added a new WixProject1.
> - On the WixProject1, right-click Properties. On the Build tab, entered
> "Name1=Value1;Name2;Name3=Name3"
> - From the command line, "msbuild /fl WindowsFormsApplication1.sln"
> - msbuild.log correctly shows "-dName1=Value" "-dName2" "-dName3=Value3" on
> the command line to candle
>
> 2)
> - Copied a default TFSBuild.proj. Changed the SolutionToBuild to
> WindowsFormsApplication1.sln
> - From the command line, "msbuild /fl TFSBuild.proj"
> - msbuild.log correctly shows "-dName1=Value" "-dName2" "-dName3=Value3" on
> the command line to candle
>
> 3)
> - Under SolutionToBuild, Properties, added "DefineConstants=BG_STANDARD"
> - From the command line, "msbuild /fl TFSBuild.proj"
> - msbuild.log shows "-dBG_STANDARD" but does NOT include "-dName1=Value1", etc
> - AH HA!!!
>
> 4)
> - Removed "DefineConstants=BG_STANDARD"
> - Added
> <Target Name="BeforeBuild">
> <CreateProperty Value="BGProductName=BeamGage
> Professional;$(DefineConstants)">
> <Output TaskParameter="Value" PropertyName="DefineConstants" />
> </CreateProperty>
> </Target>
> - From the command line, "msbuild /fl TFSBuild.proj"
> - msbuild.log shows "-dName1=Value", etc but does not show "-
> dBGProductName=BeamGage Professional"
>
> 5)
> - Changed CreateProperty line to <CreateProperty
> Value="BGProductName;$(DefineConstants)">
> - From the command line, "msbuild /fl TFSBuild.proj"
> - msbuild.log shows "-dName1=Value", etc but does not show "-dBGProductName"
>
>
> And so, the question returns... Any idea how to get parameters passed to
> candle when building under TFSBuild.proj?
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.clearswift.com
**********************************************************************
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users