That's because Imports are evaluated at PreBuild. In VisualStudio, that only occurs on Solution load.
-- John Merryweather Cooper Senior Software Engineer | Integration Development Group | Enterprise Notification Service Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Ext: 431050 |jocoo...@jackhenry.com -----Original Message----- From: Phill Hogland [mailto:phogl...@rimage.com] Sent: Monday, June 1, 2015 11:43 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Doing an Include file for HeatDirectory and HeatFile tasks? The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin. The wixproj file is a MSBuild targets file. MSBuild .targets files do not need to have a .targets extension. You can put the HarvestDirectory/HeatFile targets in a .targets file (named as you wish) and then in the .wixproj file add a 'Import' statement with the path of the file. My code that is specific to particular project I put in a harvest.targets file in that project folder. For code that is common to many projects I put in a Common.targets folder (at a common path) (Actually I have one common targets file for bundles, another for msi setup projects, and one for signing, etc. <Import Project="..\Common\Targets\Common.targets" /> <Import Project="Harvest.targets" /> I include the harvest.targets file in my project with Build Action set to none. However I have noticed that any change to a .targets file does not take effect until the solution is closed and reloaded (generaly I just close and reload VS). -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Doing-an-Include-file-for-HeatDirectory-and-HeatFile-tasks-tp7600501p7600503.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users