Hi Blair,Thanks for the reply.My DirectoryRefId for each WebApp is different, 
and they are then located in different directories in the final install (this 
part is working ok, all the other files for the WebApps are installing 
correctly)
After install I am getting four Web.config files installed in different 
directories, but they are all the same (whilst in the source they are all 
different).I understand this is related to the Source being set identically (by 
Heat).  But I'm not sure how to get Heat to output a different Source format.  
Other than using the PreprocessorVariable, but this only seems to allow Wix 
Variables to be introduced, and then I'm struggling to find a way to get all 
the additional wix variables defined in the Candle command line (from within 
msbuild).
If I change the Directory for Heat then it starts to Harvest too many files, 
and inserts extra Directory elements in the wxs that I don't want (and it seems 
wrong to have to post-process the Heat output).
How would people normally do this?Would it be more common to do this deployment 
from individual msi files, and then running an overall msi which just 
'bootloads' these other installers?

Regards,Bevan Weiss

> Date: Fri, 13 Sep 2013 19:03:58 -0700
> From: Blair Murri <os...@live.com>
> Subject: Re: [WiX-users] Web.config file issues when using Heat with
>       multiple Web Application Projects
> 
> Is your RefTargetDir different on each of your ProjectReference elements or 
> are they all the same?
> 
> > From: Bevan Weiss
> > Subject: [WiX-users] Web.config file issues when using Heat with multiple   
> > Web Application Projects
> > 
> > Hi all,
> > 
> > I'm currently trying to put together an installer which will deploy 4 Web
> > Applications to a set of servers.
> > 
> > This means there are 4 separate Web Application directories with 4 separate
> > (and different) versions of the Web.config file.
> > 
> > I'm using Heat to generate the .wxs files for the Web Applications, however
> > it only appears to be giving each instance of the Web.config <File> the
> > Source="SourceDir\Web.config", which I believe is resulting in only the
> > first Web.config being used for each of the Web Applications (which is
> > causing the other three to not work).
> > 
> > I'm also using Visual Studio 2012, and Votive (I believe..).  So I've got
> > the following at the end of my .wixproj file
> > 
> >   <Import Project="$(WixTargetsPath)" />
> > 
> >   <Target Name="BeforeBuild">
> > 
> >     <MSBuild Projects="%(ProjectReference.FullPath)" Targets="Package"
> > Properties="Configuration=$(Configuration);Platform=AnyCPU"
> > Condition="'%(ProjectReference.WebProject)'=='True'" />
> > 
> >     <ItemGroup>
> >       <LinkerBindInputPaths
> > Include="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Confi
> > guration)\Package\PackageTmp\" />
> >     </ItemGroup>
> > 
> >     <PropertyGroup>
> >       <DefineConstants Condition="'%(ProjectReference.WebProject)'=='True'">
> > $(DefineConstants);%(ProjectReference.Name).PackageDir=%(ProjectReference.Ro
> > otDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\
> >       </DefineConstants> 
> >     </PropertyGroup>
> > 
> >     <HeatDirectory OutputFile="%(ProjectReference.Filename).wxs"
> > Directory="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Con
> > figuration)\Package\PackageTmp"
> >                    DirectoryRefId="%(ProjectReference.RefTargetDir)"
> >                    ComponentGroupName="%(ProjectReference.Filename)_Project"
> >                    AutogenerateGuids="true"
> >                    SuppressCom="true"
> >                    SuppressFragments="true"
> >                    SuppressRegistry="true"
> >                    SuppressRootDirectory="true"
> > PreprocessorVariable="wix.%(ProjectReference.Name).PackageDir=%(ProjectRefer
> > ence.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\Packa
> > geTmp"
> >                    ToolPath="$(WixToolPath)"
> >                    Condition="'%(ProjectReference.WebProject)'=='True'" />
> > 
> >   </Target>
> > 
> > </Project>
> > 
> > The PreprocessorVariable stuff on the HeatDirectory action is my attempt at
> > fixing the issue.  However I don't seem to be able to get the
> > DefineConstants working properly (it's only ever assigning one path, not the
> > remaining three).  The initial version (which I found via google searches),
> > didn't have any PreprocessorVariable, and had the exact issue I mention
> > above.  This new version appears better (has unique Source paths), but
> > doesn't compile because of the lacking Defines.
> > 
> > I can attach the actual .wxs file outputs if desired, however I didn't think
> > they would be so beneficial to send just yet.  I would have expected others
> > would have come upon this issue before..
> > 
> > Unless it's something that a recent version of WiX has brought up.  I'm
> > running v3.7.
> > 
> > Any help would be greatly appreciated.
> > 
> > Regards,
> > 
> > Bevan Weiss
                                          
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to