Frage

Using Visual Studio 2012, I have created a template file which generates a WIX project with a single product.wxs file with generic folder targets and components, etc.

I would like to expand this template to use include files, however my template fails to add the additional files.

The MSDN Documentation has the following example code:

<TemplateContent>
    <ProjectItem TargetFileName="$fileinputname$.vb" SubType="Form">
        Form1.vb
    </ProjectItem>
    <ProjectItem TargetFileName="$fileinputname$.Designer.vb">
        Form1.Designer.vb
    </ProjectItem>
    <ProjectItem TargetFileName="$fileinputname$.resx">
        Form1.resx
    </ProjectItem>
</TemplateContent>

I have the following code in my template, but only product.wxs is added to my project:

<TemplateContent>
<Project TargetFileName="Wix FIAS Template1.wixproj" File="Wix FIAS Template1.wixproj" ReplaceParameters="true">
  <ProjectItem ReplaceParameters="true">Product.wxs</ProjectItem>
  <ProjectItem ReplaceParameters="true">ControlPanel.wxi</ProjectItem>
  <ProjectItem ReplaceParameters="true">Gui.wxi</ProjectItem>
  <ProjectItem ReplaceParameters="true">RequiredComponents.wxi</ProjectItem>
</Project>
</TemplateContent>

I would expect a new project to have the following files:

  • Product.wxs
  • ControlPanel.wxi
  • Gui.wxi
  • RequiredComponents.wxi

However, the only item I have is product.wxs

I have tried the tags with and without the TargetFileName property set to the same name as the original file, but this did not make any difference.

Edit: Adding these files into a blank Wix project and exporting them to a template worked, however there did not appear to be any difference between my template files.

War es hilfreich?

Lösung

Further searching revealed this document on MSDN, regarding updating an existing template.

Specifically, once the files have been updated:

  1. Start (as administrator) an instance of the Developer Command Prompt (on the start menu, under Visual Studio 2010 / Visual Studio Tools/Developer Command Prompt).
  2. Run the following command: devenv /installvstemplates.

This reloaded the template and added all desired project files.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top