Hi Tim,

I'm not sure if this answers your question, but when I use "Add existing item" 
to add a WXS file to my WiX setup project in VS2010 I click on the little down 
arrow on the Add button of the Add Existing Item file dialog and select "Add As 
Link". This adds the file by reference instead of copying it to the project 
folder.

Daniel Madill

-----Original Message-----
From: TimM [mailto:timmay...@smarttech.com] 
Sent: February-26-13 5:33 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Referencing fragment .wxs files from an environment 
variable

Thanks Steven,

But that is not exactly what I was getting at. We have a WiX include file
that is included.

What I was referring to was to include a *.wxs file, that resides in a
shared location (environment variable), that I need complied into the main
WiX project.

When we add a new .wxs file to the project (.wixproj) file, no mater where
that file resides it will simply copy it to the local build wix project
folder and then access if from there.

What we wanted was for the file just to be referenced from the folder it is
in. So if we have the following in our .wixproj file it will simply compile
all the files listed here into the project.
    <ItemGroup>
        <Compile Include="CAFragment.wxs" />
        <Compile Include="ComponentFragment.wxs" />
        <Compile Include="DirFragment.wxs" />
        <Compile Include="ErrorTableFragment.wxs" />
        <Compile Include="FilesFragment.wxs" />
        <Compile Include="PackageRegistration.wxs" />
        <Compile Include="PropertiesFragment.wxs" />
        <Compile Include="RegComponentFragment.wxs" />
        <Compile Include="ShortcutFragment.wxs" />
        <Compile Include="Product.wxs" />
        <Compile Include="UpgradeTableFragment.wxs" />
    </ItemGroup>

Now if I try to add a new .wxs file, say SharedFragment.wxs, from a
environment folder then the project will fail to load:
    <ItemGroup>
        <Compile Include="CAFragment.wxs" />
        <Compile Include="ComponentFragment.wxs" />
        <Compile Include="DirFragment.wxs" />
        <Compile Include="ErrorTableFragment.wxs" />
        <Compile Include="FilesFragment.wxs" />
        <Compile Include="PackageRegistration.wxs" />
        <Compile Include="PropertiesFragment.wxs" />
        <Compile Include="RegComponentFragment.wxs" />
        <Compile Include="ShortcutFragment.wxs" />
        <Compile Include="Product.wxs" />
        <Compile Include="UpgradeTableFragment.wxs" />
        <Compile Include="$(env.Shared)\SharedFragment.wxs" />
    </ItemGroup>

So is there anyway to do this or is this actually a issue with MS VStudio
2010 and therefore nothing that can be done other than simply include that
file into our build script to copy the file from the environment variable
and place into the project folder for it to be included in the build?

Thanks,

Tim.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Referencing-fragment-wxs-files-from-an-environment-variable-tp7583964p7583975.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to