Also, Bob pointed out what I hadn't thought through.  You don't need the 
SetDirectory if you just define a Directory with the same @Id as the Property.  
The Windows Installer will resolve the Property and overwrite the Directory 
path.  It's a very "interesting" interaction between Directories and Properties 
in the Windows Installer.  Bob's approach is far better than what I suggested.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Sullivan
Sent: Monday, July 14, 2008 12:18
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How do you use VS2005_PROJECTTEMPLATES_DIR, etc... 
from WixVSExtension

Thanks Rob, that makes sense, I guess :)

Not sure if I should file something, but it might be nice to add that to the 
examples on the "WixVSExtension" documentation page.

For anyone else facing this issue here's how I resolved it...

    <!-- Create dummy directories to assign the VS2005 directory properties to. 
-->
    <DirectoryRef Id="INSTALLDIR">
      <Directory Id="DIR_VS2005_SCHEMAS" />
      <Directory Id="DIR_VS2005_PROJECTTEMPLATES" />
      <Directory Id="DIR_VS2005_ITEMTEMPLATES" />
    </DirectoryRef>

    <PropertyRef Id='VS2005_SCHEMAS_DIR'/>
    <SetDirectory Id="DIR_VS2005_SCHEMAS" Value="[VS2005_SCHEMAS_DIR]" 
Sequence="both" />
    <PropertyRef Id='VS2005_PROJECTTEMPLATES_DIR'/>
    <SetDirectory Id="DIR_VS2005_PROJECTTEMPLATES" 
Value="[VS2005_PROJECTTEMPLATES_DIR]" Sequence="both" />
    <PropertyRef Id='VS2005_ITEMTEMPLATES_DIR'/>
    <SetDirectory Id="DIR_VS2005_ITEMTEMPLATES" 
Value="[VS2005_ITEMTEMPLATES_DIR]" Sequence="both" />


-Ian

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Mensching
Sent: Saturday, July 12, 2008 9:16 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How do you use VS2005_PROJECTTEMPLATES_DIR, etc... 
from WixVSExtension

VS2005_SCHEMAS_DIR is a Property not a Directory.  You can't create a 
DirectoryRef to a Property.  To set a Directory to the value of a Property use 
the SetDirectory element.  For example:

        <SetDirectory Id="Dir_ParentOfMyProjectTemplatesVS2005" 
Value="[VS2005_SCHEMAS_DIR]" Sequence="both" />



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Sullivan
Sent: Friday, July 11, 2008 20:35
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How do you use VS2005_PROJECTTEMPLATES_DIR, etc... from 
WixVSExtension

I'm trying to use
    <PropertyRef Id='VS2005_SCHEMAS_DIR'/>
    <PropertyRef Id='VS2005_PROJECTTEMPLATES_DIR'/>
    <PropertyRef Id='VS2005_ITEMTEMPLATES_DIR'/>
    <PropertyRef Id='VS90_SCHEMAS_DIR'/>
    <PropertyRef Id='VS90_PROJECTTEMPLATES_DIR'/>
    <PropertyRef Id='VS90_ITEMTEMPLATES_DIR'/>

For things like
    <DirectoryRef Id="VS2005_PROJECTTEMPLATES_DIR">
      <Directory Id="Dir_MyProjectTemplatesVS2005" Name="MyTemplates">
        <Component Id="Comp_ProjectTemplatesVS2005" DiskId="1" 
Guid="$(var.Comp_ProjectTemplatesVS2005_Guid)">

But I'm getting the following link errors
Unresolved reference to symbol 'Directory:VS2005_PROJECTTEMPLATES_DIR' in 
section 'Fragment:'.                Installer\Integration.wxs              302  
       1              Installer
Unresolved reference to symbol 'Directory:VS2005_ITEMTEMPLATES_DIR' in section 
'Fragment:'.                Installer\Integration.wxs              312         
1              Installer
Unresolved reference to symbol 'Directory:VS90_PROJECTTEMPLATES_DIR' in section 
'Fragment:'.                Installer\Integration.wxs              323         
1              Installer
Unresolved reference to symbol 'Directory:VS90_ITEMTEMPLATES_DIR' in section 
'Fragment:'. Installer\Integration.wxs                334         1             
 Installer
Unresolved reference to symbol 'Directory:VS2005_SCHEMAS_DIR' in section 
'Fragment:'.          Installer\Integration.wxs                348         1    
          Installer
Unresolved reference to symbol 'Directory:VS90_SCHEMAS_DIR' in section 
'Fragment:'.               Installer\Integration.wxs                362         
1              Installer

I'm pretty sure I've got the correct WixVSExtension referenced, since these 
references
    <PropertyRef Id='VS2005DEVENV'/>
    <CustomActionRef Id="VS2005Setup"/>

seem to work (I don't get any reference errors about VS2005Setup or 
VS2005DEVENV)
      <Custom Action="VS2005Setup" Before="InstallFinalize"> VS2005DEVENV 
</Custom>

          <Extension Id="myext" ContentType="text/xml">
            <Verb Id="Open" Command="&amp;Open in Visual Studio 2005" 
TargetProperty="VS2005DEVENV" Argument="&quot;%1&quot;" />
          </Extension>

I'm using version 3.0.4123.0

Any help would be appreciated.

Thanks,
-Ian

Ian Sullivan
Software Development Engineer
Microsoft Inc., Windows Live Agents: SDK

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to